@launchdarkly/observability 1.1.7 → 1.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/index.js +3280 -4223
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +54 -54
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
package/dist/index.umd.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
(function(
|
|
2
|
-
`,l=r.split(/\r\n|[\n\r]/g),p=l[i];if(p.length>120){const f=Math.floor(c/80),
|
|
3
|
-
`)}function
|
|
1
|
+
(function(et,we){typeof exports=="object"&&typeof module<"u"?we(exports):typeof define=="function"&&define.amd?define(["exports"],we):(et=typeof globalThis<"u"?globalThis:et||self,we(et.Observability={}))})(this,function(et){"use strict";var we=Object.defineProperty,zu=(e,t,n)=>t in e?we(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,yt=(e,t,n)=>zu(e,typeof t!="symbol"?t+"":t,n),Ku=(e,t,n)=>new Promise((r,i)=>{var o=c=>{try{u(n.next(c))}catch(s){i(s)}},a=c=>{try{u(n.throw(c))}catch(s){i(s)}},u=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,a);u((n=n.apply(e,t)).next())});const Qi=Object.create(null),Ot=(e,t,...n)=>{const r=`[@launchdarkly plugins]: (${e}): `;console[t].apply(console,[r,...n]),Xu(r,...n)},kt=(e,t,n,...r)=>{Qi[`${e}-${t}`]||(Qi[`${e}-${t}`]=!0,Ot(e,n,...r))},Xu=(e,...t)=>Ku(void 0,null,function*(){try{const{LDObserve:n}=yield Promise.resolve().then(()=>yp);n.recordLog(`${e}${t}`,"warn")}catch{}});class Wu{constructor(t,n){yt(this,"debug"),yt(this,"name"),this.debug=t,this.name=n}log(...t){if(this.debug){let n=`[${Date.now()}]`;this.name&&(n+=` - ${this.name}`),console.log.apply(console,[n,...t])}}warn(...t){let n=`[${Date.now()}]`;this.name&&(n+=` - ${this.name}`),console.warn.apply(console,[n,...t])}}class Zi{constructor(){yt(this,"_sdk"),yt(this,"_isLoaded",!1),yt(this,"_callBuffer",[]),yt(this,"_capacity",1e5),yt(this,"_droppedEvents",0),yt(this,"_exceededCapacity",!1),yt(this,"_logger",new Wu)}_bufferCall(t,n){if(this._isLoaded)try{return this._sdk[t](...n)}catch(r){Ot(`Error executing buffered call to ${t}:`,"error",r)}else{this._enqueue({method:t,args:n});return}}_enqueue(t){this._callBuffer.length<this._capacity?(this._callBuffer.push(t),this._exceededCapacity=!1):(this._exceededCapacity||(this._exceededCapacity=!0,Ot("Exceeded event queue capacity. Increase capacity to avoid dropping events.","warn")),this._droppedEvents+=1)}load(t){this._sdk=t,this._isLoaded=!0;for(const{method:n,args:r}of this._callBuffer)try{this._sdk[n](...r)}catch(i){Ot(`Error executing buffered call to ${n}:`,"error",i)}this._callBuffer=[]}}var Yu=Object.defineProperty,Ju=Object.defineProperties,Qu=Object.getOwnPropertyDescriptors,Ze=Object.getOwnPropertySymbols,to=Object.prototype.hasOwnProperty,eo=Object.prototype.propertyIsEnumerable,or=(e,t,n)=>t in e?Yu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,P=(e,t)=>{for(var n in t||(t={}))to.call(t,n)&&or(e,n,t[n]);if(Ze)for(var n of Ze(t))eo.call(t,n)&&or(e,n,t[n]);return e},tn=(e,t)=>Ju(e,Qu(t)),Se=(e,t)=>{var n={};for(var r in e)to.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ze)for(var r of Ze(e))t.indexOf(r)<0&&eo.call(e,r)&&(n[r]=e[r]);return n},Oe=(e,t,n)=>or(e,typeof t!="symbol"?t+"":t,n),ne=(e,t,n)=>new Promise((r,i)=>{var o=c=>{try{u(n.next(c))}catch(s){i(s)}},a=c=>{try{u(n.throw(c))}catch(s){i(s)}},u=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,a);u((n=n.apply(e,t)).next())});function en(e,t){throw new Error(t)}function Zu(e){return typeof e=="object"&&e!==null}function tc(e,t){throw new Error("Unexpected invariant triggered.")}const ec=/\r\n|[\n\r]/g;function ar(e,t){let n=0,r=1;for(const i of e.body.matchAll(ec)){if(typeof i.index=="number"||tc(),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function nc(e){return no(e.source,ar(e.source,e.start))}function no(e,t){const n=e.locationOffset.column-1,r="".padStart(n)+e.body,i=t.line-1,o=e.locationOffset.line-1,a=t.line+o,u=t.line===1?n:0,c=t.column+u,s=`${e.name}:${a}:${c}
|
|
2
|
+
`,l=r.split(/\r\n|[\n\r]/g),p=l[i];if(p.length>120){const f=Math.floor(c/80),v=c%80,m=[];for(let y=0;y<p.length;y+=80)m.push(p.slice(y,y+80));return s+ro([[`${a} |`,m[0]],...m.slice(1,f+1).map(y=>["|",y]),["|","^".padStart(v)],["|",m[f+1]]])}return s+ro([[`${a-1} |`,l[i-1]],[`${a} |`,p],["|","^".padStart(c)],[`${a+1} |`,l[i+1]]])}function ro(e){const t=e.filter(([r,i])=>i!==void 0),n=Math.max(...t.map(([r])=>r.length));return t.map(([r,i])=>r.padStart(n)+(i?" "+i:"")).join(`
|
|
3
|
+
`)}function rc(e){const t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}let ic=class qu extends Error{constructor(t,...n){var r,i,o;const{nodes:a,source:u,positions:c,path:s,originalError:l,extensions:p}=rc(n);super(t),this.name="GraphQLError",this.path=s??void 0,this.originalError=l??void 0,this.nodes=io(Array.isArray(a)?a:a?[a]:void 0);const f=io((r=this.nodes)===null||r===void 0?void 0:r.map(m=>m.loc).filter(m=>m!=null));this.source=u??(f==null||(i=f[0])===null||i===void 0?void 0:i.source),this.positions=c??f?.map(m=>m.start),this.locations=c&&u?c.map(m=>ar(u,m)):f?.map(m=>ar(m.source,m.start));const v=Zu(l?.extensions)?l?.extensions:void 0;this.extensions=(o=p??v)!==null&&o!==void 0?o:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),l!=null&&l.stack?Object.defineProperty(this,"stack",{value:l.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,qu):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(const n of this.nodes)n.loc&&(t+=`
|
|
4
4
|
|
|
5
|
-
`+
|
|
5
|
+
`+nc(n.loc));else if(this.source&&this.locations)for(const n of this.locations)t+=`
|
|
6
6
|
|
|
7
|
-
`+
|
|
7
|
+
`+no(this.source,n);return t}toJSON(){const t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}};function io(e){return e===void 0||e.length===0?void 0:e}function G(e,t,n){return new ic(`Syntax Error: ${n}`,{source:e,positions:[t]})}let oc=class{constructor(t,n,r){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}},oo=class{constructor(t,n,r,i,o,a){this.kind=t,this.start=n,this.end=r,this.line=i,this.column=o,this.value=a,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}};const ao={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},ac=new Set(Object.keys(ao));function so(e){const t=e?.kind;return typeof t=="string"&&ac.has(t)}var re;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(re||(re={}));var sr;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(sr||(sr={}));var S;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(S||(S={}));function ur(e){return e===9||e===32}function Ae(e){return e>=48&&e<=57}function uo(e){return e>=97&&e<=122||e>=65&&e<=90}function co(e){return uo(e)||e===95}function sc(e){return uo(e)||Ae(e)||e===95}function uc(e){var t;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let a=0;a<e.length;++a){var o;const u=e[a],c=cc(u);c!==u.length&&(r=(o=r)!==null&&o!==void 0?o:a,i=a,a!==0&&c<n&&(n=c))}return e.map((a,u)=>u===0?a:a.slice(n)).slice((t=r)!==null&&t!==void 0?t:0,i+1)}function cc(e){let t=0;for(;t<e.length&&ur(e.charCodeAt(t));)++t;return t}function lc(e,t){const n=e.replace(/"""/g,'\\"""'),r=n.split(/\r\n|[\n\r]/g),i=r.length===1,o=r.length>1&&r.slice(1).every(v=>v.length===0||ur(v.charCodeAt(0))),a=n.endsWith('\\"""'),u=e.endsWith('"')&&!a,c=e.endsWith("\\"),s=u||c,l=!i||e.length>70||s||o||a;let p="";const f=i&&ur(e.charCodeAt(0));return(l&&!f||o)&&(p+=`
|
|
8
8
|
`),p+=n,(l||s)&&(p+=`
|
|
9
|
-
`),'"""'+p+'"""'}var d;(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(d||(d={}));let
|
|
10
|
-
`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw G(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function
|
|
11
|
-
`));return e.line+=c.length-1,e.lineStart=i,l}if(s===92&&n.charCodeAt(o+1)===34&&n.charCodeAt(o+2)===34&&n.charCodeAt(o+3)===34){u+=n.slice(a,o),a=o+1,o+=4;continue}if(s===10||s===13){u+=n.slice(a,o),c.push(u),s===13&&n.charCodeAt(o+1)===10?o+=2:++o,u="",a=o,i=o;continue}if(
|
|
9
|
+
`),'"""'+p+'"""'}var d;(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(d||(d={}));let pc=class{constructor(t){const n=new oo(d.SOF,0,0,0,0);this.source=t,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==d.EOF)do if(t.next)t=t.next;else{const n=hc(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===d.COMMENT);return t}};function fc(e){return e===d.BANG||e===d.DOLLAR||e===d.AMP||e===d.PAREN_L||e===d.PAREN_R||e===d.SPREAD||e===d.COLON||e===d.EQUALS||e===d.AT||e===d.BRACKET_L||e===d.BRACKET_R||e===d.BRACE_L||e===d.PIPE||e===d.BRACE_R}function ie(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function nn(e,t){return lo(e.charCodeAt(t))&&po(e.charCodeAt(t+1))}function lo(e){return e>=55296&&e<=56319}function po(e){return e>=56320&&e<=57343}function Dt(e,t){const n=e.source.body.codePointAt(t);if(n===void 0)return d.EOF;if(n>=32&&n<=126){const r=String.fromCodePoint(n);return r==='"'?`'"'`:`"${r}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function F(e,t,n,r,i){const o=e.line,a=1+n-e.lineStart;return new oo(t,n,r,o,a,i)}function hc(e,t){const n=e.source.body,r=n.length;let i=t;for(;i<r;){const o=n.charCodeAt(i);switch(o){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:n.charCodeAt(i+1)===10?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return dc(e,i);case 33:return F(e,d.BANG,i,i+1);case 36:return F(e,d.DOLLAR,i,i+1);case 38:return F(e,d.AMP,i,i+1);case 40:return F(e,d.PAREN_L,i,i+1);case 41:return F(e,d.PAREN_R,i,i+1);case 46:if(n.charCodeAt(i+1)===46&&n.charCodeAt(i+2)===46)return F(e,d.SPREAD,i,i+3);break;case 58:return F(e,d.COLON,i,i+1);case 61:return F(e,d.EQUALS,i,i+1);case 64:return F(e,d.AT,i,i+1);case 91:return F(e,d.BRACKET_L,i,i+1);case 93:return F(e,d.BRACKET_R,i,i+1);case 123:return F(e,d.BRACE_L,i,i+1);case 124:return F(e,d.PIPE,i,i+1);case 125:return F(e,d.BRACE_R,i,i+1);case 34:return n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34?bc(e,i):mc(e,i)}if(Ae(o)||o===45)return vc(e,i,o);if(co(o))return Ec(e,i);throw G(e.source,i,o===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:ie(o)||nn(n,i)?`Unexpected character: ${Dt(e,i)}.`:`Invalid character: ${Dt(e,i)}.`)}return F(e,d.EOF,r,r)}function dc(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){const o=n.charCodeAt(i);if(o===10||o===13)break;if(ie(o))++i;else if(nn(n,i))i+=2;else break}return F(e,d.COMMENT,t,i,n.slice(t+1,i))}function vc(e,t,n){const r=e.source.body;let i=t,o=n,a=!1;if(o===45&&(o=r.charCodeAt(++i)),o===48){if(o=r.charCodeAt(++i),Ae(o))throw G(e.source,i,`Invalid number, unexpected digit after 0: ${Dt(e,i)}.`)}else i=cr(e,i,o),o=r.charCodeAt(i);if(o===46&&(a=!0,o=r.charCodeAt(++i),i=cr(e,i,o),o=r.charCodeAt(i)),(o===69||o===101)&&(a=!0,o=r.charCodeAt(++i),(o===43||o===45)&&(o=r.charCodeAt(++i)),i=cr(e,i,o),o=r.charCodeAt(i)),o===46||co(o))throw G(e.source,i,`Invalid number, expected digit but got: ${Dt(e,i)}.`);return F(e,a?d.FLOAT:d.INT,t,i,r.slice(t,i))}function cr(e,t,n){if(!Ae(n))throw G(e.source,t,`Invalid number, expected digit but got: ${Dt(e,t)}.`);const r=e.source.body;let i=t+1;for(;Ae(r.charCodeAt(i));)++i;return i}function mc(e,t){const n=e.source.body,r=n.length;let i=t+1,o=i,a="";for(;i<r;){const u=n.charCodeAt(i);if(u===34)return a+=n.slice(o,i),F(e,d.STRING,t,i+1,a);if(u===92){a+=n.slice(o,i);const c=n.charCodeAt(i+1)===117?n.charCodeAt(i+2)===123?yc(e,i):gc(e,i):_c(e,i);a+=c.value,i+=c.size,o=i;continue}if(u===10||u===13)break;if(ie(u))++i;else if(nn(n,i))i+=2;else throw G(e.source,i,`Invalid character within String: ${Dt(e,i)}.`)}throw G(e.source,i,"Unterminated string.")}function yc(e,t){const n=e.source.body;let r=0,i=3;for(;i<12;){const o=n.charCodeAt(t+i++);if(o===125){if(i<5||!ie(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|xe(o),r<0)break}throw G(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+i)}".`)}function gc(e,t){const n=e.source.body,r=fo(n,t+2);if(ie(r))return{value:String.fromCodePoint(r),size:6};if(lo(r)&&n.charCodeAt(t+6)===92&&n.charCodeAt(t+7)===117){const i=fo(n,t+8);if(po(i))return{value:String.fromCodePoint(r,i),size:12}}throw G(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function fo(e,t){return xe(e.charCodeAt(t))<<12|xe(e.charCodeAt(t+1))<<8|xe(e.charCodeAt(t+2))<<4|xe(e.charCodeAt(t+3))}function xe(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function _c(e,t){const n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
|
|
10
|
+
`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw G(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function bc(e,t){const n=e.source.body,r=n.length;let i=e.lineStart,o=t+3,a=o,u="";const c=[];for(;o<r;){const s=n.charCodeAt(o);if(s===34&&n.charCodeAt(o+1)===34&&n.charCodeAt(o+2)===34){u+=n.slice(a,o),c.push(u);const l=F(e,d.BLOCK_STRING,t,o+3,uc(c).join(`
|
|
11
|
+
`));return e.line+=c.length-1,e.lineStart=i,l}if(s===92&&n.charCodeAt(o+1)===34&&n.charCodeAt(o+2)===34&&n.charCodeAt(o+3)===34){u+=n.slice(a,o),a=o+1,o+=4;continue}if(s===10||s===13){u+=n.slice(a,o),c.push(u),s===13&&n.charCodeAt(o+1)===10?o+=2:++o,u="",a=o,i=o;continue}if(ie(s))++o;else if(nn(n,o))o+=2;else throw G(e.source,o,`Invalid character within String: ${Dt(e,o)}.`)}throw G(e.source,o,"Unterminated string.")}function Ec(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){const o=n.charCodeAt(i);if(sc(o))++i;else break}return F(e,d.NAME,t,i,n.slice(t,i))}const Tc=10,ho=2;function lr(e){return rn(e,[])}function rn(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return wc(e,t);default:return String(e)}}function wc(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";const n=[...t,e];if(Sc(e)){const r=e.toJSON();if(r!==e)return typeof r=="string"?r:rn(r,n)}else if(Array.isArray(e))return Ac(e,n);return Oc(e,n)}function Sc(e){return typeof e.toJSON=="function"}function Oc(e,t){const n=Object.entries(e);return n.length===0?"{}":t.length>ho?"["+xc(e)+"]":"{ "+n.map(([r,i])=>r+": "+rn(i,t)).join(", ")+" }"}function Ac(e,t){if(e.length===0)return"[]";if(t.length>ho)return"[Array]";const n=Math.min(Tc,e.length),r=e.length-n,i=[];for(let o=0;o<n;++o)i.push(rn(e[o],t));return r===1?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function xc(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){const n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}const Cc=globalThis.process&&process.env.NODE_ENV==="production",Lc=Cc?function(e,t){return e instanceof t}:function(e,t){if(e instanceof t)return!0;if(typeof e=="object"&&e!==null){var n;const r=t.prototype[Symbol.toStringTag],i=Symbol.toStringTag in e?e[Symbol.toStringTag]:(n=e.constructor)===null||n===void 0?void 0:n.name;if(r===i){const o=lr(e);throw new Error(`Cannot use ${r} "${o}" from another module or realm.
|
|
12
12
|
|
|
13
13
|
Ensure that there is only one instance of "graphql" in the node_modules
|
|
14
14
|
directory. If different versions of "graphql" are the dependencies of other
|
|
@@ -19,41 +19,41 @@ https://yarnpkg.com/en/docs/selective-version-resolutions
|
|
|
19
19
|
Duplicate "graphql" modules cannot be used at the same time since different
|
|
20
20
|
versions may have different capabilities and behavior. The data from one
|
|
21
21
|
version used in the function from another could produce confusing and
|
|
22
|
-
spurious results.`)}}return!1};class Fo{constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||sn(!1,`Body must be a string. Received: ${hr(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||sn(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||sn(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function gl(e){return ml(e,Fo)}function Vo(e,t){const n=new _l(e,t),r=n.parseDocument();return Object.defineProperty(r,"tokenCount",{enumerable:!1,value:n.tokenCount}),r}let _l=class{constructor(t,n={}){const r=gl(t)?t:new Fo(t);this._lexer=new Zc(r),this._options=n,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){const t=this.expectToken(d.NAME);return this.node(t,{kind:O.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:O.DOCUMENT,definitions:this.many(d.SOF,this.parseDefinition,d.EOF)})}parseDefinition(){if(this.peek(d.BRACE_L))return this.parseOperationDefinition();const t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===d.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(t)throw G(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){const t=this._lexer.token;if(this.peek(d.BRACE_L))return this.node(t,{kind:O.OPERATION_DEFINITION,operation:nt.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const n=this.parseOperationType();let r;return this.peek(d.NAME)&&(r=this.parseName()),this.node(t,{kind:O.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const t=this.expectToken(d.NAME);switch(t.value){case"query":return nt.QUERY;case"mutation":return nt.MUTATION;case"subscription":return nt.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(d.PAREN_L,this.parseVariableDefinition,d.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:O.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(d.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(d.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const t=this._lexer.token;return this.expectToken(d.DOLLAR),this.node(t,{kind:O.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:O.SELECTION_SET,selections:this.many(d.BRACE_L,this.parseSelection,d.BRACE_R)})}parseSelection(){return this.peek(d.SPREAD)?this.parseFragment():this.parseField()}parseField(){const t=this._lexer.token,n=this.parseName();let r,i;return this.expectOptionalToken(d.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:O.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(d.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){const n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(d.PAREN_L,n,d.PAREN_R)}parseArgument(t=!1){const n=this._lexer.token,r=this.parseName();return this.expectToken(d.COLON),this.node(n,{kind:O.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const t=this._lexer.token;this.expectToken(d.SPREAD);const n=this.expectOptionalKeyword("on");return!n&&this.peek(d.NAME)?this.node(t,{kind:O.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:O.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:O.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:O.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){const n=this._lexer.token;switch(n.kind){case d.BRACKET_L:return this.parseList(t);case d.BRACE_L:return this.parseObject(t);case d.INT:return this.advanceLexer(),this.node(n,{kind:O.INT,value:n.value});case d.FLOAT:return this.advanceLexer(),this.node(n,{kind:O.FLOAT,value:n.value});case d.STRING:case d.BLOCK_STRING:return this.parseStringLiteral();case d.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:O.BOOLEAN,value:!0});case"false":return this.node(n,{kind:O.BOOLEAN,value:!1});case"null":return this.node(n,{kind:O.NULL});default:return this.node(n,{kind:O.ENUM,value:n.value})}case d.DOLLAR:if(t)if(this.expectToken(d.DOLLAR),this._lexer.token.kind===d.NAME){const r=this._lexer.token.value;throw G(this._lexer.source,n.start,`Unexpected variable "$${r}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:O.STRING,value:t.value,block:t.kind===d.BLOCK_STRING})}parseList(t){const n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:O.LIST,values:this.any(d.BRACKET_L,n,d.BRACKET_R)})}parseObject(t){const n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:O.OBJECT,fields:this.any(d.BRACE_L,n,d.BRACE_R)})}parseObjectField(t){const n=this._lexer.token,r=this.parseName();return this.expectToken(d.COLON),this.node(n,{kind:O.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){const n=[];for(;this.peek(d.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){const n=this._lexer.token;return this.expectToken(d.AT),this.node(n,{kind:O.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){const t=this._lexer.token;let n;if(this.expectOptionalToken(d.BRACKET_L)){const r=this.parseTypeReference();this.expectToken(d.BRACKET_R),n=this.node(t,{kind:O.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(d.BANG)?this.node(t,{kind:O.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:O.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(d.STRING)||this.peek(d.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");const r=this.parseConstDirectives(),i=this.many(d.BRACE_L,this.parseOperationTypeDefinition,d.BRACE_R);return this.node(t,{kind:O.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){const t=this._lexer.token,n=this.parseOperationType();this.expectToken(d.COLON);const r=this.parseNamedType();return this.node(t,{kind:O.OPERATION_TYPE_DEFINITION,operation:n,type:r})}parseScalarTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");const r=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:O.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:i})}parseObjectTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");const r=this.parseName(),i=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:O.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:o,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(d.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(d.BRACE_L,this.parseFieldDefinition,d.BRACE_R)}parseFieldDefinition(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(d.COLON);const o=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(t,{kind:O.FIELD_DEFINITION,description:n,name:r,arguments:i,type:o,directives:a})}parseArgumentDefs(){return this.optionalMany(d.PAREN_L,this.parseInputValueDef,d.PAREN_R)}parseInputValueDef(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(d.COLON);const i=this.parseTypeReference();let o;this.expectOptionalToken(d.EQUALS)&&(o=this.parseConstValueLiteral());const a=this.parseConstDirectives();return this.node(t,{kind:O.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:o,directives:a})}parseInterfaceTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");const r=this.parseName(),i=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:O.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:o,fields:a})}parseUnionTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");const r=this.parseName(),i=this.parseConstDirectives(),o=this.parseUnionMemberTypes();return this.node(t,{kind:O.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:o})}parseUnionMemberTypes(){return this.expectOptionalToken(d.EQUALS)?this.delimitedMany(d.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");const r=this.parseName(),i=this.parseConstDirectives(),o=this.parseEnumValuesDefinition();return this.node(t,{kind:O.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:o})}parseEnumValuesDefinition(){return this.optionalMany(d.BRACE_L,this.parseEnumValueDefinition,d.BRACE_R)}parseEnumValueDefinition(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:O.ENUM_VALUE_DEFINITION,description:n,name:r,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw G(this._lexer.source,this._lexer.token.start,`${ln(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");const r=this.parseName(),i=this.parseConstDirectives(),o=this.parseInputFieldsDefinition();return this.node(t,{kind:O.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:o})}parseInputFieldsDefinition(){return this.optionalMany(d.BRACE_L,this.parseInputValueDef,d.BRACE_R)}parseTypeSystemExtension(){const t=this._lexer.lookahead();if(t.kind===d.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)}parseSchemaExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const n=this.parseConstDirectives(),r=this.optionalMany(d.BRACE_L,this.parseOperationTypeDefinition,d.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:O.SCHEMA_EXTENSION,directives:n,operationTypes:r})}parseScalarTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const n=this.parseName(),r=this.parseConstDirectives();if(r.length===0)throw this.unexpected();return this.node(t,{kind:O.SCALAR_TYPE_EXTENSION,name:n,directives:r})}parseObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&o.length===0)throw this.unexpected();return this.node(t,{kind:O.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:o})}parseInterfaceTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&o.length===0)throw this.unexpected();return this.node(t,{kind:O.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:o})}parseUnionTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:O.UNION_TYPE_EXTENSION,name:n,directives:r,types:i})}parseEnumTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:O.ENUM_TYPE_EXTENSION,name:n,directives:r,values:i})}parseInputObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:O.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i})}parseDirectiveDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(d.AT);const r=this.parseName(),i=this.parseArgumentDefs(),o=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const a=this.parseDirectiveLocations();return this.node(t,{kind:O.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,repeatable:o,locations:a})}parseDirectiveLocations(){return this.delimitedMany(d.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(lr,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new Xc(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){const n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw G(this._lexer.source,n.start,`Expected ${Ho(t)}, found ${ln(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){const n=this._lexer.token;if(n.kind===d.NAME&&n.value===t)this.advanceLexer();else throw G(this._lexer.source,n.start,`Expected "${t}", found ${ln(n)}.`)}expectOptionalKeyword(t){const n=this._lexer.token;return n.kind===d.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){const n=t??this._lexer.token;return G(this._lexer.source,n.start,`Unexpected ${ln(n)}.`)}any(t,n,r){this.expectToken(t);const i=[];for(;!this.expectOptionalToken(r);)i.push(n.call(this));return i}optionalMany(t,n,r){if(this.expectOptionalToken(t)){const i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}return[]}many(t,n,r){this.expectToken(t);const i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}delimitedMany(t,n){this.expectOptionalToken(t);const r=[];do r.push(n.call(this));while(this.expectOptionalToken(t));return r}advanceLexer(){const{maxTokens:t}=this._options,n=this._lexer.advance();if(n.kind!==d.EOF&&(++this._tokenCounter,t!==void 0&&this._tokenCounter>t))throw G(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};function ln(e){const t=e.value;return Ho(e.kind)+(t!=null?` "${t}"`:"")}function Ho(e){return el(e)?`"${e}"`:e}function El(e){return`"${e.replace(Tl,bl)}"`}const Tl=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function bl(e){return Sl[e.charCodeAt(0)]}const Sl=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],Ol=Object.freeze({});function wl(e,t,n=Io){const r=new Map;for(const E of Object.values(O))r.set(E,Al(t,E));let i,o=Array.isArray(e),a=[e],u=-1,c=[],s=e,l,p;const f=[],m=[];do{u++;const E=u===a.length,S=E&&c.length!==0;if(E){if(l=m.length===0?void 0:f[f.length-1],s=p,p=m.pop(),S)if(o){s=s.slice();let j=0;for(const[$,ne]of c){const X=$-j;ne===null?(s.splice(X,1),j++):s[X]=ne}}else{s=I({},s);for(const[j,$]of c)s[j]=$}u=i.index,a=i.keys,c=i.edits,o=i.inArray,i=i.prev}else if(p){if(l=o?u:a[u],s=p[l],s==null)continue;f.push(l)}let P;if(!Array.isArray(s)){var v,y;ko(s)||sn(!1,`Invalid AST Node: ${hr(s)}.`);const j=E?(v=r.get(s.kind))===null||v===void 0?void 0:v.leave:(y=r.get(s.kind))===null||y===void 0?void 0:y.enter;if(P=j?.call(t,s,l,p,f,m),P===Ol)break;if(P===!1){if(!E){f.pop();continue}}else if(P!==void 0&&(c.push([l,P]),!E))if(ko(P))s=P;else{f.pop();continue}}if(P===void 0&&S&&c.push([l,s]),E)f.pop();else{var g;i={inArray:o,index:u,keys:a,edits:c,prev:i},o=Array.isArray(s),a=o?s:(g=n[s.kind])!==null&&g!==void 0?g:[],u=-1,c=[],p&&m.push(p),p=s}}while(i!==void 0);return c.length!==0?c[c.length-1][1]:e}function Al(e,t){const n=e[t];return typeof n=="object"?n:typeof n=="function"?{enter:n,leave:void 0}:{enter:e.enter,leave:e.leave}}function Ll(e){return wl(e,Cl)}const Rl=80,Cl={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>b(e.definitions,`
|
|
22
|
+
spurious results.`)}}return!1};let vo=class{constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||en(!1,`Body must be a string. Received: ${lr(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||en(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||en(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}};function Nc(e){return Lc(e,vo)}function mo(e,t){const n=new Rc(e,t),r=n.parseDocument();return Object.defineProperty(r,"tokenCount",{enumerable:!1,value:n.tokenCount}),r}let Rc=class{constructor(t,n={}){const r=Nc(t)?t:new vo(t);this._lexer=new pc(r),this._options=n,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){const t=this.expectToken(d.NAME);return this.node(t,{kind:S.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:S.DOCUMENT,definitions:this.many(d.SOF,this.parseDefinition,d.EOF)})}parseDefinition(){if(this.peek(d.BRACE_L))return this.parseOperationDefinition();const t=this.peekDescription(),n=t?this._lexer.lookahead():this._lexer.token;if(n.kind===d.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(t)throw G(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){const t=this._lexer.token;if(this.peek(d.BRACE_L))return this.node(t,{kind:S.OPERATION_DEFINITION,operation:re.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const n=this.parseOperationType();let r;return this.peek(d.NAME)&&(r=this.parseName()),this.node(t,{kind:S.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const t=this.expectToken(d.NAME);switch(t.value){case"query":return re.QUERY;case"mutation":return re.MUTATION;case"subscription":return re.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(d.PAREN_L,this.parseVariableDefinition,d.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:S.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(d.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(d.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const t=this._lexer.token;return this.expectToken(d.DOLLAR),this.node(t,{kind:S.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:S.SELECTION_SET,selections:this.many(d.BRACE_L,this.parseSelection,d.BRACE_R)})}parseSelection(){return this.peek(d.SPREAD)?this.parseFragment():this.parseField()}parseField(){const t=this._lexer.token,n=this.parseName();let r,i;return this.expectOptionalToken(d.COLON)?(r=n,i=this.parseName()):i=n,this.node(t,{kind:S.FIELD,alias:r,name:i,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(d.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){const n=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(d.PAREN_L,n,d.PAREN_R)}parseArgument(t=!1){const n=this._lexer.token,r=this.parseName();return this.expectToken(d.COLON),this.node(n,{kind:S.ARGUMENT,name:r,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const t=this._lexer.token;this.expectToken(d.SPREAD);const n=this.expectOptionalKeyword("on");return!n&&this.peek(d.NAME)?this.node(t,{kind:S.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:S.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:S.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:S.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){const n=this._lexer.token;switch(n.kind){case d.BRACKET_L:return this.parseList(t);case d.BRACE_L:return this.parseObject(t);case d.INT:return this.advanceLexer(),this.node(n,{kind:S.INT,value:n.value});case d.FLOAT:return this.advanceLexer(),this.node(n,{kind:S.FLOAT,value:n.value});case d.STRING:case d.BLOCK_STRING:return this.parseStringLiteral();case d.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:S.BOOLEAN,value:!0});case"false":return this.node(n,{kind:S.BOOLEAN,value:!1});case"null":return this.node(n,{kind:S.NULL});default:return this.node(n,{kind:S.ENUM,value:n.value})}case d.DOLLAR:if(t)if(this.expectToken(d.DOLLAR),this._lexer.token.kind===d.NAME){const r=this._lexer.token.value;throw G(this._lexer.source,n.start,`Unexpected variable "$${r}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:S.STRING,value:t.value,block:t.kind===d.BLOCK_STRING})}parseList(t){const n=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:S.LIST,values:this.any(d.BRACKET_L,n,d.BRACKET_R)})}parseObject(t){const n=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:S.OBJECT,fields:this.any(d.BRACE_L,n,d.BRACE_R)})}parseObjectField(t){const n=this._lexer.token,r=this.parseName();return this.expectToken(d.COLON),this.node(n,{kind:S.OBJECT_FIELD,name:r,value:this.parseValueLiteral(t)})}parseDirectives(t){const n=[];for(;this.peek(d.AT);)n.push(this.parseDirective(t));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){const n=this._lexer.token;return this.expectToken(d.AT),this.node(n,{kind:S.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){const t=this._lexer.token;let n;if(this.expectOptionalToken(d.BRACKET_L)){const r=this.parseTypeReference();this.expectToken(d.BRACKET_R),n=this.node(t,{kind:S.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(d.BANG)?this.node(t,{kind:S.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:S.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(d.STRING)||this.peek(d.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");const r=this.parseConstDirectives(),i=this.many(d.BRACE_L,this.parseOperationTypeDefinition,d.BRACE_R);return this.node(t,{kind:S.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){const t=this._lexer.token,n=this.parseOperationType();this.expectToken(d.COLON);const r=this.parseNamedType();return this.node(t,{kind:S.OPERATION_TYPE_DEFINITION,operation:n,type:r})}parseScalarTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");const r=this.parseName(),i=this.parseConstDirectives();return this.node(t,{kind:S.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:i})}parseObjectTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");const r=this.parseName(),i=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:S.OBJECT_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:o,fields:a})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(d.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(d.BRACE_L,this.parseFieldDefinition,d.BRACE_R)}parseFieldDefinition(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseName(),i=this.parseArgumentDefs();this.expectToken(d.COLON);const o=this.parseTypeReference(),a=this.parseConstDirectives();return this.node(t,{kind:S.FIELD_DEFINITION,description:n,name:r,arguments:i,type:o,directives:a})}parseArgumentDefs(){return this.optionalMany(d.PAREN_L,this.parseInputValueDef,d.PAREN_R)}parseInputValueDef(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseName();this.expectToken(d.COLON);const i=this.parseTypeReference();let o;this.expectOptionalToken(d.EQUALS)&&(o=this.parseConstValueLiteral());const a=this.parseConstDirectives();return this.node(t,{kind:S.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:o,directives:a})}parseInterfaceTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");const r=this.parseName(),i=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),a=this.parseFieldsDefinition();return this.node(t,{kind:S.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:o,fields:a})}parseUnionTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");const r=this.parseName(),i=this.parseConstDirectives(),o=this.parseUnionMemberTypes();return this.node(t,{kind:S.UNION_TYPE_DEFINITION,description:n,name:r,directives:i,types:o})}parseUnionMemberTypes(){return this.expectOptionalToken(d.EQUALS)?this.delimitedMany(d.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");const r=this.parseName(),i=this.parseConstDirectives(),o=this.parseEnumValuesDefinition();return this.node(t,{kind:S.ENUM_TYPE_DEFINITION,description:n,name:r,directives:i,values:o})}parseEnumValuesDefinition(){return this.optionalMany(d.BRACE_L,this.parseEnumValueDefinition,d.BRACE_R)}parseEnumValueDefinition(){const t=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(t,{kind:S.ENUM_VALUE_DEFINITION,description:n,name:r,directives:i})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw G(this._lexer.source,this._lexer.token.start,`${on(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");const r=this.parseName(),i=this.parseConstDirectives(),o=this.parseInputFieldsDefinition();return this.node(t,{kind:S.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:r,directives:i,fields:o})}parseInputFieldsDefinition(){return this.optionalMany(d.BRACE_L,this.parseInputValueDef,d.BRACE_R)}parseTypeSystemExtension(){const t=this._lexer.lookahead();if(t.kind===d.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)}parseSchemaExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const n=this.parseConstDirectives(),r=this.optionalMany(d.BRACE_L,this.parseOperationTypeDefinition,d.BRACE_R);if(n.length===0&&r.length===0)throw this.unexpected();return this.node(t,{kind:S.SCHEMA_EXTENSION,directives:n,operationTypes:r})}parseScalarTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const n=this.parseName(),r=this.parseConstDirectives();if(r.length===0)throw this.unexpected();return this.node(t,{kind:S.SCALAR_TYPE_EXTENSION,name:n,directives:r})}parseObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&o.length===0)throw this.unexpected();return this.node(t,{kind:S.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:o})}parseInterfaceTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const n=this.parseName(),r=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(r.length===0&&i.length===0&&o.length===0)throw this.unexpected();return this.node(t,{kind:S.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:o})}parseUnionTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseUnionMemberTypes();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:S.UNION_TYPE_EXTENSION,name:n,directives:r,types:i})}parseEnumTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:S.ENUM_TYPE_EXTENSION,name:n,directives:r,values:i})}parseInputObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const n=this.parseName(),r=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();if(r.length===0&&i.length===0)throw this.unexpected();return this.node(t,{kind:S.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i})}parseDirectiveDefinition(){const t=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(d.AT);const r=this.parseName(),i=this.parseArgumentDefs(),o=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const a=this.parseDirectiveLocations();return this.node(t,{kind:S.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,repeatable:o,locations:a})}parseDirectiveLocations(){return this.delimitedMany(d.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const t=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(sr,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new oc(t,this._lexer.lastToken,this._lexer.source)),n}peek(t){return this._lexer.token.kind===t}expectToken(t){const n=this._lexer.token;if(n.kind===t)return this.advanceLexer(),n;throw G(this._lexer.source,n.start,`Expected ${yo(t)}, found ${on(n)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){const n=this._lexer.token;if(n.kind===d.NAME&&n.value===t)this.advanceLexer();else throw G(this._lexer.source,n.start,`Expected "${t}", found ${on(n)}.`)}expectOptionalKeyword(t){const n=this._lexer.token;return n.kind===d.NAME&&n.value===t?(this.advanceLexer(),!0):!1}unexpected(t){const n=t??this._lexer.token;return G(this._lexer.source,n.start,`Unexpected ${on(n)}.`)}any(t,n,r){this.expectToken(t);const i=[];for(;!this.expectOptionalToken(r);)i.push(n.call(this));return i}optionalMany(t,n,r){if(this.expectOptionalToken(t)){const i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}return[]}many(t,n,r){this.expectToken(t);const i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}delimitedMany(t,n){this.expectOptionalToken(t);const r=[];do r.push(n.call(this));while(this.expectOptionalToken(t));return r}advanceLexer(){const{maxTokens:t}=this._options,n=this._lexer.advance();if(n.kind!==d.EOF&&(++this._tokenCounter,t!==void 0&&this._tokenCounter>t))throw G(this._lexer.source,n.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};function on(e){const t=e.value;return yo(e.kind)+(t!=null?` "${t}"`:"")}function yo(e){return fc(e)?`"${e}"`:e}function Ic(e){return`"${e.replace(Pc,kc)}"`}const Pc=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function kc(e){return Dc[e.charCodeAt(0)]}const Dc=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],Mc=Object.freeze({});function Uc(e,t,n=ao){const r=new Map;for(const b of Object.values(S))r.set(b,$c(t,b));let i,o=Array.isArray(e),a=[e],u=-1,c=[],s=e,l,p;const f=[],v=[];do{u++;const b=u===a.length,w=b&&c.length!==0;if(b){if(l=v.length===0?void 0:f[f.length-1],s=p,p=v.pop(),w)if(o){s=s.slice();let M=0;for(const[j,tt]of c){const X=j-M;tt===null?(s.splice(X,1),M++):s[X]=tt}}else{s=P({},s);for(const[M,j]of c)s[M]=j}u=i.index,a=i.keys,c=i.edits,o=i.inArray,i=i.prev}else if(p){if(l=o?u:a[u],s=p[l],s==null)continue;f.push(l)}let I;if(!Array.isArray(s)){var m,y;so(s)||en(!1,`Invalid AST Node: ${lr(s)}.`);const M=b?(m=r.get(s.kind))===null||m===void 0?void 0:m.leave:(y=r.get(s.kind))===null||y===void 0?void 0:y.enter;if(I=M?.call(t,s,l,p,f,v),I===Mc)break;if(I===!1){if(!b){f.pop();continue}}else if(I!==void 0&&(c.push([l,I]),!b))if(so(I))s=I;else{f.pop();continue}}if(I===void 0&&w&&c.push([l,s]),b)f.pop();else{var g;i={inArray:o,index:u,keys:a,edits:c,prev:i},o=Array.isArray(s),a=o?s:(g=n[s.kind])!==null&&g!==void 0?g:[],u=-1,c=[],p&&v.push(p),p=s}}while(i!==void 0);return c.length!==0?c[c.length-1][1]:e}function $c(e,t){const n=e[t];return typeof n=="object"?n:typeof n=="function"?{enter:n,leave:void 0}:{enter:e.enter,leave:e.leave}}function jc(e){return Uc(e,Fc)}const Bc=80,Fc={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>E(e.definitions,`
|
|
23
23
|
|
|
24
|
-
`)},OperationDefinition:{leave(e){const t=N("(",
|
|
25
|
-
`,
|
|
24
|
+
`)},OperationDefinition:{leave(e){const t=N("(",E(e.variableDefinitions,", "),")"),n=E([e.operation,E([e.name,t]),E(e.directives," ")]," ");return(n==="query"?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+N(" = ",n)+N(" ",E(r," "))},SelectionSet:{leave:({selections:e})=>ct(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){const o=N("",e,": ")+t;let a=o+N("(",E(n,", "),")");return a.length>Bc&&(a=o+N(`(
|
|
25
|
+
`,an(E(n,`
|
|
26
26
|
`)),`
|
|
27
|
-
)`)),
|
|
28
|
-
`)+
|
|
29
|
-
`)+
|
|
30
|
-
`)+
|
|
31
|
-
`)+t+(
|
|
32
|
-
`,
|
|
27
|
+
)`)),E([a,E(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+N(" ",E(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>E(["...",N("on ",e),E(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${N("(",E(n,", "),")")} on ${t} ${N("",E(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?lc(e):Ic(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+E(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+E(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+N("(",E(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>N("",e,`
|
|
28
|
+
`)+E(["schema",E(t," "),ct(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>N("",e,`
|
|
29
|
+
`)+E(["scalar",t,E(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>N("",e,`
|
|
30
|
+
`)+E(["type",t,N("implements ",E(n," & ")),E(r," "),ct(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>N("",e,`
|
|
31
|
+
`)+t+(go(n)?N(`(
|
|
32
|
+
`,an(E(n,`
|
|
33
33
|
`)),`
|
|
34
|
-
)`):N("(",
|
|
35
|
-
`)+
|
|
36
|
-
`)+
|
|
37
|
-
`)+
|
|
38
|
-
`)+
|
|
39
|
-
`)+
|
|
40
|
-
`)+
|
|
41
|
-
`)+"directive @"+t+(
|
|
42
|
-
`,
|
|
34
|
+
)`):N("(",E(n,", "),")"))+": "+r+N(" ",E(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:i})=>N("",e,`
|
|
35
|
+
`)+E([t+": "+n,N("= ",r),E(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>N("",e,`
|
|
36
|
+
`)+E(["interface",t,N("implements ",E(n," & ")),E(r," "),ct(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>N("",e,`
|
|
37
|
+
`)+E(["union",t,E(n," "),N("= ",E(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:r})=>N("",e,`
|
|
38
|
+
`)+E(["enum",t,E(n," "),ct(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>N("",e,`
|
|
39
|
+
`)+E([t,E(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>N("",e,`
|
|
40
|
+
`)+E(["input",t,E(n," "),ct(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:i})=>N("",e,`
|
|
41
|
+
`)+"directive @"+t+(go(n)?N(`(
|
|
42
|
+
`,an(E(n,`
|
|
43
43
|
`)),`
|
|
44
|
-
)`):N("(",
|
|
45
|
-
`,
|
|
44
|
+
)`):N("(",E(n,", "),")"))+(r?" repeatable":"")+" on "+E(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>E(["extend schema",E(e," "),ct(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>E(["extend scalar",e,E(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>E(["extend type",e,N("implements ",E(t," & ")),E(n," "),ct(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>E(["extend interface",e,N("implements ",E(t," & ")),E(n," "),ct(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>E(["extend union",e,E(t," "),N("= ",E(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>E(["extend enum",e,E(t," "),ct(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>E(["extend input",e,E(t," "),ct(n)]," ")}};function E(e,t=""){var n;return(n=e?.filter(r=>r).join(t))!==null&&n!==void 0?n:""}function ct(e){return N(`{
|
|
45
|
+
`,an(E(e,`
|
|
46
46
|
`)),`
|
|
47
|
-
}`)}function N(e,t,n=""){return t!=null&&t!==""?e+t+n:""}function
|
|
48
|
-
`))}function
|
|
49
|
-
`)))!==null&&t!==void 0?t:!1}const dr=JSON,Nl=e=>e.toUpperCase(),xl=e=>{const t={};return e.forEach((n,r)=>{t[r]=n}),t},Pl=(e,t,n)=>e.document?e:{document:e,variables:t,requestHeaders:n,signal:void 0},Il=(e,t,n)=>e.query?e:{query:e,variables:t,requestHeaders:n,signal:void 0},kl=(e,t)=>e.documents?e:{documents:e,requestHeaders:t,signal:void 0},qo=e=>{var t,n;let r;const i=e.definitions.filter(o=>o.kind==="OperationDefinition");return i.length===1&&(r=(n=(t=i[0])==null?void 0:t.name)==null?void 0:n.value),r},vr=e=>{if(typeof e=="string"){let n;try{const r=Vo(e);n=qo(r)}catch{}return{query:e,operationName:n}}const t=qo(e);return{query:Ll(e),operationName:t}};let zo=class sr extends Error{constructor(t,n){const r=`${sr.extractMessage(t)}: ${JSON.stringify({response:t,request:n})}`;super(r),Object.setPrototypeOf(this,sr.prototype),this.response=t,this.request=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,sr)}static extractMessage(t){var n,r,i;return(i=(r=(n=t.errors)==null?void 0:n[0])==null?void 0:r.message)!=null?i:`GraphQL Error (Code: ${t.status})`}};var yr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var mr={exports:{}};(function(e,t){var n=typeof self<"u"?self:yr,r=function(){function o(){this.fetch=!1,this.DOMException=n.DOMException}return o.prototype=n,new o}();(function(o){(function(a){var u={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function c(h){return h&&DataView.prototype.isPrototypeOf(h)}if(u.arrayBuffer)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],l=ArrayBuffer.isView||function(h){return h&&s.indexOf(Object.prototype.toString.call(h))>-1};function p(h){if(typeof h!="string"&&(h=String(h)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(h))throw new TypeError("Invalid character in header field name");return h.toLowerCase()}function f(h){return typeof h!="string"&&(h=String(h)),h}function m(h){var _={next:function(){var L=h.shift();return{done:L===void 0,value:L}}};return u.iterable&&(_[Symbol.iterator]=function(){return _}),_}function v(h){this.map={},h instanceof v?h.forEach(function(_,L){this.append(L,_)},this):Array.isArray(h)?h.forEach(function(_){this.append(_[0],_[1])},this):h&&Object.getOwnPropertyNames(h).forEach(function(_){this.append(_,h[_])},this)}v.prototype.append=function(h,_){h=p(h),_=f(_);var L=this.map[h];this.map[h]=L?L+", "+_:_},v.prototype.delete=function(h){delete this.map[p(h)]},v.prototype.get=function(h){return h=p(h),this.has(h)?this.map[h]:null},v.prototype.has=function(h){return this.map.hasOwnProperty(p(h))},v.prototype.set=function(h,_){this.map[p(h)]=f(_)},v.prototype.forEach=function(h,_){for(var L in this.map)this.map.hasOwnProperty(L)&&h.call(_,this.map[L],L,this)},v.prototype.keys=function(){var h=[];return this.forEach(function(_,L){h.push(L)}),m(h)},v.prototype.values=function(){var h=[];return this.forEach(function(_){h.push(_)}),m(h)},v.prototype.entries=function(){var h=[];return this.forEach(function(_,L){h.push([L,_])}),m(h)},u.iterable&&(v.prototype[Symbol.iterator]=v.prototype.entries);function y(h){if(h.bodyUsed)return Promise.reject(new TypeError("Already read"));h.bodyUsed=!0}function g(h){return new Promise(function(_,L){h.onload=function(){_(h.result)},h.onerror=function(){L(h.error)}})}function E(h){var _=new FileReader,L=g(_);return _.readAsArrayBuffer(h),L}function S(h){var _=new FileReader,L=g(_);return _.readAsText(h),L}function P(h){for(var _=new Uint8Array(h),L=new Array(_.length),H=0;H<_.length;H++)L[H]=String.fromCharCode(_[H]);return L.join("")}function j(h){if(h.slice)return h.slice(0);var _=new Uint8Array(h.byteLength);return _.set(new Uint8Array(h)),_.buffer}function $(){return this.bodyUsed=!1,this._initBody=function(h){this._bodyInit=h,h?typeof h=="string"?this._bodyText=h:u.blob&&Blob.prototype.isPrototypeOf(h)?this._bodyBlob=h:u.formData&&FormData.prototype.isPrototypeOf(h)?this._bodyFormData=h:u.searchParams&&URLSearchParams.prototype.isPrototypeOf(h)?this._bodyText=h.toString():u.arrayBuffer&&u.blob&&c(h)?(this._bodyArrayBuffer=j(h.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(h)||l(h))?this._bodyArrayBuffer=j(h):this._bodyText=h=Object.prototype.toString.call(h):this._bodyText="",this.headers.get("content-type")||(typeof h=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):u.searchParams&&URLSearchParams.prototype.isPrototypeOf(h)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},u.blob&&(this.blob=function(){var h=y(this);if(h)return h;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?y(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(E)}),this.text=function(){var h=y(this);if(h)return h;if(this._bodyBlob)return S(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(P(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},u.formData&&(this.formData=function(){return this.text().then(Te)}),this.json=function(){return this.text().then(JSON.parse)},this}var ne=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function X(h){var _=h.toUpperCase();return ne.indexOf(_)>-1?_:h}function U(h,_){_=_||{};var L=_.body;if(h instanceof U){if(h.bodyUsed)throw new TypeError("Already read");this.url=h.url,this.credentials=h.credentials,_.headers||(this.headers=new v(h.headers)),this.method=h.method,this.mode=h.mode,this.signal=h.signal,!L&&h._bodyInit!=null&&(L=h._bodyInit,h.bodyUsed=!0)}else this.url=String(h);if(this.credentials=_.credentials||this.credentials||"same-origin",(_.headers||!this.headers)&&(this.headers=new v(_.headers)),this.method=X(_.method||this.method||"GET"),this.mode=_.mode||this.mode||null,this.signal=_.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&L)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(L)}U.prototype.clone=function(){return new U(this,{body:this._bodyInit})};function Te(h){var _=new FormData;return h.trim().split("&").forEach(function(L){if(L){var H=L.split("="),V=H.shift().replace(/\+/g," "),M=H.join("=").replace(/\+/g," ");_.append(decodeURIComponent(V),decodeURIComponent(M))}}),_}function ye(h){var _=new v,L=h.replace(/\r?\n[\t ]+/g," ");return L.split(/\r?\n/).forEach(function(H){var V=H.split(":"),M=V.shift().trim();if(M){var Qe=V.join(":").trim();_.append(M,Qe)}}),_}$.call(U.prototype);function W(h,_){_||(_={}),this.type="default",this.status=_.status===void 0?200:_.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in _?_.statusText:"OK",this.headers=new v(_.headers),this.url=_.url||"",this._initBody(h)}$.call(W.prototype),W.prototype.clone=function(){return new W(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new v(this.headers),url:this.url})},W.error=function(){var h=new W(null,{status:0,statusText:""});return h.type="error",h};var Je=[301,302,303,307,308];W.redirect=function(h,_){if(Je.indexOf(_)===-1)throw new RangeError("Invalid status code");return new W(null,{status:_,headers:{location:h}})},a.DOMException=o.DOMException;try{new a.DOMException}catch{a.DOMException=function(_,L){this.message=_,this.name=L;var H=Error(_);this.stack=H.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function be(h,_){return new Promise(function(L,H){var V=new U(h,_);if(V.signal&&V.signal.aborted)return H(new a.DOMException("Aborted","AbortError"));var M=new XMLHttpRequest;function Qe(){M.abort()}M.onload=function(){var Ze={status:M.status,statusText:M.statusText,headers:ye(M.getAllResponseHeaders()||"")};Ze.url="responseURL"in M?M.responseURL:Ze.headers.get("X-Request-URL");var rn="response"in M?M.response:M.responseText;L(new W(rn,Ze))},M.onerror=function(){H(new TypeError("Network request failed"))},M.ontimeout=function(){H(new TypeError("Network request failed"))},M.onabort=function(){H(new a.DOMException("Aborted","AbortError"))},M.open(V.method,V.url,!0),V.credentials==="include"?M.withCredentials=!0:V.credentials==="omit"&&(M.withCredentials=!1),"responseType"in M&&u.blob&&(M.responseType="blob"),V.headers.forEach(function(Ze,rn){M.setRequestHeader(rn,Ze)}),V.signal&&(V.signal.addEventListener("abort",Qe),M.onreadystatechange=function(){M.readyState===4&&V.signal.removeEventListener("abort",Qe)}),M.send(typeof V._bodyInit>"u"?null:V._bodyInit)})}return be.polyfill=!0,o.fetch||(o.fetch=be,o.Headers=v,o.Request=U,o.Response=W),a.Headers=v,a.Request=U,a.Response=W,a.fetch=be,Object.defineProperty(a,"__esModule",{value:!0}),a})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;t=i.fetch,t.default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t})(mr,mr.exports);var gr=mr.exports;const hn=fn(gr),Ml=Object.freeze(Object.defineProperty({__proto__:null,default:hn},Symbol.toStringTag,{value:"Module"})),it=e=>{let t={};return e&&(typeof Headers<"u"&&e instanceof Headers||Ml&&gr.Headers&&e instanceof gr.Headers?t=xl(e):Array.isArray(e)?e.forEach(([n,r])=>{n&&r!==void 0&&(t[n]=r)}):t=e),t},Xo=e=>e.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),Dl=e=>{if(!Array.isArray(e.query)){const r=e,i=[`query=${encodeURIComponent(Xo(r.query))}`];return e.variables&&i.push(`variables=${encodeURIComponent(r.jsonSerializer.stringify(r.variables))}`),r.operationName&&i.push(`operationName=${encodeURIComponent(r.operationName)}`),i.join("&")}if(typeof e.variables<"u"&&!Array.isArray(e.variables))throw new Error("Cannot create query with given variable type, array expected");const t=e,n=e.query.reduce((r,i,o)=>(r.push({query:Xo(i),variables:t.variables?t.jsonSerializer.stringify(t.variables[o]):void 0}),r),[]);return`query=${encodeURIComponent(t.jsonSerializer.stringify(n))}`},Ul=e=>t=>tt(void 0,null,function*(){var n;const{url:r,query:i,variables:o,operationName:a,fetch:u,fetchOptions:c,middleware:s}=t,l=I({},t.headers);let p="",f;e==="POST"?(f=$l(i,o,a,c.jsonSerializer),typeof f=="string"&&(l["Content-Type"]="application/json")):p=Dl({query:i,variables:o,operationName:a,jsonSerializer:(n=c.jsonSerializer)!=null?n:dr});const m=I({method:e,headers:l,body:f},c);let v=r,y=m;if(s){const g=yield Promise.resolve(s(an(I({},m),{url:r,operationName:a,variables:o}))),{url:E}=g,S=Ot(g,["url"]);v=E,y=S}return p&&(v=`${v}?${p}`),yield u(v,y)});let jl=class{constructor(t,n={}){this.url=t,this.requestConfig=n,this.rawRequest=(...r)=>tt(this,null,function*(){const[i,o,a]=r,u=Il(i,o,a),c=this.requestConfig,{headers:s,fetch:l=hn,method:p="POST",requestMiddleware:f,responseMiddleware:m}=c,v=Ot(c,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:y}=this;u.signal!==void 0&&(v.signal=u.signal);const{operationName:g}=vr(u.query);return _r({url:y,query:u.query,variables:u.variables,headers:I(I({},it(Er(s))),it(u.requestHeaders)),operationName:g,fetch:l,method:p,fetchOptions:v,middleware:f}).then(E=>(m&&m(E),E)).catch(E=>{throw m&&m(E),E})})}request(t,...n){return tt(this,null,function*(){const[r,i]=n,o=Pl(t,r,i),a=this.requestConfig,{headers:u,fetch:c=hn,method:s="POST",requestMiddleware:l,responseMiddleware:p}=a,f=Ot(a,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:m}=this;o.signal!==void 0&&(f.signal=o.signal);const{query:v,operationName:y}=vr(o.document);return _r({url:m,query:v,variables:o.variables,headers:I(I({},it(Er(u))),it(o.requestHeaders)),operationName:y,fetch:c,method:s,fetchOptions:f,middleware:l}).then(g=>(p&&p(g),g.data)).catch(g=>{throw p&&p(g),g})})}batchRequests(t,n){var r;const i=kl(t,n),o=this.requestConfig,{headers:a}=o,u=Ot(o,["headers"]);i.signal!==void 0&&(u.signal=i.signal);const c=i.documents.map(({document:l})=>vr(l).query),s=i.documents.map(({variables:l})=>l);return _r({url:this.url,query:c,variables:s,headers:I(I({},it(Er(a))),it(i.requestHeaders)),operationName:void 0,fetch:(r=this.requestConfig.fetch)!=null?r:hn,method:this.requestConfig.method||"POST",fetchOptions:u,middleware:this.requestConfig.requestMiddleware}).then(l=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(l),l.data)).catch(l=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(l),l})}setHeaders(t){return this.requestConfig.headers=t,this}setHeader(t,n){const{headers:r}=this.requestConfig;return r?r[t]=n:this.requestConfig.headers={[t]:n},this}setEndpoint(t){return this.url=t,this}};const _r=e=>tt(void 0,null,function*(){var t,n;const{query:r,variables:i,fetchOptions:o}=e,a=Ul(Nl((t=e.method)!=null?t:"post")),u=Array.isArray(e.query),c=yield a(e),s=yield Bl(c,(n=o.jsonSerializer)!=null?n:dr),l=Array.isArray(s)?!s.some(({data:f})=>!f):!!s.data,p=Array.isArray(s)||!s.errors||Array.isArray(s.errors)&&!s.errors.length||o.errorPolicy==="all"||o.errorPolicy==="ignore";if(c.ok&&p&&l){const f=s,m=Ot(f,["errors"]),v=o.errorPolicy==="ignore"?m:s;return an(I({},u?{data:v}:v),{headers:c.headers,status:c.status})}else{const f=typeof s=="string"?{error:s}:s;throw new zo(an(I({},f),{status:c.status,headers:c.headers}),{query:r,variables:i})}}),$l=(e,t,n,r)=>{const i=r??dr;if(!Array.isArray(e))return i.stringify({query:e,variables:t,operationName:n});if(typeof t<"u"&&!Array.isArray(t))throw new Error("Cannot create request body with given variable type, array expected");const o=e.reduce((a,u,c)=>(a.push({query:u,variables:t?t[c]:void 0}),a),[]);return i.stringify(o)},Bl=(e,t)=>tt(void 0,null,function*(){let n;return e.headers.forEach((r,i)=>{i.toLowerCase()==="content-type"&&(n=r)}),n&&(n.toLowerCase().startsWith("application/json")||n.toLowerCase().startsWith("application/graphql+json")||n.toLowerCase().startsWith("application/graphql-response+json"))?t.parse(yield e.text()):e.text()}),Er=e=>typeof e=="function"?e():e;var Tr={exports:{}};(function(e,t){t=e.exports=n,t.getSerialize=r;function n(i,o,a,u){return JSON.stringify(i,r(o,u),a)}function r(i,o){var a=[],u=[];return o==null&&(o=function(c,s){return a[0]===s?"[Circular ~]":"[Circular ~."+u.slice(0,a.indexOf(s)).join(".")+"]"}),function(c,s){if(a.length>0){var l=a.indexOf(this);~l?a.splice(l+1):a.push(this),~l?u.splice(l,1/0,c):u.push(c),~a.indexOf(s)&&(s=o.call(this,c,s))}else a.push(s);return i==null?s:i.call(this,c,s)}}})(Tr,Tr.exports);var Fl=Tr.exports;const dn=fn(Fl);var vn=function(){return vn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},vn.apply(this,arguments)},yn=new Map,br=new Map,Ko=!0,mn=!1;function Wo(e){return e.replace(/[\s,]+/g," ").trim()}function Vl(e){return Wo(e.source.body.substring(e.start,e.end))}function Hl(e){var t=new Set,n=[];return e.definitions.forEach(function(r){if(r.kind==="FragmentDefinition"){var i=r.name.value,o=Vl(r.loc),a=br.get(i);a&&!a.has(o)?Ko&&console.warn("Warning: fragment with name "+i+` already exists.
|
|
47
|
+
}`)}function N(e,t,n=""){return t!=null&&t!==""?e+t+n:""}function an(e){return N(" ",e.replace(/\n/g,`
|
|
48
|
+
`))}function go(e){var t;return(t=e?.some(n=>n.includes(`
|
|
49
|
+
`)))!==null&&t!==void 0?t:!1}const pr=JSON,Vc=e=>e.toUpperCase(),Hc=e=>{const t={};return e.forEach((n,r)=>{t[r]=n}),t},Gc=(e,t,n)=>e.document?e:{document:e,variables:t,requestHeaders:n,signal:void 0},qc=(e,t,n)=>e.query?e:{query:e,variables:t,requestHeaders:n,signal:void 0},zc=(e,t)=>e.documents?e:{documents:e,requestHeaders:t,signal:void 0},_o=e=>{var t,n;let r;const i=e.definitions.filter(o=>o.kind==="OperationDefinition");return i.length===1&&(r=(n=(t=i[0])==null?void 0:t.name)==null?void 0:n.value),r},fr=e=>{if(typeof e=="string"){let n;try{const r=mo(e);n=_o(r)}catch{}return{query:e,operationName:n}}const t=_o(e);return{query:jc(e),operationName:t}};let bo=class ir extends Error{constructor(t,n){const r=`${ir.extractMessage(t)}: ${JSON.stringify({response:t,request:n})}`;super(r),Object.setPrototypeOf(this,ir.prototype),this.response=t,this.request=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ir)}static extractMessage(t){var n,r,i;return(i=(r=(n=t.errors)==null?void 0:n[0])==null?void 0:r.message)!=null?i:`GraphQL Error (Code: ${t.status})`}};var hr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function sn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var dr={exports:{}};(function(e,t){var n=typeof self<"u"?self:hr,r=function(){function o(){this.fetch=!1,this.DOMException=n.DOMException}return o.prototype=n,new o}();(function(o){(function(a){var u={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};function c(h){return h&&DataView.prototype.isPrototypeOf(h)}if(u.arrayBuffer)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],l=ArrayBuffer.isView||function(h){return h&&s.indexOf(Object.prototype.toString.call(h))>-1};function p(h){if(typeof h!="string"&&(h=String(h)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(h))throw new TypeError("Invalid character in header field name");return h.toLowerCase()}function f(h){return typeof h!="string"&&(h=String(h)),h}function v(h){var _={next:function(){var x=h.shift();return{done:x===void 0,value:x}}};return u.iterable&&(_[Symbol.iterator]=function(){return _}),_}function m(h){this.map={},h instanceof m?h.forEach(function(_,x){this.append(x,_)},this):Array.isArray(h)?h.forEach(function(_){this.append(_[0],_[1])},this):h&&Object.getOwnPropertyNames(h).forEach(function(_){this.append(_,h[_])},this)}m.prototype.append=function(h,_){h=p(h),_=f(_);var x=this.map[h];this.map[h]=x?x+", "+_:_},m.prototype.delete=function(h){delete this.map[p(h)]},m.prototype.get=function(h){return h=p(h),this.has(h)?this.map[h]:null},m.prototype.has=function(h){return this.map.hasOwnProperty(p(h))},m.prototype.set=function(h,_){this.map[p(h)]=f(_)},m.prototype.forEach=function(h,_){for(var x in this.map)this.map.hasOwnProperty(x)&&h.call(_,this.map[x],x,this)},m.prototype.keys=function(){var h=[];return this.forEach(function(_,x){h.push(x)}),v(h)},m.prototype.values=function(){var h=[];return this.forEach(function(_){h.push(_)}),v(h)},m.prototype.entries=function(){var h=[];return this.forEach(function(_,x){h.push([x,_])}),v(h)},u.iterable&&(m.prototype[Symbol.iterator]=m.prototype.entries);function y(h){if(h.bodyUsed)return Promise.reject(new TypeError("Already read"));h.bodyUsed=!0}function g(h){return new Promise(function(_,x){h.onload=function(){_(h.result)},h.onerror=function(){x(h.error)}})}function b(h){var _=new FileReader,x=g(_);return _.readAsArrayBuffer(h),x}function w(h){var _=new FileReader,x=g(_);return _.readAsText(h),x}function I(h){for(var _=new Uint8Array(h),x=new Array(_.length),H=0;H<_.length;H++)x[H]=String.fromCharCode(_[H]);return x.join("")}function M(h){if(h.slice)return h.slice(0);var _=new Uint8Array(h.byteLength);return _.set(new Uint8Array(h)),_.buffer}function j(){return this.bodyUsed=!1,this._initBody=function(h){this._bodyInit=h,h?typeof h=="string"?this._bodyText=h:u.blob&&Blob.prototype.isPrototypeOf(h)?this._bodyBlob=h:u.formData&&FormData.prototype.isPrototypeOf(h)?this._bodyFormData=h:u.searchParams&&URLSearchParams.prototype.isPrototypeOf(h)?this._bodyText=h.toString():u.arrayBuffer&&u.blob&&c(h)?(this._bodyArrayBuffer=M(h.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(h)||l(h))?this._bodyArrayBuffer=M(h):this._bodyText=h=Object.prototype.toString.call(h):this._bodyText="",this.headers.get("content-type")||(typeof h=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):u.searchParams&&URLSearchParams.prototype.isPrototypeOf(h)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},u.blob&&(this.blob=function(){var h=y(this);if(h)return h;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?y(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(b)}),this.text=function(){var h=y(this);if(h)return h;if(this._bodyBlob)return w(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(I(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},u.formData&&(this.formData=function(){return this.text().then(wt)}),this.json=function(){return this.text().then(JSON.parse)},this}var tt=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function X(h){var _=h.toUpperCase();return tt.indexOf(_)>-1?_:h}function D(h,_){_=_||{};var x=_.body;if(h instanceof D){if(h.bodyUsed)throw new TypeError("Already read");this.url=h.url,this.credentials=h.credentials,_.headers||(this.headers=new m(h.headers)),this.method=h.method,this.mode=h.mode,this.signal=h.signal,!x&&h._bodyInit!=null&&(x=h._bodyInit,h.bodyUsed=!0)}else this.url=String(h);if(this.credentials=_.credentials||this.credentials||"same-origin",(_.headers||!this.headers)&&(this.headers=new m(_.headers)),this.method=X(_.method||this.method||"GET"),this.mode=_.mode||this.mode||null,this.signal=_.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&x)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(x)}D.prototype.clone=function(){return new D(this,{body:this._bodyInit})};function wt(h){var _=new FormData;return h.trim().split("&").forEach(function(x){if(x){var H=x.split("="),V=H.shift().replace(/\+/g," "),k=H.join("=").replace(/\+/g," ");_.append(decodeURIComponent(V),decodeURIComponent(k))}}),_}function mt(h){var _=new m,x=h.replace(/\r?\n[\t ]+/g," ");return x.split(/\r?\n/).forEach(function(H){var V=H.split(":"),k=V.shift().trim();if(k){var Zt=V.join(":").trim();_.append(k,Zt)}}),_}j.call(D.prototype);function W(h,_){_||(_={}),this.type="default",this.status=_.status===void 0?200:_.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in _?_.statusText:"OK",this.headers=new m(_.headers),this.url=_.url||"",this._initBody(h)}j.call(W.prototype),W.prototype.clone=function(){return new W(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new m(this.headers),url:this.url})},W.error=function(){var h=new W(null,{status:0,statusText:""});return h.type="error",h};var Qt=[301,302,303,307,308];W.redirect=function(h,_){if(Qt.indexOf(_)===-1)throw new RangeError("Invalid status code");return new W(null,{status:_,headers:{location:h}})},a.DOMException=o.DOMException;try{new a.DOMException}catch{a.DOMException=function(_,x){this.message=_,this.name=x;var H=Error(_);this.stack=H.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function St(h,_){return new Promise(function(x,H){var V=new D(h,_);if(V.signal&&V.signal.aborted)return H(new a.DOMException("Aborted","AbortError"));var k=new XMLHttpRequest;function Zt(){k.abort()}k.onload=function(){var te={status:k.status,statusText:k.statusText,headers:mt(k.getAllResponseHeaders()||"")};te.url="responseURL"in k?k.responseURL:te.headers.get("X-Request-URL");var Qe="response"in k?k.response:k.responseText;x(new W(Qe,te))},k.onerror=function(){H(new TypeError("Network request failed"))},k.ontimeout=function(){H(new TypeError("Network request failed"))},k.onabort=function(){H(new a.DOMException("Aborted","AbortError"))},k.open(V.method,V.url,!0),V.credentials==="include"?k.withCredentials=!0:V.credentials==="omit"&&(k.withCredentials=!1),"responseType"in k&&u.blob&&(k.responseType="blob"),V.headers.forEach(function(te,Qe){k.setRequestHeader(Qe,te)}),V.signal&&(V.signal.addEventListener("abort",Zt),k.onreadystatechange=function(){k.readyState===4&&V.signal.removeEventListener("abort",Zt)}),k.send(typeof V._bodyInit>"u"?null:V._bodyInit)})}return St.polyfill=!0,o.fetch||(o.fetch=St,o.Headers=m,o.Request=D,o.Response=W),a.Headers=m,a.Request=D,a.Response=W,a.fetch=St,Object.defineProperty(a,"__esModule",{value:!0}),a})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;t=i.fetch,t.default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t})(dr,dr.exports);var vr=dr.exports;const un=sn(vr),Kc=Object.freeze(Object.defineProperty({__proto__:null,default:un},Symbol.toStringTag,{value:"Module"})),oe=e=>{let t={};return e&&(typeof Headers<"u"&&e instanceof Headers||Kc&&vr.Headers&&e instanceof vr.Headers?t=Hc(e):Array.isArray(e)?e.forEach(([n,r])=>{n&&r!==void 0&&(t[n]=r)}):t=e),t},Eo=e=>e.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),Xc=e=>{if(!Array.isArray(e.query)){const r=e,i=[`query=${encodeURIComponent(Eo(r.query))}`];return e.variables&&i.push(`variables=${encodeURIComponent(r.jsonSerializer.stringify(r.variables))}`),r.operationName&&i.push(`operationName=${encodeURIComponent(r.operationName)}`),i.join("&")}if(typeof e.variables<"u"&&!Array.isArray(e.variables))throw new Error("Cannot create query with given variable type, array expected");const t=e,n=e.query.reduce((r,i,o)=>(r.push({query:Eo(i),variables:t.variables?t.jsonSerializer.stringify(t.variables[o]):void 0}),r),[]);return`query=${encodeURIComponent(t.jsonSerializer.stringify(n))}`},Wc=e=>t=>ne(void 0,null,function*(){var n;const{url:r,query:i,variables:o,operationName:a,fetch:u,fetchOptions:c,middleware:s}=t,l=P({},t.headers);let p="",f;e==="POST"?(f=Jc(i,o,a,c.jsonSerializer),typeof f=="string"&&(l["Content-Type"]="application/json")):p=Xc({query:i,variables:o,operationName:a,jsonSerializer:(n=c.jsonSerializer)!=null?n:pr});const v=P({method:e,headers:l,body:f},c);let m=r,y=v;if(s){const g=yield Promise.resolve(s(tn(P({},v),{url:r,operationName:a,variables:o}))),{url:b}=g,w=Se(g,["url"]);m=b,y=w}return p&&(m=`${m}?${p}`),yield u(m,y)});let Yc=class{constructor(t,n={}){this.url=t,this.requestConfig=n,this.rawRequest=(...r)=>ne(this,null,function*(){const[i,o,a]=r,u=qc(i,o,a),c=this.requestConfig,{headers:s,fetch:l=un,method:p="POST",requestMiddleware:f,responseMiddleware:v}=c,m=Se(c,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:y}=this;u.signal!==void 0&&(m.signal=u.signal);const{operationName:g}=fr(u.query);return mr({url:y,query:u.query,variables:u.variables,headers:P(P({},oe(yr(s))),oe(u.requestHeaders)),operationName:g,fetch:l,method:p,fetchOptions:m,middleware:f}).then(b=>(v&&v(b),b)).catch(b=>{throw v&&v(b),b})})}request(t,...n){return ne(this,null,function*(){const[r,i]=n,o=Gc(t,r,i),a=this.requestConfig,{headers:u,fetch:c=un,method:s="POST",requestMiddleware:l,responseMiddleware:p}=a,f=Se(a,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:v}=this;o.signal!==void 0&&(f.signal=o.signal);const{query:m,operationName:y}=fr(o.document);return mr({url:v,query:m,variables:o.variables,headers:P(P({},oe(yr(u))),oe(o.requestHeaders)),operationName:y,fetch:c,method:s,fetchOptions:f,middleware:l}).then(g=>(p&&p(g),g.data)).catch(g=>{throw p&&p(g),g})})}batchRequests(t,n){var r;const i=zc(t,n),o=this.requestConfig,{headers:a}=o,u=Se(o,["headers"]);i.signal!==void 0&&(u.signal=i.signal);const c=i.documents.map(({document:l})=>fr(l).query),s=i.documents.map(({variables:l})=>l);return mr({url:this.url,query:c,variables:s,headers:P(P({},oe(yr(a))),oe(i.requestHeaders)),operationName:void 0,fetch:(r=this.requestConfig.fetch)!=null?r:un,method:this.requestConfig.method||"POST",fetchOptions:u,middleware:this.requestConfig.requestMiddleware}).then(l=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(l),l.data)).catch(l=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(l),l})}setHeaders(t){return this.requestConfig.headers=t,this}setHeader(t,n){const{headers:r}=this.requestConfig;return r?r[t]=n:this.requestConfig.headers={[t]:n},this}setEndpoint(t){return this.url=t,this}};const mr=e=>ne(void 0,null,function*(){var t,n;const{query:r,variables:i,fetchOptions:o}=e,a=Wc(Vc((t=e.method)!=null?t:"post")),u=Array.isArray(e.query),c=yield a(e),s=yield Qc(c,(n=o.jsonSerializer)!=null?n:pr),l=Array.isArray(s)?!s.some(({data:f})=>!f):!!s.data,p=Array.isArray(s)||!s.errors||Array.isArray(s.errors)&&!s.errors.length||o.errorPolicy==="all"||o.errorPolicy==="ignore";if(c.ok&&p&&l){const f=s,v=Se(f,["errors"]),m=o.errorPolicy==="ignore"?v:s;return tn(P({},u?{data:m}:m),{headers:c.headers,status:c.status})}else{const f=typeof s=="string"?{error:s}:s;throw new bo(tn(P({},f),{status:c.status,headers:c.headers}),{query:r,variables:i})}}),Jc=(e,t,n,r)=>{const i=r??pr;if(!Array.isArray(e))return i.stringify({query:e,variables:t,operationName:n});if(typeof t<"u"&&!Array.isArray(t))throw new Error("Cannot create request body with given variable type, array expected");const o=e.reduce((a,u,c)=>(a.push({query:u,variables:t?t[c]:void 0}),a),[]);return i.stringify(o)},Qc=(e,t)=>ne(void 0,null,function*(){let n;return e.headers.forEach((r,i)=>{i.toLowerCase()==="content-type"&&(n=r)}),n&&(n.toLowerCase().startsWith("application/json")||n.toLowerCase().startsWith("application/graphql+json")||n.toLowerCase().startsWith("application/graphql-response+json"))?t.parse(yield e.text()):e.text()}),yr=e=>typeof e=="function"?e():e;var gr={exports:{}};(function(e,t){t=e.exports=n,t.getSerialize=r;function n(i,o,a,u){return JSON.stringify(i,r(o,u),a)}function r(i,o){var a=[],u=[];return o==null&&(o=function(c,s){return a[0]===s?"[Circular ~]":"[Circular ~."+u.slice(0,a.indexOf(s)).join(".")+"]"}),function(c,s){if(a.length>0){var l=a.indexOf(this);~l?a.splice(l+1):a.push(this),~l?u.splice(l,1/0,c):u.push(c),~a.indexOf(s)&&(s=o.call(this,c,s))}else a.push(s);return i==null?s:i.call(this,c,s)}}})(gr,gr.exports);var Zc=gr.exports;const cn=sn(Zc);var ln=function(){return ln=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},ln.apply(this,arguments)},pn=new Map,_r=new Map,To=!0,fn=!1;function wo(e){return e.replace(/[\s,]+/g," ").trim()}function tl(e){return wo(e.source.body.substring(e.start,e.end))}function el(e){var t=new Set,n=[];return e.definitions.forEach(function(r){if(r.kind==="FragmentDefinition"){var i=r.name.value,o=tl(r.loc),a=_r.get(i);a&&!a.has(o)?To&&console.warn("Warning: fragment with name "+i+` already exists.
|
|
50
50
|
graphql-tag enforces all fragment names across your application to be unique; read more about
|
|
51
|
-
this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a||
|
|
51
|
+
this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a||_r.set(i,a=new Set),a.add(o),t.has(o)||(t.add(o),n.push(r))}else n.push(r)}),ln(ln({},e),{definitions:n})}function nl(e){var t=new Set(e.definitions);t.forEach(function(r){r.loc&&delete r.loc,Object.keys(r).forEach(function(i){var o=r[i];o&&typeof o=="object"&&t.add(o)})});var n=e.loc;return n&&(delete n.startToken,delete n.endToken),e}function rl(e){var t=wo(e);if(!pn.has(t)){var n=mo(e,{experimentalFragmentVariables:fn,allowLegacyFragmentVariables:fn});if(!n||n.kind!=="Document")throw new Error("Not a valid GraphQL document.");pn.set(t,nl(el(n)))}return pn.get(t)}function Y(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];typeof e=="string"&&(e=[e]);var r=e[0];return t.forEach(function(i,o){i&&i.kind==="Document"?r+=i.loc.source.body:r+=i,r+=e[o+1]}),rl(r)}function il(){pn.clear(),_r.clear()}function ol(){To=!1}function al(){fn=!0}function sl(){fn=!1}var Ce={gql:Y,resetCaches:il,disableFragmentWarnings:ol,enableExperimentalFragmentVariables:al,disableExperimentalFragmentVariables:sl};(function(e){e.gql=Ce.gql,e.resetCaches=Ce.resetCaches,e.disableFragmentWarnings=Ce.disableFragmentWarnings,e.enableExperimentalFragmentVariables=Ce.enableExperimentalFragmentVariables,e.disableExperimentalFragmentVariables=Ce.disableExperimentalFragmentVariables})(Y||(Y={})),Y.default=Y;const So=Y`
|
|
52
52
|
fragment MatchParts on MatchConfig {
|
|
53
53
|
regexValue
|
|
54
54
|
matchValue
|
|
55
55
|
}
|
|
56
|
-
`,
|
|
56
|
+
`,ul=Y`
|
|
57
57
|
mutation PushPayload(
|
|
58
58
|
$session_secure_id: String!
|
|
59
59
|
$payload_id: ID!
|
|
@@ -79,7 +79,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a
|
|
|
79
79
|
highlight_logs: $highlight_logs
|
|
80
80
|
)
|
|
81
81
|
}
|
|
82
|
-
`,
|
|
82
|
+
`,cl=Y`
|
|
83
83
|
mutation PushSessionEvents(
|
|
84
84
|
$session_secure_id: String!
|
|
85
85
|
$payload_id: Int64ID!
|
|
@@ -91,7 +91,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a
|
|
|
91
91
|
data: $data
|
|
92
92
|
)
|
|
93
93
|
}
|
|
94
|
-
`,
|
|
94
|
+
`,ll=Y`
|
|
95
95
|
mutation identifySession(
|
|
96
96
|
$session_secure_id: String!
|
|
97
97
|
$user_identifier: String!
|
|
@@ -103,7 +103,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a
|
|
|
103
103
|
user_object: $user_object
|
|
104
104
|
)
|
|
105
105
|
}
|
|
106
|
-
`,
|
|
106
|
+
`,pl=Y`
|
|
107
107
|
mutation addSessionProperties(
|
|
108
108
|
$session_secure_id: String!
|
|
109
109
|
$properties_object: Any
|
|
@@ -113,11 +113,11 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a
|
|
|
113
113
|
properties_object: $properties_object
|
|
114
114
|
)
|
|
115
115
|
}
|
|
116
|
-
`,
|
|
116
|
+
`,fl=Y`
|
|
117
117
|
mutation pushMetrics($metrics: [MetricInput]!) {
|
|
118
118
|
pushMetrics(metrics: $metrics)
|
|
119
119
|
}
|
|
120
|
-
`,
|
|
120
|
+
`,hl=Y`
|
|
121
121
|
mutation addSessionFeedback(
|
|
122
122
|
$session_secure_id: String!
|
|
123
123
|
$user_name: String
|
|
@@ -133,7 +133,7 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a
|
|
|
133
133
|
timestamp: $timestamp
|
|
134
134
|
)
|
|
135
135
|
}
|
|
136
|
-
`,
|
|
136
|
+
`,dl=Y`
|
|
137
137
|
mutation initializeSession(
|
|
138
138
|
$session_secure_id: String!
|
|
139
139
|
$session_key: String
|
|
@@ -220,12 +220,12 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a
|
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
|
-
${
|
|
224
|
-
`,
|
|
223
|
+
${So}
|
|
224
|
+
`,vl=Y`
|
|
225
225
|
query Ignore($id: ID!) {
|
|
226
226
|
ignore(id: $id)
|
|
227
227
|
}
|
|
228
|
-
`,
|
|
228
|
+
`,ml=Y`
|
|
229
229
|
query GetSamplingConfig($organization_verbose_id: String!) {
|
|
230
230
|
sampling(organization_verbose_id: $organization_verbose_id) {
|
|
231
231
|
spans {
|
|
@@ -274,8 +274,8 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a
|
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
276
|
}
|
|
277
|
-
${
|
|
278
|
-
`,op=(e,t,n,r)=>e();function ap(e,t=op){return{PushPayload(n,r){return t(i=>e.request(Yl,n,I(I({},r),i)),"PushPayload","mutation",n)},PushSessionEvents(n,r){return t(i=>e.request(Jl,n,I(I({},r),i)),"PushSessionEvents","mutation",n)},identifySession(n,r){return t(i=>e.request(Ql,n,I(I({},r),i)),"identifySession","mutation",n)},addSessionProperties(n,r){return t(i=>e.request(Zl,n,I(I({},r),i)),"addSessionProperties","mutation",n)},pushMetrics(n,r){return t(i=>e.request(ep,n,I(I({},r),i)),"pushMetrics","mutation",n)},addSessionFeedback(n,r){return t(i=>e.request(tp,n,I(I({},r),i)),"addSessionFeedback","mutation",n)},initializeSession(n,r){return t(i=>e.request(np,n,I(I({},r),i)),"initializeSession","mutation",n)},Ignore(n,r){return t(i=>e.request(rp,n,I(I({},r),i)),"Ignore","query",n)},GetSamplingConfig(n,r){return t(i=>e.request(ip,n,I(I({},r),i)),"GetSamplingConfig","query",n)}}}function sp(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}function up(e){if(!e||!e.outerHTML)return"";let t="";for(;e.parentElement;){let n=e.localName;if(!n)break;n=n.toLowerCase();let r=e.parentElement,i=[];if(r.children&&r.children.length>0)for(let o=0;o<r.children.length;o++){let a=r.children[o];a.localName&&a.localName.toLowerCase&&a.localName.toLowerCase()===n&&i.push(a)}i.length>1&&(n+=":eq("+i.indexOf(e)+")"),t=n+(t?">"+t:""),e=r}return t}function Sr(e){return Object.prototype.toString.call(e)==="[object Object]"}function Jo(e,t){if(t===0)return!0;const n=Object.keys(e);for(const r of n)if(Sr(e[r])&&Jo(e[r],t-1))return!0;return!1}function Or(e,t){const n={numOfKeysLimit:50,depthOfLimit:4};Object.assign(n,t);const r=[],i=[];return JSON.stringify(e,function(u,c){if(r.length>0){const s=r.indexOf(this);~s?r.splice(s+1):r.push(this),~s?i.splice(s,1/0,u):i.push(u),~r.indexOf(c)&&(r[0]===c?c="[Circular ~]":c="[Circular ~."+i.slice(0,r.indexOf(c)).join(".")+"]")}else r.push(c);if(c==null)return c;if(o(c))return a(c);if(c instanceof Event){const s={};for(const l in c){const p=c[l];Array.isArray(p)?s[l]=up(p.length?p[0]:null):s[l]=p}return s}else{if(c instanceof Node)return c instanceof HTMLElement?c?c.outerHTML:"":c.nodeName;if(c instanceof Error)return c.name+": "+c.message}return c});function o(u){return Sr(u)&&Object.keys(u).length>n.numOfKeysLimit||typeof u=="function"?!0:u instanceof Event&&u.isTrusted===!1?Object.keys(u).length===1:!!(Sr(u)&&Jo(u,n.depthOfLimit))}function a(u){let c=u.toString();return n.stringLengthLimit&&c.length>n.stringLengthLimit&&(c=`${c.slice(0,n.stringLengthLimit)}...`),c}}function cp(e){return typeof e=="number"&&!isNaN(e)&&isFinite(e)}const wr="exception.message",lp="exception.stacktrace",Ar="exception.type",Qo="http.response.status_code",pp="server.address",fp="service.name",hp="service.version",dp="telemetry.sdk.name",vp="telemetry.sdk.version",we="url.full",gn="url.path",yp="url.query",mp="user_agent.original",Lr=15*60*1e3;/*! js-cookie v3.0.5 | MIT */function _n(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var gp={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Rr(e,t){function n(i,o,a){if(typeof document<"u"){a=_n({},t,a),typeof a.expires=="number"&&(a.expires=new Date(Date.now()+a.expires*864e5)),a.expires&&(a.expires=a.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var u="";for(var c in a)a[c]&&(u+="; "+c,a[c]!==!0&&(u+="="+a[c].split(";")[0]));return document.cookie=i+"="+e.write(o,i)+u}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],a={},u=0;u<o.length;u++){var c=o[u].split("="),s=c.slice(1).join("=");try{var l=decodeURIComponent(c[0]);if(a[l]=e.read(s,l),i===l)break}catch{}}return i?a[i]:a}}return Object.create({set:n,get:r,remove:function(i,o){n(i,"",_n({},o,{expires:-1}))},withAttributes:function(i){return Rr(this.converter,_n({},this.attributes,i))},withConverter:function(i){return Rr(_n({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var Cr=Rr(gp,{path:"/"});let Nr="localStorage",xr=!0,_p=class{constructor(){wt(this,"storage",{})}get length(){return Object.keys(this.storage).length}key(t){var n;return(n=Object.keys(this.storage)[t])!=null?n:null}getItem(t){var n;return(n=this.storage[t])!=null?n:""}setItem(t,n){this.storage[t]=n}removeItem(t){delete this.storage[t]}},Ep=class{getItem(t){var n;return(n=Cr.get(t))!=null?n:""}setItem(t,n){if(!xr)return;const r=new Date;r.setTime(r.getTime()+Lr),Cr.set(t,n,{expires:r})}removeItem(t){xr&&Cr.remove(t)}};const ot=new _p,En=new Ep,Ct=()=>{let e=null;if(typeof window>"u")return ot;try{switch(Nr){case"localStorage":e=window.localStorage;break;case"sessionStorage":e=window.sessionStorage;break}e||(Oe("storage","getPersistentStorage","debug",`persistent storage was not found for mode ${Nr}; using global storage`),e=ot)}catch(t){Oe("storage","getPersistentStorage","debug","failed to get persistent storage; using global storage",t),e=ot}return e},Tp=e=>{Nr=e},Zo=e=>{xr=e},Pr=e=>{try{return Ct().getItem(e)}catch(t){return Oe("storage","getItem","debug",`failed to get item ${e}; using global storage`,t),ot.getItem(e)}},ea=(e,t)=>{En.setItem(e,t);try{return Ct().setItem(e,t)}catch(n){return Oe("storage","setItem","debug",`failed to set item ${e}; using global storage`,n),ot.setItem(e,t)}},ta=e=>{En.removeItem(e);try{return Ct().removeItem(e)}catch(t){return Oe("storage","removeItem","debug",`failed to remove item ${e}; using global storage`,t),ot.removeItem(e)}};var at=(e=>(e.SEGMENT_LAST_SENT_HASH_KEY="HIGHLIGHT_SEGMENT_LAST_SENT_HASH_KEY",e.SESSION_ID="sessionID",e.SESSION_DATA="sessionData",e.USER_IDENTIFIER="highlightIdentifier",e.USER_OBJECT="highlightUserObject",e))(at||{});const Tn=e=>`${at.SESSION_DATA}_${e}`,Ae=()=>{var e;return typeof globalThis<"u"&&(e=globalThis.persistentSessionSecureID)!=null&&e.length?globalThis.persistentSessionSecureID:na()},bp=e=>{typeof globalThis<"u"&&e!=null&&e.length&&(globalThis.persistentSessionSecureID=e)},na=()=>{var e;return(e=Pr(at.SESSION_ID))!=null?e:""},ra=e=>{ea(at.SESSION_ID,e)},Sp=e=>{const t=Tn(e);return JSON.parse(Pr(t)||"{}")},Op=e=>{e||(e=na());let t=Sp(e);if(t&&t.lastPushTime&&Date.now()-t.lastPushTime<Lr)return t;ta(Tn(e))},ia=function(e){if(!(e!=null&&e.sessionSecureID))return;const t=e.sessionSecureID;bp(t);const n=Tn(t);ea(n,JSON.stringify(e)),Ap(n)},wp=function(){const e=En.getItem(at.SESSION_ID);ra(e);const t=Tn(e),n=En.getItem(t);try{ia(JSON.parse(n))}catch{}};function Ap(e){const t=`${at.SESSION_DATA}_`;for(let n=Ct().length-1;n>=0;n--){const r=Ct().key(n);if(r&&r.startsWith(t)&&r!==e)try{const i=JSON.parse(Pr(r)||"{}");i.lastPushTime!==void 0&&Date.now()-i.lastPushTime>=Lr&&(Oe("highlightSession","pruneSessionData","debug",`removing session data for stale key ${r}`),ta(r))}catch(i){Oe("highlightSession","pruneSessionData","error",`failed to parse session data for key ${r}`,i)}}}var oa=(e=>(e.BillingQuotaExceeded="BillingQuotaExceeded",e))(oa||{});const Ir=3,kr=1e3,Mr=500,Lp=[oa.BillingQuotaExceeded.toString()],Rp=e=>{var t;return((t=e.response.errors)==null?void 0:t.find(n=>Lp.includes(n.message)))===void 0},Cp=()=>{const e=(t,n,r,i,o=0)=>tt(void 0,null,function*(){try{return yield t()}catch(a){if(a instanceof zo&&!Rp(a))throw a;if(o<Ir)return yield new Promise(u=>setTimeout(u,kr+Mr*Math.pow(2,o))),yield e(t,n,r,i,o+1);throw console.error(`highlight.io: data request failed after ${o} retries`),a}});return e},J="feature_flag",aa="launchdarkly",Np="evaluation",xp=`${J}.set.id`,Pp=`${J}.key`,Ip=`${J}.contextKeys`,kp=`${J}.context.id`,Mp=`${J}.result.value`,Dp=`${J}.provider.name`,sa={kind:`${J}.result.reason.kind`,errorKind:`${J}.result.reason.errorKind`,ruleIndex:`${J}.result.reason.ruleIndex`,ruleId:`${J}.result.reason.ruleId`,prerequisiteKey:`${J}.result.reason.prerequisiteKey`,inExperiment:`${J}.result.reason.inExperiment`,bigSegmentsStatus:`${J}.result.reason.bigSegmentsStatus`},Up=`${J}.result.variationIndex`,jp=`${aa}.application.id`,$p=`${aa}.application.version`,Bp="context",Fp=`${Bp}.contextKeys`,Vp="$ld:telemetry:session:init",ua="$ld:telemetry:track",Hp="launchdarkly.track",Gp="page_view",qp="document_load",zp="result.status";function ca(e){return e.includes("%")||e.includes(":")?e.replace(/%/g,"%25").replace(/:/g,"%3A"):e}function la(e){return e.kind==="multi"}function Dr(e){return la(e)?Object.keys(e).sort().filter(t=>t!=="kind").map(t=>`${t}:${ca(e[t].key)}`).join(":"):"kind"in e&&e.kind==="user"?e.key:"kind"in e?`${e.kind}:${ca(e.key)}`:e.key}function pa(e){return la(e)?Object.keys(e).sort().filter(t=>t!=="kind").map(t=>({[t]:e[t].key})).reduce((t,n)=>I(I({},t),n),{}):"kind"in e?{[e.kind]:e.key}:{user:e.key}}let Xp=class{constructor(t,n){wt(this,"client"),wt(this,"metadata"),this.client=t,this.metadata=n}getHooks(t){return[]}init(t){this.client.track(Vp,{sessionID:t})}recordGauge(t,n){}identify(t,n,r={},i){}error(t,n){}track(t,n){const r=n.event;this.client.track(r?`${ua}:${r}`:ua,an(I({},n),{sessionID:t}))}},Kp=class extends Ao{constructor(t,n){super(),wt(this,"client"),this.client=new Xp(t,n)}getHooks(t){return[{getMetadata:()=>({name:"highlight.run/ld"}),afterIdentify:(n,r,i)=>(this.load(this.client),r)}]}init(t){return this._bufferCall("init",[t])}recordGauge(t,n){return this._bufferCall("recordGauge",[t,n])}identify(t,n,r={},i){return this._bufferCall("identify",[t,n,r,i])}error(t,n){return this._bufferCall("error",[t,n])}track(t,n){return this._bufferCall("track",[t,n])}};const Wp=e=>{e(window.location.href);const t=history.pushState;history.pushState=(o=>function(){var a=o.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),a})(history.pushState);const n=history.replaceState;history.replaceState=(o=>function(){var a=o.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),a})(history.replaceState);const r=()=>{window.dispatchEvent(new Event("locationchange"))};window.addEventListener("popstate",r);const i=function(){e(window.location.href)};return window.addEventListener("locationchange",i),()=>{window.removeEventListener("popstate",r),window.removeEventListener("locationchange",i),history.pushState=t,history.replaceState=n}},Yp="10.2.0",Jp={version:Yp},Qp=Jp.version;function Zp(e){if(e.id.length)return`#${e.id}`;if(e.classList.length){let t=[];for(const n of e.classList)t.push(`.${n}`);return`${e.nodeName.toLowerCase()}${t.join(",")}`}return e.nodeName.toLowerCase()}const ef=e=>{let t;const n=()=>{clearTimeout(t),t=setTimeout(()=>{var r,i;e({height:window.innerHeight,width:window.innerWidth,availHeight:window.screen.availHeight,availWidth:window.screen.availWidth,colorDepth:window.screen.colorDepth,pixelDepth:window.screen.pixelDepth,orientation:(i=(r=window.screen.orientation)==null?void 0:r.angle)!=null?i:0})},500)};return window.addEventListener("resize",n),n(),()=>window.removeEventListener("resize",n)};var fa={exports:{}};/**
|
|
277
|
+
${So}
|
|
278
|
+
`,yl=(e,t,n,r)=>e();function gl(e,t=yl){return{PushPayload(n,r){return t(i=>e.request(ul,n,P(P({},r),i)),"PushPayload","mutation",n)},PushSessionEvents(n,r){return t(i=>e.request(cl,n,P(P({},r),i)),"PushSessionEvents","mutation",n)},identifySession(n,r){return t(i=>e.request(ll,n,P(P({},r),i)),"identifySession","mutation",n)},addSessionProperties(n,r){return t(i=>e.request(pl,n,P(P({},r),i)),"addSessionProperties","mutation",n)},pushMetrics(n,r){return t(i=>e.request(fl,n,P(P({},r),i)),"pushMetrics","mutation",n)},addSessionFeedback(n,r){return t(i=>e.request(hl,n,P(P({},r),i)),"addSessionFeedback","mutation",n)},initializeSession(n,r){return t(i=>e.request(dl,n,P(P({},r),i)),"initializeSession","mutation",n)},Ignore(n,r){return t(i=>e.request(vl,n,P(P({},r),i)),"Ignore","query",n)},GetSamplingConfig(n,r){return t(i=>e.request(ml,n,P(P({},r),i)),"GetSamplingConfig","query",n)}}}function _l(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}function bl(e){if(!e||!e.outerHTML)return"";let t="";for(;e.parentElement;){let n=e.localName;if(!n)break;n=n.toLowerCase();let r=e.parentElement,i=[];if(r.children&&r.children.length>0)for(let o=0;o<r.children.length;o++){let a=r.children[o];a.localName&&a.localName.toLowerCase&&a.localName.toLowerCase()===n&&i.push(a)}i.length>1&&(n+=":eq("+i.indexOf(e)+")"),t=n+(t?">"+t:""),e=r}return t}function br(e){return Object.prototype.toString.call(e)==="[object Object]"}function Oo(e,t){if(t===0)return!0;const n=Object.keys(e);for(const r of n)if(br(e[r])&&Oo(e[r],t-1))return!0;return!1}function Er(e,t){const n={numOfKeysLimit:50,depthOfLimit:4};Object.assign(n,t);const r=[],i=[];return JSON.stringify(e,function(u,c){if(r.length>0){const s=r.indexOf(this);~s?r.splice(s+1):r.push(this),~s?i.splice(s,1/0,u):i.push(u),~r.indexOf(c)&&(r[0]===c?c="[Circular ~]":c="[Circular ~."+i.slice(0,r.indexOf(c)).join(".")+"]")}else r.push(c);if(c==null)return c;if(o(c))return a(c);if(c instanceof Event){const s={};for(const l in c){const p=c[l];Array.isArray(p)?s[l]=bl(p.length?p[0]:null):s[l]=p}return s}else{if(c instanceof Node)return c instanceof HTMLElement?c?c.outerHTML:"":c.nodeName;if(c instanceof Error)return c.name+": "+c.message}return c});function o(u){return br(u)&&Object.keys(u).length>n.numOfKeysLimit||typeof u=="function"?!0:u instanceof Event&&u.isTrusted===!1?Object.keys(u).length===1:!!(br(u)&&Oo(u,n.depthOfLimit))}function a(u){let c=u.toString();return n.stringLengthLimit&&c.length>n.stringLengthLimit&&(c=`${c.slice(0,n.stringLengthLimit)}...`),c}}function El(e){return typeof e=="number"&&!isNaN(e)&&isFinite(e)}const Tr="exception.message",Tl="exception.stacktrace",wr="exception.type",Ao="http.response.status_code",wl="server.address",Sl="service.name",Ol="service.version",Al="telemetry.sdk.name",xl="telemetry.sdk.version",At="url.full",hn="url.path",Cl="url.query",Ll="user_agent.original",Sr=15*60*1e3;/*! js-cookie v3.0.5 | MIT */function dn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var Nl={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Or(e,t){function n(i,o,a){if(typeof document<"u"){a=dn({},t,a),typeof a.expires=="number"&&(a.expires=new Date(Date.now()+a.expires*864e5)),a.expires&&(a.expires=a.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var u="";for(var c in a)a[c]&&(u+="; "+c,a[c]!==!0&&(u+="="+a[c].split(";")[0]));return document.cookie=i+"="+e.write(o,i)+u}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],a={},u=0;u<o.length;u++){var c=o[u].split("="),s=c.slice(1).join("=");try{var l=decodeURIComponent(c[0]);if(a[l]=e.read(s,l),i===l)break}catch{}}return i?a[i]:a}}return Object.create({set:n,get:r,remove:function(i,o){n(i,"",dn({},o,{expires:-1}))},withAttributes:function(i){return Or(this.converter,dn({},this.attributes,i))},withConverter:function(i){return Or(dn({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var vn=Or(Nl,{path:"/"});let Ar="localStorage",xr=!0,Rl=class{constructor(){Oe(this,"storage",{})}get length(){return Object.keys(this.storage).length}key(t){var n;return(n=Object.keys(this.storage)[t])!=null?n:null}getItem(t){var n;return(n=this.storage[t])!=null?n:""}setItem(t,n){this.storage[t]=n}removeItem(t){delete this.storage[t]}},Il=class{getItem(t){var n;return(n=vn.get(t))!=null?n:""}setItem(t,n){if(!xr)return;const r=new Date;r.setTime(r.getTime()+Sr),vn.set(t,n,{expires:r})}removeItem(t){xr&&vn.remove(t)}keys(){var t;return Object.keys((t=vn.get())!=null?t:{})}};const ae=new Rl,se=new Il,mn=()=>{let e=null;if(typeof window>"u")return ae;try{switch(Ar){case"localStorage":e=window.localStorage;break;case"sessionStorage":e=window.sessionStorage;break}e||(kt("storage","getPersistentStorage","debug",`persistent storage was not found for mode ${Ar}; using global storage`),e=ae)}catch(t){kt("storage","getPersistentStorage","debug","failed to get persistent storage; using global storage",t),e=ae}return e},Pl=e=>{Ar=e},xo=e=>{xr=e},Cr=e=>{try{return mn().getItem(e)}catch(t){return kt("storage","getItem","debug",`failed to get item ${e}; using global storage`,t),ae.getItem(e)}},Co=(e,t)=>{se.setItem(e,t);try{return mn().setItem(e,t)}catch(n){return kt("storage","setItem","debug",`failed to set item ${e}; using global storage`,n),ae.setItem(e,t)}},Lo=e=>{se.removeItem(e);try{return mn().removeItem(e)}catch(t){return kt("storage","removeItem","debug",`failed to remove item ${e}; using global storage`,t),ae.removeItem(e)}};var ue=(e=>(e.SEGMENT_LAST_SENT_HASH_KEY="HIGHLIGHT_SEGMENT_LAST_SENT_HASH_KEY",e.SESSION_ID="sessionID",e.SESSION_DATA="sessionData",e.USER_IDENTIFIER="highlightIdentifier",e.USER_OBJECT="highlightUserObject",e))(ue||{});const yn=e=>`${ue.SESSION_DATA}_${e}`,xt=()=>{var e;return typeof globalThis<"u"&&(e=globalThis.persistentSessionSecureID)!=null&&e.length?globalThis.persistentSessionSecureID:No()},kl=e=>{typeof globalThis<"u"&&e!=null&&e.length&&(globalThis.persistentSessionSecureID=e)},No=()=>{var e;return(e=Cr(ue.SESSION_ID))!=null?e:""},Ro=e=>{Co(ue.SESSION_ID,e)},Dl=e=>{const t=yn(e);return JSON.parse(Cr(t)||"{}")},Ml=e=>{e||(e=No());let t=Dl(e);if(t&&t.lastPushTime&&Date.now()-t.lastPushTime<Sr)return t;Lo(yn(e))},Io=function(e){if(!(e!=null&&e.sessionSecureID))return;const t=e.sessionSecureID;kl(t);const n=yn(t);Co(n,JSON.stringify(e)),$l(n)},Ul=function(){const e=se.getItem(ue.SESSION_ID);Ro(e);const t=yn(e),n=se.getItem(t);try{Io(JSON.parse(n))}catch{}};function $l(e){var t;const n=`${ue.SESSION_DATA}_`,r=new Set,i=mn();for(let o=i.length-1;o>=0;o--){const a=i.key(o);a&&a.startsWith(n)&&a!==e&&r.add(a)}for(const o of se.keys())o.startsWith(n)&&o!==e&&r.add(o);for(const o of r){let a=!0;try{const u=Cr(o)||se.getItem(o)||"{}",c=JSON.parse(u),s=(t=c.lastPushTime)!=null?t:c.sessionStartTime;a=s===void 0||Date.now()-s>=Sr}catch{}a&&(kt("highlightSession","pruneSessionData","debug",`removing session data for stale key ${o}`),Lo(o))}}var Po=(e=>(e.BillingQuotaExceeded="BillingQuotaExceeded",e))(Po||{});const Lr=3,Nr=1e3,Rr=500,jl=[Po.BillingQuotaExceeded.toString()],Bl=e=>{var t;return((t=e.response.errors)==null?void 0:t.find(n=>jl.includes(n.message)))===void 0},Fl=()=>{const e=(t,n,r,i,o=0)=>ne(void 0,null,function*(){try{return yield t()}catch(a){if(a instanceof bo&&!Bl(a))throw a;if(o<Lr)return yield new Promise(u=>setTimeout(u,Nr+Rr*Math.pow(2,o))),yield e(t,n,r,i,o+1);throw console.error(`highlight.io: data request failed after ${o} retries`),a}});return e},J="feature_flag",ko="launchdarkly",Vl="evaluation",Hl=`${J}.set.id`,Gl=`${J}.key`,ql=`${J}.contextKeys`,zl=`${J}.context.id`,Kl=`${J}.result.value`,Xl=`${J}.provider.name`,Do={kind:`${J}.result.reason.kind`,errorKind:`${J}.result.reason.errorKind`,ruleIndex:`${J}.result.reason.ruleIndex`,ruleId:`${J}.result.reason.ruleId`,prerequisiteKey:`${J}.result.reason.prerequisiteKey`,inExperiment:`${J}.result.reason.inExperiment`,bigSegmentsStatus:`${J}.result.reason.bigSegmentsStatus`},Wl=`${J}.result.variationIndex`,Yl=`${ko}.application.id`,Jl=`${ko}.application.version`,Ql="context",Zl=`${Ql}.contextKeys`,tp="$ld:telemetry:session:init",Mo="$ld:telemetry:track",ep="launchdarkly.track",np="page_view",rp="document_load",ip="result.status";function Uo(e){return e.includes("%")||e.includes(":")?e.replace(/%/g,"%25").replace(/:/g,"%3A"):e}function $o(e){return e.kind==="multi"}function Ir(e){return $o(e)?Object.keys(e).sort().filter(t=>t!=="kind").map(t=>`${t}:${Uo(e[t].key)}`).join(":"):"kind"in e&&e.kind==="user"?e.key:"kind"in e?`${e.kind}:${Uo(e.key)}`:e.key}function jo(e){return $o(e)?Object.keys(e).sort().filter(t=>t!=="kind").map(t=>({[t]:e[t].key})).reduce((t,n)=>P(P({},t),n),{}):"kind"in e?{[e.kind]:e.key}:{user:e.key}}class op{constructor(t,n){Oe(this,"client"),Oe(this,"metadata"),this.client=t,this.metadata=n}getHooks(t){return[]}init(t){this.client.track(tp,{sessionID:t})}recordGauge(t,n){}identify(t,n,r={},i){}error(t,n){}track(t,n){const r=n.event;this.client.track(r?`${Mo}:${r}`:Mo,tn(P({},n),{sessionID:t}))}}let ap=class extends Zi{constructor(t,n){super(),Oe(this,"client"),this.client=new op(t,n)}getHooks(t){return[{getMetadata:()=>({name:"highlight.run/ld"}),afterIdentify:(n,r,i)=>(this.load(this.client),r)}]}init(t){return this._bufferCall("init",[t])}recordGauge(t,n){return this._bufferCall("recordGauge",[t,n])}identify(t,n,r={},i){return this._bufferCall("identify",[t,n,r,i])}error(t,n){return this._bufferCall("error",[t,n])}track(t,n){return this._bufferCall("track",[t,n])}};const sp=e=>{e(window.location.href);const t=history.pushState;history.pushState=(o=>function(){var a=o.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),a})(history.pushState);const n=history.replaceState;history.replaceState=(o=>function(){var a=o.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),a})(history.replaceState);const r=()=>{window.dispatchEvent(new Event("locationchange"))};window.addEventListener("popstate",r);const i=function(){e(window.location.href)};return window.addEventListener("locationchange",i),()=>{window.removeEventListener("popstate",r),window.removeEventListener("locationchange",i),history.pushState=t,history.replaceState=n}},up="10.3.1",cp={version:up},lp=cp.version;function pp(e){if(e.id.length)return`#${e.id}`;if(e.classList.length){let t=[];for(const n of e.classList)t.push(`.${n}`);return`${e.nodeName.toLowerCase()}${t.join(",")}`}return e.nodeName.toLowerCase()}const fp=e=>{let t;const n=()=>{clearTimeout(t),t=setTimeout(()=>{var r,i;e({height:window.innerHeight,width:window.innerWidth,availHeight:window.screen.availHeight,availWidth:window.screen.availWidth,colorDepth:window.screen.colorDepth,pixelDepth:window.screen.pixelDepth,orientation:(i=(r=window.screen.orientation)==null?void 0:r.angle)!=null?i:0})},500)};return window.addEventListener("resize",n),n(),()=>window.removeEventListener("resize",n)};var Bo={exports:{}};/**
|
|
279
279
|
* @preserve
|
|
280
280
|
* JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013)
|
|
281
281
|
*
|
|
@@ -285,26 +285,26 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a
|
|
|
285
285
|
* @see http://github.com/garycourt/murmurhash-js
|
|
286
286
|
* @author <a href="mailto:aappleby@gmail.com">Austin Appleby</a>
|
|
287
287
|
* @see http://sites.google.com/site/murmurhash/
|
|
288
|
-
*/(function(e){(function(){var t;function n(r,i){var o=this instanceof n?this:t;if(o.reset(i),typeof r=="string"&&r.length>0&&o.hash(r),o!==this)return o}n.prototype.hash=function(r){var i,o,a,u,c;switch(c=r.length,this.len+=c,o=this.k1,a=0,this.rem){case 0:o^=c>a?r.charCodeAt(a++)&65535:0;case 1:o^=c>a?(r.charCodeAt(a++)&65535)<<8:0;case 2:o^=c>a?(r.charCodeAt(a++)&65535)<<16:0;case 3:o^=c>a?(r.charCodeAt(a)&255)<<24:0,o^=c>a?(r.charCodeAt(a++)&65280)>>8:0}if(this.rem=c+this.rem&3,c-=this.rem,c>0){for(i=this.h1;o=o*11601+(o&65535)*3432906752&4294967295,o=o<<15|o>>>17,o=o*13715+(o&65535)*461832192&4294967295,i^=o,i=i<<13|i>>>19,i=i*5+3864292196&4294967295,!(a>=c);)o=r.charCodeAt(a++)&65535^(r.charCodeAt(a++)&65535)<<8^(r.charCodeAt(a++)&65535)<<16,u=r.charCodeAt(a++),o^=(u&255)<<24^(u&65280)>>8;switch(o=0,this.rem){case 3:o^=(r.charCodeAt(a+2)&65535)<<16;case 2:o^=(r.charCodeAt(a+1)&65535)<<8;case 1:o^=r.charCodeAt(a)&65535}this.h1=i}return this.k1=o,this},n.prototype.result=function(){var r,i;return r=this.k1,i=this.h1,r>0&&(r=r*11601+(r&65535)*3432906752&4294967295,r=r<<15|r>>>17,r=r*13715+(r&65535)*461832192&4294967295,i^=r),i^=this.len,i^=i>>>16,i=i*51819+(i&65535)*2246770688&4294967295,i^=i>>>13,i=i*44597+(i&65535)*3266445312&4294967295,i^=i>>>16,i>>>0},n.prototype.reset=function(r){return this.h1=typeof r=="number"?r:0,this.rem=this.k1=this.len=0,this},t=new n,e.exports=n})()})(
|
|
289
|
-
`).filter(function(c){return!!c.match(i)},this);return u.map(function(c){c.indexOf("(eval ")>-1&&(c=c.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var s=c.replace(/^\s+/,"").replace(/\(eval code/g,"("),l=s.match(/ (\((.+):(\d+):(\d+)\)$)/);s=l?s.replace(l[0],""):s;var p=s.split(/\s+/).slice(1),f=this.extractLocation(l?l[1]:p.pop()),
|
|
288
|
+
*/(function(e){(function(){var t;function n(r,i){var o=this instanceof n?this:t;if(o.reset(i),typeof r=="string"&&r.length>0&&o.hash(r),o!==this)return o}n.prototype.hash=function(r){var i,o,a,u,c;switch(c=r.length,this.len+=c,o=this.k1,a=0,this.rem){case 0:o^=c>a?r.charCodeAt(a++)&65535:0;case 1:o^=c>a?(r.charCodeAt(a++)&65535)<<8:0;case 2:o^=c>a?(r.charCodeAt(a++)&65535)<<16:0;case 3:o^=c>a?(r.charCodeAt(a)&255)<<24:0,o^=c>a?(r.charCodeAt(a++)&65280)>>8:0}if(this.rem=c+this.rem&3,c-=this.rem,c>0){for(i=this.h1;o=o*11601+(o&65535)*3432906752&4294967295,o=o<<15|o>>>17,o=o*13715+(o&65535)*461832192&4294967295,i^=o,i=i<<13|i>>>19,i=i*5+3864292196&4294967295,!(a>=c);)o=r.charCodeAt(a++)&65535^(r.charCodeAt(a++)&65535)<<8^(r.charCodeAt(a++)&65535)<<16,u=r.charCodeAt(a++),o^=(u&255)<<24^(u&65280)>>8;switch(o=0,this.rem){case 3:o^=(r.charCodeAt(a+2)&65535)<<16;case 2:o^=(r.charCodeAt(a+1)&65535)<<8;case 1:o^=r.charCodeAt(a)&65535}this.h1=i}return this.k1=o,this},n.prototype.result=function(){var r,i;return r=this.k1,i=this.h1,r>0&&(r=r*11601+(r&65535)*3432906752&4294967295,r=r<<15|r>>>17,r=r*13715+(r&65535)*461832192&4294967295,i^=r),i^=this.len,i^=i>>>16,i=i*51819+(i&65535)*2246770688&4294967295,i^=i>>>13,i=i*44597+(i&65535)*3266445312&4294967295,i^=i>>>16,i>>>0},n.prototype.reset=function(r){return this.h1=typeof r=="number"?r:0,this.rem=this.k1=this.len=0,this},t=new n,e.exports=n})()})(Bo);var hp=Bo.exports;const dp=sn(hp),Pr=28,ce="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",vp=2246822507,Fo=e=>{var t,n="";if(e){const r=dp(e).result();for(let i=0;i<Pr;i++){const o=((r^i*vp)>>>0)%ce.length;n+=ce.charAt(o)}}else{const r=typeof window<"u"&&((t=window.crypto)==null?void 0:t.getRandomValues),i=new Uint32Array(Pr);r&&window.crypto.getRandomValues(i);for(let o=0;o<Pr;o++)r?n+=ce.charAt(i[o]%ce.length):n+=ce.charAt(Math.floor(Math.random()*ce.length))}return n};let mp=class{constructor(t){Oe(this,"sessionSecureID");try{t!=null&&t.storageMode&&Pl(t?.storageMode),xo(!!(t!=null&&t.sessionCookie)),t!=null&&t.sessionCookie?Ul():xo(!1)}catch(n){Ot("Error initializing @launchdarkly observability plugin","error",n)}}configureSession(t,n){try{const r=xt();let i=Ml(r);i!=null&&i.sessionSecureID?this.sessionSecureID=i.sessionSecureID:(n!=null&&n.sessionKey?this.sessionSecureID=Fo(`${t}-${n.sessionKey}`):this.sessionSecureID=Fo(),Ro(this.sessionSecureID),Io({sessionSecureID:this.sessionSecureID,sessionKey:n?.sessionKey,projectID:0,sessionStartTime:Date.now(),lastPushTime:Date.now()}))}catch(r){Ot("Error configuring session in @launchdarkly observability plugin","error",r)}}};class Vo extends Zi{start(){return this._sdk.start()}stop(){return this._sdk.stop()}recordGauge(t){return this._bufferCall("recordGauge",[t])}recordCount(t){return this._bufferCall("recordCount",[t])}recordIncr(t){return this._bufferCall("recordIncr",[t])}recordHistogram(t){return this._bufferCall("recordHistogram",[t])}recordUpDownCounter(t){return this._bufferCall("recordUpDownCounter",[t])}startSpan(t,n,r,i){return this._bufferCall("startSpan",[t,n,r,i])}startManualSpan(t,n,r,i){return this._bufferCall("startManualSpan",[t,n,r,i])}register(t,n){return this._bufferCall("register",[t,n])}recordLog(t,n,r){return this._bufferCall("recordLog",[t,n,r])}recordError(t,n,r,i,o){return this._bufferCall("recordError",[t,n,r,i,o])}setLDContextKeyAttributes(t){return this._bufferCall("setLDContextKeyAttributes",[t])}getLDContextKeyAttributes(){return this._bufferCall("getLDContextKeyAttributes",[])}}et.LDObserve=void 0,typeof globalThis<"u"?globalThis.LDObserve?et.LDObserve=globalThis.LDObserve:(et.LDObserve=new Vo,globalThis.LDObserve=et.LDObserve):et.LDObserve=new Vo;const yp=Object.freeze(Object.defineProperty({__proto__:null,get LDObserve(){return et.LDObserve}},Symbol.toStringTag,{value:"Module"}));var gp=Object.defineProperty,_p=Object.defineProperties,bp=Object.getOwnPropertyDescriptors,gn=Object.getOwnPropertySymbols,Ep=Object.getPrototypeOf,Ho=Object.prototype.hasOwnProperty,Go=Object.prototype.propertyIsEnumerable,Tp=Reflect.get,kr=(e,t,n)=>t in e?gp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,C=(e,t)=>{for(var n in t||(t={}))Ho.call(t,n)&&kr(e,n,t[n]);if(gn)for(var n of gn(t))Go.call(t,n)&&kr(e,n,t[n]);return e},Q=(e,t)=>_p(e,bp(t)),wp=(e,t)=>{var n={};for(var r in e)Ho.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&gn)for(var r of gn(e))t.indexOf(r)<0&&Go.call(e,r)&&(n[r]=e[r]);return n},L=(e,t,n)=>kr(e,typeof t!="symbol"?t+"":t,n),qo=(e,t,n)=>Tp(Ep(e),n,t),lt=(e,t,n)=>new Promise((r,i)=>{var o=c=>{try{u(n.next(c))}catch(s){i(s)}},a=c=>{try{u(n.throw(c))}catch(s){i(s)}},u=c=>c.done?r(c.value):Promise.resolve(c.value).then(o,a);u((n=n.apply(e,t)).next())});const Sp=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"];var Mt=(e=>(e.DeviceMemory="DeviceMemory",e.ViewportHeight="ViewportHeight",e.ViewportWidth="ViewportWidth",e.ScreenHeight="ScreenHeight",e.ScreenWidth="ScreenWidth",e.ViewportArea="ViewportArea",e))(Mt||{}),nt=(e=>(e.Device="Device",e.WebVital="WebVital",e.Performance="Performance",e.Frontend="Frontend",e.Backend="Backend",e))(nt||{}),zo={exports:{}},Ko={exports:{}},Xo;function Op(){return Xo||(Xo=1,function(e,t){(function(n,r){e.exports=r()})(hr,function(){function n(y){return!isNaN(parseFloat(y))&&isFinite(y)}function r(y){return y.charAt(0).toUpperCase()+y.substring(1)}function i(y){return function(){return this[y]}}var o=["isConstructor","isEval","isNative","isToplevel"],a=["columnNumber","lineNumber"],u=["fileName","functionName","source"],c=["args"],s=["evalOrigin"],l=o.concat(a,u,c,s);function p(y){if(y)for(var g=0;g<l.length;g++)y[l[g]]!==void 0&&this["set"+r(l[g])](y[l[g]])}p.prototype={getArgs:function(){return this.args},setArgs:function(y){if(Object.prototype.toString.call(y)!=="[object Array]")throw new TypeError("Args must be an Array");this.args=y},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(y){if(y instanceof p)this.evalOrigin=y;else if(y instanceof Object)this.evalOrigin=new p(y);else throw new TypeError("Eval Origin must be an Object or StackFrame")},toString:function(){var y=this.getFileName()||"",g=this.getLineNumber()||"",b=this.getColumnNumber()||"",w=this.getFunctionName()||"";return this.getIsEval()?y?"[eval] ("+y+":"+g+":"+b+")":"[eval]:"+g+":"+b:w?w+" ("+y+":"+g+":"+b+")":y+":"+g+":"+b}},p.fromString=function(y){var g=y.indexOf("("),b=y.lastIndexOf(")"),w=y.substring(0,g),I=y.substring(g+1,b).split(","),M=y.substring(b+1);if(M.indexOf("@")===0)var j=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(M,""),tt=j[1],X=j[2],D=j[3];return new p({functionName:w,args:I||void 0,fileName:tt,lineNumber:X||void 0,columnNumber:D||void 0})};for(var f=0;f<o.length;f++)p.prototype["get"+r(o[f])]=i(o[f]),p.prototype["set"+r(o[f])]=function(y){return function(g){this[y]=!!g}}(o[f]);for(var v=0;v<a.length;v++)p.prototype["get"+r(a[v])]=i(a[v]),p.prototype["set"+r(a[v])]=function(y){return function(g){if(!n(g))throw new TypeError(y+" must be a Number");this[y]=Number(g)}}(a[v]);for(var m=0;m<u.length;m++)p.prototype["get"+r(u[m])]=i(u[m]),p.prototype["set"+r(u[m])]=function(y){return function(g){this[y]=String(g)}}(u[m]);return p})}(Ko)),Ko.exports}(function(e,t){(function(n,r){e.exports=r(Op())})(hr,function(n){var r=/(^|@)\S+:\d+/,i=/^\s*at .*(\S+:\d+|\(native\))/m,o=/^(eval@)?(\[native code])?$/;return{parse:function(a){if(typeof a.stacktrace<"u"||typeof a["opera#sourceloc"]<"u")return this.parseOpera(a);if(a.stack&&a.stack.match(i))return this.parseV8OrIE(a);if(a.stack)return this.parseFFOrSafari(a);throw new Error("Cannot parse given Error object")},extractLocation:function(a){if(a.indexOf(":")===-1)return[a];var u=/(.+?)(?::(\d+))?(?::(\d+))?$/,c=u.exec(a.replace(/[()]/g,""));return[c[1],c[2]||void 0,c[3]||void 0]},parseV8OrIE:function(a){var u=a.stack.split(`
|
|
289
|
+
`).filter(function(c){return!!c.match(i)},this);return u.map(function(c){c.indexOf("(eval ")>-1&&(c=c.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var s=c.replace(/^\s+/,"").replace(/\(eval code/g,"("),l=s.match(/ (\((.+):(\d+):(\d+)\)$)/);s=l?s.replace(l[0],""):s;var p=s.split(/\s+/).slice(1),f=this.extractLocation(l?l[1]:p.pop()),v=p.join(" ")||void 0,m=["eval","<anonymous>"].indexOf(f[0])>-1?void 0:f[0];return new n({functionName:v,fileName:m,lineNumber:f[1],columnNumber:f[2],source:c})},this)},parseFFOrSafari:function(a){var u=a.stack.split(`
|
|
290
290
|
`).filter(function(c){return!c.match(o)},this);return u.map(function(c){if(c.indexOf(" > eval")>-1&&(c=c.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),c.indexOf("@")===-1&&c.indexOf(":")===-1)return new n({functionName:c});var s=/((.*".+"[^@]*)?[^@]*)(?:@)/,l=c.match(s),p=l&&l[1]?l[1]:void 0,f=this.extractLocation(c.replace(s,""));return new n({functionName:p,fileName:f[0],lineNumber:f[1],columnNumber:f[2],source:c})},this)},parseOpera:function(a){return!a.stacktrace||a.message.indexOf(`
|
|
291
291
|
`)>-1&&a.message.split(`
|
|
292
292
|
`).length>a.stacktrace.split(`
|
|
293
293
|
`).length?this.parseOpera9(a):a.stack?this.parseOpera11(a):this.parseOpera10(a)},parseOpera9:function(a){for(var u=/Line (\d+).*script (?:in )?(\S+)/i,c=a.message.split(`
|
|
294
294
|
`),s=[],l=2,p=c.length;l<p;l+=2){var f=u.exec(c[l]);f&&s.push(new n({fileName:f[2],lineNumber:f[1],source:c[l]}))}return s},parseOpera10:function(a){for(var u=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,c=a.stacktrace.split(`
|
|
295
295
|
`),s=[],l=0,p=c.length;l<p;l+=2){var f=u.exec(c[l]);f&&s.push(new n({functionName:f[3]||void 0,fileName:f[2],lineNumber:f[1],source:c[l]}))}return s},parseOpera11:function(a){var u=a.stack.split(`
|
|
296
|
-
`).filter(function(c){return!!c.match(r)&&!c.match(/^Error created at/)},this);return u.map(function(c){var s=c.split("@"),l=this.extractLocation(s.pop()),p=s.shift()||"",f=p.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0,m;p.match(/\(([^)]*)\)/)&&(m=p.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var v=m===void 0||m==="[arguments not available]"?void 0:m.split(",");return new n({functionName:f,args:v,fileName:l[0],lineNumber:l[1],columnNumber:l[2],source:c})},this)}}})})(ga);var vf=ga.exports;const Ta=fn(vf);function Sn(e){try{return Ta.parse(e)}catch(t){try{return Ta.parse(new Error)}catch(n){return console.warn("Highlight Warning: failed to parse error",{originalError:t,secondaryError:n}),[]}}}function yf(e,t){const n=t.logger;let r;r=window[n];const i=[];if(t.level.includes("error")&&window){const a=u=>{const{message:c,error:s}=u;let l=[];s&&(l=Sn(s));const p=[Or(c,t.stringifyOptions)];e({type:"Error",trace:l,time:Date.now(),value:p})};window.addEventListener("error",a),i.push(()=>{window&&window.removeEventListener("error",a)})}for(const a of t.level)i.push(o(r,a));return()=>{i.forEach(a=>a())};function o(a,u){return a[u]?sp(a,u,c=>(...s)=>{c.apply(this,s);try{e(mf(u,t,...s))}catch(l){c("highlight logger error:",l,...s)}}):()=>{}}}function mf(e,t,...n){const r=Sn(new Error),i=t.serializeConsoleAttributes?n.map(o=>typeof o=="object"?Or(o,t.stringifyOptions):o):n.filter(o=>typeof o!="object").map(o=>`${o}`);return{type:e,trace:r,value:i,attributes:Or(n.filter(o=>typeof o=="object").reduce((o,a)=>R(R({},o),a),{}),t.stringifyOptions),time:Date.now()}}const gf={start:0,end:3},_f={start:4,end:5},$r={start:6,end:7},Br={start:8,end:8},Ef={start:9,end:9},Tf={start:10,end:15};function bf(){if(crypto&&crypto.getRandomValues){const t=new Uint8Array(16);return crypto.getRandomValues(t),[...t.values()]}const e=[];for(let t=0;t<16;t+=1)e.push(Math.floor(Math.random()*256));return e}function ut(e,t){let n="";for(let r=t.start;r<=t.end;r+=1)n+=e[r].toString(16).padStart(2,"0");return n}function Sf(e){return e[Br.start]=(e[Br.start]|128)&191,e[$r.start]=e[$r.start]&15|64,`${ut(e,gf)}-${ut(e,_f)}-${ut(e,$r)}-${ut(e,Br)}${ut(e,Ef)}-${ut(e,Tf)}`}function Of(){const e=bf();return Sf(e)}function Fr(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():Of()}function Vr(e,t,n,r){var i,o,a,u;let c=r??t,s=Sn(c),l={};t instanceof Error&&(t=t.message,t.cause&&(l={"exception.cause":t.cause}));const p=Af(s);e({error:c,event:dn(t),type:"window.onerror",url:window.location.href,source:n??"",lineNumber:(i=p[0])!=null&&i.lineNumber?(o=p[0])==null?void 0:o.lineNumber:0,columnNumber:(a=p[0])!=null&&a.columnNumber?(u=p[0])==null?void 0:u.columnNumber:0,stackTrace:p,timestamp:new Date().toISOString(),payload:l?dn(l):void 0,id:Fr()})}const wf=(e,{enablePromisePatch:t})=>{if(typeof window>"u")return()=>{};const n=window.onerror=(a,u,c,s,l)=>{Vr(e,a,u,l)},r=window.onunhandledrejection=a=>{if(a.reason){const u=a.promise;u.getStack?Vr(e,a.reason,a.type,u.getStack()):Vr(e,a.reason,a.type)}},i=window.Promise,o=class extends i{constructor(a){super(a),C(this,"promiseCreationError"),this.promiseCreationError=new Error}getStack(){return this.promiseCreationError}static shouldPatch(){const a=typeof window.Zone>"u";return t&&a}};return o.shouldPatch()&&(window.Promise=o),()=>{window.Promise=i,window.onunhandledrejection=r,window.onerror=n}},Af=e=>{var t,n;if(e.length===0)return e;const r=e[0];return(t=r.fileName)!=null&&t.includes("highlight.run")||(n=r.fileName)!=null&&n.includes("highlight.io")||r.functionName==="new highlightPromise"?e.slice(1):e},Lf=['["\\"Script error.\\""]','"Script error."','["\\"Load failed.\\""]','"Load failed."','["\\"Network request failed.\\""]','"Network request failed."','["\\"Document is not focused.\\""]','"Document is not focused."','["\\"Failed to fetch\\""]','"Failed to fetch"','[{"isTrusted":true}]','{"isTrusted":true}','["{}"]','"{}"','[""]','""','["\\"\\""]','""'],Rf=["websocket error",'\\"ResizeObserver loop'];var Cf=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},De="1.9.0",ba=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function Nf(e){var t=new Set([e]),n=new Set,r=e.match(ba);if(!r)return function(){return!1};var i={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(i.prerelease!=null)return function(u){return u===e};function o(u){return n.add(u),!1}function a(u){return t.add(u),!0}return function(u){if(t.has(u))return!0;if(n.has(u))return!1;var c=u.match(ba);if(!c)return o(u);var s={major:+c[1],minor:+c[2],patch:+c[3],prerelease:c[4]};return s.prerelease!=null||i.major!==s.major?o(u):i.major===0?i.minor===s.minor&&i.patch<=s.patch?a(u):o(u):i.minor<=s.minor?a(u):o(u)}}var xf=Nf(De),Pf=De.split(".")[0],Nt=Symbol.for("opentelemetry.js.api."+Pf),xt=Cf;function Pt(e,t,n,r){var i;r===void 0&&(r=!1);var o=xt[Nt]=(i=xt[Nt])!==null&&i!==void 0?i:{version:De};if(!r&&o[e]){var a=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+e);return n.error(a.stack||a.message),!1}if(o.version!==De){var a=new Error("@opentelemetry/api: Registration of version v"+o.version+" for "+e+" does not match previously registered API v"+De);return n.error(a.stack||a.message),!1}return o[e]=t,n.debug("@opentelemetry/api: Registered a global for "+e+" v"+De+"."),!0}function Ue(e){var t,n,r=(t=xt[Nt])===null||t===void 0?void 0:t.version;if(!(!r||!xf(r)))return(n=xt[Nt])===null||n===void 0?void 0:n[e]}function It(e,t){t.debug("@opentelemetry/api: Unregistering a global for "+e+" v"+De+".");var n=xt[Nt];n&&delete n[e]}var If=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},kf=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},Mf=function(){function e(t){this._namespace=t.namespace||"DiagComponentLogger"}return e.prototype.debug=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return kt("debug",this._namespace,t)},e.prototype.error=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return kt("error",this._namespace,t)},e.prototype.info=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return kt("info",this._namespace,t)},e.prototype.warn=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return kt("warn",this._namespace,t)},e.prototype.verbose=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return kt("verbose",this._namespace,t)},e}();function kt(e,t,n){var r=Ue("diag");if(r)return n.unshift(t),r[e].apply(r,kf([],If(n),!1))}var D;(function(e){e[e.NONE=0]="NONE",e[e.ERROR=30]="ERROR",e[e.WARN=50]="WARN",e[e.INFO=60]="INFO",e[e.DEBUG=70]="DEBUG",e[e.VERBOSE=80]="VERBOSE",e[e.ALL=9999]="ALL"})(D||(D={}));function Df(e,t){e<D.NONE?e=D.NONE:e>D.ALL&&(e=D.ALL),t=t||{};function n(r,i){var o=t[r];return typeof o=="function"&&e>=i?o.bind(t):function(){}}return{error:n("error",D.ERROR),warn:n("warn",D.WARN),info:n("info",D.INFO),debug:n("debug",D.DEBUG),verbose:n("verbose",D.VERBOSE)}}var Uf=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},jf=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},$f="diag",pe=function(){function e(){function t(i){return function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var u=Ue("diag");if(u)return u[i].apply(u,jf([],Uf(o),!1))}}var n=this,r=function(i,o){var a,u,c;if(o===void 0&&(o={logLevel:D.INFO}),i===n){var s=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return n.error((a=s.stack)!==null&&a!==void 0?a:s.message),!1}typeof o=="number"&&(o={logLevel:o});var l=Ue("diag"),p=Df((u=o.logLevel)!==null&&u!==void 0?u:D.INFO,i);if(l&&!o.suppressOverrideMessage){var f=(c=new Error().stack)!==null&&c!==void 0?c:"<failed to generate stacktrace>";l.warn("Current logger will be overwritten from "+f),p.warn("Current logger will overwrite one already registered from "+f)}return Pt("diag",p,n,!0)};n.setLogger=r,n.disable=function(){It($f,n)},n.createComponentLogger=function(i){return new Mf(i)},n.verbose=t("verbose"),n.debug=t("debug"),n.info=t("info"),n.warn=t("warn"),n.error=t("error")}return e.instance=function(){return this._instance||(this._instance=new e),this._instance},e}(),Bf=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Ff=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Vf=function(){function e(t){this._entries=t?new Map(t):new Map}return e.prototype.getEntry=function(t){var n=this._entries.get(t);if(n)return Object.assign({},n)},e.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(t){var n=Bf(t,2),r=n[0],i=n[1];return[r,i]})},e.prototype.setEntry=function(t,n){var r=new e(this._entries);return r._entries.set(t,n),r},e.prototype.removeEntry=function(t){var n=new e(this._entries);return n._entries.delete(t),n},e.prototype.removeEntries=function(){for(var t,n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=new e(this._entries);try{for(var a=Ff(r),u=a.next();!u.done;u=a.next()){var c=u.value;o._entries.delete(c)}}catch(s){t={error:s}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return o},e.prototype.clear=function(){return new e},e}(),Hf=Symbol("BaggageEntryMetadata"),Gf=pe.instance();function qf(e){return e===void 0&&(e={}),new Vf(new Map(Object.entries(e)))}function Sa(e){return typeof e!="string"&&(Gf.error("Cannot create baggage metadata from unknown type: "+typeof e),e=""),{__TYPE__:Hf,toString:function(){return e}}}function Mt(e){return Symbol.for(e)}var zf=function(){function e(t){var n=this;n._currentContext=t?new Map(t):new Map,n.getValue=function(r){return n._currentContext.get(r)},n.setValue=function(r,i){var o=new e(n._currentContext);return o._currentContext.set(r,i),o},n.deleteValue=function(r){var i=new e(n._currentContext);return i._currentContext.delete(r),i}}return e}(),je=new zf,$e=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xf=function(){function e(){}return e.prototype.createGauge=function(t,n){return nh},e.prototype.createHistogram=function(t,n){return rh},e.prototype.createCounter=function(t,n){return th},e.prototype.createUpDownCounter=function(t,n){return ih},e.prototype.createObservableGauge=function(t,n){return ah},e.prototype.createObservableCounter=function(t,n){return oh},e.prototype.createObservableUpDownCounter=function(t,n){return sh},e.prototype.addBatchObservableCallback=function(t,n){},e.prototype.removeBatchObservableCallback=function(t){},e}(),On=function(){function e(){}return e}(),Kf=function(e){$e(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(n,r){},t}(On),Wf=function(e){$e(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(n,r){},t}(On),Yf=function(e){$e(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(n,r){},t}(On),Jf=function(e){$e(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(n,r){},t}(On),Hr=function(){function e(){}return e.prototype.addCallback=function(t){},e.prototype.removeCallback=function(t){},e}(),Qf=function(e){$e(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Hr),Zf=function(e){$e(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Hr),eh=function(e){$e(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Hr),Oa=new Xf,th=new Kf,nh=new Yf,rh=new Jf,ih=new Wf,oh=new Qf,ah=new Zf,sh=new eh;function uh(){return Oa}var Le;(function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"})(Le||(Le={}));var ch={get:function(e,t){if(e!=null)return e[t]},keys:function(e){return e==null?[]:Object.keys(e)}},lh={set:function(e,t,n){e!=null&&(e[t]=n)}},ph=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},fh=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},hh=function(){function e(){}return e.prototype.active=function(){return je},e.prototype.with=function(t,n,r){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];return n.call.apply(n,fh([r],ph(i),!1))},e.prototype.bind=function(t,n){return n},e.prototype.enable=function(){return this},e.prototype.disable=function(){return this},e}(),dh=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},vh=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},Gr="context",yh=new hh,wn=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalContextManager=function(t){return Pt(Gr,t,pe.instance())},e.prototype.active=function(){return this._getContextManager().active()},e.prototype.with=function(t,n,r){for(var i,o=[],a=3;a<arguments.length;a++)o[a-3]=arguments[a];return(i=this._getContextManager()).with.apply(i,vh([t,n,r],dh(o),!1))},e.prototype.bind=function(t,n){return this._getContextManager().bind(t,n)},e.prototype._getContextManager=function(){return Ue(Gr)||yh},e.prototype.disable=function(){this._getContextManager().disable(),It(Gr,pe.instance())},e}(),fe;(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(fe||(fe={}));var wa="0000000000000000",Aa="00000000000000000000000000000000",La={traceId:Aa,spanId:wa,traceFlags:fe.NONE},Dt=function(){function e(t){t===void 0&&(t=La),this._spanContext=t}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(t,n){return this},e.prototype.setAttributes=function(t){return this},e.prototype.addEvent=function(t,n){return this},e.prototype.addLink=function(t){return this},e.prototype.addLinks=function(t){return this},e.prototype.setStatus=function(t){return this},e.prototype.updateName=function(t){return this},e.prototype.end=function(t){},e.prototype.isRecording=function(){return!1},e.prototype.recordException=function(t,n){},e}(),qr=Mt("OpenTelemetry Context Key SPAN");function zr(e){return e.getValue(qr)||void 0}function mh(){return zr(wn.getInstance().active())}function Xr(e,t){return e.setValue(qr,t)}function gh(e){return e.deleteValue(qr)}function _h(e,t){return Xr(e,new Dt(t))}function Ra(e){var t;return(t=zr(e))===null||t===void 0?void 0:t.spanContext()}var Eh=/^([0-9a-f]{32})$/i,Th=/^[0-9a-f]{16}$/i;function Ca(e){return Eh.test(e)&&e!==Aa}function bh(e){return Th.test(e)&&e!==wa}function Ut(e){return Ca(e.traceId)&&bh(e.spanId)}function Sh(e){return new Dt(e)}var Kr=wn.getInstance(),Na=function(){function e(){}return e.prototype.startSpan=function(t,n,r){r===void 0&&(r=Kr.active());var i=!!(n!=null&&n.root);if(i)return new Dt;var o=r&&Ra(r);return Oh(o)&&Ut(o)?new Dt(o):new Dt},e.prototype.startActiveSpan=function(t,n,r,i){var o,a,u;if(!(arguments.length<2)){arguments.length===2?u=n:arguments.length===3?(o=n,u=r):(o=n,a=r,u=i);var c=a??Kr.active(),s=this.startSpan(t,o,c),l=Xr(c,s);return Kr.with(l,u,void 0,s)}},e}();function Oh(e){return typeof e=="object"&&typeof e.spanId=="string"&&typeof e.traceId=="string"&&typeof e.traceFlags=="number"}var wh=new Na,Ah=function(){function e(t,n,r,i){this._provider=t,this.name=n,this.version=r,this.options=i}return e.prototype.startSpan=function(t,n,r){return this._getTracer().startSpan(t,n,r)},e.prototype.startActiveSpan=function(t,n,r,i){var o=this._getTracer();return Reflect.apply(o.startActiveSpan,o,arguments)},e.prototype._getTracer=function(){if(this._delegate)return this._delegate;var t=this._provider.getDelegateTracer(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):wh},e}(),Lh=function(){function e(){}return e.prototype.getTracer=function(t,n,r){return new Na},e}(),Rh=new Lh,xa=function(){function e(){}return e.prototype.getTracer=function(t,n,r){var i;return(i=this.getDelegateTracer(t,n,r))!==null&&i!==void 0?i:new Ah(this,t,n,r)},e.prototype.getDelegate=function(){var t;return(t=this._delegate)!==null&&t!==void 0?t:Rh},e.prototype.setDelegate=function(t){this._delegate=t},e.prototype.getDelegateTracer=function(t,n,r){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getTracer(t,n,r)},e}(),An;(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(An||(An={}));var jt;(function(e){e[e.INTERNAL=0]="INTERNAL",e[e.SERVER=1]="SERVER",e[e.CLIENT=2]="CLIENT",e[e.PRODUCER=3]="PRODUCER",e[e.CONSUMER=4]="CONSUMER"})(jt||(jt={}));var Ln;(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(Ln||(Ln={}));var x=wn.getInstance(),T=pe.instance(),Ch=function(){function e(){}return e.prototype.getMeter=function(t,n,r){return Oa},e}(),Nh=new Ch,Wr="metrics",xh=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalMeterProvider=function(t){return Pt(Wr,t,pe.instance())},e.prototype.getMeterProvider=function(){return Ue(Wr)||Nh},e.prototype.getMeter=function(t,n,r){return this.getMeterProvider().getMeter(t,n,r)},e.prototype.disable=function(){It(Wr,pe.instance())},e}(),ct=xh.getInstance(),Ph=function(){function e(){}return e.prototype.inject=function(t,n){},e.prototype.extract=function(t,n){return t},e.prototype.fields=function(){return[]},e}(),Yr=Mt("OpenTelemetry Baggage Key");function Pa(e){return e.getValue(Yr)||void 0}function Ih(){return Pa(wn.getInstance().active())}function kh(e,t){return e.setValue(Yr,t)}function Mh(e){return e.deleteValue(Yr)}var Jr="propagation",Dh=new Ph,Uh=function(){function e(){this.createBaggage=qf,this.getBaggage=Pa,this.getActiveBaggage=Ih,this.setBaggage=kh,this.deleteBaggage=Mh}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalPropagator=function(t){return Pt(Jr,t,pe.instance())},e.prototype.inject=function(t,n,r){return r===void 0&&(r=lh),this._getGlobalPropagator().inject(t,n,r)},e.prototype.extract=function(t,n,r){return r===void 0&&(r=ch),this._getGlobalPropagator().extract(t,n,r)},e.prototype.fields=function(){return this._getGlobalPropagator().fields()},e.prototype.disable=function(){It(Jr,pe.instance())},e.prototype._getGlobalPropagator=function(){return Ue(Jr)||Dh},e}(),Z=Uh.getInstance(),Qr="trace",jh=function(){function e(){this._proxyTracerProvider=new xa,this.wrapSpanContext=Sh,this.isSpanContextValid=Ut,this.deleteSpan=gh,this.getSpan=zr,this.getActiveSpan=mh,this.getSpanContext=Ra,this.setSpan=Xr,this.setSpanContext=_h}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalTracerProvider=function(t){var n=Pt(Qr,this._proxyTracerProvider,pe.instance());return n&&this._proxyTracerProvider.setDelegate(t),n},e.prototype.getTracerProvider=function(){return Ue(Qr)||this._proxyTracerProvider},e.prototype.getTracer=function(t,n){return this.getTracerProvider().getTracer(t,n)},e.prototype.disable=function(){It(Qr,pe.instance()),this._proxyTracerProvider=new xa},e}(),k=jh.getInstance(),$h=Mt("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Ia(e){return e.getValue($h)===!0}var Bh="=",Zr=";",ei=",",ti="baggage",Fh=180,Vh=4096,Hh=8192,Gh=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function qh(e){return e.reduce(function(t,n){var r=""+t+(t!==""?ei:"")+n;return r.length>Hh?t:r},"")}function zh(e){return e.getAllEntries().map(function(t){var n=Gh(t,2),r=n[0],i=n[1],o=encodeURIComponent(r)+"="+encodeURIComponent(i.value);return i.metadata!==void 0&&(o+=Zr+i.metadata.toString()),o})}function Xh(e){var t=e.split(Zr);if(!(t.length<=0)){var n=t.shift();if(n){var r=n.indexOf(Bh);if(!(r<=0)){var i=decodeURIComponent(n.substring(0,r).trim()),o=decodeURIComponent(n.substring(r+1).trim()),a;return t.length>0&&(a=Sa(t.join(Zr))),{key:i,value:o,metadata:a}}}}}var Kh=function(){function e(){}return e.prototype.inject=function(t,n,r){var i=Z.getBaggage(t);if(!(!i||Ia(t))){var o=zh(i).filter(function(u){return u.length<=Vh}).slice(0,Fh),a=qh(o);a.length>0&&r.set(n,ti,a)}},e.prototype.extract=function(t,n,r){var i=r.get(n,ti),o=Array.isArray(i)?i.join(ei):i;if(!o)return t;var a={};if(o.length===0)return t;var u=o.split(ei);return u.forEach(function(c){var s=Xh(c);if(s){var l={value:s.value};s.metadata&&(l.metadata=s.metadata),a[s.key]=l}}),Object.entries(a).length===0?t:Z.setBaggage(t,Z.createBaggage(a))},e.prototype.fields=function(){return[ti]},e}(),ni;(function(e){e.AlwaysOff="always_off",e.AlwaysOn="always_on",e.ParentBasedAlwaysOff="parentbased_always_off",e.ParentBasedAlwaysOn="parentbased_always_on",e.ParentBasedTraceIdRatio="parentbased_traceidratio",e.TraceIdRatio="traceidratio"})(ni||(ni={}));var Wh=",",Yh=["OTEL_SDK_DISABLED"];function Jh(e){return Yh.indexOf(e)>-1}var Qh=["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 Zh(e){return Qh.indexOf(e)>-1}var ed=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];function td(e){return ed.indexOf(e)>-1}var ri=1/0,ii=128,nd=128,rd=128,ka={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:D.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:ri,OTEL_ATTRIBUTE_COUNT_LIMIT:ii,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:ri,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:ii,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:ri,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:ii,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:nd,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:rd,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:ni.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",OTEL_SEMCONV_STABILITY_OPT_IN:[]};function id(e,t,n){if(typeof n[e]<"u"){var r=String(n[e]);t[e]=r.toLowerCase()==="true"}}function od(e,t,n,r,i){if(r===void 0&&(r=-1/0),i===void 0&&(i=1/0),typeof n[e]<"u"){var o=Number(n[e]);isNaN(o)||(o<r?t[e]=r:o>i?t[e]=i:t[e]=o)}}function ad(e,t,n,r){r===void 0&&(r=Wh);var i=n[e];typeof i=="string"&&(t[e]=i.split(r).map(function(o){return o.trim()}))}var sd={ALL:D.ALL,VERBOSE:D.VERBOSE,DEBUG:D.DEBUG,INFO:D.INFO,WARN:D.WARN,ERROR:D.ERROR,NONE:D.NONE};function ud(e,t,n){var r=n[e];if(typeof r=="string"){var i=sd[r.toUpperCase()];i!=null&&(t[e]=i)}}function cd(e){var t={};for(var n in ka){var r=n;switch(r){case"OTEL_LOG_LEVEL":ud(r,t,e);break;default:if(Jh(r))id(r,t,e);else if(Zh(r))od(r,t,e);else if(td(r))ad(r,t,e);else{var i=e[r];typeof i<"u"&&i!==null&&(t[r]=String(i))}}}return t}var ld=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{};function pd(){var e=cd(ld);return Object.assign({},ka,e)}var oi=performance,fd=9,hd=6,dd=Math.pow(10,hd),Ma=Math.pow(10,fd);function Da(e){var t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*dd);return[n,r]}function vd(){var e=oi.timeOrigin;if(typeof e!="number"){var t=oi;e=t.timing&&t.timing.fetchStart}return e}function yd(e){var t=Da(vd()),n=Da(oi.now());return md(t,n)}function md(e,t){var n=[e[0]+t[0],e[1]+t[1]];return n[1]>=Ma&&(n[1]-=Ma,n[0]+=1),n}var B;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(B||(B={}));var gd=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},_d=function(){function e(t){t===void 0&&(t={});var n;this._propagators=(n=t.propagators)!==null&&n!==void 0?n:[],this._fields=Array.from(new Set(this._propagators.map(function(r){return typeof r.fields=="function"?r.fields():[]}).reduce(function(r,i){return r.concat(i)},[])))}return e.prototype.inject=function(t,n,r){var i,o;try{for(var a=gd(this._propagators),u=a.next();!u.done;u=a.next()){var c=u.value;try{c.inject(t,n,r)}catch(s){T.warn("Failed to inject with "+c.constructor.name+". Err: "+s.message)}}}catch(s){i={error:s}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}},e.prototype.extract=function(t,n,r){return this._propagators.reduce(function(i,o){try{return o.extract(i,n,r)}catch(a){T.warn("Failed to extract with "+o.constructor.name+". Err: "+a.message)}return i},t)},e.prototype.fields=function(){return this._fields.slice()},e}(),ai="[_0-9a-z-*/]",Ed="[a-z]"+ai+"{0,255}",Td="[a-z0-9]"+ai+"{0,240}@[a-z]"+ai+"{0,13}",bd=new RegExp("^(?:"+Ed+"|"+Td+")$"),Sd=/^[ -~]{0,255}[!-~]$/,Od=/,|=/;function wd(e){return bd.test(e)}function Ad(e){return Sd.test(e)&&!Od.test(e)}var Ua=32,Ld=512,ja=",",$a="=",Rd=function(){function e(t){this._internalState=new Map,t&&this._parse(t)}return e.prototype.set=function(t,n){var r=this._clone();return r._internalState.has(t)&&r._internalState.delete(t),r._internalState.set(t,n),r},e.prototype.unset=function(t){var n=this._clone();return n._internalState.delete(t),n},e.prototype.get=function(t){return this._internalState.get(t)},e.prototype.serialize=function(){var t=this;return this._keys().reduce(function(n,r){return n.push(r+$a+t.get(r)),n},[]).join(ja)},e.prototype._parse=function(t){t.length>Ld||(this._internalState=t.split(ja).reverse().reduce(function(n,r){var i=r.trim(),o=i.indexOf($a);if(o!==-1){var a=i.slice(0,o),u=i.slice(o+1,r.length);wd(a)&&Ad(u)&&n.set(a,u)}return n},new Map),this._internalState.size>Ua&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Ua))))},e.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},e.prototype._clone=function(){var t=new e;return t._internalState=new Map(this._internalState),t},e}(),si="traceparent",ui="tracestate",Cd="00",Nd="(?!ff)[\\da-f]{2}",xd="(?![0]{32})[\\da-f]{32}",Pd="(?![0]{16})[\\da-f]{16}",Id="[\\da-f]{2}",kd=new RegExp("^\\s?("+Nd+")-("+xd+")-("+Pd+")-("+Id+")(-.*)?\\s?$");function Md(e){var t=kd.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}var Dd=function(){function e(){}return e.prototype.inject=function(t,n,r){var i=k.getSpanContext(t);if(!(!i||Ia(t)||!Ut(i))){var o=Cd+"-"+i.traceId+"-"+i.spanId+"-0"+Number(i.traceFlags||fe.NONE).toString(16);r.set(n,si,o),i.traceState&&r.set(n,ui,i.traceState.serialize())}},e.prototype.extract=function(t,n,r){var i=r.get(n,si);if(!i)return t;var o=Array.isArray(i)?i[0]:i;if(typeof o!="string")return t;var a=Md(o);if(!a)return t;a.isRemote=!0;var u=r.get(n,ui);if(u){var c=Array.isArray(u)?u.join(","):u;a.traceState=new Rd(typeof c=="string"?c:void 0)}return k.setSpanContext(t,a)},e.prototype.fields=function(){return[si,ui]},e}(),Ud="[object Object]",jd="[object Null]",$d="[object Undefined]",Bd=Function.prototype,Ba=Bd.toString,Fd=Ba.call(Object),Vd=Hd(Object.getPrototypeOf,Object),Fa=Object.prototype,Va=Fa.hasOwnProperty,Be=Symbol?Symbol.toStringTag:void 0,Ha=Fa.toString;function Hd(e,t){return function(n){return e(t(n))}}function Ga(e){if(!Gd(e)||qd(e)!==Ud)return!1;var t=Vd(e);if(t===null)return!0;var n=Va.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Ba.call(n)===Fd}function Gd(e){return e!=null&&typeof e=="object"}function qd(e){return e==null?e===void 0?$d:jd:Be&&Be in Object(e)?zd(e):Xd(e)}function zd(e){var t=Va.call(e,Be),n=e[Be],r=!1;try{e[Be]=void 0,r=!0}catch{}var i=Ha.call(e);return r&&(t?e[Be]=n:delete e[Be]),i}function Xd(e){return Ha.call(e)}var Kd=20;function Wd(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e.shift(),r=new WeakMap;e.length>0;)n=qa(n,e.shift(),0,r);return n}function ci(e){return Rn(e)?e.slice():e}function qa(e,t,n,r){n===void 0&&(n=0);var i;if(!(n>Kd)){if(n++,Cn(e)||Cn(t)||Xa(t))i=ci(t);else if(Rn(e)){if(i=e.slice(),Rn(t))for(var o=0,a=t.length;o<a;o++)i.push(ci(t[o]));else if($t(t))for(var u=Object.keys(t),o=0,a=u.length;o<a;o++){var c=u[o];i[c]=ci(t[c])}}else if($t(e))if($t(t)){if(!Yd(e,t))return t;i=Object.assign({},e);for(var u=Object.keys(t),o=0,a=u.length;o<a;o++){var c=u[o],s=t[c];if(Cn(s))typeof s>"u"?delete i[c]:i[c]=s;else{var l=i[c],p=s;if(za(e,c,r)||za(t,c,r))delete i[c];else{if($t(l)&&$t(p)){var f=r.get(l)||[],m=r.get(p)||[];f.push({obj:e,key:c}),m.push({obj:t,key:c}),r.set(l,f),r.set(p,m)}i[c]=qa(i[c],s,n,r)}}}}else i=t;return i}}function za(e,t,n){for(var r=n.get(e[t])||[],i=0,o=r.length;i<o;i++){var a=r[i];if(a.key===t&&a.obj===e)return!0}return!1}function Rn(e){return Array.isArray(e)}function Xa(e){return typeof e=="function"}function $t(e){return!Cn(e)&&!Rn(e)&&!Xa(e)&&typeof e=="object"}function Cn(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function Yd(e,t){return!(!Ga(e)||!Ga(t))}var Ka=function(){function e(){}return e.prototype.emit=function(t){},e}(),Jd=new Ka,Qd=function(){function e(){}return e.prototype.getLogger=function(t,n,r){return new Ka},e}(),Wa=new Qd,Zd=function(){function e(t,n,r,i){this._provider=t,this.name=n,this.version=r,this.options=i}return e.prototype.emit=function(t){this._getLogger().emit(t)},e.prototype._getLogger=function(){if(this._delegate)return this._delegate;var t=this._provider.getDelegateLogger(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):Jd},e}(),Ya=function(){function e(){}return e.prototype.getLogger=function(t,n,r){var i;return(i=this.getDelegateLogger(t,n,r))!==null&&i!==void 0?i:new Zd(this,t,n,r)},e.prototype.getDelegate=function(){var t;return(t=this._delegate)!==null&&t!==void 0?t:Wa},e.prototype.setDelegate=function(t){this._delegate=t},e.prototype.getDelegateLogger=function(t,n,r){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getLogger(t,n,r)},e}(),ev=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},Nn=Symbol.for("io.opentelemetry.js.api.logs"),Bt=ev;function tv(e,t,n){return function(r){return r===e?t:n}}var Ja=1,nv=function(){function e(){this._proxyLoggerProvider=new Ya}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalLoggerProvider=function(t){return Bt[Nn]?this.getLoggerProvider():(Bt[Nn]=tv(Ja,t,Wa),this._proxyLoggerProvider.setDelegate(t),t)},e.prototype.getLoggerProvider=function(){var t,n;return(n=(t=Bt[Nn])===null||t===void 0?void 0:t.call(Bt,Ja))!==null&&n!==void 0?n:this._proxyLoggerProvider},e.prototype.getLogger=function(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)},e.prototype.disable=function(){delete Bt[Nn],this._proxyLoggerProvider=new Ya},e}(),Ft=nv.getInstance();function rv(e,t,n,r){for(var i=0,o=e.length;i<o;i++){var a=e[i];t&&a.setTracerProvider(t),n&&a.setMeterProvider(n),r&&a.setLoggerProvider&&a.setLoggerProvider(r),a.getConfig().enabled||a.enable()}}function iv(e){e.forEach(function(t){return t.disable()})}function ov(e){var t,n,r=e.tracerProvider||k.getTracerProvider(),i=e.meterProvider||ct.getMeterProvider(),o=e.loggerProvider||Ft.getLoggerProvider(),a=(n=(t=e.instrumentations)===null||t===void 0?void 0:t.flat())!==null&&n!==void 0?n:[];return rv(a,r,i,o),function(){iv(a)}}function li(e){return typeof e=="function"}var ee=console.error.bind(console);function Vt(e,t,n){var r=!!e[t]&&e.propertyIsEnumerable(t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}function Ht(e){e&&e.logger&&(li(e.logger)?ee=e.logger:ee("new logger isn't a function, not replacing"))}function Qa(e,t,n){if(!e||!e[t]){ee("no original function "+t+" to wrap");return}if(!n){ee("no wrapper function"),ee(new Error().stack);return}if(!li(e[t])||!li(n)){ee("original object and wrapper must be functions");return}var r=e[t],i=n(r,t);return Vt(i,"__original",r),Vt(i,"__unwrap",function(){e[t]===i&&Vt(e,t,r)}),Vt(i,"__wrapped",!0),Vt(e,t,i),i}function av(e,t,n){if(e)Array.isArray(e)||(e=[e]);else{ee("must provide one or more modules to patch"),ee(new Error().stack);return}if(!(t&&Array.isArray(t))){ee("must provide one or more functions to wrap on modules");return}e.forEach(function(r){t.forEach(function(i){Qa(r,i,n)})})}function Za(e,t){if(!e||!e[t]){ee("no function to unwrap."),ee(new Error().stack);return}if(!e[t].__unwrap)ee("no original to unwrap to -- has "+t+" already been unwrapped?");else return e[t].__unwrap()}function sv(e,t){if(e)Array.isArray(e)||(e=[e]);else{ee("must provide one or more modules to patch"),ee(new Error().stack);return}if(!(t&&Array.isArray(t))){ee("must provide one or more functions to unwrap on modules");return}e.forEach(function(n){t.forEach(function(r){Za(n,r)})})}Ht.wrap=Qa,Ht.massWrap=av,Ht.unwrap=Za,Ht.massUnwrap=sv;var K=Ht,pi=function(){return pi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},pi.apply(this,arguments)},uv=function(){function e(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this._config={},this._wrap=K.wrap,this._unwrap=K.unwrap,this._massWrap=K.massWrap,this._massUnwrap=K.massUnwrap,this.setConfig(r),this._diag=T.createComponentLogger({namespace:t}),this._tracer=k.getTracer(t,n),this._meter=ct.getMeter(t,n),this._logger=Ft.getLogger(t,n),this._updateMetricInstruments()}return Object.defineProperty(e.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),e.prototype.setMeterProvider=function(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(e.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),e.prototype.setLoggerProvider=function(t){this._logger=t.getLogger(this.instrumentationName,this.instrumentationVersion)},e.prototype.getModuleDefinitions=function(){var t,n=(t=this.init())!==null&&t!==void 0?t:[];return Array.isArray(n)?n:[n]},e.prototype._updateMetricInstruments=function(){},e.prototype.getConfig=function(){return this._config},e.prototype.setConfig=function(t){this._config=pi({enabled:!0},t)},e.prototype.setTracerProvider=function(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(e.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),e.prototype._runSpanCustomizationHook=function(t,n,r,i){if(t)try{t(r,i)}catch(o){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:n},o)}},e}(),cv=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),es=function(e){cv(t,e);function t(n,r,i){var o=e.call(this,n,r,i)||this;return o._config.enabled&&o.enable(),o}return t}(uv);function te(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}var xn=performance,lv="traceparent",ts=Mt("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function pv(e){return e.setValue(ts,!0)}function fi(e){return e.getValue(ts)===!0}var fv="=",hi=";",di=",",vi="baggage",hv=180,dv=4096,vv=8192,yv=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function mv(e){return e.reduce(function(t,n){var r=""+t+(t!==""?di:"")+n;return r.length>vv?t:r},"")}function gv(e){return e.getAllEntries().map(function(t){var n=yv(t,2),r=n[0],i=n[1],o=encodeURIComponent(r)+"="+encodeURIComponent(i.value);return i.metadata!==void 0&&(o+=hi+i.metadata.toString()),o})}function _v(e){var t=e.split(hi);if(!(t.length<=0)){var n=t.shift();if(n){var r=n.indexOf(fv);if(!(r<=0)){var i=decodeURIComponent(n.substring(0,r).trim()),o=decodeURIComponent(n.substring(r+1).trim()),a;return t.length>0&&(a=Sa(t.join(hi))),{key:i,value:o,metadata:a}}}}}var Ev=function(){function e(){}return e.prototype.inject=function(t,n,r){var i=Z.getBaggage(t);if(!(!i||fi(t))){var o=gv(i).filter(function(u){return u.length<=dv}).slice(0,hv),a=mv(o);a.length>0&&r.set(n,vi,a)}},e.prototype.extract=function(t,n,r){var i=r.get(n,vi),o=Array.isArray(i)?i.join(di):i;if(!o)return t;var a={};if(o.length===0)return t;var u=o.split(di);return u.forEach(function(c){var s=_v(c);if(s){var l={value:s.value};s.metadata&&(l.metadata=s.metadata),a[s.key]=l}}),Object.entries(a).length===0?t:Z.setBaggage(t,Z.createBaggage(a))},e.prototype.fields=function(){return[vi]},e}(),ns=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Tv=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function Pn(e){var t,n,r={};if(typeof e!="object"||e==null)return r;try{for(var i=ns(Object.entries(e)),o=i.next();!o.done;o=i.next()){var a=Tv(o.value,2),u=a[0],c=a[1];if(!bv(u)){T.warn("Invalid attribute key: "+u);continue}if(!rs(c)){T.warn("Invalid attribute value set for key: "+u);continue}Array.isArray(c)?r[u]=c.slice():r[u]=c}}catch(s){t={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}function bv(e){return typeof e=="string"&&e.length>0}function rs(e){return e==null?!0:Array.isArray(e)?Sv(e):is(e)}function Sv(e){var t,n,r;try{for(var i=ns(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(a!=null){if(!r){if(is(a)){r=typeof a;continue}return!1}if(typeof a!==r)return!1}}}catch(u){t={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return!0}function is(e){switch(typeof e){case"number":case"boolean":case"string":return!0}return!1}function Ov(){return function(e){T.error(wv(e))}}function wv(e){return typeof e=="string"?e:JSON.stringify(Av(e))}function Av(e){for(var t={},n=e;n!==null;)Object.getOwnPropertyNames(n).forEach(function(r){if(!t[r]){var i=n[r];i&&(t[r]=String(i))}}),n=Object.getPrototypeOf(n);return t}var Lv=Ov();function lt(e){try{Lv(e)}catch{}}var he;(function(e){e.AlwaysOff="always_off",e.AlwaysOn="always_on",e.ParentBasedAlwaysOff="parentbased_always_off",e.ParentBasedAlwaysOn="parentbased_always_on",e.ParentBasedTraceIdRatio="parentbased_traceidratio",e.TraceIdRatio="traceidratio"})(he||(he={}));var Rv=",",Cv=["OTEL_SDK_DISABLED"];function Nv(e){return Cv.indexOf(e)>-1}var xv=["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 Pv(e){return xv.indexOf(e)>-1}var Iv=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];function kv(e){return Iv.indexOf(e)>-1}var In=1/0,kn=128,Mv=128,Dv=128,os={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:D.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:In,OTEL_ATTRIBUTE_COUNT_LIMIT:kn,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:In,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:kn,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:In,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:kn,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:Mv,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:Dv,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:he.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",OTEL_SEMCONV_STABILITY_OPT_IN:[]};function Uv(e,t,n){if(typeof n[e]<"u"){var r=String(n[e]);t[e]=r.toLowerCase()==="true"}}function jv(e,t,n,r,i){if(r===void 0&&(r=-1/0),i===void 0&&(i=1/0),typeof n[e]<"u"){var o=Number(n[e]);isNaN(o)||(o<r?t[e]=r:o>i?t[e]=i:t[e]=o)}}function $v(e,t,n,r){r===void 0&&(r=Rv);var i=n[e];typeof i=="string"&&(t[e]=i.split(r).map(function(o){return o.trim()}))}var Bv={ALL:D.ALL,VERBOSE:D.VERBOSE,DEBUG:D.DEBUG,INFO:D.INFO,WARN:D.WARN,ERROR:D.ERROR,NONE:D.NONE};function Fv(e,t,n){var r=n[e];if(typeof r=="string"){var i=Bv[r.toUpperCase()];i!=null&&(t[e]=i)}}function as(e){var t={};for(var n in os){var r=n;switch(r){case"OTEL_LOG_LEVEL":Fv(r,t,e);break;default:if(Nv(r))Uv(r,t,e);else if(Pv(r))jv(r,t,e);else if(kv(r))$v(r,t,e);else{var i=e[r];typeof i<"u"&&i!==null&&(t[r]=String(i))}}}return t}var ss=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{};function Gt(){var e=as(ss);return Object.assign({},os,e)}function Vv(){return as(ss)}var pt=performance,Hv="exception.type",Gv="exception.message",qv="exception.stacktrace",zv="http.response_content_length",Xv="http.response_content_length_uncompressed",yi=Hv,mi=Gv,Kv=qv,Wv=zv,Yv=Xv,Jv=9,Qv=6,Zv=Math.pow(10,Qv),Mn=Math.pow(10,Jv);function Re(e){var t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*Zv);return[n,r]}function gi(){var e=pt.timeOrigin;if(typeof e!="number"){var t=pt;e=t.timing&&t.timing.fetchStart}return e}function us(e){var t=Re(gi()),n=Re(typeof e=="number"?e:pt.now());return ls(t,n)}function qt(e){if(_i(e))return e;if(typeof e=="number")return e<gi()?us(e):Re(e);if(e instanceof Date)return Re(e.getTime());throw TypeError("Invalid input type")}function ey(e,t){var n=t[0]-e[0],r=t[1]-e[1];return r<0&&(n-=1,r+=Mn),[n,r]}function Ce(e){return e[0]*Mn+e[1]}function _i(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}function cs(e){return _i(e)||typeof e=="number"||e instanceof Date}function ls(e,t){var n=[e[0]+t[0],e[1]+t[1]];return n[1]>=Mn&&(n[1]-=Mn,n[0]+=1),n}var Ei;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(Ei||(Ei={}));var ty=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ny=function(){function e(t){t===void 0&&(t={});var n;this._propagators=(n=t.propagators)!==null&&n!==void 0?n:[],this._fields=Array.from(new Set(this._propagators.map(function(r){return typeof r.fields=="function"?r.fields():[]}).reduce(function(r,i){return r.concat(i)},[])))}return e.prototype.inject=function(t,n,r){var i,o;try{for(var a=ty(this._propagators),u=a.next();!u.done;u=a.next()){var c=u.value;try{c.inject(t,n,r)}catch(s){T.warn("Failed to inject with "+c.constructor.name+". Err: "+s.message)}}}catch(s){i={error:s}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}},e.prototype.extract=function(t,n,r){return this._propagators.reduce(function(i,o){try{return o.extract(i,n,r)}catch(a){T.warn("Failed to extract with "+o.constructor.name+". Err: "+a.message)}return i},t)},e.prototype.fields=function(){return this._fields.slice()},e}(),Ti="[_0-9a-z-*/]",ry="[a-z]"+Ti+"{0,255}",iy="[a-z0-9]"+Ti+"{0,240}@[a-z]"+Ti+"{0,13}",oy=new RegExp("^(?:"+ry+"|"+iy+")$"),ay=/^[ -~]{0,255}[!-~]$/,sy=/,|=/;function uy(e){return oy.test(e)}function cy(e){return ay.test(e)&&!sy.test(e)}var ps=32,ly=512,fs=",",hs="=",py=function(){function e(t){this._internalState=new Map,t&&this._parse(t)}return e.prototype.set=function(t,n){var r=this._clone();return r._internalState.has(t)&&r._internalState.delete(t),r._internalState.set(t,n),r},e.prototype.unset=function(t){var n=this._clone();return n._internalState.delete(t),n},e.prototype.get=function(t){return this._internalState.get(t)},e.prototype.serialize=function(){var t=this;return this._keys().reduce(function(n,r){return n.push(r+hs+t.get(r)),n},[]).join(fs)},e.prototype._parse=function(t){t.length>ly||(this._internalState=t.split(fs).reverse().reduce(function(n,r){var i=r.trim(),o=i.indexOf(hs);if(o!==-1){var a=i.slice(0,o),u=i.slice(o+1,r.length);uy(a)&&cy(u)&&n.set(a,u)}return n},new Map),this._internalState.size>ps&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,ps))))},e.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},e.prototype._clone=function(){var t=new e;return t._internalState=new Map(this._internalState),t},e}(),bi="traceparent",Si="tracestate",fy="00",hy="(?!ff)[\\da-f]{2}",dy="(?![0]{32})[\\da-f]{32}",vy="(?![0]{16})[\\da-f]{16}",yy="[\\da-f]{2}",my=new RegExp("^\\s?("+hy+")-("+dy+")-("+vy+")-("+yy+")(-.*)?\\s?$");function gy(e){var t=my.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}var _y=function(){function e(){}return e.prototype.inject=function(t,n,r){var i=k.getSpanContext(t);if(!(!i||fi(t)||!Ut(i))){var o=fy+"-"+i.traceId+"-"+i.spanId+"-0"+Number(i.traceFlags||fe.NONE).toString(16);r.set(n,bi,o),i.traceState&&r.set(n,Si,i.traceState.serialize())}},e.prototype.extract=function(t,n,r){var i=r.get(n,bi);if(!i)return t;var o=Array.isArray(i)?i[0]:i;if(typeof o!="string")return t;var a=gy(o);if(!a)return t;a.isRemote=!0;var u=r.get(n,Si);if(u){var c=Array.isArray(u)?u.join(","):u;a.traceState=new py(typeof c=="string"?c:void 0)}return k.setSpanContext(t,a)},e.prototype.fields=function(){return[bi,Si]},e}(),Ey="[object Object]",Ty="[object Null]",by="[object Undefined]",Sy=Function.prototype,ds=Sy.toString,Oy=ds.call(Object),wy=Ay(Object.getPrototypeOf,Object),vs=Object.prototype,ys=vs.hasOwnProperty,Fe=Symbol?Symbol.toStringTag:void 0,ms=vs.toString;function Ay(e,t){return function(n){return e(t(n))}}function gs(e){if(!Ly(e)||Ry(e)!==Ey)return!1;var t=wy(e);if(t===null)return!0;var n=ys.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&ds.call(n)===Oy}function Ly(e){return e!=null&&typeof e=="object"}function Ry(e){return e==null?e===void 0?by:Ty:Fe&&Fe in Object(e)?Cy(e):Ny(e)}function Cy(e){var t=ys.call(e,Fe),n=e[Fe],r=!1;try{e[Fe]=void 0,r=!0}catch{}var i=ms.call(e);return r&&(t?e[Fe]=n:delete e[Fe]),i}function Ny(e){return ms.call(e)}var xy=20;function Py(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e.shift(),r=new WeakMap;e.length>0;)n=_s(n,e.shift(),0,r);return n}function Oi(e){return Dn(e)?e.slice():e}function _s(e,t,n,r){n===void 0&&(n=0);var i;if(!(n>xy)){if(n++,Un(e)||Un(t)||Ts(t))i=Oi(t);else if(Dn(e)){if(i=e.slice(),Dn(t))for(var o=0,a=t.length;o<a;o++)i.push(Oi(t[o]));else if(zt(t))for(var u=Object.keys(t),o=0,a=u.length;o<a;o++){var c=u[o];i[c]=Oi(t[c])}}else if(zt(e))if(zt(t)){if(!Iy(e,t))return t;i=Object.assign({},e);for(var u=Object.keys(t),o=0,a=u.length;o<a;o++){var c=u[o],s=t[c];if(Un(s))typeof s>"u"?delete i[c]:i[c]=s;else{var l=i[c],p=s;if(Es(e,c,r)||Es(t,c,r))delete i[c];else{if(zt(l)&&zt(p)){var f=r.get(l)||[],m=r.get(p)||[];f.push({obj:e,key:c}),m.push({obj:t,key:c}),r.set(l,f),r.set(p,m)}i[c]=_s(i[c],s,n,r)}}}}else i=t;return i}}function Es(e,t,n){for(var r=n.get(e[t])||[],i=0,o=r.length;i<o;i++){var a=r[i];if(a.key===t&&a.obj===e)return!0}return!1}function Dn(e){return Array.isArray(e)}function Ts(e){return typeof e=="function"}function zt(e){return!Un(e)&&!Dn(e)&&!Ts(e)&&typeof e=="object"}function Un(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function Iy(e,t){return!(!gs(e)||!gs(t))}function ky(e,t){return typeof t=="string"?e===t:!!e.match(t)}var My=function(){function e(){var t=this;this._promise=new Promise(function(n,r){t._resolve=n,t._reject=r})}return Object.defineProperty(e.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),e.prototype.resolve=function(t){this._resolve(t)},e.prototype.reject=function(t){this._reject(t)},e}(),Dy=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Uy=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},jy=function(){function e(t,n){this._callback=t,this._that=n,this._isCalled=!1,this._deferred=new My}return Object.defineProperty(e.prototype,"isCalled",{get:function(){return this._isCalled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"promise",{get:function(){return this._deferred.promise},enumerable:!1,configurable:!0}),e.prototype.call=function(){for(var t,n=this,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(!this._isCalled){this._isCalled=!0;try{Promise.resolve((t=this._callback).call.apply(t,Uy([this._that],Dy(r),!1))).then(function(o){return n._deferred.resolve(o)},function(o){return n._deferred.reject(o)})}catch(o){this._deferred.reject(o)}}return this._deferred.promise},e}(),$y="exception",wi=function(){return wi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},wi.apply(this,arguments)},By=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},bs=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Fy=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},Vy=function(){function e(t,n,r,i,o,a,u,c,s,l){u===void 0&&(u=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:Ln.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=r,this._spanContext=i,this.parentSpanId=a,this.kind=o,this.links=u;var p=Date.now();this._performanceStartTime=pt.now(),this._performanceOffset=p-(this._performanceStartTime+gi()),this._startTimeProvided=c!=null,this.startTime=this._getTime(c??p),this.resource=t.resource,this.instrumentationLibrary=t.instrumentationLibrary,this._spanLimits=t.getSpanLimits(),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,l!=null&&this.setAttributes(l),this._spanProcessor=t.getActiveSpanProcessor(),this._spanProcessor.onStart(this,n)}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(t,n){return n==null||this._isSpanEnded()?this:t.length===0?(T.warn("Invalid attribute key: "+t),this):rs(n)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,t)?(this._droppedAttributesCount++,this):(this.attributes[t]=this._truncateToSize(n),this):(T.warn("Invalid attribute value set for key: "+t),this)},e.prototype.setAttributes=function(t){var n,r;try{for(var i=By(Object.entries(t)),o=i.next();!o.done;o=i.next()){var a=bs(o.value,2),u=a[0],c=a[1];this.setAttribute(u,c)}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return this},e.prototype.addEvent=function(t,n,r){if(this._isSpanEnded())return this;if(this._spanLimits.eventCountLimit===0)return T.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(this._droppedEventsCount===0&&T.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),cs(n)&&(cs(r)||(r=n),n=void 0);var i=Pn(n);return this.events.push({name:t,attributes:i,time:this._getTime(r),droppedAttributesCount:0}),this},e.prototype.addLink=function(t){return this.links.push(t),this},e.prototype.addLinks=function(t){var n;return(n=this.links).push.apply(n,Fy([],bs(t),!1)),this},e.prototype.setStatus=function(t){return this._isSpanEnded()?this:(this.status=wi({},t),this.status.message!=null&&typeof t.message!="string"&&(T.warn("Dropping invalid status.message of type '"+typeof t.message+"', expected 'string'"),delete this.status.message),this)},e.prototype.updateName=function(t){return this._isSpanEnded()?this:(this.name=t,this)},e.prototype.end=function(t){if(this._isSpanEnded()){T.error(this.name+" "+this._spanContext.traceId+"-"+this._spanContext.spanId+" - You can only call end() on a span once.");return}this._ended=!0,this.endTime=this._getTime(t),this._duration=ey(this.startTime,this.endTime),this._duration[0]<0&&(T.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&&T.warn("Dropped "+this._droppedEventsCount+" events because eventCountLimit reached"),this._spanProcessor.onEnd(this)},e.prototype._getTime=function(t){if(typeof t=="number"&&t<=pt.now())return us(t+this._performanceOffset);if(typeof t=="number")return Re(t);if(t instanceof Date)return Re(t.getTime());if(_i(t))return t;if(this._startTimeProvided)return Re(Date.now());var n=pt.now()-this._performanceStartTime;return ls(this.startTime,Re(n))},e.prototype.isRecording=function(){return this._ended===!1},e.prototype.recordException=function(t,n){var r={};typeof t=="string"?r[mi]=t:t&&(t.code?r[yi]=t.code.toString():t.name&&(r[yi]=t.name),t.message&&(r[mi]=t.message),t.stack&&(r[Kv]=t.stack)),r[yi]||r[mi]?this.addEvent($y,r,n):T.warn("Failed to record an exception "+t)},Object.defineProperty(e.prototype,"duration",{get:function(){return this._duration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ended",{get:function(){return this._ended},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedAttributesCount",{get:function(){return this._droppedAttributesCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedEventsCount",{get:function(){return this._droppedEventsCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedLinksCount",{get:function(){return this._droppedLinksCount},enumerable:!1,configurable:!0}),e.prototype._isSpanEnded=function(){return this._ended&&T.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},e.prototype._truncateToLimitUtil=function(t,n){return t.length<=n?t:t.substring(0,n)},e.prototype._truncateToSize=function(t){var n=this,r=this._attributeValueLengthLimit;return r<=0?(T.warn("Attribute value limit must be positive, got "+r),t):typeof t=="string"?this._truncateToLimitUtil(t,r):Array.isArray(t)?t.map(function(i){return typeof i=="string"?n._truncateToLimitUtil(i,r):i}):t},e}(),ft;(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(ft||(ft={}));var jn=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:ft.NOT_RECORD}},e.prototype.toString=function(){return"AlwaysOffSampler"},e}(),ht=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:ft.RECORD_AND_SAMPLED}},e.prototype.toString=function(){return"AlwaysOnSampler"},e}(),Ai=function(){function e(t){var n,r,i,o;this._root=t.root,this._root||(lt(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new ht),this._remoteParentSampled=(n=t.remoteParentSampled)!==null&&n!==void 0?n:new ht,this._remoteParentNotSampled=(r=t.remoteParentNotSampled)!==null&&r!==void 0?r:new jn,this._localParentSampled=(i=t.localParentSampled)!==null&&i!==void 0?i:new ht,this._localParentNotSampled=(o=t.localParentNotSampled)!==null&&o!==void 0?o:new jn}return e.prototype.shouldSample=function(t,n,r,i,o,a){var u=k.getSpanContext(t);return!u||!Ut(u)?this._root.shouldSample(t,n,r,i,o,a):u.isRemote?u.traceFlags&fe.SAMPLED?this._remoteParentSampled.shouldSample(t,n,r,i,o,a):this._remoteParentNotSampled.shouldSample(t,n,r,i,o,a):u.traceFlags&fe.SAMPLED?this._localParentSampled.shouldSample(t,n,r,i,o,a):this._localParentNotSampled.shouldSample(t,n,r,i,o,a)},e.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},e}(),Ss=function(){function e(t){t===void 0&&(t=0),this._ratio=t,this._ratio=this._normalize(t),this._upperBound=Math.floor(this._ratio*4294967295)}return e.prototype.shouldSample=function(t,n){return{decision:Ca(n)&&this._accumulate(n)<this._upperBound?ft.RECORD_AND_SAMPLED:ft.NOT_RECORD}},e.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},e.prototype._normalize=function(t){return typeof t!="number"||isNaN(t)?0:t>=1?1:t<=0?0:t},e.prototype._accumulate=function(t){for(var n=0,r=0;r<t.length/8;r++){var i=r*8,o=parseInt(t.slice(i,i+8),16);n=(n^o)>>>0}return n},e}(),Hy=he.AlwaysOn,dt=1;function Os(){var e=Gt();return{sampler:ws(e),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:e.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:e.OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:e.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:e.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:e.OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:e.OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:e.OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:e.OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT},mergeResourceWithDefaults:!0}}function ws(e){switch(e===void 0&&(e=Gt()),e.OTEL_TRACES_SAMPLER){case he.AlwaysOn:return new ht;case he.AlwaysOff:return new jn;case he.ParentBasedAlwaysOn:return new Ai({root:new ht});case he.ParentBasedAlwaysOff:return new Ai({root:new jn});case he.TraceIdRatio:return new Ss(As(e));case he.ParentBasedTraceIdRatio:return new Ai({root:new Ss(As(e))});default:return T.error('OTEL_TRACES_SAMPLER value "'+e.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+Hy+'".'),new ht}}function As(e){if(e.OTEL_TRACES_SAMPLER_ARG===void 0||e.OTEL_TRACES_SAMPLER_ARG==="")return T.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+dt+"."),dt;var t=Number(e.OTEL_TRACES_SAMPLER_ARG);return isNaN(t)?(T.error("OTEL_TRACES_SAMPLER_ARG="+e.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+dt+"."),dt):t<0||t>1?(T.error("OTEL_TRACES_SAMPLER_ARG="+e.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+dt+"."),dt):t}function Gy(e){var t={sampler:ws()},n=Os(),r=Object.assign({},n,t,e);return r.generalLimits=Object.assign({},n.generalLimits,e.generalLimits||{}),r.spanLimits=Object.assign({},n.spanLimits,e.spanLimits||{}),r}function qy(e){var t,n,r,i,o,a,u,c,s,l,p,f,m=Object.assign({},e.spanLimits),v=Vv();return m.attributeCountLimit=(a=(o=(i=(n=(t=e.spanLimits)===null||t===void 0?void 0:t.attributeCountLimit)!==null&&n!==void 0?n:(r=e.generalLimits)===null||r===void 0?void 0:r.attributeCountLimit)!==null&&i!==void 0?i:v.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&o!==void 0?o:v.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&a!==void 0?a:kn,m.attributeValueLengthLimit=(f=(p=(l=(c=(u=e.spanLimits)===null||u===void 0?void 0:u.attributeValueLengthLimit)!==null&&c!==void 0?c:(s=e.generalLimits)===null||s===void 0?void 0:s.attributeValueLengthLimit)!==null&&l!==void 0?l:v.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&p!==void 0?p:v.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&f!==void 0?f:In,Object.assign({},e,{spanLimits:m})}var zy=function(){function e(t,n){this._exporter=t,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var r=Gt();this._maxExportBatchSize=typeof n?.maxExportBatchSize=="number"?n.maxExportBatchSize:r.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=typeof n?.maxQueueSize=="number"?n.maxQueueSize:r.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=typeof n?.scheduledDelayMillis=="number"?n.scheduledDelayMillis:r.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis=typeof n?.exportTimeoutMillis=="number"?n.exportTimeoutMillis:r.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new jy(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(T.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return e.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},e.prototype.onStart=function(t,n){},e.prototype.onEnd=function(t){this._shutdownOnce.isCalled||(t.spanContext().traceFlags&fe.SAMPLED)!==0&&this._addToBuffer(t)},e.prototype.shutdown=function(){return this._shutdownOnce.call()},e.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()})},e.prototype._addToBuffer=function(t){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&T.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(T.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(t),this._maybeStartTimer()},e.prototype._flushAll=function(){var t=this;return new Promise(function(n,r){for(var i=[],o=Math.ceil(t._finishedSpans.length/t._maxExportBatchSize),a=0,u=o;a<u;a++)i.push(t._flushOneBatch());Promise.all(i).then(function(){n()}).catch(r)})},e.prototype._flushOneBatch=function(){var t=this;return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise(function(n,r){var i=setTimeout(function(){r(new Error("Timeout"))},t._exportTimeoutMillis);x.with(pv(x.active()),function(){var o;t._finishedSpans.length<=t._maxExportBatchSize?(o=t._finishedSpans,t._finishedSpans=[]):o=t._finishedSpans.splice(0,t._maxExportBatchSize);for(var a=function(){return t._exporter.export(o,function(p){var f;clearTimeout(i),p.code===Ei.SUCCESS?n():r((f=p.error)!==null&&f!==void 0?f:new Error("BatchSpanProcessor: span export failed"))})},u=null,c=0,s=o.length;c<s;c++){var l=o[c];l.resource.asyncAttributesPending&&l.resource.waitForAsyncAttributes&&(u!=null||(u=[]),u.push(l.resource.waitForAsyncAttributes()))}u===null?a():Promise.all(u).then(a,function(p){lt(p),r(p)})})})},e.prototype._maybeStartTimer=function(){var t=this;if(!this._isExporting){var n=function(){t._isExporting=!0,t._flushOneBatch().finally(function(){t._isExporting=!1,t._finishedSpans.length>0&&(t._clearTimer(),t._maybeStartTimer())}).catch(function(r){t._isExporting=!1,lt(r)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return n();this._timer===void 0&&(this._timer=setTimeout(function(){return n()},this._scheduledDelayMillis))}},e.prototype._clearTimer=function(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)},e}(),Xy=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ls=function(e){Xy(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.onInit(r),i}return t.prototype.onInit=function(n){var r=this;n?.disableAutoFlushOnDocumentHide!==!0&&typeof document<"u"&&(this._visibilityChangeListener=function(){document.visibilityState==="hidden"&&r.forceFlush().catch(function(i){lt(i)})},this._pageHideListener=function(){r.forceFlush().catch(function(i){lt(i)})},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))},t.prototype.onShutdown=function(){typeof document<"u"&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))},t}(zy),Ky=8,Wy=16,Yy=function(){function e(){this.generateTraceId=Rs(Wy),this.generateSpanId=Rs(Ky)}return e}(),$n=Array(32);function Rs(e){return function(){for(var t=0;t<e*2;t++)$n[t]=Math.floor(Math.random()*16)+48,$n[t]>=58&&($n[t]+=39);return String.fromCharCode.apply(null,$n.slice(0,e*2))}}var Jy=function(){function e(t,n,r){this._tracerProvider=r;var i=Gy(n);this._sampler=i.sampler,this._generalLimits=i.generalLimits,this._spanLimits=i.spanLimits,this._idGenerator=n.idGenerator||new Yy,this.resource=r.resource,this.instrumentationLibrary=t}return e.prototype.startSpan=function(t,n,r){var i,o,a;n===void 0&&(n={}),r===void 0&&(r=x.active()),n.root&&(r=k.deleteSpan(r));var u=k.getSpan(r);if(fi(r)){T.debug("Instrumentation suppressed, returning Noop Span");var c=k.wrapSpanContext(La);return c}var s=u?.spanContext(),l=this._idGenerator.generateSpanId(),p,f,m;!s||!k.isSpanContextValid(s)?p=this._idGenerator.generateTraceId():(p=s.traceId,f=s.traceState,m=s.spanId);var v=(i=n.kind)!==null&&i!==void 0?i:jt.INTERNAL,y=((o=n.links)!==null&&o!==void 0?o:[]).map(function(ne){return{context:ne.context,attributes:Pn(ne.attributes)}}),g=Pn(n.attributes),E=this._sampler.shouldSample(r,p,t,v,g,y);f=(a=E.traceState)!==null&&a!==void 0?a:f;var S=E.decision===An.RECORD_AND_SAMPLED?fe.SAMPLED:fe.NONE,P={traceId:p,spanId:l,traceFlags:S,traceState:f};if(E.decision===An.NOT_RECORD){T.debug("Recording is off, propagating context in a non-recording span");var c=k.wrapSpanContext(P);return c}var j=Pn(Object.assign(g,E.attributes)),$=new Vy(this,r,t,P,v,m,y,n.startTime,void 0,j);return $},e.prototype.startActiveSpan=function(t,n,r,i){var o,a,u;if(!(arguments.length<2)){arguments.length===2?u=n:arguments.length===3?(o=n,u=r):(o=n,a=r,u=i);var c=a??x.active(),s=this.startSpan(t,o,c),l=k.setSpan(c,s);return x.with(l,u,void 0,s)}},e.prototype.getGeneralLimits=function(){return this._generalLimits},e.prototype.getSpanLimits=function(){return this._spanLimits},e.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},e}(),Qy="process.runtime.name",Zy="service.name",em="telemetry.sdk.name",tm="telemetry.sdk.language",nm="telemetry.sdk.version",rm=Qy,im=Zy,Li=em,Ri=tm,Ci=nm,om="webjs",am=om,sm="1.30.1",vt,Ni=(vt={},vt[Li]="opentelemetry",vt[rm]="browser",vt[Ri]=am,vt[Ci]=sm,vt);function um(){return"unknown_service"}var Ne=function(){return Ne=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Ne.apply(this,arguments)},cm=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},lm=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},pm=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Xt=function(){function e(t,n){var r=this,i;this._attributes=t,this.asyncAttributesPending=n!=null,this._syncAttributes=(i=this._attributes)!==null&&i!==void 0?i:{},this._asyncAttributesPromise=n?.then(function(o){return r._attributes=Object.assign({},r._attributes,o),r.asyncAttributesPending=!1,o},function(o){return T.debug("a resource's async attributes promise rejected: %s",o),r.asyncAttributesPending=!1,{}})}return e.empty=function(){return e.EMPTY},e.default=function(){var t;return new e((t={},t[im]=um(),t[Ri]=Ni[Ri],t[Li]=Ni[Li],t[Ci]=Ni[Ci],t))},Object.defineProperty(e.prototype,"attributes",{get:function(){var t;return this.asyncAttributesPending&&T.error("Accessing resource attributes before async attributes settled"),(t=this._attributes)!==null&&t!==void 0?t:{}},enumerable:!1,configurable:!0}),e.prototype.waitForAsyncAttributes=function(){return cm(this,void 0,void 0,function(){return lm(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]}})})},e.prototype.merge=function(t){var n=this,r;if(!t)return this;var i=Ne(Ne({},this._syncAttributes),(r=t._syncAttributes)!==null&&r!==void 0?r:t.attributes);if(!this._asyncAttributesPromise&&!t._asyncAttributesPromise)return new e(i);var o=Promise.all([this._asyncAttributesPromise,t._asyncAttributesPromise]).then(function(a){var u,c=pm(a,2),s=c[0],l=c[1];return Ne(Ne(Ne(Ne({},n._syncAttributes),s),(u=t._syncAttributes)!==null&&u!==void 0?u:t.attributes),l)});return new e(i,o)},e.EMPTY=new e({}),e}(),Bn=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Cs=function(){function e(t){this._spanProcessors=t}return e.prototype.forceFlush=function(){var t,n,r=[];try{for(var i=Bn(this._spanProcessors),o=i.next();!o.done;o=i.next()){var a=o.value;r.push(a.forceFlush())}}catch(u){t={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return new Promise(function(u){Promise.all(r).then(function(){u()}).catch(function(c){lt(c||new Error("MultiSpanProcessor: forceFlush failed")),u()})})},e.prototype.onStart=function(t,n){var r,i;try{for(var o=Bn(this._spanProcessors),a=o.next();!a.done;a=o.next()){var u=a.value;u.onStart(t,n)}}catch(c){r={error:c}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}},e.prototype.onEnd=function(t){var n,r;try{for(var i=Bn(this._spanProcessors),o=i.next();!o.done;o=i.next()){var a=o.value;a.onEnd(t)}}catch(u){n={error:u}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},e.prototype.shutdown=function(){var t,n,r=[];try{for(var i=Bn(this._spanProcessors),o=i.next();!o.done;o=i.next()){var a=o.value;r.push(a.shutdown())}}catch(u){t={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return new Promise(function(u,c){Promise.all(r).then(function(){u()},c)})},e}(),fm=function(){function e(){}return e.prototype.onStart=function(t,n){},e.prototype.onEnd=function(t){},e.prototype.shutdown=function(){return Promise.resolve()},e.prototype.forceFlush=function(){return Promise.resolve()},e}(),hm=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},dm=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},Ve;(function(e){e[e.resolved=0]="resolved",e[e.timeout=1]="timeout",e[e.error=2]="error",e[e.unresolved=3]="unresolved"})(Ve||(Ve={}));var vm=function(){function e(t){t===void 0&&(t={});var n,r;this._registeredSpanProcessors=[],this._tracers=new Map;var i=Py({},Os(),qy(t));if(this.resource=(n=i.resource)!==null&&n!==void 0?n:Xt.empty(),i.mergeResourceWithDefaults&&(this.resource=Xt.default().merge(this.resource)),this._config=Object.assign({},i,{resource:this.resource}),!((r=t.spanProcessors)===null||r===void 0)&&r.length)this._registeredSpanProcessors=dm([],hm(t.spanProcessors),!1),this.activeSpanProcessor=new Cs(this._registeredSpanProcessors);else{var o=this._buildExporterFromEnv();if(o!==void 0){var a=new Ls(o);this.activeSpanProcessor=a}else this.activeSpanProcessor=new fm}}return e.prototype.getTracer=function(t,n,r){var i=t+"@"+(n||"")+":"+(r?.schemaUrl||"");return this._tracers.has(i)||this._tracers.set(i,new Jy({name:t,version:n,schemaUrl:r?.schemaUrl},this._config,this)),this._tracers.get(i)},e.prototype.addSpanProcessor=function(t){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(function(n){return T.error("Error while trying to shutdown current span processor",n)}),this._registeredSpanProcessors.push(t),this.activeSpanProcessor=new Cs(this._registeredSpanProcessors)},e.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},e.prototype.register=function(t){t===void 0&&(t={}),k.setGlobalTracerProvider(this),t.propagator===void 0&&(t.propagator=this._buildPropagatorFromEnv()),t.contextManager&&x.setGlobalContextManager(t.contextManager),t.propagator&&Z.setGlobalPropagator(t.propagator)},e.prototype.forceFlush=function(){var t=this._config.forceFlushTimeoutMillis,n=this._registeredSpanProcessors.map(function(r){return new Promise(function(i){var o,a=setTimeout(function(){i(new Error("Span processor did not completed within timeout period of "+t+" ms")),o=Ve.timeout},t);r.forceFlush().then(function(){clearTimeout(a),o!==Ve.timeout&&(o=Ve.resolved,i(o))}).catch(function(u){clearTimeout(a),o=Ve.error,i(u)})})});return new Promise(function(r,i){Promise.all(n).then(function(o){var a=o.filter(function(u){return u!==Ve.resolved});a.length>0?i(a):r()}).catch(function(o){return i([o])})})},e.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},e.prototype._getPropagator=function(t){var n;return(n=this.constructor._registeredPropagators.get(t))===null||n===void 0?void 0:n()},e.prototype._getSpanExporter=function(t){var n;return(n=this.constructor._registeredExporters.get(t))===null||n===void 0?void 0:n()},e.prototype._buildPropagatorFromEnv=function(){var t=this,n=Array.from(new Set(Gt().OTEL_PROPAGATORS)),r=n.map(function(o){var a=t._getPropagator(o);return a||T.warn('Propagator "'+o+'" requested through environment variable is unavailable.'),a}),i=r.reduce(function(o,a){return a&&o.push(a),o},[]);if(i.length!==0)return n.length===1?i[0]:new ny({propagators:i})},e.prototype._buildExporterFromEnv=function(){var t=Gt().OTEL_TRACES_EXPORTER;if(!(t==="none"||t==="")){var n=this._getSpanExporter(t);return n||T.error('Exporter "'+t+'" requested through environment variable is unavailable.'),n}},e._registeredPropagators=new Map([["tracecontext",function(){return new _y}],["baggage",function(){return new Ev}]]),e._registeredExporters=new Map,e}(),ym=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},mm=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},Ns=function(){function e(){this._enabled=!1,this._currentContext=je}return e.prototype._bindFunction=function(t,n){t===void 0&&(t=je);var r=this,i=function(){for(var o=this,a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];return r.with(t,function(){return n.apply(o,a)})};return Object.defineProperty(i,"length",{enumerable:!1,configurable:!0,writable:!1,value:n.length}),i},e.prototype.active=function(){return this._currentContext},e.prototype.bind=function(t,n){return t===void 0&&(t=this.active()),typeof n=="function"?this._bindFunction(t,n):n},e.prototype.disable=function(){return this._currentContext=je,this._enabled=!1,this},e.prototype.enable=function(){return this._enabled?this:(this._enabled=!0,this._currentContext=je,this)},e.prototype.with=function(t,n,r){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];var a=this._currentContext;this._currentContext=t||je;try{return n.call.apply(n,mm([r],ym(i),!1))}finally{this._currentContext=a}},e}(),gm=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),_m=function(e){gm(t,e);function t(n){n===void 0&&(n={});var r=e.call(this,n)||this;if(n.contextManager)throw"contextManager should be defined in register method not in constructor";if(n.propagator)throw"propagator should be defined in register method not in constructor";return r}return t.prototype.register=function(n){n===void 0&&(n={}),n.contextManager===void 0&&(n.contextManager=new Ns),n.contextManager&&n.contextManager.enable(),e.prototype.register.call(this,n)},t}(vm),w;(function(e){e.CONNECT_END="connectEnd",e.CONNECT_START="connectStart",e.DECODED_BODY_SIZE="decodedBodySize",e.DOM_COMPLETE="domComplete",e.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",e.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",e.DOM_INTERACTIVE="domInteractive",e.DOMAIN_LOOKUP_END="domainLookupEnd",e.DOMAIN_LOOKUP_START="domainLookupStart",e.ENCODED_BODY_SIZE="encodedBodySize",e.FETCH_START="fetchStart",e.LOAD_EVENT_END="loadEventEnd",e.LOAD_EVENT_START="loadEventStart",e.NAVIGATION_START="navigationStart",e.REDIRECT_END="redirectEnd",e.REDIRECT_START="redirectStart",e.REQUEST_START="requestStart",e.RESPONSE_END="responseEnd",e.RESPONSE_START="responseStart",e.SECURE_CONNECTION_START="secureConnectionStart",e.UNLOAD_EVENT_END="unloadEventEnd",e.UNLOAD_EVENT_START="unloadEventStart"})(w||(w={}));var xi;function Em(){return xi||(xi=document.createElement("a")),xi}function xe(e,t){return t in e}function q(e,t,n,r){var i=void 0,o=void 0;xe(n,t)&&typeof n[t]=="number"&&(i=n[t]);var a=w.FETCH_START;if(xe(n,a)&&typeof n[a]=="number"&&(o=n[a]),i!==void 0&&o!==void 0&&i>=o)return e.addEvent(t,i),e}function yt(e,t,n){n===void 0&&(n=!1),n||(q(e,w.FETCH_START,t),q(e,w.DOMAIN_LOOKUP_START,t),q(e,w.DOMAIN_LOOKUP_END,t),q(e,w.CONNECT_START,t),xe(t,"name")&&t.name.startsWith("https:")&&q(e,w.SECURE_CONNECTION_START,t),q(e,w.CONNECT_END,t),q(e,w.REQUEST_START,t),q(e,w.RESPONSE_START,t),q(e,w.RESPONSE_END,t));var r=t[w.ENCODED_BODY_SIZE];r!==void 0&&e.setAttribute(Wv,r);var i=t[w.DECODED_BODY_SIZE];i!==void 0&&r!==i&&e.setAttribute(Yv,i)}function Tm(e){return e.slice().sort(function(t,n){var r=t[w.FETCH_START],i=n[w.FETCH_START];return r>i?1:r<i?-1:0})}function xs(){return typeof location<"u"?location.origin:void 0}function Ps(e,t,n,r,i,o){i===void 0&&(i=new WeakSet);var a=ge(e);e=a.toString();var u=Sm(e,t,n,r,i,o);if(u.length===0)return{mainRequest:void 0};if(u.length===1)return{mainRequest:u[0]};var c=Tm(u);if(a.origin!==xs()&&c.length>1){var s=c[0],l=bm(c,s[w.RESPONSE_END],n),p=s[w.RESPONSE_END],f=l[w.FETCH_START];return f<p&&(l=s,s=void 0),{corsPreFlightRequest:s,mainRequest:l}}else return{mainRequest:u[0]}}function bm(e,t,n){for(var r=Ce(n),i=Ce(qt(t)),o=e[1],a,u=e.length,c=1;c<u;c++){var s=e[c],l=Ce(qt(s[w.FETCH_START])),p=Ce(qt(s[w.RESPONSE_END])),f=r-p;l>=i&&(!a||f<a)&&(a=f,o=s)}return o}function Sm(e,t,n,r,i,o){var a=Ce(t),u=Ce(n),c=r.filter(function(s){var l=Ce(qt(s[w.FETCH_START])),p=Ce(qt(s[w.RESPONSE_END]));return s.initiatorType.toLowerCase()===(o||"xmlhttprequest")&&s.name===e&&l>=a&&p<=u});return c.length>0&&(c=c.filter(function(s){return!i.has(s)})),c}function ge(e){if(typeof URL=="function")return new URL(e,typeof document<"u"?document.baseURI:typeof location<"u"?location.href:void 0);var t=Em();return t.href=e,t}function Is(e,t){if(e.nodeType===Node.DOCUMENT_NODE)return"/";var n=wm(e,t);if(t&&n.indexOf("@id")>0)return n;var r="";return e.parentNode&&(r+=Is(e.parentNode,!1)),r+=n,r}function Om(e){if(!e.parentNode)return 0;var t=[e.nodeType];e.nodeType===Node.CDATA_SECTION_NODE&&t.push(Node.TEXT_NODE);var n=Array.from(e.parentNode.childNodes);return n=n.filter(function(r){var i=r.localName;return t.indexOf(r.nodeType)>=0&&i===e.localName}),n.length>=1?n.indexOf(e)+1:0}function wm(e,t){var n=e.nodeType,r=Om(e),i="";if(n===Node.ELEMENT_NODE){var o=e.getAttribute("id");if(t&&o)return'//*[@id="'+o+'"]';i=e.localName}else if(n===Node.TEXT_NODE||n===Node.CDATA_SECTION_NODE)i="text()";else if(n===Node.COMMENT_NODE)i="comment()";else return"";return i&&r>1?"/"+i+"["+r+"]":"/"+i}function ks(e,t){var n=t||[];(typeof n=="string"||n instanceof RegExp)&&(n=[n]);var r=ge(e);return r.origin===xs()?!0:n.some(function(i){return ky(e,i)})}var Pi=function(){return Pi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Pi.apply(this,arguments)},Am=function(){function e(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this._config={},this._wrap=K.wrap,this._unwrap=K.unwrap,this._massWrap=K.massWrap,this._massUnwrap=K.massUnwrap,this.setConfig(r),this._diag=T.createComponentLogger({namespace:t}),this._tracer=k.getTracer(t,n),this._meter=ct.getMeter(t,n),this._logger=Ft.getLogger(t,n),this._updateMetricInstruments()}return Object.defineProperty(e.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),e.prototype.setMeterProvider=function(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(e.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),e.prototype.setLoggerProvider=function(t){this._logger=t.getLogger(this.instrumentationName,this.instrumentationVersion)},e.prototype.getModuleDefinitions=function(){var t,n=(t=this.init())!==null&&t!==void 0?t:[];return Array.isArray(n)?n:[n]},e.prototype._updateMetricInstruments=function(){},e.prototype.getConfig=function(){return this._config},e.prototype.setConfig=function(t){this._config=Pi({enabled:!0},t)},e.prototype.setTracerProvider=function(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(e.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),e.prototype._runSpanCustomizationHook=function(t,n,r,i){if(t)try{t(r,i)}catch(o){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:n},o)}},e}(),Lm=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Rm=function(e){Lm(t,e);function t(n,r,i){var o=e.call(this,n,r,i)||this;return o._config.enabled&&o.enable(),o}return t}(Am);function Ms(e,t,n){var r,i;try{i=e()}catch(o){r=o}finally{return t(r,i),i}}var Kt;(function(e){e.DOCUMENT_LOAD="documentLoad",e.DOCUMENT_FETCH="documentFetch",e.RESOURCE_FETCH="resourceFetch"})(Kt||(Kt={}));var Cm="0.44.0",Nm="@opentelemetry/instrumentation-document-load";const xm="http.url",Pm="http.user_agent",mt=xm,Im=Pm;var Fn;(function(e){e.FIRST_PAINT="firstPaint",e.FIRST_CONTENTFUL_PAINT="firstContentfulPaint"})(Fn||(Fn={}));var km=function(){var e,t,n={},r=(t=(e=xn).getEntriesByType)===null||t===void 0?void 0:t.call(e,"navigation")[0];if(r){var i=Object.values(w);i.forEach(function(u){if(xe(r,u)){var c=r[u];typeof c=="number"&&(n[u]=c)}})}else{var o=xn,a=o.timing;if(a){var i=Object.values(w);i.forEach(function(c){if(xe(a,c)){var s=a[c];typeof s=="number"&&(n[c]=s)}})}}return n},Ds={"first-paint":Fn.FIRST_PAINT,"first-contentful-paint":Fn.FIRST_CONTENTFUL_PAINT},Mm=function(e){var t,n,r=(n=(t=xn).getEntriesByType)===null||n===void 0?void 0:n.call(t,"paint");r&&r.forEach(function(i){var o=i.name,a=i.startTime;xe(Ds,o)&&e.addEvent(Ds[o],a)})},Dm=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Um=function(e){Dm(t,e);function t(n){n===void 0&&(n={});var r=e.call(this,Nm,Cm,n)||this;return r.component="document-load",r.version="1",r.moduleName=r.component,r}return t.prototype.init=function(){},t.prototype._onDocumentLoaded=function(){var n=this;window.setTimeout(function(){n._collectPerformance()})},t.prototype._addResourcesSpans=function(n){var r=this,i,o,a=(o=(i=xn).getEntriesByType)===null||o===void 0?void 0:o.call(i,"resource");a&&a.forEach(function(u){r._initResourceSpan(u,n)})},t.prototype._collectPerformance=function(){var n=this,r=Array.from(document.getElementsByTagName("meta")).find(function(a){return a.getAttribute("name")===lv}),i=km(),o=r&&r.content||"";x.with(Z.extract(je,{traceparent:o}),function(){var a,u=n._startSpan(Kt.DOCUMENT_LOAD,w.FETCH_START,i);u&&(x.with(k.setSpan(x.active(),u),function(){var c=n._startSpan(Kt.DOCUMENT_FETCH,w.FETCH_START,i);c&&(c.setAttribute(mt,location.href),x.with(k.setSpan(x.active(),c),function(){var s;n.getConfig().ignoreNetworkEvents||yt(c,i),n._addCustomAttributesOnSpan(c,(s=n.getConfig().applyCustomAttributesOnSpan)===null||s===void 0?void 0:s.documentFetch),n._endSpan(c,w.RESPONSE_END,i)}))}),u.setAttribute(mt,location.href),u.setAttribute(Im,navigator.userAgent),n._addResourcesSpans(u),n.getConfig().ignoreNetworkEvents||(q(u,w.FETCH_START,i),q(u,w.UNLOAD_EVENT_START,i),q(u,w.UNLOAD_EVENT_END,i),q(u,w.DOM_INTERACTIVE,i),q(u,w.DOM_CONTENT_LOADED_EVENT_START,i),q(u,w.DOM_CONTENT_LOADED_EVENT_END,i),q(u,w.DOM_COMPLETE,i),q(u,w.LOAD_EVENT_START,i),q(u,w.LOAD_EVENT_END,i)),n.getConfig().ignorePerformancePaintEvents||Mm(u),n._addCustomAttributesOnSpan(u,(a=n.getConfig().applyCustomAttributesOnSpan)===null||a===void 0?void 0:a.documentLoad),n._endSpan(u,w.LOAD_EVENT_END,i))})},t.prototype._endSpan=function(n,r,i){n&&(xe(i,r)?n.end(i[r]):n.end())},t.prototype._initResourceSpan=function(n,r){var i,o=this._startSpan(Kt.RESOURCE_FETCH,w.FETCH_START,n,r);o&&(o.setAttribute(mt,n.name),this.getConfig().ignoreNetworkEvents||yt(o,n),this._addCustomAttributesOnResourceSpan(o,n,(i=this.getConfig().applyCustomAttributesOnSpan)===null||i===void 0?void 0:i.resourceFetch),this._endSpan(o,w.RESPONSE_END,n))},t.prototype._startSpan=function(n,r,i,o){if(xe(i,r)&&typeof i[r]=="number"){var a=this.tracer.startSpan(n,{startTime:i[r]},o?k.setSpan(x.active(),o):void 0);return a}},t.prototype._waitForPageLoad=function(){window.document.readyState==="complete"?this._onDocumentLoaded():(this._onDocumentLoaded=this._onDocumentLoaded.bind(this),window.addEventListener("load",this._onDocumentLoaded))},t.prototype._addCustomAttributesOnSpan=function(n,r){var i=this;r&&Ms(function(){return r(n)},function(o){o&&i._diag.error("addCustomAttributesOnSpan",o)})},t.prototype._addCustomAttributesOnResourceSpan=function(n,r,i){var o=this;i&&Ms(function(){return i(n,r)},function(a){a&&o._diag.error("addCustomAttributesOnResourceSpan",a)})},t.prototype.enable=function(){window.removeEventListener("load",this._onDocumentLoaded),this._waitForPageLoad()},t.prototype.disable=function(){window.removeEventListener("load",this._onDocumentLoaded)},t}(Rm),Ii=function(){return Ii=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Ii.apply(this,arguments)},jm=function(){function e(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this._config={},this._wrap=K.wrap,this._unwrap=K.unwrap,this._massWrap=K.massWrap,this._massUnwrap=K.massUnwrap,this.setConfig(r),this._diag=T.createComponentLogger({namespace:t}),this._tracer=k.getTracer(t,n),this._meter=ct.getMeter(t,n),this._logger=Ft.getLogger(t,n),this._updateMetricInstruments()}return Object.defineProperty(e.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),e.prototype.setMeterProvider=function(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(e.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),e.prototype.setLoggerProvider=function(t){this._logger=t.getLogger(this.instrumentationName,this.instrumentationVersion)},e.prototype.getModuleDefinitions=function(){var t,n=(t=this.init())!==null&&t!==void 0?t:[];return Array.isArray(n)?n:[n]},e.prototype._updateMetricInstruments=function(){},e.prototype.getConfig=function(){return this._config},e.prototype.setConfig=function(t){this._config=Ii({enabled:!0},t)},e.prototype.setTracerProvider=function(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(e.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),e.prototype._runSpanCustomizationHook=function(t,n,r,i){if(t)try{t(r,i)}catch(o){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:n},o)}},e}(),$m=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Bm=function(e){$m(t,e);function t(n,r,i){var o=e.call(this,n,r,i)||this;return o._config.enabled&&o.enable(),o}return t}(jm);function Fm(e,t,n){var r,i;try{i=e()}catch(o){r=o}finally{return t(r,i),i}}function Vm(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}var ki=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},Mi=performance,Hm="http.method",Gm="http.url",qm="http.host",zm="http.scheme",Xm="http.status_code",Km="http.user_agent",Wm="http.request_content_length_uncompressed",Ym=Hm,Jm=Gm,Qm=qm,Zm=zm,eg=Xm,tg=Km,ng=Wm,rg=9,ig=6,og=Math.pow(10,ig),Us=Math.pow(10,rg);function Di(e){var t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*og);return[n,r]}function ag(){var e=Mi.timeOrigin;if(typeof e!="number"){var t=Mi;e=t.timing&&t.timing.fetchStart}return e}function js(e){var t=Di(ag()),n=Di(Mi.now());return sg(t,n)}function sg(e,t){var n=[e[0]+t[0],e[1]+t[1]];return n[1]>=Us&&(n[1]-=Us,n[0]+=1),n}var ug=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function cg(e,t){return typeof t=="string"?e===t:!!e.match(t)}function lg(e,t){var n,r;if(!t)return!1;try{for(var i=ug(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(cg(e,a))return!0}}catch(u){n={error:u}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!1}var Vn;(function(e){e.COMPONENT="component",e.HTTP_ERROR_NAME="http.error_name",e.HTTP_STATUS_TEXT="http.status_text"})(Vn||(Vn={}));var pg=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},fg=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},hg=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},dg=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},$s=T.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-fetch/utils"});function vg(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e[0]instanceof URL||typeof e[0]=="string"){var n=e[1];if(!(n!=null&&n.body))return Promise.resolve();if(n.body instanceof ReadableStream){var r=yg(n.body),i=r.body,o=r.length;return n.body=i,o}else return Promise.resolve(mg(n.body))}else{var a=e[0];return a!=null&&a.body?a.clone().text().then(function(u){return Ui(u)}):Promise.resolve()}}function yg(e){if(!e.pipeThrough)return $s.warn("Platform has ReadableStream but not pipeThrough!"),{body:e,length:Promise.resolve(void 0)};var t=0,n,r=new Promise(function(o){n=o}),i=new TransformStream({start:function(){},transform:function(o,a){return pg(this,void 0,void 0,function(){var u;return fg(this,function(c){switch(c.label){case 0:return[4,o];case 1:return u=c.sent(),t+=u.byteLength,a.enqueue(o),[2]}})})},flush:function(){n(t)}});return{body:e.pipeThrough(i),length:r}}function mg(e){if(typeof Document<"u"&&e instanceof Document)return new XMLSerializer().serializeToString(document).length;if(e instanceof Blob)return e.size;if(e.byteLength!==void 0)return e.byteLength;if(e instanceof FormData)return _g(e);if(e instanceof URLSearchParams)return Ui(e.toString());if(typeof e=="string")return Ui(e);$s.warn("unknown body type")}var gg=new TextEncoder;function Ui(e){return gg.encode(e).byteLength}function _g(e){var t,n,r=0;try{for(var i=hg(e.entries()),o=i.next();!o.done;o=i.next()){var a=dg(o.value,2),u=a[0],c=a[1];r+=u.length,c instanceof Blob?r+=c.size:r+=c.length}}catch(s){t={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}var Bs="0.57.2",Eg=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Tg=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},bg=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},ji,Sg=300,Fs=typeof process=="object"&&((ji=process.release)===null||ji===void 0?void 0:ji.name)==="node",Og=function(e){Eg(t,e);function t(n){n===void 0&&(n={});var r=e.call(this,"@opentelemetry/instrumentation-fetch",Bs,n)||this;return r.component="fetch",r.version=Bs,r.moduleName=r.component,r._usedResources=new WeakSet,r._tasksCount=0,r}return t.prototype.init=function(){},t.prototype._addChildSpan=function(n,r){var i=this.tracer.startSpan("CORS Preflight",{startTime:r[w.FETCH_START]},k.setSpan(x.active(),n));yt(i,r,this.getConfig().ignoreNetworkEvents),i.end(r[w.RESPONSE_END])},t.prototype._addFinalSpanAttributes=function(n,r){var i=ge(r.url);n.setAttribute(eg,r.status),r.statusText!=null&&n.setAttribute(Vn.HTTP_STATUS_TEXT,r.statusText),n.setAttribute(Qm,i.host),n.setAttribute(Zm,i.protocol.replace(":","")),typeof navigator<"u"&&n.setAttribute(tg,navigator.userAgent)},t.prototype._addHeaders=function(n,r){if(!ks(r,this.getConfig().propagateTraceHeaderCorsUrls)){var i={};Z.inject(x.active(),i),Object.keys(i).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}if(n instanceof Request)Z.inject(x.active(),n.headers,{set:function(o,a,u){return o.set(a,typeof u=="string"?u:String(u))}});else if(n.headers instanceof Headers)Z.inject(x.active(),n.headers,{set:function(o,a,u){return o.set(a,typeof u=="string"?u:String(u))}});else if(n.headers instanceof Map)Z.inject(x.active(),n.headers,{set:function(o,a,u){return o.set(a,typeof u=="string"?u:String(u))}});else{var i={};Z.inject(x.active(),i),n.headers=Object.assign({},i,n.headers||{})}},t.prototype._clearResources=function(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(performance.clearResourceTimings(),this._usedResources=new WeakSet)},t.prototype._createSpan=function(n,r){var i;if(r===void 0&&(r={}),lg(n,this.getConfig().ignoreUrls)){this._diag.debug("ignoring span as url matches ignored url");return}var o=(r.method||"GET").toUpperCase(),a="HTTP "+o;return this.tracer.startSpan(a,{kind:jt.CLIENT,attributes:(i={},i[Vn.COMPONENT]=this.moduleName,i[Ym]=o,i[Jm]=n,i)})},t.prototype._findResourceAndAddNetworkEvents=function(n,r,i){var o=r.entries;if(!o.length){if(!performance.getEntriesByType)return;o=performance.getEntriesByType("resource")}var a=Ps(r.spanUrl,r.startTime,i,o,this._usedResources,"fetch");if(a.mainRequest){var u=a.mainRequest;this._markResourceAsUsed(u);var c=a.corsPreFlightRequest;c&&(this._addChildSpan(n,c),this._markResourceAsUsed(c)),yt(n,u,this.getConfig().ignoreNetworkEvents)}},t.prototype._markResourceAsUsed=function(n){this._usedResources.add(n)},t.prototype._endSpan=function(n,r,i){var o=this,a=Di(Date.now()),u=js();this._addFinalSpanAttributes(n,i),setTimeout(function(){var c;(c=r.observer)===null||c===void 0||c.disconnect(),o._findResourceAndAddNetworkEvents(n,r,u),o._tasksCount--,o._clearResources(),n.end(a)},Sg)},t.prototype._patchConstructor=function(){var n=this;return function(r){var i=n;return function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var u=this,c=ge(o[0]instanceof Request?o[0].url:String(o[0])).href,s=o[0]instanceof Request?o[0]:o[1]||{},l=i._createSpan(c,s);if(!l)return r.apply(this,o);var p=i._prepareSpanData(c);i.getConfig().measureRequestSize&&vg.apply(void 0,bg([],Tg(o),!1)).then(function(g){g&&l.setAttribute(ng,g)}).catch(function(g){i._diag.warn("getFetchBodyLength",g)});function f(g,E){i._applyAttributesAfterFetch(g,s,E),i._endSpan(g,p,{status:E.status||0,statusText:E.message,url:c})}function m(g,E){i._applyAttributesAfterFetch(g,s,E),E.status>=200&&E.status<400?i._endSpan(g,p,E):i._endSpan(g,p,{status:E.status,statusText:E.statusText,url:c})}function v(g,E,S){try{var P=S.clone(),j=S.clone(),$=P.body;if($){var ne=$.getReader(),X=function(){ne.read().then(function(U){var Te=U.done;Te?m(g,j):X()},function(U){f(g,U)})};X()}else m(g,S)}finally{E(S)}}function y(g,E,S){try{f(g,S)}finally{E(S)}}return new Promise(function(g,E){return x.with(k.setSpan(x.active(),l),function(){return i._addHeaders(s,c),i._tasksCount++,r.apply(u,s instanceof Request?[s]:[c,s]).then(v.bind(u,l,g),y.bind(u,l,E))})})}}},t.prototype._applyAttributesAfterFetch=function(n,r,i){var o=this,a=this.getConfig().applyCustomAttributesOnSpan;a&&Fm(function(){return a(n,r,i)},function(u){u&&o._diag.error("applyCustomAttributesOnSpan",u)})},t.prototype._prepareSpanData=function(n){var r=js(),i=[];if(typeof PerformanceObserver!="function")return{entries:i,startTime:r,spanUrl:n};var o=new PerformanceObserver(function(a){var u=a.getEntries();u.forEach(function(c){c.initiatorType==="fetch"&&c.name===n&&i.push(c)})});return o.observe({entryTypes:["resource"]}),{entries:i,observer:o,startTime:r,spanUrl:n}},t.prototype.enable=function(){if(Fs){this._diag.warn("this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()");return}Vm(fetch)&&(this._unwrap(ki,"fetch"),this._diag.debug("removing previous patch for constructor")),this._wrap(ki,"fetch",this._patchConstructor())},t.prototype.disable=function(){Fs||(this._unwrap(ki,"fetch"),this._usedResources=new WeakSet)},t}(Bm),$i=function(){return $i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},$i.apply(this,arguments)},wg=function(){function e(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this._config={},this._wrap=K.wrap,this._unwrap=K.unwrap,this._massWrap=K.massWrap,this._massUnwrap=K.massUnwrap,this.setConfig(r),this._diag=T.createComponentLogger({namespace:t}),this._tracer=k.getTracer(t,n),this._meter=ct.getMeter(t,n),this._logger=Ft.getLogger(t,n),this._updateMetricInstruments()}return Object.defineProperty(e.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),e.prototype.setMeterProvider=function(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(e.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),e.prototype.setLoggerProvider=function(t){this._logger=t.getLogger(this.instrumentationName,this.instrumentationVersion)},e.prototype.getModuleDefinitions=function(){var t,n=(t=this.init())!==null&&t!==void 0?t:[];return Array.isArray(n)?n:[n]},e.prototype._updateMetricInstruments=function(){},e.prototype.getConfig=function(){return this._config},e.prototype.setConfig=function(t){this._config=$i({enabled:!0},t)},e.prototype.setTracerProvider=function(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(e.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),e.prototype._runSpanCustomizationHook=function(t,n,r,i){if(t)try{t(r,i)}catch(o){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:n},o)}},e}(),Ag=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Lg=function(e){Ag(t,e);function t(n,r,i){var o=e.call(this,n,r,i)||this;return o._config.enabled&&o.enable(),o}return t}(wg);function Rg(e,t,n){var r,i;try{i=e()}catch(o){r=o}finally{return t(r,i),i}}function Vs(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}var Wt=performance,Cg="http.method",Ng="http.url",xg="http.host",Pg="http.scheme",Ig="http.status_code",kg="http.user_agent",Mg="http.request_content_length_uncompressed",Dg=Cg,Ug=Ng,jg=xg,$g=Pg,Bg=Ig,Fg=kg,Vg=Mg,Hg=9,Gg=6,qg=Math.pow(10,Gg),Hs=Math.pow(10,Hg);function Gs(e){var t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*qg);return[n,r]}function zg(){var e=Wt.timeOrigin;if(typeof e!="number"){var t=Wt;e=t.timing&&t.timing.fetchStart}return e}function qs(e){var t=Gs(zg()),n=Gs(Wt.now());return Xg(t,n)}function Xg(e,t){var n=[e[0]+t[0],e[1]+t[1]];return n[1]>=Hs&&(n[1]-=Hs,n[0]+=1),n}var Kg=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function Wg(e,t){return typeof t=="string"?e===t:!!e.match(t)}function Yg(e,t){var n,r;if(!t)return!1;try{for(var i=Kg(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(Wg(e,a))return!0}}catch(u){n={error:u}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!1}var _e;(function(e){e.METHOD_OPEN="open",e.METHOD_SEND="send",e.EVENT_ABORT="abort",e.EVENT_ERROR="error",e.EVENT_LOAD="loaded",e.EVENT_TIMEOUT="timeout"})(_e||(_e={}));var Jg=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Qg=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Zg=T.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-xml-http-request/utils"});function e_(e){if(typeof Document<"u"&&e instanceof Document)return new XMLSerializer().serializeToString(document).length;if(e instanceof Blob)return e.size;if(e.byteLength!==void 0)return e.byteLength;if(e instanceof FormData)return n_(e);if(e instanceof URLSearchParams)return zs(e.toString());if(typeof e=="string")return zs(e);Zg.warn("unknown body type")}var t_=new TextEncoder;function zs(e){return t_.encode(e).byteLength}function n_(e){var t,n,r=0;try{for(var i=Jg(e.entries()),o=i.next();!o.done;o=i.next()){var a=Qg(o.value,2),u=a[0],c=a[1];r+=u.length,c instanceof Blob?r+=c.size:r+=c.length}}catch(s){t={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}var Xs="0.57.2",Bi;(function(e){e.HTTP_STATUS_TEXT="http.status_text"})(Bi||(Bi={}));var r_=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),i_=300,o_=function(e){r_(t,e);function t(n){n===void 0&&(n={});var r=e.call(this,"@opentelemetry/instrumentation-xml-http-request",Xs,n)||this;return r.component="xml-http-request",r.version=Xs,r.moduleName=r.component,r._tasksCount=0,r._xhrMem=new WeakMap,r._usedResources=new WeakSet,r}return t.prototype.init=function(){},t.prototype._addHeaders=function(n,r){var i=ge(r).href;if(!ks(i,this.getConfig().propagateTraceHeaderCorsUrls)){var o={};Z.inject(x.active(),o),Object.keys(o).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}var a={};Z.inject(x.active(),a),Object.keys(a).forEach(function(u){n.setRequestHeader(u,String(a[u]))})},t.prototype._addChildSpan=function(n,r){var i=this;x.with(k.setSpan(x.active(),n),function(){var o=i.tracer.startSpan("CORS Preflight",{startTime:r[w.FETCH_START]});yt(o,r,i.getConfig().ignoreNetworkEvents),o.end(r[w.RESPONSE_END])})},t.prototype._addFinalSpanAttributes=function(n,r,i){if(typeof i=="string"){var o=ge(i);r.status!==void 0&&n.setAttribute(Bg,r.status),r.statusText!==void 0&&n.setAttribute(Bi.HTTP_STATUS_TEXT,r.statusText),n.setAttribute(jg,o.host),n.setAttribute($g,o.protocol.replace(":","")),n.setAttribute(Fg,navigator.userAgent)}},t.prototype._applyAttributesAfterXHR=function(n,r){var i=this,o=this.getConfig().applyCustomAttributesOnSpan;typeof o=="function"&&Rg(function(){return o(n,r)},function(a){a&&i._diag.error("applyCustomAttributesOnSpan",a)})},t.prototype._addResourceObserver=function(n,r){var i=this._xhrMem.get(n);!i||typeof PerformanceObserver!="function"||typeof PerformanceResourceTiming!="function"||(i.createdResources={observer:new PerformanceObserver(function(o){var a=o.getEntries(),u=ge(r);a.forEach(function(c){c.initiatorType==="xmlhttprequest"&&c.name===u.href&&i.createdResources&&i.createdResources.entries.push(c)})}),entries:[]},i.createdResources.observer.observe({entryTypes:["resource"]}))},t.prototype._clearResources=function(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(Wt.clearResourceTimings(),this._xhrMem=new WeakMap,this._usedResources=new WeakSet)},t.prototype._findResourceAndAddNetworkEvents=function(n,r,i,o,a){if(!(!i||!o||!a||!n.createdResources)){var u=n.createdResources.entries;(!u||!u.length)&&(u=Wt.getEntriesByType("resource"));var c=Ps(ge(i).href,o,a,u,this._usedResources);if(c.mainRequest){var s=c.mainRequest;this._markResourceAsUsed(s);var l=c.corsPreFlightRequest;l&&(this._addChildSpan(r,l),this._markResourceAsUsed(l)),yt(r,s,this.getConfig().ignoreNetworkEvents)}}},t.prototype._cleanPreviousSpanInformation=function(n){var r=this._xhrMem.get(n);if(r){var i=r.callbackToRemoveEvents;i&&i(),this._xhrMem.delete(n)}},t.prototype._createSpan=function(n,r,i){var o;if(Yg(r,this.getConfig().ignoreUrls)){this._diag.debug("ignoring span as url matches ignored url");return}var a=i.toUpperCase(),u=this.tracer.startSpan(a,{kind:jt.CLIENT,attributes:(o={},o[Dg]=i,o[Ug]=ge(r).toString(),o)});return u.addEvent(_e.METHOD_OPEN),this._cleanPreviousSpanInformation(n),this._xhrMem.set(n,{span:u,spanUrl:r}),u},t.prototype._markResourceAsUsed=function(n){this._usedResources.add(n)},t.prototype._patchOpen=function(){var n=this;return function(r){var i=n;return function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var u=o[0],c=o[1];return i._createSpan(this,c,u),r.apply(this,o)}}},t.prototype._patchSend=function(){var n=this;function r(l,p,f,m){var v=p.callbackToRemoveEvents;typeof v=="function"&&v();var y=p.span,g=p.spanUrl,E=p.sendStartTime;y&&(n._findResourceAndAddNetworkEvents(p,y,g,E,f),y.addEvent(l,m),n._addFinalSpanAttributes(y,p,g),y.end(m),n._tasksCount--),n._clearResources()}function i(l,p){var f=n._xhrMem.get(p);if(f){f.status=p.status,f.statusText=p.statusText,n._xhrMem.delete(p),f.span&&n._applyAttributesAfterXHR(f.span,p);var m=qs(),v=Date.now();setTimeout(function(){r(l,f,m,v)},i_)}}function o(){i(_e.EVENT_ERROR,this)}function a(){i(_e.EVENT_ABORT,this)}function u(){i(_e.EVENT_TIMEOUT,this)}function c(){this.status<299?i(_e.EVENT_LOAD,this):i(_e.EVENT_ERROR,this)}function s(l){l.removeEventListener("abort",a),l.removeEventListener("error",o),l.removeEventListener("load",c),l.removeEventListener("timeout",u);var p=n._xhrMem.get(l);p&&(p.callbackToRemoveEvents=void 0)}return function(l){return function(){for(var p=this,f=[],m=0;m<arguments.length;m++)f[m]=arguments[m];var v=n._xhrMem.get(this);if(!v)return l.apply(this,f);var y=v.span,g=v.spanUrl;if(y&&g){if(n.getConfig().measureRequestSize&&f!=null&&f[0]){var E=f[0],S=e_(E);S!==void 0&&y.setAttribute(Vg,S)}x.with(k.setSpan(x.active(),y),function(){n._tasksCount++,v.sendStartTime=qs(),y.addEvent(_e.METHOD_SEND),p.addEventListener("abort",a),p.addEventListener("error",o),p.addEventListener("load",c),p.addEventListener("timeout",u),v.callbackToRemoveEvents=function(){s(p),v.createdResources&&v.createdResources.observer.disconnect()},n._addHeaders(p,g),n._addResourceObserver(p,g)})}return l.apply(this,f)}}},t.prototype.enable=function(){this._diag.debug("applying patch to",this.moduleName,this.version),Vs(XMLHttpRequest.prototype.open)&&(this._unwrap(XMLHttpRequest.prototype,"open"),this._diag.debug("removing previous patch from method open")),Vs(XMLHttpRequest.prototype.send)&&(this._unwrap(XMLHttpRequest.prototype,"send"),this._diag.debug("removing previous patch from method send")),this._wrap(XMLHttpRequest.prototype,"open",this._patchOpen()),this._wrap(XMLHttpRequest.prototype,"send",this._patchSend())},t.prototype.disable=function(){this._diag.debug("removing patch from",this.moduleName,this.version),this._unwrap(XMLHttpRequest.prototype,"open"),this._unwrap(XMLHttpRequest.prototype,"send"),this._tasksCount=0,this._xhrMem=new WeakMap,this._usedResources=new WeakSet},t}(Lg);const Fi=(e,t,n)=>{var r,i;const o=R({},t);return n?((r=Object.keys(o))==null||r.forEach(a=>{[...n].includes(a?.toLowerCase())||(o[a]="[REDACTED]")}),o):((i=Object.keys(o))==null||i.forEach(a=>{[...a_,...e].includes(a?.toLowerCase())&&(o[a]="[REDACTED]")}),o)},a_=["authorization","cookie","proxy-authorization","set-cookie","token"],s_=["https://www.googleapis.com/identitytoolkit","https://securetoken.googleapis.com"],u_=["awsaccesskeyid","signature","sig","x-goog-signature"],Ks=e=>{var t,n;try{return new URL(e)}catch{return new URL(e,(n=(t=globalThis.location)==null?void 0:t.origin)!=null?n:"http://example.com")}},Vi=e=>{try{const t=Ks(e);(t.username||t.password)&&(t.username="REDACTED",t.password="REDACTED");const n=t.searchParams;if(u_.forEach(r=>{for(const i of Array.from(n.keys()))i.toLowerCase()===r&&n.set(i,"REDACTED")}),!e.includes("://")&&!e.startsWith("//"))return t.pathname+t.search+t.hash;if(e.startsWith("//")){let r="//";return(t.username||t.password)&&(r+=t.username+":"+t.password+"@"),r+=t.host+t.pathname+t.search+t.hash,r}return t.toString()}catch{return e}},c_=new RegExp("sdk\\/evalx\\/[^/]+\\/contexts\\/(?<context>[^/?]*)\\??.*?"),l_=new RegExp("\\/eval\\/[^/]+\\/(?<context>[^/?]*)\\??.*?");function p_(e){return!!(e.includes("/sdk/evalx")&&e.match(c_)||e.includes("/eval/")&&e.match(l_))}const f_=e=>["events.ld.catamorphic.com","events.launchdarkly.com"].some(t=>e.toLocaleLowerCase().includes(t)),h_=e=>p_(e),d_=(e,t)=>t.some(n=>e.toLocaleLowerCase().includes(n)),v_=(e,t,n)=>!d_(e,t)&&!h_(e)&&!f_(e),y_=(e,t,n)=>{var r;if(n.some(u=>e.toLowerCase().includes(u)))return!1;let i=[];t===!0?(i=["localhost",/^\//],(r=window?.location)!=null&&r.host&&i.push(Ws(window.location.host))):t instanceof Array&&(i=t);const o=g_(e);let a=!1;return i.forEach(u=>{o.match(u)&&(a=!0)}),a},m_=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Ws=e=>new RegExp("^https?://([^/]+\\.)?"+m_(e)+"([:/?#]|$)"),g_=e=>{if(e.startsWith("/")&&!e.startsWith("//"))return e;try{return new URL(e).origin}catch{return e}},Ys=64*1024,__={"application/json":64*1024*1024,"text/plain":64*1024*1024},Hi=(e,t,n,r)=>{var i,o,a;let u=Ys;if(r){let c="";typeof r.get=="function"?c=(i=r.get("content-type"))!=null?i:"":c=(o=r["content-type"])!=null?o:"";try{c=c.split(";")[0]}catch{}u=(a=__[c])!=null?a:Ys}if(e){if(t)try{const c=JSON.parse(e);Array.isArray(c)?c.forEach(s=>{Object.keys(s).forEach(l=>{t.includes(l.toLocaleLowerCase())&&(s[l]="[REDACTED]")})}):Object.keys(c).forEach(s=>{t.includes(s.toLocaleLowerCase())&&(c[s]="[REDACTED]")}),e=JSON.stringify(c)}catch{}if(n)try{const c=JSON.parse(e);Object.keys(c).forEach(s=>{n.includes(s.toLocaleLowerCase())||(c[s]="[REDACTED]")}),e=JSON.stringify(c)}catch{}}try{e=e.slice(0,u)}catch{}return e},E_=(e,t,n)=>ce(void 0,null,function*(){let r;try{const i=e.clone().body;if(i){let o=i.getReader(),a=new TextDecoder,u,c="";for(;!(u=yield o.read()).done;){let s=u.value;c+=a.decode(s)}r=c,r=Hi(r,n,t,e.headers)}else r=""}catch(i){r=`Unable to clone response: ${i}`}return r});var Js=function(){function e(t){this._delegate=t}return e.prototype.export=function(t,n){this._delegate.export(t,n)},e.prototype.forceFlush=function(){return this._delegate.forceFlush()},e.prototype.shutdown=function(){return this._delegate.shutdown()},e}(),T_=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Qs=function(e){T_(t,e);function t(n,r,i){var o=e.call(this,n)||this;return o.name="OTLPExporterError",o.data=i,o.code=r,o}return t}(Error);function b_(e){if(!Number.isNaN(e)&&Number.isFinite(e)&&e>0)return e;throw new Error("Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '"+e+"')")}function S_(e){if(e!=null)return function(){return e}}function O_(e,t,n){var r,i,o,a,u,c;return{timeoutMillis:b_((i=(r=e.timeoutMillis)!==null&&r!==void 0?r:t.timeoutMillis)!==null&&i!==void 0?i:n.timeoutMillis),concurrencyLimit:(a=(o=e.concurrencyLimit)!==null&&o!==void 0?o:t.concurrencyLimit)!==null&&a!==void 0?a:n.concurrencyLimit,compression:(c=(u=e.compression)!==null&&u!==void 0?u:t.compression)!==null&&c!==void 0?c:n.compression}}function w_(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}var A_=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},L_=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},R_=function(){function e(t){this._sendingPromises=[],this._concurrencyLimit=t}return e.prototype.pushPromise=function(t){var n=this;if(this.hasReachedLimit())throw new Error("Concurrency Limit reached");this._sendingPromises.push(t);var r=function(){var i=n._sendingPromises.indexOf(t);n._sendingPromises.splice(i,1)};t.then(r,r)},e.prototype.hasReachedLimit=function(){return this._sendingPromises.length>=this._concurrencyLimit},e.prototype.awaitAll=function(){return A_(this,void 0,void 0,function(){return L_(this,function(t){switch(t.label){case 0:return[4,Promise.all(this._sendingPromises)];case 1:return t.sent(),[2]}})})},e}();function C_(e){return new R_(e.concurrencyLimit)}function N_(e){return Object.prototype.hasOwnProperty.call(e,"partialSuccess")}function x_(){return{handleResponse:function(e){e==null||!N_(e)||e.partialSuccess==null||Object.keys(e.partialSuccess).length===0||T.warn("Received Partial Success response:",JSON.stringify(e.partialSuccess))}}}var P_=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},I_=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},k_=function(){function e(t,n,r,i,o){this._transport=t,this._serializer=n,this._responseHandler=r,this._promiseQueue=i,this._timeout=o,this._diagLogger=T.createComponentLogger({namespace:"OTLPExportDelegate"})}return e.prototype.export=function(t,n){var r=this;if(this._diagLogger.debug("items to be sent",t),this._promiseQueue.hasReachedLimit()){n({code:B.FAILED,error:new Error("Concurrent export limit reached")});return}var i=this._serializer.serializeRequest(t);if(i==null){n({code:B.FAILED,error:new Error("Nothing to send")});return}this._promiseQueue.pushPromise(this._transport.send(i,this._timeout).then(function(o){if(o.status==="success"){if(o.data!=null)try{r._responseHandler.handleResponse(r._serializer.deserializeResponse(o.data))}catch(a){r._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?",a,o.data)}n({code:B.SUCCESS});return}else if(o.status==="failure"&&o.error){n({code:B.FAILED,error:o.error});return}else o.status==="retryable"?n({code:B.FAILED,error:new Qs("Export failed with retryable status")}):n({code:B.FAILED,error:new Qs("Export failed with unknown error")})},function(o){return n({code:B.FAILED,error:o})}))},e.prototype.forceFlush=function(){return this._promiseQueue.awaitAll()},e.prototype.shutdown=function(){return P_(this,void 0,void 0,function(){return I_(this,function(t){switch(t.label){case 0:return this._diagLogger.debug("shutdown started"),[4,this.forceFlush()];case 1:return t.sent(),this._transport.shutdown(),[2]}})})},e}();function M_(e,t){return new k_(e.transport,e.serializer,x_(),e.promiseHandler,t.timeout)}function Zs(e,t,n){return M_({transport:n,serializer:t,promiseHandler:C_(e)},{timeout:e.timeoutMillis})}function eu(e){return e>=48&&e<=57?e-48:e>=97&&e<=102?e-87:e-55}function Gi(e){for(var t=new Uint8Array(e.length/2),n=0,r=0;r<e.length;r+=2){var i=eu(e.charCodeAt(r)),o=eu(e.charCodeAt(r+1));t[n++]=i<<4|o}return t}var D_=9,U_=Math.pow(10,D_);function j_(e){return e[0]*U_+e[1]}function tu(e){var t=BigInt(1e9);return BigInt(e[0])*t+BigInt(e[1])}function $_(e){var t=Number(BigInt.asUintN(32,e)),n=Number(BigInt.asUintN(32,e>>BigInt(32)));return{low:t,high:n}}function nu(e){var t=tu(e);return $_(t)}function B_(e){var t=tu(e);return t.toString()}var F_=typeof BigInt<"u"?B_:j_;function ru(e){return e}function iu(e){if(e!==void 0)return Gi(e)}var V_={encodeHrTime:nu,encodeSpanContext:Gi,encodeOptionalSpanContext:iu};function ou(e){var t,n;if(e===void 0)return V_;var r=(t=e.useLongBits)!==null&&t!==void 0?t:!0,i=(n=e.useHex)!==null&&n!==void 0?n:!1;return{encodeHrTime:r?nu:F_,encodeSpanContext:i?ru:Gi,encodeOptionalSpanContext:i?ru:iu}}var H_=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function au(e){return{attributes:He(e.attributes),droppedAttributesCount:0}}function su(e){return{name:e.name,version:e.version}}function He(e){return Object.keys(e).map(function(t){return uu(t,e[t])})}function uu(e,t){return{key:e,value:cu(t)}}function cu(e){var t=typeof e;return t==="string"?{stringValue:e}:t==="number"?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:t==="boolean"?{boolValue:e}:e instanceof Uint8Array?{bytesValue:e}:Array.isArray(e)?{arrayValue:{values:e.map(cu)}}:t==="object"&&e!=null?{kvlistValue:{values:Object.entries(e).map(function(n){var r=H_(n,2),i=r[0],o=r[1];return uu(i,o)})}}:{}}var le;(function(e){e[e.DELTA=0]="DELTA",e[e.CUMULATIVE=1]="CUMULATIVE"})(le||(le={}));var de;(function(e){e[e.HISTOGRAM=0]="HISTOGRAM",e[e.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",e[e.GAUGE=2]="GAUGE",e[e.SUM=3]="SUM"})(de||(de={}));var G_=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),lu=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},pu=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},q_=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},z_=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},X_=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function K_(e){return e!=null}function fu(e){var t=Object.keys(e);return t.length===0?"":(t=t.sort(),JSON.stringify(t.map(function(n){return[n,e[n]]})))}function W_(e){var t,n;return e.name+":"+((t=e.version)!==null&&t!==void 0?t:"")+":"+((n=e.schemaUrl)!==null&&n!==void 0?n:"")}var hu=function(e){G_(t,e);function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return t}(Error);function Yt(e,t){var n,r=new Promise(function(i,o){n=setTimeout(function(){o(new hu("Operation timed out."))},t)});return Promise.race([e,r]).then(function(i){return clearTimeout(n),i},function(i){throw clearTimeout(n),i})}function Y_(e){return lu(this,void 0,void 0,function(){var t=this;return pu(this,function(n){return[2,Promise.all(e.map(function(r){return lu(t,void 0,void 0,function(){var i,o;return pu(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,r];case 1:return i=a.sent(),[2,{status:"fulfilled",value:i}];case 2:return o=a.sent(),[2,{status:"rejected",reason:o}];case 3:return[2]}})})}))]})})}function J_(e){return e.status==="rejected"}function du(e,t){var n=[];return e.forEach(function(r){n.push.apply(n,z_([],q_(t(r)),!1))}),n}function Q_(e,t){var n,r;if(e.size!==t.size)return!1;try{for(var i=X_(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(!t.has(a))return!1}}catch(u){n={error:u}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!0}function Z_(e,t){for(var n=0,r=e.length-1,i=e.length;r>=n;){var o=n+Math.trunc((r-n)/2);e[o]<t?n=o+1:(i=o,r=o-1)}return i}function eE(e,t){return e.toLowerCase()===t.toLowerCase()}var Ge;(function(e){e[e.DROP=0]="DROP",e[e.SUM=1]="SUM",e[e.LAST_VALUE=2]="LAST_VALUE",e[e.HISTOGRAM=3]="HISTOGRAM",e[e.EXPONENTIAL_HISTOGRAM=4]="EXPONENTIAL_HISTOGRAM"})(Ge||(Ge={}));var tE=function(){function e(){this.kind=Ge.DROP}return e.prototype.createAccumulation=function(){},e.prototype.merge=function(t,n){},e.prototype.diff=function(t,n){},e.prototype.toMetricData=function(t,n,r,i){},e}(),A;(function(e){e.COUNTER="COUNTER",e.GAUGE="GAUGE",e.HISTOGRAM="HISTOGRAM",e.UP_DOWN_COUNTER="UP_DOWN_COUNTER",e.OBSERVABLE_COUNTER="OBSERVABLE_COUNTER",e.OBSERVABLE_GAUGE="OBSERVABLE_GAUGE",e.OBSERVABLE_UP_DOWN_COUNTER="OBSERVABLE_UP_DOWN_COUNTER"})(A||(A={}));function Pe(e,t,n){var r,i,o,a;return oE(e)||T.warn('Invalid metric name: "'+e+'". The metric name should be a ASCII string with a length no greater than 255 characters.'),{name:e,type:t,description:(r=n?.description)!==null&&r!==void 0?r:"",unit:(i=n?.unit)!==null&&i!==void 0?i:"",valueType:(o=n?.valueType)!==null&&o!==void 0?o:Le.DOUBLE,advice:(a=n?.advice)!==null&&a!==void 0?a:{}}}function nE(e,t){var n,r;return{name:(n=e.name)!==null&&n!==void 0?n:t.name,description:(r=e.description)!==null&&r!==void 0?r:t.description,type:t.type,unit:t.unit,valueType:t.valueType,advice:t.advice}}function rE(e,t){return eE(e.name,t.name)&&e.unit===t.unit&&e.type===t.type&&e.valueType===t.valueType}var iE=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function oE(e){return e.match(iE)!=null}var aE=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function sE(e){var t=e.map(function(){return 0});return t.push(0),{buckets:{boundaries:e,counts:t},sum:0,count:0,hasMinMax:!1,min:1/0,max:-1/0}}var qi=function(){function e(t,n,r,i){r===void 0&&(r=!0),i===void 0&&(i=sE(n)),this.startTime=t,this._boundaries=n,this._recordMinMax=r,this._current=i}return e.prototype.record=function(t){if(!Number.isNaN(t)){this._current.count+=1,this._current.sum+=t,this._recordMinMax&&(this._current.min=Math.min(t,this._current.min),this._current.max=Math.max(t,this._current.max),this._current.hasMinMax=!0);var n=Z_(this._boundaries,t);this._current.buckets.counts[n]+=1}},e.prototype.setStartTime=function(t){this.startTime=t},e.prototype.toPointValue=function(){return this._current},e}(),vu=function(){function e(t,n){this._boundaries=t,this._recordMinMax=n,this.kind=Ge.HISTOGRAM}return e.prototype.createAccumulation=function(t){return new qi(t,this._boundaries,this._recordMinMax)},e.prototype.merge=function(t,n){for(var r=t.toPointValue(),i=n.toPointValue(),o=r.buckets.counts,a=i.buckets.counts,u=new Array(o.length),c=0;c<o.length;c++)u[c]=o[c]+a[c];var s=1/0,l=-1/0;return this._recordMinMax&&(r.hasMinMax&&i.hasMinMax?(s=Math.min(r.min,i.min),l=Math.max(r.max,i.max)):r.hasMinMax?(s=r.min,l=r.max):i.hasMinMax&&(s=i.min,l=i.max)),new qi(t.startTime,r.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:r.buckets.boundaries,counts:u},count:r.count+i.count,sum:r.sum+i.sum,hasMinMax:this._recordMinMax&&(r.hasMinMax||i.hasMinMax),min:s,max:l})},e.prototype.diff=function(t,n){for(var r=t.toPointValue(),i=n.toPointValue(),o=r.buckets.counts,a=i.buckets.counts,u=new Array(o.length),c=0;c<o.length;c++)u[c]=a[c]-o[c];return new qi(n.startTime,r.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:r.buckets.boundaries,counts:u},count:i.count-r.count,sum:i.sum-r.sum,hasMinMax:!1,min:1/0,max:-1/0})},e.prototype.toMetricData=function(t,n,r,i){return{descriptor:t,aggregationTemporality:n,dataPointType:de.HISTOGRAM,dataPoints:r.map(function(o){var a=aE(o,2),u=a[0],c=a[1],s=c.toPointValue(),l=t.type===A.GAUGE||t.type===A.UP_DOWN_COUNTER||t.type===A.OBSERVABLE_GAUGE||t.type===A.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:u,startTime:c.startTime,endTime:i,value:{min:s.hasMinMax?s.min:void 0,max:s.hasMinMax?s.max:void 0,sum:l?void 0:s.sum,buckets:s.buckets,count:s.count}}})}},e}(),zi=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Xi=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},yu=function(){function e(t,n,r,i){t===void 0&&(t=new uE),n===void 0&&(n=0),r===void 0&&(r=0),i===void 0&&(i=0),this.backing=t,this.indexBase=n,this.indexStart=r,this.indexEnd=i}return Object.defineProperty(e.prototype,"offset",{get:function(){return this.indexStart},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this.backing.length===0||this.indexEnd===this.indexStart&&this.at(0)===0?0:this.indexEnd-this.indexStart+1},enumerable:!1,configurable:!0}),e.prototype.counts=function(){var t=this;return Array.from({length:this.length},function(n,r){return t.at(r)})},e.prototype.at=function(t){var n=this.indexBase-this.indexStart;return t<n&&(t+=this.backing.length),t-=n,this.backing.countAt(t)},e.prototype.incrementBucket=function(t,n){this.backing.increment(t,n)},e.prototype.decrementBucket=function(t,n){this.backing.decrement(t,n)},e.prototype.trim=function(){for(var t=0;t<this.length;t++)if(this.at(t)!==0){this.indexStart+=t;break}else if(t===this.length-1){this.indexStart=this.indexEnd=this.indexBase=0;return}for(var t=this.length-1;t>=0;t--)if(this.at(t)!==0){this.indexEnd-=this.length-t-1;break}this._rotate()},e.prototype.downscale=function(t){this._rotate();for(var n=1+this.indexEnd-this.indexStart,r=1<<t,i=0,o=0,a=this.indexStart;a<=this.indexEnd;){var u=a%r;u<0&&(u+=r);for(var c=u;c<r&&i<n;c++)this._relocateBucket(o,i),i++,a++;o++}this.indexStart>>=t,this.indexEnd>>=t,this.indexBase=this.indexStart},e.prototype.clone=function(){return new e(this.backing.clone(),this.indexBase,this.indexStart,this.indexEnd)},e.prototype._rotate=function(){var t=this.indexBase-this.indexStart;t!==0&&(t>0?(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,t),this.backing.reverse(t,this.backing.length)):(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,this.backing.length+t)),this.indexBase=this.indexStart)},e.prototype._relocateBucket=function(t,n){t!==n&&this.incrementBucket(t,this.backing.emptyBucket(n))},e}(),uE=function(){function e(t){t===void 0&&(t=[0]),this._counts=t}return Object.defineProperty(e.prototype,"length",{get:function(){return this._counts.length},enumerable:!1,configurable:!0}),e.prototype.countAt=function(t){return this._counts[t]},e.prototype.growTo=function(t,n,r){var i=new Array(t).fill(0);i.splice.apply(i,Xi([r,this._counts.length-n],zi(this._counts.slice(n)),!1)),i.splice.apply(i,Xi([0,n],zi(this._counts.slice(0,n)),!1)),this._counts=i},e.prototype.reverse=function(t,n){for(var r=Math.floor((t+n)/2)-t,i=0;i<r;i++){var o=this._counts[t+i];this._counts[t+i]=this._counts[n-i-1],this._counts[n-i-1]=o}},e.prototype.emptyBucket=function(t){var n=this._counts[t];return this._counts[t]=0,n},e.prototype.increment=function(t,n){this._counts[t]+=n},e.prototype.decrement=function(t,n){this._counts[t]>=n?this._counts[t]-=n:this._counts[t]=0},e.prototype.clone=function(){return new e(Xi([],zi(this._counts),!1))},e}(),cE=52,lE=2146435072,pE=1048575,Ki=1023,mu=-Ki+1,gu=Ki,Wi=Math.pow(2,-1022);function _u(e){var t=new DataView(new ArrayBuffer(8));t.setFloat64(0,e);var n=t.getUint32(0),r=(n&lE)>>20;return r-Ki}function Eu(e){var t=new DataView(new ArrayBuffer(8));t.setFloat64(0,e);var n=t.getUint32(0),r=t.getUint32(4),i=(n&pE)*Math.pow(2,32);return i+r}function Yi(e,t){return e===0||e===Number.POSITIVE_INFINITY||e===Number.NEGATIVE_INFINITY||Number.isNaN(e)?e:e*Math.pow(2,t)}function fE(e){return e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,e++,e}var hE=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Jt=function(e){hE(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Error),dE=function(){function e(t){this._shift=-t}return e.prototype.mapToIndex=function(t){if(t<Wi)return this._minNormalLowerBoundaryIndex();var n=_u(t),r=this._rightShift(Eu(t)-1,cE);return n+r>>this._shift},e.prototype.lowerBoundary=function(t){var n=this._minNormalLowerBoundaryIndex();if(t<n)throw new Jt("underflow: "+t+" is < minimum lower boundary: "+n);var r=this._maxNormalLowerBoundaryIndex();if(t>r)throw new Jt("overflow: "+t+" is > maximum lower boundary: "+r);return Yi(1,t<<this._shift)},Object.defineProperty(e.prototype,"scale",{get:function(){return this._shift===0?0:-this._shift},enumerable:!1,configurable:!0}),e.prototype._minNormalLowerBoundaryIndex=function(){var t=mu>>this._shift;return this._shift<2&&t--,t},e.prototype._maxNormalLowerBoundaryIndex=function(){return gu>>this._shift},e.prototype._rightShift=function(t,n){return Math.floor(t*Math.pow(2,-n))},e}(),vE=function(){function e(t){this._scale=t,this._scaleFactor=Yi(Math.LOG2E,t),this._inverseFactor=Yi(Math.LN2,-t)}return e.prototype.mapToIndex=function(t){if(t<=Wi)return this._minNormalLowerBoundaryIndex()-1;if(Eu(t)===0){var n=_u(t);return(n<<this._scale)-1}var r=Math.floor(Math.log(t)*this._scaleFactor),i=this._maxNormalLowerBoundaryIndex();return r>=i?i:r},e.prototype.lowerBoundary=function(t){var n=this._maxNormalLowerBoundaryIndex();if(t>=n){if(t===n)return 2*Math.exp((t-(1<<this._scale))/this._scaleFactor);throw new Jt("overflow: "+t+" is > maximum lower boundary: "+n)}var r=this._minNormalLowerBoundaryIndex();if(t<=r){if(t===r)return Wi;if(t===r-1)return Math.exp((t+(1<<this._scale))/this._scaleFactor)/2;throw new Jt("overflow: "+t+" is < minimum lower boundary: "+r)}return Math.exp(t*this._inverseFactor)},Object.defineProperty(e.prototype,"scale",{get:function(){return this._scale},enumerable:!1,configurable:!0}),e.prototype._minNormalLowerBoundaryIndex=function(){return mu<<this._scale},e.prototype._maxNormalLowerBoundaryIndex=function(){return(gu+1<<this._scale)-1},e}(),Tu=-10,bu=20,yE=Array.from({length:31},function(e,t){return t>10?new vE(t-10):new dE(t-10)});function Su(e){if(e>bu||e<Tu)throw new Jt("expected scale >= "+Tu+" && <= "+bu+", got: "+e);return yE[e+10]}var mE=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Hn=function(){function e(t,n){this.low=t,this.high=n}return e.combine=function(t,n){return new e(Math.min(t.low,n.low),Math.max(t.high,n.high))},e}(),gE=20,_E=160,Ji=2,EE=function(){function e(t,n,r,i,o,a,u,c,s,l,p){t===void 0&&(t=t),n===void 0&&(n=_E),r===void 0&&(r=!0),i===void 0&&(i=0),o===void 0&&(o=0),a===void 0&&(a=0),u===void 0&&(u=Number.POSITIVE_INFINITY),c===void 0&&(c=Number.NEGATIVE_INFINITY),s===void 0&&(s=new yu),l===void 0&&(l=new yu),p===void 0&&(p=Su(gE)),this.startTime=t,this._maxSize=n,this._recordMinMax=r,this._sum=i,this._count=o,this._zeroCount=a,this._min=u,this._max=c,this._positive=s,this._negative=l,this._mapping=p,this._maxSize<Ji&&(T.warn("Exponential Histogram Max Size set to "+this._maxSize+", changing to the minimum size of: "+Ji),this._maxSize=Ji)}return e.prototype.record=function(t){this.updateByIncrement(t,1)},e.prototype.setStartTime=function(t){this.startTime=t},e.prototype.toPointValue=function(){return{hasMinMax:this._recordMinMax,min:this.min,max:this.max,sum:this.sum,positive:{offset:this.positive.offset,bucketCounts:this.positive.counts()},negative:{offset:this.negative.offset,bucketCounts:this.negative.counts()},count:this.count,scale:this.scale,zeroCount:this.zeroCount}},Object.defineProperty(e.prototype,"sum",{get:function(){return this._sum},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"min",{get:function(){return this._min},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return this._max},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zeroCount",{get:function(){return this._zeroCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scale",{get:function(){return this._count===this._zeroCount?0:this._mapping.scale},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"positive",{get:function(){return this._positive},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"negative",{get:function(){return this._negative},enumerable:!1,configurable:!0}),e.prototype.updateByIncrement=function(t,n){if(!Number.isNaN(t)){if(t>this._max&&(this._max=t),t<this._min&&(this._min=t),this._count+=n,t===0){this._zeroCount+=n;return}this._sum+=t*n,t>0?this._updateBuckets(this._positive,t,n):this._updateBuckets(this._negative,-t,n)}},e.prototype.merge=function(t){this._count===0?(this._min=t.min,this._max=t.max):t.count!==0&&(t.min<this.min&&(this._min=t.min),t.max>this.max&&(this._max=t.max)),this.startTime=t.startTime,this._sum+=t.sum,this._count+=t.count,this._zeroCount+=t.zeroCount;var n=this._minScale(t);this._downscale(this.scale-n),this._mergeBuckets(this.positive,t,t.positive,n),this._mergeBuckets(this.negative,t,t.negative,n)},e.prototype.diff=function(t){this._min=1/0,this._max=-1/0,this._sum-=t.sum,this._count-=t.count,this._zeroCount-=t.zeroCount;var n=this._minScale(t);this._downscale(this.scale-n),this._diffBuckets(this.positive,t,t.positive,n),this._diffBuckets(this.negative,t,t.negative,n)},e.prototype.clone=function(){return new e(this.startTime,this._maxSize,this._recordMinMax,this._sum,this._count,this._zeroCount,this._min,this._max,this.positive.clone(),this.negative.clone(),this._mapping)},e.prototype._updateBuckets=function(t,n,r){var i=this._mapping.mapToIndex(n),o=!1,a=0,u=0;if(t.length===0?(t.indexStart=i,t.indexEnd=t.indexStart,t.indexBase=t.indexStart):i<t.indexStart&&t.indexEnd-i>=this._maxSize?(o=!0,u=i,a=t.indexEnd):i>t.indexEnd&&i-t.indexStart>=this._maxSize&&(o=!0,u=t.indexStart,a=i),o){var c=this._changeScale(a,u);this._downscale(c),i=this._mapping.mapToIndex(n)}this._incrementIndexBy(t,i,r)},e.prototype._incrementIndexBy=function(t,n,r){if(r!==0){if(t.length===0&&(t.indexStart=t.indexEnd=t.indexBase=n),n<t.indexStart){var i=t.indexEnd-n;i>=t.backing.length&&this._grow(t,i+1),t.indexStart=n}else if(n>t.indexEnd){var i=n-t.indexStart;i>=t.backing.length&&this._grow(t,i+1),t.indexEnd=n}var o=n-t.indexBase;o<0&&(o+=t.backing.length),t.incrementBucket(o,r)}},e.prototype._grow=function(t,n){var r=t.backing.length,i=t.indexBase-t.indexStart,o=r-i,a=fE(n);a>this._maxSize&&(a=this._maxSize);var u=a-i;t.backing.growTo(a,o,u)},e.prototype._changeScale=function(t,n){for(var r=0;t-n>=this._maxSize;)t>>=1,n>>=1,r++;return r},e.prototype._downscale=function(t){if(t!==0){if(t<0)throw new Error("impossible change of scale: "+this.scale);var n=this._mapping.scale-t;this._positive.downscale(t),this._negative.downscale(t),this._mapping=Su(n)}},e.prototype._minScale=function(t){var n=Math.min(this.scale,t.scale),r=Hn.combine(this._highLowAtScale(this.positive,this.scale,n),this._highLowAtScale(t.positive,t.scale,n)),i=Hn.combine(this._highLowAtScale(this.negative,this.scale,n),this._highLowAtScale(t.negative,t.scale,n));return Math.min(n-this._changeScale(r.high,r.low),n-this._changeScale(i.high,i.low))},e.prototype._highLowAtScale=function(t,n,r){if(t.length===0)return new Hn(0,-1);var i=n-r;return new Hn(t.indexStart>>i,t.indexEnd>>i)},e.prototype._mergeBuckets=function(t,n,r,i){for(var o=r.offset,a=n.scale-i,u=0;u<r.length;u++)this._incrementIndexBy(t,o+u>>a,r.at(u))},e.prototype._diffBuckets=function(t,n,r,i){for(var o=r.offset,a=n.scale-i,u=0;u<r.length;u++){var c=o+u>>a,s=c-t.indexBase;s<0&&(s+=t.backing.length),t.decrementBucket(s,r.at(u))}t.trim()},e}(),TE=function(){function e(t,n){this._maxSize=t,this._recordMinMax=n,this.kind=Ge.EXPONENTIAL_HISTOGRAM}return e.prototype.createAccumulation=function(t){return new EE(t,this._maxSize,this._recordMinMax)},e.prototype.merge=function(t,n){var r=n.clone();return r.merge(t),r},e.prototype.diff=function(t,n){var r=n.clone();return r.diff(t),r},e.prototype.toMetricData=function(t,n,r,i){return{descriptor:t,aggregationTemporality:n,dataPointType:de.EXPONENTIAL_HISTOGRAM,dataPoints:r.map(function(o){var a=mE(o,2),u=a[0],c=a[1],s=c.toPointValue(),l=t.type===A.GAUGE||t.type===A.UP_DOWN_COUNTER||t.type===A.OBSERVABLE_GAUGE||t.type===A.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:u,startTime:c.startTime,endTime:i,value:{min:s.hasMinMax?s.min:void 0,max:s.hasMinMax?s.max:void 0,sum:l?void 0:s.sum,positive:{offset:s.positive.offset,bucketCounts:s.positive.bucketCounts},negative:{offset:s.negative.offset,bucketCounts:s.negative.bucketCounts},count:s.count,scale:s.scale,zeroCount:s.zeroCount}}})}},e}(),bE=Mt("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function SE(e){return e.setValue(bE,!0)}function OE(){return function(e){T.error(wE(e))}}function wE(e){return typeof e=="string"?e:JSON.stringify(AE(e))}function AE(e){for(var t={},n=e;n!==null;)Object.getOwnPropertyNames(n).forEach(function(r){if(!t[r]){var i=n[r];i&&(t[r]=String(i))}}),n=Object.getPrototypeOf(n);return t}var LE=OE();function Ou(e){try{LE(e)}catch{}}var RE=6,CE=Math.pow(10,RE);function Qi(e){var t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*CE);return[n,r]}function Gn(e){return e[0]*1e6+e[1]/1e3}var Zi;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(Zi||(Zi={}));function NE(e,t){return new Promise(function(n){x.with(SE(x.active()),function(){e.export(t,function(r){n(r)})})})}var xE={_export:NE},PE=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},eo=function(){function e(t,n,r){n===void 0&&(n=0),r===void 0&&(r=[0,0]),this.startTime=t,this._current=n,this.sampleTime=r}return e.prototype.record=function(t){this._current=t,this.sampleTime=Qi(Date.now())},e.prototype.setStartTime=function(t){this.startTime=t},e.prototype.toPointValue=function(){return this._current},e}(),IE=function(){function e(){this.kind=Ge.LAST_VALUE}return e.prototype.createAccumulation=function(t){return new eo(t)},e.prototype.merge=function(t,n){var r=Gn(n.sampleTime)>=Gn(t.sampleTime)?n:t;return new eo(t.startTime,r.toPointValue(),r.sampleTime)},e.prototype.diff=function(t,n){var r=Gn(n.sampleTime)>=Gn(t.sampleTime)?n:t;return new eo(n.startTime,r.toPointValue(),r.sampleTime)},e.prototype.toMetricData=function(t,n,r,i){return{descriptor:t,aggregationTemporality:n,dataPointType:de.GAUGE,dataPoints:r.map(function(o){var a=PE(o,2),u=a[0],c=a[1];return{attributes:u,startTime:c.startTime,endTime:i,value:c.toPointValue()}})}},e}(),kE=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Qt=function(){function e(t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1),this.startTime=t,this.monotonic=n,this._current=r,this.reset=i}return e.prototype.record=function(t){this.monotonic&&t<0||(this._current+=t)},e.prototype.setStartTime=function(t){this.startTime=t},e.prototype.toPointValue=function(){return this._current},e}(),wu=function(){function e(t){this.monotonic=t,this.kind=Ge.SUM}return e.prototype.createAccumulation=function(t){return new Qt(t,this.monotonic)},e.prototype.merge=function(t,n){var r=t.toPointValue(),i=n.toPointValue();return n.reset?new Qt(n.startTime,this.monotonic,i,n.reset):new Qt(t.startTime,this.monotonic,r+i)},e.prototype.diff=function(t,n){var r=t.toPointValue(),i=n.toPointValue();return this.monotonic&&r>i?new Qt(n.startTime,this.monotonic,i,!0):new Qt(n.startTime,this.monotonic,i-r)},e.prototype.toMetricData=function(t,n,r,i){return{descriptor:t,aggregationTemporality:n,dataPointType:de.SUM,dataPoints:r.map(function(o){var a=kE(o,2),u=a[0],c=a[1];return{attributes:u,startTime:c.startTime,endTime:i,value:c.toPointValue()}}),isMonotonic:this.monotonic}},e}(),qe=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ee=function(){function e(){}return e.Drop=function(){return Au},e.Sum=function(){return Lu},e.LastValue=function(){return Ru},e.Histogram=function(){return Cu},e.ExponentialHistogram=function(){return VE},e.Default=function(){return HE},e}(),ME=function(e){qe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createAggregator=function(n){return t.DEFAULT_INSTANCE},t.DEFAULT_INSTANCE=new tE,t}(Ee),DE=function(e){qe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createAggregator=function(n){switch(n.type){case A.COUNTER:case A.OBSERVABLE_COUNTER:case A.HISTOGRAM:return t.MONOTONIC_INSTANCE;default:return t.NON_MONOTONIC_INSTANCE}},t.MONOTONIC_INSTANCE=new wu(!0),t.NON_MONOTONIC_INSTANCE=new wu(!1),t}(Ee),UE=function(e){qe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createAggregator=function(n){return t.DEFAULT_INSTANCE},t.DEFAULT_INSTANCE=new IE,t}(Ee),jE=function(e){qe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createAggregator=function(n){return t.DEFAULT_INSTANCE},t.DEFAULT_INSTANCE=new vu([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0),t}(Ee),$E=function(e){qe(t,e);function t(n,r){r===void 0&&(r=!0);var i=e.call(this)||this;if(i._recordMinMax=r,n==null)throw new Error("ExplicitBucketHistogramAggregation should be created with explicit boundaries, if a single bucket histogram is required, please pass an empty array");n=n.concat(),n=n.sort(function(u,c){return u-c});var o=n.lastIndexOf(-1/0),a=n.indexOf(1/0);return a===-1&&(a=void 0),i._boundaries=n.slice(o+1,a),i}return t.prototype.createAggregator=function(n){return new vu(this._boundaries,this._recordMinMax)},t}(Ee),BE=function(e){qe(t,e);function t(n,r){n===void 0&&(n=160),r===void 0&&(r=!0);var i=e.call(this)||this;return i._maxSize=n,i._recordMinMax=r,i}return t.prototype.createAggregator=function(n){return new TE(this._maxSize,this._recordMinMax)},t}(Ee),FE=function(e){qe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype._resolve=function(n){switch(n.type){case A.COUNTER:case A.UP_DOWN_COUNTER:case A.OBSERVABLE_COUNTER:case A.OBSERVABLE_UP_DOWN_COUNTER:return Lu;case A.GAUGE:case A.OBSERVABLE_GAUGE:return Ru;case A.HISTOGRAM:return n.advice.explicitBucketBoundaries?new $E(n.advice.explicitBucketBoundaries):Cu}return T.warn("Unable to recognize instrument type: "+n.type),Au},t.prototype.createAggregator=function(n){return this._resolve(n).createAggregator(n)},t}(Ee),Au=new ME,Lu=new DE,Ru=new UE,Cu=new jE,VE=new BE,HE=new FE,GE=function(e){return Ee.Default()},qE=function(e){return le.CUMULATIVE},to=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},no=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},Nu=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},zE=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},XE=function(){function e(t){var n,r,i;this._shutdown=!1,this._aggregationSelector=(n=t?.aggregationSelector)!==null&&n!==void 0?n:GE,this._aggregationTemporalitySelector=(r=t?.aggregationTemporalitySelector)!==null&&r!==void 0?r:qE,this._metricProducers=(i=t?.metricProducers)!==null&&i!==void 0?i:[],this._cardinalitySelector=t?.cardinalitySelector}return e.prototype.setMetricProducer=function(t){if(this._sdkMetricProducer)throw new Error("MetricReader can not be bound to a MeterProvider again.");this._sdkMetricProducer=t,this.onInitialized()},e.prototype.selectAggregation=function(t){return this._aggregationSelector(t)},e.prototype.selectAggregationTemporality=function(t){return this._aggregationTemporalitySelector(t)},e.prototype.selectCardinalityLimit=function(t){return this._cardinalitySelector?this._cardinalitySelector(t):2e3},e.prototype.onInitialized=function(){},e.prototype.collect=function(t){return to(this,void 0,void 0,function(){var n,r,i,o,a,u;return no(this,function(c){switch(c.label){case 0:if(this._sdkMetricProducer===void 0)throw new Error("MetricReader is not bound to a MetricProducer");if(this._shutdown)throw new Error("MetricReader is shutdown");return[4,Promise.all(zE([this._sdkMetricProducer.collect({timeoutMillis:t?.timeoutMillis})],Nu(this._metricProducers.map(function(s){return s.collect({timeoutMillis:t?.timeoutMillis})})),!1))];case 1:return n=Nu.apply(void 0,[c.sent()]),r=n[0],i=n.slice(1),o=r.errors.concat(du(i,function(s){return s.errors})),a=r.resourceMetrics.resource,u=r.resourceMetrics.scopeMetrics.concat(du(i,function(s){return s.resourceMetrics.scopeMetrics})),[2,{resourceMetrics:{resource:a,scopeMetrics:u},errors:o}]}})})},e.prototype.shutdown=function(t){return to(this,void 0,void 0,function(){return no(this,function(n){switch(n.label){case 0:return this._shutdown?(T.error("Cannot call shutdown twice."),[2]):t?.timeoutMillis!=null?[3,2]:[4,this.onShutdown()];case 1:return n.sent(),[3,4];case 2:return[4,Yt(this.onShutdown(),t.timeoutMillis)];case 3:n.sent(),n.label=4;case 4:return this._shutdown=!0,[2]}})})},e.prototype.forceFlush=function(t){return to(this,void 0,void 0,function(){return no(this,function(n){switch(n.label){case 0:return this._shutdown?(T.warn("Cannot forceFlush on already shutdown MetricReader."),[2]):t?.timeoutMillis!=null?[3,2]:[4,this.onForceFlush()];case 1:return n.sent(),[2];case 2:return[4,Yt(this.onForceFlush(),t.timeoutMillis)];case 3:return n.sent(),[2]}})})},e}(),KE=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),qn=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},zn=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},WE=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},YE=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},JE=function(e){KE(t,e);function t(n){var r,i,o,a,u=e.call(this,{aggregationSelector:(r=n.exporter.selectAggregation)===null||r===void 0?void 0:r.bind(n.exporter),aggregationTemporalitySelector:(i=n.exporter.selectAggregationTemporality)===null||i===void 0?void 0:i.bind(n.exporter),metricProducers:n.metricProducers})||this;if(n.exportIntervalMillis!==void 0&&n.exportIntervalMillis<=0)throw Error("exportIntervalMillis must be greater than 0");if(n.exportTimeoutMillis!==void 0&&n.exportTimeoutMillis<=0)throw Error("exportTimeoutMillis must be greater than 0");if(n.exportTimeoutMillis!==void 0&&n.exportIntervalMillis!==void 0&&n.exportIntervalMillis<n.exportTimeoutMillis)throw Error("exportIntervalMillis must be greater than or equal to exportTimeoutMillis");return u._exportInterval=(o=n.exportIntervalMillis)!==null&&o!==void 0?o:6e4,u._exportTimeout=(a=n.exportTimeoutMillis)!==null&&a!==void 0?a:3e4,u._exporter=n.exporter,u}return t.prototype._runOnce=function(){return qn(this,void 0,void 0,function(){var n;return zn(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,Yt(this._doRun(),this._exportTimeout)];case 1:return r.sent(),[3,3];case 2:return n=r.sent(),n instanceof hu?(T.error("Export took longer than %s milliseconds and timed out.",this._exportTimeout),[2]):(Ou(n),[3,3]);case 3:return[2]}})})},t.prototype._doRun=function(){var n,r;return qn(this,void 0,void 0,function(){var i,o,a,u,c,s;return zn(this,function(l){switch(l.label){case 0:return[4,this.collect({timeoutMillis:this._exportTimeout})];case 1:if(i=l.sent(),o=i.resourceMetrics,a=i.errors,a.length>0&&(s=T).error.apply(s,YE(["PeriodicExportingMetricReader: metrics collection errors"],WE(a),!1)),!o.resource.asyncAttributesPending)return[3,5];l.label=2;case 2:return l.trys.push([2,4,,5]),[4,(r=(n=o.resource).waitForAsyncAttributes)===null||r===void 0?void 0:r.call(n)];case 3:return l.sent(),[3,5];case 4:return u=l.sent(),T.debug("Error while resolving async portion of resource: ",u),Ou(u),[3,5];case 5:return o.scopeMetrics.length===0?[2]:[4,xE._export(this._exporter,o)];case 6:if(c=l.sent(),c.code!==Zi.SUCCESS)throw new Error("PeriodicExportingMetricReader: metrics export failed (error "+c.error+")");return[2]}})})},t.prototype.onInitialized=function(){var n=this;this._interval=setInterval(function(){n._runOnce()},this._exportInterval)},t.prototype.onForceFlush=function(){return qn(this,void 0,void 0,function(){return zn(this,function(n){switch(n.label){case 0:return[4,this._runOnce()];case 1:return n.sent(),[4,this._exporter.forceFlush()];case 2:return n.sent(),[2]}})})},t.prototype.onShutdown=function(){return qn(this,void 0,void 0,function(){return zn(this,function(n){switch(n.label){case 0:return this._interval&&clearInterval(this._interval),[4,this.onForceFlush()];case 1:return n.sent(),[4,this._exporter.shutdown()];case 2:return n.sent(),[2]}})})},t}(XE),QE=function(){function e(){this._registeredViews=[]}return e.prototype.addView=function(t){this._registeredViews.push(t)},e.prototype.findViews=function(t,n){var r=this,i=this._registeredViews.filter(function(o){return r._matchInstrument(o.instrumentSelector,t)&&r._matchMeter(o.meterSelector,n)});return i},e.prototype._matchInstrument=function(t,n){return(t.getType()===void 0||n.type===t.getType())&&t.getNameFilter().match(n.name)&&t.getUnitFilter().match(n.unit)},e.prototype._matchMeter=function(t,n){return t.getNameFilter().match(n.name)&&(n.version===void 0||t.getVersionFilter().match(n.version))&&(n.schemaUrl===void 0||t.getSchemaUrlFilter().match(n.schemaUrl))},e}(),ze=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xn=function(){function e(t,n){this._writableMetricStorage=t,this._descriptor=n}return e.prototype._record=function(t,n,r){if(n===void 0&&(n={}),r===void 0&&(r=x.active()),typeof t!="number"){T.warn("non-number value provided to metric "+this._descriptor.name+": "+t);return}this._descriptor.valueType===Le.INT&&!Number.isInteger(t)&&(T.warn("INT value type cannot accept a floating-point value for "+this._descriptor.name+", ignoring the fractional digits."),t=Math.trunc(t),!Number.isInteger(t))||this._writableMetricStorage.record(t,n,r,Qi(Date.now()))},e}(),ZE=function(e){ze(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(n,r,i){this._record(n,r,i)},t}(Xn),eT=function(e){ze(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(n,r,i){if(n<0){T.warn("negative value provided to counter "+this._descriptor.name+": "+n);return}this._record(n,r,i)},t}(Xn),tT=function(e){ze(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(n,r,i){this._record(n,r,i)},t}(Xn),nT=function(e){ze(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(n,r,i){if(n<0){T.warn("negative value provided to histogram "+this._descriptor.name+": "+n);return}this._record(n,r,i)},t}(Xn),Kn=function(){function e(t,n,r){this._observableRegistry=r,this._descriptor=t,this._metricStorages=n}return e.prototype.addCallback=function(t){this._observableRegistry.addCallback(t,this)},e.prototype.removeCallback=function(t){this._observableRegistry.removeCallback(t,this)},e}(),rT=function(e){ze(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Kn),iT=function(e){ze(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Kn),oT=function(e){ze(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Kn);function ro(e){return e instanceof Kn}var aT=function(){function e(t){this._meterSharedState=t}return e.prototype.createGauge=function(t,n){var r=Pe(t,A.GAUGE,n),i=this._meterSharedState.registerMetricStorage(r);return new tT(i,r)},e.prototype.createHistogram=function(t,n){var r=Pe(t,A.HISTOGRAM,n),i=this._meterSharedState.registerMetricStorage(r);return new nT(i,r)},e.prototype.createCounter=function(t,n){var r=Pe(t,A.COUNTER,n),i=this._meterSharedState.registerMetricStorage(r);return new eT(i,r)},e.prototype.createUpDownCounter=function(t,n){var r=Pe(t,A.UP_DOWN_COUNTER,n),i=this._meterSharedState.registerMetricStorage(r);return new ZE(i,r)},e.prototype.createObservableGauge=function(t,n){var r=Pe(t,A.OBSERVABLE_GAUGE,n),i=this._meterSharedState.registerAsyncMetricStorage(r);return new iT(r,i,this._meterSharedState.observableRegistry)},e.prototype.createObservableCounter=function(t,n){var r=Pe(t,A.OBSERVABLE_COUNTER,n),i=this._meterSharedState.registerAsyncMetricStorage(r);return new rT(r,i,this._meterSharedState.observableRegistry)},e.prototype.createObservableUpDownCounter=function(t,n){var r=Pe(t,A.OBSERVABLE_UP_DOWN_COUNTER,n),i=this._meterSharedState.registerAsyncMetricStorage(r);return new oT(r,i,this._meterSharedState.observableRegistry)},e.prototype.addBatchObservableCallback=function(t,n){this._meterSharedState.observableRegistry.addBatchCallback(t,n)},e.prototype.removeBatchObservableCallback=function(t,n){this._meterSharedState.observableRegistry.removeBatchCallback(t,n)},e}(),xu=function(){function e(t){this._instrumentDescriptor=t}return e.prototype.getInstrumentDescriptor=function(){return this._instrumentDescriptor},e.prototype.updateDescription=function(t){this._instrumentDescriptor=Pe(this._instrumentDescriptor.name,this._instrumentDescriptor.type,{description:t,valueType:this._instrumentDescriptor.valueType,unit:this._instrumentDescriptor.unit,advice:this._instrumentDescriptor.advice})},e}(),sT=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Pu=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},uT=function(){function e(t){this._hash=t,this._valueMap=new Map,this._keyMap=new Map}return e.prototype.get=function(t,n){return n!=null||(n=this._hash(t)),this._valueMap.get(n)},e.prototype.getOrDefault=function(t,n){var r=this._hash(t);if(this._valueMap.has(r))return this._valueMap.get(r);var i=n();return this._keyMap.has(r)||this._keyMap.set(r,t),this._valueMap.set(r,i),i},e.prototype.set=function(t,n,r){r!=null||(r=this._hash(t)),this._keyMap.has(r)||this._keyMap.set(r,t),this._valueMap.set(r,n)},e.prototype.has=function(t,n){return n!=null||(n=this._hash(t)),this._valueMap.has(n)},e.prototype.keys=function(){var t,n;return Pu(this,function(r){switch(r.label){case 0:t=this._keyMap.entries(),n=t.next(),r.label=1;case 1:return n.done===!0?[3,3]:[4,[n.value[1],n.value[0]]];case 2:return r.sent(),n=t.next(),[3,1];case 3:return[2]}})},e.prototype.entries=function(){var t,n;return Pu(this,function(r){switch(r.label){case 0:t=this._valueMap.entries(),n=t.next(),r.label=1;case 1:return n.done===!0?[3,3]:[4,[this._keyMap.get(n.value[0]),n.value[1],n.value[0]]];case 2:return r.sent(),n=t.next(),[3,1];case 3:return[2]}})},Object.defineProperty(e.prototype,"size",{get:function(){return this._valueMap.size},enumerable:!1,configurable:!0}),e}(),Xe=function(e){sT(t,e);function t(){return e.call(this,fu)||this}return t}(uT),cT=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Iu=function(){function e(t,n){this._aggregator=t,this._activeCollectionStorage=new Xe,this._cumulativeMemoStorage=new Xe,this._overflowAttributes={"otel.metric.overflow":!0},this._cardinalityLimit=(n??2e3)-1,this._overflowHashCode=fu(this._overflowAttributes)}return e.prototype.record=function(t,n,r,i){var o=this,a=this._activeCollectionStorage.get(n);if(!a){if(this._activeCollectionStorage.size>=this._cardinalityLimit){var u=this._activeCollectionStorage.getOrDefault(this._overflowAttributes,function(){return o._aggregator.createAccumulation(i)});u?.record(t);return}a=this._aggregator.createAccumulation(i),this._activeCollectionStorage.set(n,a)}a?.record(t)},e.prototype.batchCumulate=function(t,n){var r=this;Array.from(t.entries()).forEach(function(i){var o=cT(i,3),a=o[0],u=o[1],c=o[2],s=r._aggregator.createAccumulation(n);s?.record(u);var l=s;if(r._cumulativeMemoStorage.has(a,c)){var p=r._cumulativeMemoStorage.get(a,c);l=r._aggregator.diff(p,s)}else if(r._cumulativeMemoStorage.size>=r._cardinalityLimit&&(a=r._overflowAttributes,c=r._overflowHashCode,r._cumulativeMemoStorage.has(a,c))){var p=r._cumulativeMemoStorage.get(a,c);l=r._aggregator.diff(p,s)}if(r._activeCollectionStorage.has(a,c)){var f=r._activeCollectionStorage.get(a,c);l=r._aggregator.merge(f,l)}r._cumulativeMemoStorage.set(a,s,c),r._activeCollectionStorage.set(a,l,c)})},e.prototype.collect=function(){var t=this._activeCollectionStorage;return this._activeCollectionStorage=new Xe,t},e}(),io=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ku=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Mu=function(){function e(t,n){var r=this;this._aggregator=t,this._unreportedAccumulations=new Map,this._reportHistory=new Map,n.forEach(function(i){r._unreportedAccumulations.set(i,[])})}return e.prototype.buildMetrics=function(t,n,r,i){this._stashAccumulations(r);var o=this._getMergedUnreportedAccumulations(t),a=o,u;if(this._reportHistory.has(t)){var c=this._reportHistory.get(t),s=c.collectionTime;u=c.aggregationTemporality,u===le.CUMULATIVE?a=e.merge(c.accumulations,o,this._aggregator):a=e.calibrateStartTime(c.accumulations,o,s)}else u=t.selectAggregationTemporality(n.type);this._reportHistory.set(t,{accumulations:a,collectionTime:i,aggregationTemporality:u});var l=lT(a);if(l.length!==0)return this._aggregator.toMetricData(n,u,l,i)},e.prototype._stashAccumulations=function(t){var n,r,i=this._unreportedAccumulations.keys();try{for(var o=io(i),a=o.next();!a.done;a=o.next()){var u=a.value,c=this._unreportedAccumulations.get(u);c===void 0&&(c=[],this._unreportedAccumulations.set(u,c)),c.push(t)}}catch(s){n={error:s}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},e.prototype._getMergedUnreportedAccumulations=function(t){var n,r,i=new Xe,o=this._unreportedAccumulations.get(t);if(this._unreportedAccumulations.set(t,[]),o===void 0)return i;try{for(var a=io(o),u=a.next();!u.done;u=a.next()){var c=u.value;i=e.merge(i,c,this._aggregator)}}catch(s){n={error:s}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i},e.merge=function(t,n,r){for(var i=t,o=n.entries(),a=o.next();a.done!==!0;){var u=ku(a.value,3),c=u[0],s=u[1],l=u[2];if(t.has(c,l)){var p=t.get(c,l),f=r.merge(p,s);i.set(c,f,l)}else i.set(c,s,l);a=o.next()}return i},e.calibrateStartTime=function(t,n,r){var i,o;try{for(var a=io(t.keys()),u=a.next();!u.done;u=a.next()){var c=ku(u.value,2),s=c[0],l=c[1],p=n.get(s,l);p?.setStartTime(r)}}catch(f){i={error:f}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}return n},e}();function lT(e){return Array.from(e.entries())}var pT=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),fT=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},hT=function(e){pT(t,e);function t(n,r,i,o,a){var u=e.call(this,n)||this;return u._attributesProcessor=i,u._aggregationCardinalityLimit=a,u._deltaMetricStorage=new Iu(r,u._aggregationCardinalityLimit),u._temporalMetricStorage=new Mu(r,o),u}return t.prototype.record=function(n,r){var i=this,o=new Xe;Array.from(n.entries()).forEach(function(a){var u=fT(a,2),c=u[0],s=u[1];o.set(i._attributesProcessor.process(c),s)}),this._deltaMetricStorage.batchCumulate(o,r)},t.prototype.collect=function(n,r){var i=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(n,this._instrumentDescriptor,i,r)},t}(xu);function Du(e,t){var n="";return e.unit!==t.unit&&(n+=" - Unit '"+e.unit+"' does not match '"+t.unit+`'
|
|
296
|
+
`).filter(function(c){return!!c.match(r)&&!c.match(/^Error created at/)},this);return u.map(function(c){var s=c.split("@"),l=this.extractLocation(s.pop()),p=s.shift()||"",f=p.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0,v;p.match(/\(([^)]*)\)/)&&(v=p.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var m=v===void 0||v==="[arguments not available]"?void 0:v.split(",");return new n({functionName:f,args:m,fileName:l[0],lineNumber:l[1],columnNumber:l[2],source:c})},this)}}})})(zo);var Ap=zo.exports;const Wo=sn(Ap);function _n(e){try{return Wo.parse(e)}catch(t){try{return Wo.parse(new Error)}catch(n){return console.warn("Highlight Warning: failed to parse error",{originalError:t,secondaryError:n}),[]}}}function xp(e,t){const n=t.logger;let r;r=window[n];const i=[];if(t.level.includes("error")&&window){const a=u=>{const{message:c,error:s}=u;let l=[];s&&(l=_n(s));const p=[Er(c,t.stringifyOptions)];e({type:"Error",trace:l,time:Date.now(),value:p})};window.addEventListener("error",a),i.push(()=>{window&&window.removeEventListener("error",a)})}for(const a of t.level)i.push(o(r,a));return()=>{i.forEach(a=>a())};function o(a,u){return a[u]?_l(a,u,c=>(...s)=>{c.apply(this,s);try{e(Cp(u,t,...s))}catch(l){c("highlight logger error:",l,...s)}}):()=>{}}}function Cp(e,t,...n){const r=_n(new Error),i=t.serializeConsoleAttributes?n.map(o=>typeof o=="object"?Er(o,t.stringifyOptions):o):n.filter(o=>typeof o!="object").map(o=>`${o}`);return{type:e,trace:r,value:i,attributes:Er(n.filter(o=>typeof o=="object").reduce((o,a)=>C(C({},o),a),{}),t.stringifyOptions),time:Date.now()}}const Lp={start:0,end:3},Np={start:4,end:5},Dr={start:6,end:7},Mr={start:8,end:8},Rp={start:9,end:9},Ip={start:10,end:15};function Pp(){if(crypto&&crypto.getRandomValues){const t=new Uint8Array(16);return crypto.getRandomValues(t),[...t.values()]}const e=[];for(let t=0;t<16;t+=1)e.push(Math.floor(Math.random()*256));return e}function le(e,t){let n="";for(let r=t.start;r<=t.end;r+=1)n+=e[r].toString(16).padStart(2,"0");return n}function kp(e){return e[Mr.start]=(e[Mr.start]|128)&191,e[Dr.start]=e[Dr.start]&15|64,`${le(e,Lp)}-${le(e,Np)}-${le(e,Dr)}-${le(e,Mr)}${le(e,Rp)}-${le(e,Ip)}`}function Dp(){const e=Pp();return kp(e)}function Ur(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():Dp()}function $r(e,t,n,r){var i,o,a,u;let c=r??t,s=_n(c),l={};t instanceof Error&&(t=t.message,t.cause&&(l={"exception.cause":t.cause}));const p=Up(s);e({error:c,event:cn(t),type:"window.onerror",url:window.location.href,source:n??"",lineNumber:(i=p[0])!=null&&i.lineNumber?(o=p[0])==null?void 0:o.lineNumber:0,columnNumber:(a=p[0])!=null&&a.columnNumber?(u=p[0])==null?void 0:u.columnNumber:0,stackTrace:p,timestamp:new Date().toISOString(),payload:l?cn(l):void 0,id:Ur()})}const Mp=(e,{enablePromisePatch:t})=>{if(typeof window>"u")return()=>{};const n=window.onerror=(a,u,c,s,l)=>{$r(e,a,u,l)},r=window.onunhandledrejection=a=>{if(a.reason){const u=a.promise;u.getStack?$r(e,a.reason,a.type,u.getStack()):$r(e,a.reason,a.type)}},i=window.Promise,o=class extends i{constructor(a){super(a),L(this,"promiseCreationError"),this.promiseCreationError=new Error}getStack(){return this.promiseCreationError}static shouldPatch(){const a=typeof window.Zone>"u";return t&&a}};return o.shouldPatch()&&(window.Promise=o),()=>{window.Promise=i,window.onunhandledrejection=r,window.onerror=n}},Up=e=>{var t,n;if(e.length===0)return e;const r=e[0];return(t=r.fileName)!=null&&t.includes("highlight.run")||(n=r.fileName)!=null&&n.includes("highlight.io")||r.functionName==="new highlightPromise"?e.slice(1):e},$p=['["\\"Script error.\\""]','"Script error."','["\\"Load failed.\\""]','"Load failed."','["\\"Network request failed.\\""]','"Network request failed."','["\\"Document is not focused.\\""]','"Document is not focused."','["\\"Failed to fetch\\""]','"Failed to fetch"','[{"isTrusted":true}]','{"isTrusted":true}','["{}"]','"{}"','[""]','""','["\\"\\""]','""'],jp=["websocket error",'\\"ResizeObserver loop'];var Bp=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},Ut="1.9.0",Yo=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function Fp(e){var t=new Set([e]),n=new Set,r=e.match(Yo);if(!r)return function(){return!1};var i={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(i.prerelease!=null)return function(u){return u===e};function o(u){return n.add(u),!1}function a(u){return t.add(u),!0}return function(u){if(t.has(u))return!0;if(n.has(u))return!1;var c=u.match(Yo);if(!c)return o(u);var s={major:+c[1],minor:+c[2],patch:+c[3],prerelease:c[4]};return s.prerelease!=null||i.major!==s.major?o(u):i.major===0?i.minor===s.minor&&i.patch<=s.patch?a(u):o(u):i.minor<=s.minor?a(u):o(u)}}var Vp=Fp(Ut),Hp=Ut.split(".")[0],Le=Symbol.for("opentelemetry.js.api."+Hp),Ne=Bp;function Re(e,t,n,r){var i;r===void 0&&(r=!1);var o=Ne[Le]=(i=Ne[Le])!==null&&i!==void 0?i:{version:Ut};if(!r&&o[e]){var a=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+e);return n.error(a.stack||a.message),!1}if(o.version!==Ut){var a=new Error("@opentelemetry/api: Registration of version v"+o.version+" for "+e+" does not match previously registered API v"+Ut);return n.error(a.stack||a.message),!1}return o[e]=t,n.debug("@opentelemetry/api: Registered a global for "+e+" v"+Ut+"."),!0}function $t(e){var t,n,r=(t=Ne[Le])===null||t===void 0?void 0:t.version;if(!(!r||!Vp(r)))return(n=Ne[Le])===null||n===void 0?void 0:n[e]}function Ie(e,t){t.debug("@opentelemetry/api: Unregistering a global for "+e+" v"+Ut+".");var n=Ne[Le];n&&delete n[e]}var Gp=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},qp=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},zp=function(){function e(t){this._namespace=t.namespace||"DiagComponentLogger"}return e.prototype.debug=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return Pe("debug",this._namespace,t)},e.prototype.error=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return Pe("error",this._namespace,t)},e.prototype.info=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return Pe("info",this._namespace,t)},e.prototype.warn=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return Pe("warn",this._namespace,t)},e.prototype.verbose=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return Pe("verbose",this._namespace,t)},e}();function Pe(e,t,n){var r=$t("diag");if(r)return n.unshift(t),r[e].apply(r,qp([],Gp(n),!1))}var B;(function(e){e[e.NONE=0]="NONE",e[e.ERROR=30]="ERROR",e[e.WARN=50]="WARN",e[e.INFO=60]="INFO",e[e.DEBUG=70]="DEBUG",e[e.VERBOSE=80]="VERBOSE",e[e.ALL=9999]="ALL"})(B||(B={}));function Kp(e,t){e<B.NONE?e=B.NONE:e>B.ALL&&(e=B.ALL),t=t||{};function n(r,i){var o=t[r];return typeof o=="function"&&e>=i?o.bind(t):function(){}}return{error:n("error",B.ERROR),warn:n("warn",B.WARN),info:n("info",B.INFO),debug:n("debug",B.DEBUG),verbose:n("verbose",B.VERBOSE)}}var Xp=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Wp=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},Yp="diag",ft=function(){function e(){function t(i){return function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var u=$t("diag");if(u)return u[i].apply(u,Wp([],Xp(o),!1))}}var n=this,r=function(i,o){var a,u,c;if(o===void 0&&(o={logLevel:B.INFO}),i===n){var s=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return n.error((a=s.stack)!==null&&a!==void 0?a:s.message),!1}typeof o=="number"&&(o={logLevel:o});var l=$t("diag"),p=Kp((u=o.logLevel)!==null&&u!==void 0?u:B.INFO,i);if(l&&!o.suppressOverrideMessage){var f=(c=new Error().stack)!==null&&c!==void 0?c:"<failed to generate stacktrace>";l.warn("Current logger will be overwritten from "+f),p.warn("Current logger will overwrite one already registered from "+f)}return Re("diag",p,n,!0)};n.setLogger=r,n.disable=function(){Ie(Yp,n)},n.createComponentLogger=function(i){return new zp(i)},n.verbose=t("verbose"),n.debug=t("debug"),n.info=t("info"),n.warn=t("warn"),n.error=t("error")}return e.instance=function(){return this._instance||(this._instance=new e),this._instance},e}(),Jp=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Qp=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Zp=function(){function e(t){this._entries=t?new Map(t):new Map}return e.prototype.getEntry=function(t){var n=this._entries.get(t);if(n)return Object.assign({},n)},e.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(t){var n=Jp(t,2),r=n[0],i=n[1];return[r,i]})},e.prototype.setEntry=function(t,n){var r=new e(this._entries);return r._entries.set(t,n),r},e.prototype.removeEntry=function(t){var n=new e(this._entries);return n._entries.delete(t),n},e.prototype.removeEntries=function(){for(var t,n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=new e(this._entries);try{for(var a=Qp(r),u=a.next();!u.done;u=a.next()){var c=u.value;o._entries.delete(c)}}catch(s){t={error:s}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return o},e.prototype.clear=function(){return new e},e}(),tf=Symbol("BaggageEntryMetadata"),ef=ft.instance();function nf(e){return e===void 0&&(e={}),new Zp(new Map(Object.entries(e)))}function rf(e){return typeof e!="string"&&(ef.error("Cannot create baggage metadata from unknown type: "+typeof e),e=""),{__TYPE__:tf,toString:function(){return e}}}function jr(e){return Symbol.for(e)}var of=function(){function e(t){var n=this;n._currentContext=t?new Map(t):new Map,n.getValue=function(r){return n._currentContext.get(r)},n.setValue=function(r,i){var o=new e(n._currentContext);return o._currentContext.set(r,i),o},n.deleteValue=function(r){var i=new e(n._currentContext);return i._currentContext.delete(r),i}}return e}(),jt=new of,Bt=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),af=function(){function e(){}return e.prototype.createGauge=function(t,n){return vf},e.prototype.createHistogram=function(t,n){return mf},e.prototype.createCounter=function(t,n){return df},e.prototype.createUpDownCounter=function(t,n){return yf},e.prototype.createObservableGauge=function(t,n){return _f},e.prototype.createObservableCounter=function(t,n){return gf},e.prototype.createObservableUpDownCounter=function(t,n){return bf},e.prototype.addBatchObservableCallback=function(t,n){},e.prototype.removeBatchObservableCallback=function(t){},e}(),bn=function(){function e(){}return e}(),sf=function(e){Bt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(n,r){},t}(bn),uf=function(e){Bt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(n,r){},t}(bn),cf=function(e){Bt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(n,r){},t}(bn),lf=function(e){Bt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(n,r){},t}(bn),Br=function(){function e(){}return e.prototype.addCallback=function(t){},e.prototype.removeCallback=function(t){},e}(),pf=function(e){Bt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Br),ff=function(e){Bt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Br),hf=function(e){Bt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Br),Jo=new af,df=new sf,vf=new cf,mf=new lf,yf=new uf,gf=new pf,_f=new ff,bf=new hf;function Ef(){return Jo}var Ct;(function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"})(Ct||(Ct={}));var Tf={get:function(e,t){if(e!=null)return e[t]},keys:function(e){return e==null?[]:Object.keys(e)}},wf={set:function(e,t,n){e!=null&&(e[t]=n)}},Sf=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Of=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},Af=function(){function e(){}return e.prototype.active=function(){return jt},e.prototype.with=function(t,n,r){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];return n.call.apply(n,Of([r],Sf(i),!1))},e.prototype.bind=function(t,n){return n},e.prototype.enable=function(){return this},e.prototype.disable=function(){return this},e}(),xf=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Cf=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},Fr="context",Lf=new Af,En=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalContextManager=function(t){return Re(Fr,t,ft.instance())},e.prototype.active=function(){return this._getContextManager().active()},e.prototype.with=function(t,n,r){for(var i,o=[],a=3;a<arguments.length;a++)o[a-3]=arguments[a];return(i=this._getContextManager()).with.apply(i,Cf([t,n,r],xf(o),!1))},e.prototype.bind=function(t,n){return this._getContextManager().bind(t,n)},e.prototype._getContextManager=function(){return $t(Fr)||Lf},e.prototype.disable=function(){this._getContextManager().disable(),Ie(Fr,ft.instance())},e}(),gt;(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(gt||(gt={}));var Qo="0000000000000000",Zo="00000000000000000000000000000000",ta={traceId:Zo,spanId:Qo,traceFlags:gt.NONE},ke=function(){function e(t){t===void 0&&(t=ta),this._spanContext=t}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(t,n){return this},e.prototype.setAttributes=function(t){return this},e.prototype.addEvent=function(t,n){return this},e.prototype.addLink=function(t){return this},e.prototype.addLinks=function(t){return this},e.prototype.setStatus=function(t){return this},e.prototype.updateName=function(t){return this},e.prototype.end=function(t){},e.prototype.isRecording=function(){return!1},e.prototype.recordException=function(t,n){},e}(),Vr=jr("OpenTelemetry Context Key SPAN");function Hr(e){return e.getValue(Vr)||void 0}function Nf(){return Hr(En.getInstance().active())}function Gr(e,t){return e.setValue(Vr,t)}function Rf(e){return e.deleteValue(Vr)}function If(e,t){return Gr(e,new ke(t))}function ea(e){var t;return(t=Hr(e))===null||t===void 0?void 0:t.spanContext()}var Pf=/^([0-9a-f]{32})$/i,kf=/^[0-9a-f]{16}$/i;function na(e){return Pf.test(e)&&e!==Zo}function Df(e){return kf.test(e)&&e!==Qo}function Tn(e){return na(e.traceId)&&Df(e.spanId)}function Mf(e){return new ke(e)}var qr=En.getInstance(),ra=function(){function e(){}return e.prototype.startSpan=function(t,n,r){r===void 0&&(r=qr.active());var i=!!(n!=null&&n.root);if(i)return new ke;var o=r&&ea(r);return Uf(o)&&Tn(o)?new ke(o):new ke},e.prototype.startActiveSpan=function(t,n,r,i){var o,a,u;if(!(arguments.length<2)){arguments.length===2?u=n:arguments.length===3?(o=n,u=r):(o=n,a=r,u=i);var c=a??qr.active(),s=this.startSpan(t,o,c),l=Gr(c,s);return qr.with(l,u,void 0,s)}},e}();function Uf(e){return typeof e=="object"&&typeof e.spanId=="string"&&typeof e.traceId=="string"&&typeof e.traceFlags=="number"}var $f=new ra,jf=function(){function e(t,n,r,i){this._provider=t,this.name=n,this.version=r,this.options=i}return e.prototype.startSpan=function(t,n,r){return this._getTracer().startSpan(t,n,r)},e.prototype.startActiveSpan=function(t,n,r,i){var o=this._getTracer();return Reflect.apply(o.startActiveSpan,o,arguments)},e.prototype._getTracer=function(){if(this._delegate)return this._delegate;var t=this._provider.getDelegateTracer(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):$f},e}(),Bf=function(){function e(){}return e.prototype.getTracer=function(t,n,r){return new ra},e}(),Ff=new Bf,ia=function(){function e(){}return e.prototype.getTracer=function(t,n,r){var i;return(i=this.getDelegateTracer(t,n,r))!==null&&i!==void 0?i:new jf(this,t,n,r)},e.prototype.getDelegate=function(){var t;return(t=this._delegate)!==null&&t!==void 0?t:Ff},e.prototype.setDelegate=function(t){this._delegate=t},e.prototype.getDelegateTracer=function(t,n,r){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getTracer(t,n,r)},e}(),wn;(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(wn||(wn={}));var De;(function(e){e[e.INTERNAL=0]="INTERNAL",e[e.SERVER=1]="SERVER",e[e.CLIENT=2]="CLIENT",e[e.PRODUCER=3]="PRODUCER",e[e.CONSUMER=4]="CONSUMER"})(De||(De={}));var Sn;(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(Sn||(Sn={}));var R=En.getInstance(),T=ft.instance(),Vf=function(){function e(){}return e.prototype.getMeter=function(t,n,r){return Jo},e}(),Hf=new Vf,zr="metrics",Gf=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalMeterProvider=function(t){return Re(zr,t,ft.instance())},e.prototype.getMeterProvider=function(){return $t(zr)||Hf},e.prototype.getMeter=function(t,n,r){return this.getMeterProvider().getMeter(t,n,r)},e.prototype.disable=function(){Ie(zr,ft.instance())},e}(),Kr=Gf.getInstance(),qf=function(){function e(){}return e.prototype.inject=function(t,n){},e.prototype.extract=function(t,n){return t},e.prototype.fields=function(){return[]},e}(),Xr=jr("OpenTelemetry Baggage Key");function oa(e){return e.getValue(Xr)||void 0}function zf(){return oa(En.getInstance().active())}function Kf(e,t){return e.setValue(Xr,t)}function Xf(e){return e.deleteValue(Xr)}var Wr="propagation",Wf=new qf,Yf=function(){function e(){this.createBaggage=nf,this.getBaggage=oa,this.getActiveBaggage=zf,this.setBaggage=Kf,this.deleteBaggage=Xf}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalPropagator=function(t){return Re(Wr,t,ft.instance())},e.prototype.inject=function(t,n,r){return r===void 0&&(r=wf),this._getGlobalPropagator().inject(t,n,r)},e.prototype.extract=function(t,n,r){return r===void 0&&(r=Tf),this._getGlobalPropagator().extract(t,n,r)},e.prototype.fields=function(){return this._getGlobalPropagator().fields()},e.prototype.disable=function(){Ie(Wr,ft.instance())},e.prototype._getGlobalPropagator=function(){return $t(Wr)||Wf},e}(),rt=Yf.getInstance(),Yr="trace",Jf=function(){function e(){this._proxyTracerProvider=new ia,this.wrapSpanContext=Mf,this.isSpanContextValid=Tn,this.deleteSpan=Rf,this.getSpan=Hr,this.getActiveSpan=Nf,this.getSpanContext=ea,this.setSpan=Gr,this.setSpanContext=If}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalTracerProvider=function(t){var n=Re(Yr,this._proxyTracerProvider,ft.instance());return n&&this._proxyTracerProvider.setDelegate(t),n},e.prototype.getTracerProvider=function(){return $t(Yr)||this._proxyTracerProvider},e.prototype.getTracer=function(t,n){return this.getTracerProvider().getTracer(t,n)},e.prototype.disable=function(){Ie(Yr,ft.instance()),this._proxyTracerProvider=new ia},e}(),U=Jf.getInstance(),aa=jr("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function sa(e){return e.setValue(aa,!0)}function Jr(e){return e.getValue(aa)===!0}var Qf="=",Qr=";",Zr=",",ti="baggage",Zf=180,th=4096,eh=8192,nh=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function rh(e){return e.reduce(function(t,n){var r=""+t+(t!==""?Zr:"")+n;return r.length>eh?t:r},"")}function ih(e){return e.getAllEntries().map(function(t){var n=nh(t,2),r=n[0],i=n[1],o=encodeURIComponent(r)+"="+encodeURIComponent(i.value);return i.metadata!==void 0&&(o+=Qr+i.metadata.toString()),o})}function oh(e){var t=e.split(Qr);if(!(t.length<=0)){var n=t.shift();if(n){var r=n.indexOf(Qf);if(!(r<=0)){var i=decodeURIComponent(n.substring(0,r).trim()),o=decodeURIComponent(n.substring(r+1).trim()),a;return t.length>0&&(a=rf(t.join(Qr))),{key:i,value:o,metadata:a}}}}}var ua=function(){function e(){}return e.prototype.inject=function(t,n,r){var i=rt.getBaggage(t);if(!(!i||Jr(t))){var o=ih(i).filter(function(u){return u.length<=th}).slice(0,Zf),a=rh(o);a.length>0&&r.set(n,ti,a)}},e.prototype.extract=function(t,n,r){var i=r.get(n,ti),o=Array.isArray(i)?i.join(Zr):i;if(!o)return t;var a={};if(o.length===0)return t;var u=o.split(Zr);return u.forEach(function(c){var s=oh(c);if(s){var l={value:s.value};s.metadata&&(l.metadata=s.metadata),a[s.key]=l}}),Object.entries(a).length===0?t:rt.setBaggage(t,rt.createBaggage(a))},e.prototype.fields=function(){return[ti]},e}(),ca=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ah=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function On(e){var t,n,r={};if(typeof e!="object"||e==null)return r;try{for(var i=ca(Object.entries(e)),o=i.next();!o.done;o=i.next()){var a=ah(o.value,2),u=a[0],c=a[1];if(!sh(u)){T.warn("Invalid attribute key: "+u);continue}if(!la(c)){T.warn("Invalid attribute value set for key: "+u);continue}Array.isArray(c)?r[u]=c.slice():r[u]=c}}catch(s){t={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}function sh(e){return typeof e=="string"&&e.length>0}function la(e){return e==null?!0:Array.isArray(e)?uh(e):pa(e)}function uh(e){var t,n,r;try{for(var i=ca(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(a!=null){if(!r){if(pa(a)){r=typeof a;continue}return!1}if(typeof a!==r)return!1}}}catch(u){t={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return!0}function pa(e){switch(typeof e){case"number":case"boolean":case"string":return!0}return!1}function ch(){return function(e){T.error(lh(e))}}function lh(e){return typeof e=="string"?e:JSON.stringify(ph(e))}function ph(e){for(var t={},n=e;n!==null;)Object.getOwnPropertyNames(n).forEach(function(r){if(!t[r]){var i=n[r];i&&(t[r]=String(i))}}),n=Object.getPrototypeOf(n);return t}var fh=ch();function Lt(e){try{fh(e)}catch{}}var ht;(function(e){e.AlwaysOff="always_off",e.AlwaysOn="always_on",e.ParentBasedAlwaysOff="parentbased_always_off",e.ParentBasedAlwaysOn="parentbased_always_on",e.ParentBasedTraceIdRatio="parentbased_traceidratio",e.TraceIdRatio="traceidratio"})(ht||(ht={}));var hh=",",dh=["OTEL_SDK_DISABLED"];function vh(e){return dh.indexOf(e)>-1}var mh=["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 yh(e){return mh.indexOf(e)>-1}var gh=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];function _h(e){return gh.indexOf(e)>-1}var An=1/0,xn=128,bh=128,Eh=128,fa={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:B.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:An,OTEL_ATTRIBUTE_COUNT_LIMIT:xn,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:An,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:xn,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:An,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:xn,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:bh,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:Eh,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:ht.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",OTEL_SEMCONV_STABILITY_OPT_IN:[]};function Th(e,t,n){if(typeof n[e]<"u"){var r=String(n[e]);t[e]=r.toLowerCase()==="true"}}function wh(e,t,n,r,i){if(r===void 0&&(r=-1/0),i===void 0&&(i=1/0),typeof n[e]<"u"){var o=Number(n[e]);isNaN(o)||(o<r?t[e]=r:o>i?t[e]=i:t[e]=o)}}function Sh(e,t,n,r){r===void 0&&(r=hh);var i=n[e];typeof i=="string"&&(t[e]=i.split(r).map(function(o){return o.trim()}))}var Oh={ALL:B.ALL,VERBOSE:B.VERBOSE,DEBUG:B.DEBUG,INFO:B.INFO,WARN:B.WARN,ERROR:B.ERROR,NONE:B.NONE};function Ah(e,t,n){var r=n[e];if(typeof r=="string"){var i=Oh[r.toUpperCase()];i!=null&&(t[e]=i)}}function ha(e){var t={};for(var n in fa){var r=n;switch(r){case"OTEL_LOG_LEVEL":Ah(r,t,e);break;default:if(vh(r))Th(r,t,e);else if(yh(r))wh(r,t,e);else if(_h(r))Sh(r,t,e);else{var i=e[r];typeof i<"u"&&i!==null&&(t[r]=String(i))}}}return t}var Me=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{};function pe(){var e=ha(Me);return Object.assign({},fa,e)}function xh(){return ha(Me)}function da(e){return e>=48&&e<=57?e-48:e>=97&&e<=102?e-87:e-55}function ei(e){for(var t=new Uint8Array(e.length/2),n=0,r=0;r<e.length;r+=2){var i=da(e.charCodeAt(r)),o=da(e.charCodeAt(r+1));t[n++]=i<<4|o}return t}var it=performance,Ch="1.30.1",Lh="process.runtime.name",Nh="telemetry.sdk.name",Rh="telemetry.sdk.language",Ih="telemetry.sdk.version",Ph=Lh,kh=Nh,Dh=Rh,Mh=Ih,Uh="webjs",$h=Uh,fe,ni=(fe={},fe[kh]="opentelemetry",fe[Ph]="browser",fe[Dh]=$h,fe[Mh]=Ch,fe),jh=9,Bh=6,Fh=Math.pow(10,Bh),Cn=Math.pow(10,jh);function ot(e){var t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*Fh);return[n,r]}function ri(){var e=it.timeOrigin;if(typeof e!="number"){var t=it;e=t.timing&&t.timing.fetchStart}return e}function Ft(e){var t=ot(ri()),n=ot(typeof e=="number"?e:it.now());return ma(t,n)}function Ue(e){if(ii(e))return e;if(typeof e=="number")return e<ri()?Ft(e):ot(e);if(e instanceof Date)return ot(e.getTime());throw TypeError("Invalid input type")}function Vh(e,t){var n=t[0]-e[0],r=t[1]-e[1];return r<0&&(n-=1,r+=Cn),[n,r]}function _t(e){return e[0]*Cn+e[1]}function Ln(e){return e[0]*1e6+e[1]/1e3}function ii(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}function va(e){return ii(e)||typeof e=="number"||e instanceof Date}function ma(e,t){var n=[e[0]+t[0],e[1]+t[1]];return n[1]>=Cn&&(n[1]-=Cn,n[0]+=1),n}var $;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})($||($={}));var Hh=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ya=function(){function e(t){t===void 0&&(t={});var n;this._propagators=(n=t.propagators)!==null&&n!==void 0?n:[],this._fields=Array.from(new Set(this._propagators.map(function(r){return typeof r.fields=="function"?r.fields():[]}).reduce(function(r,i){return r.concat(i)},[])))}return e.prototype.inject=function(t,n,r){var i,o;try{for(var a=Hh(this._propagators),u=a.next();!u.done;u=a.next()){var c=u.value;try{c.inject(t,n,r)}catch(s){T.warn("Failed to inject with "+c.constructor.name+". Err: "+s.message)}}}catch(s){i={error:s}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}},e.prototype.extract=function(t,n,r){return this._propagators.reduce(function(i,o){try{return o.extract(i,n,r)}catch(a){T.warn("Failed to extract with "+o.constructor.name+". Err: "+a.message)}return i},t)},e.prototype.fields=function(){return this._fields.slice()},e}(),oi="[_0-9a-z-*/]",Gh="[a-z]"+oi+"{0,255}",qh="[a-z0-9]"+oi+"{0,240}@[a-z]"+oi+"{0,13}",zh=new RegExp("^(?:"+Gh+"|"+qh+")$"),Kh=/^[ -~]{0,255}[!-~]$/,Xh=/,|=/;function Wh(e){return zh.test(e)}function Yh(e){return Kh.test(e)&&!Xh.test(e)}var ga=32,Jh=512,_a=",",ba="=",Qh=function(){function e(t){this._internalState=new Map,t&&this._parse(t)}return e.prototype.set=function(t,n){var r=this._clone();return r._internalState.has(t)&&r._internalState.delete(t),r._internalState.set(t,n),r},e.prototype.unset=function(t){var n=this._clone();return n._internalState.delete(t),n},e.prototype.get=function(t){return this._internalState.get(t)},e.prototype.serialize=function(){var t=this;return this._keys().reduce(function(n,r){return n.push(r+ba+t.get(r)),n},[]).join(_a)},e.prototype._parse=function(t){t.length>Jh||(this._internalState=t.split(_a).reverse().reduce(function(n,r){var i=r.trim(),o=i.indexOf(ba);if(o!==-1){var a=i.slice(0,o),u=i.slice(o+1,r.length);Wh(a)&&Yh(u)&&n.set(a,u)}return n},new Map),this._internalState.size>ga&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,ga))))},e.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},e.prototype._clone=function(){var t=new e;return t._internalState=new Map(this._internalState),t},e}(),Nn="traceparent",ai="tracestate",Zh="00",td="(?!ff)[\\da-f]{2}",ed="(?![0]{32})[\\da-f]{32}",nd="(?![0]{16})[\\da-f]{16}",rd="[\\da-f]{2}",id=new RegExp("^\\s?("+td+")-("+ed+")-("+nd+")-("+rd+")(-.*)?\\s?$");function od(e){var t=id.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}var Ea=function(){function e(){}return e.prototype.inject=function(t,n,r){var i=U.getSpanContext(t);if(!(!i||Jr(t)||!Tn(i))){var o=Zh+"-"+i.traceId+"-"+i.spanId+"-0"+Number(i.traceFlags||gt.NONE).toString(16);r.set(n,Nn,o),i.traceState&&r.set(n,ai,i.traceState.serialize())}},e.prototype.extract=function(t,n,r){var i=r.get(n,Nn);if(!i)return t;var o=Array.isArray(i)?i[0]:i;if(typeof o!="string")return t;var a=od(o);if(!a)return t;a.isRemote=!0;var u=r.get(n,ai);if(u){var c=Array.isArray(u)?u.join(","):u;a.traceState=new Qh(typeof c=="string"?c:void 0)}return U.setSpanContext(t,a)},e.prototype.fields=function(){return[Nn,ai]},e}(),ad="[object Object]",sd="[object Null]",ud="[object Undefined]",cd=Function.prototype,Ta=cd.toString,ld=Ta.call(Object),pd=fd(Object.getPrototypeOf,Object),wa=Object.prototype,Sa=wa.hasOwnProperty,Vt=Symbol?Symbol.toStringTag:void 0,Oa=wa.toString;function fd(e,t){return function(n){return e(t(n))}}function Aa(e){if(!hd(e)||dd(e)!==ad)return!1;var t=pd(e);if(t===null)return!0;var n=Sa.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Ta.call(n)===ld}function hd(e){return e!=null&&typeof e=="object"}function dd(e){return e==null?e===void 0?ud:sd:Vt&&Vt in Object(e)?vd(e):md(e)}function vd(e){var t=Sa.call(e,Vt),n=e[Vt],r=!1;try{e[Vt]=void 0,r=!0}catch{}var i=Oa.call(e);return r&&(t?e[Vt]=n:delete e[Vt]),i}function md(e){return Oa.call(e)}var yd=20;function xa(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e.shift(),r=new WeakMap;e.length>0;)n=Ca(n,e.shift(),0,r);return n}function si(e){return Rn(e)?e.slice():e}function Ca(e,t,n,r){n===void 0&&(n=0);var i;if(!(n>yd)){if(n++,In(e)||In(t)||Na(t))i=si(t);else if(Rn(e)){if(i=e.slice(),Rn(t))for(var o=0,a=t.length;o<a;o++)i.push(si(t[o]));else if($e(t))for(var u=Object.keys(t),o=0,a=u.length;o<a;o++){var c=u[o];i[c]=si(t[c])}}else if($e(e))if($e(t)){if(!gd(e,t))return t;i=Object.assign({},e);for(var u=Object.keys(t),o=0,a=u.length;o<a;o++){var c=u[o],s=t[c];if(In(s))typeof s>"u"?delete i[c]:i[c]=s;else{var l=i[c],p=s;if(La(e,c,r)||La(t,c,r))delete i[c];else{if($e(l)&&$e(p)){var f=r.get(l)||[],v=r.get(p)||[];f.push({obj:e,key:c}),v.push({obj:t,key:c}),r.set(l,f),r.set(p,v)}i[c]=Ca(i[c],s,n,r)}}}}else i=t;return i}}function La(e,t,n){for(var r=n.get(e[t])||[],i=0,o=r.length;i<o;i++){var a=r[i];if(a.key===t&&a.obj===e)return!0}return!1}function Rn(e){return Array.isArray(e)}function Na(e){return typeof e=="function"}function $e(e){return!In(e)&&!Rn(e)&&!Na(e)&&typeof e=="object"}function In(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function gd(e,t){return!(!Aa(e)||!Aa(t))}var _d=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function Ra(e,t){return typeof t=="string"?e===t:!!e.match(t)}function Ia(e,t){var n,r;if(!t)return!1;try{for(var i=_d(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(Ra(e,a))return!0}}catch(u){n={error:u}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!1}var bd=function(){function e(){var t=this;this._promise=new Promise(function(n,r){t._resolve=n,t._reject=r})}return Object.defineProperty(e.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),e.prototype.resolve=function(t){this._resolve(t)},e.prototype.reject=function(t){this._reject(t)},e}(),Ed=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Td=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},wd=function(){function e(t,n){this._callback=t,this._that=n,this._isCalled=!1,this._deferred=new bd}return Object.defineProperty(e.prototype,"isCalled",{get:function(){return this._isCalled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"promise",{get:function(){return this._deferred.promise},enumerable:!1,configurable:!0}),e.prototype.call=function(){for(var t,n=this,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(!this._isCalled){this._isCalled=!0;try{Promise.resolve((t=this._callback).call.apply(t,Td([this._that],Ed(r),!1))).then(function(o){return n._deferred.resolve(o)},function(o){return n._deferred.reject(o)})}catch(o){this._deferred.reject(o)}}return this._deferred.promise},e}();function Sd(e,t){return new Promise(function(n){R.with(sa(R.active()),function(){e.export(t,function(r){n(r)})})})}var Od={_export:Sd},Pa=function(){function e(){}return e.prototype.emit=function(t){},e}(),Ad=new Pa,xd=function(){function e(){}return e.prototype.getLogger=function(t,n,r){return new Pa},e}(),ka=new xd,Cd=function(){function e(t,n,r,i){this._provider=t,this.name=n,this.version=r,this.options=i}return e.prototype.emit=function(t){this._getLogger().emit(t)},e.prototype._getLogger=function(){if(this._delegate)return this._delegate;var t=this._provider.getDelegateLogger(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):Ad},e}(),Da=function(){function e(){}return e.prototype.getLogger=function(t,n,r){var i;return(i=this.getDelegateLogger(t,n,r))!==null&&i!==void 0?i:new Cd(this,t,n,r)},e.prototype.getDelegate=function(){var t;return(t=this._delegate)!==null&&t!==void 0?t:ka},e.prototype.setDelegate=function(t){this._delegate=t},e.prototype.getDelegateLogger=function(t,n,r){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getLogger(t,n,r)},e}(),Ld=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},Pn=Symbol.for("io.opentelemetry.js.api.logs"),je=Ld;function Nd(e,t,n){return function(r){return r===e?t:n}}var Ma=1,Rd=function(){function e(){this._proxyLoggerProvider=new Da}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalLoggerProvider=function(t){return je[Pn]?this.getLoggerProvider():(je[Pn]=Nd(Ma,t,ka),this._proxyLoggerProvider.setDelegate(t),t)},e.prototype.getLoggerProvider=function(){var t,n;return(n=(t=je[Pn])===null||t===void 0?void 0:t.call(je,Ma))!==null&&n!==void 0?n:this._proxyLoggerProvider},e.prototype.getLogger=function(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)},e.prototype.disable=function(){delete je[Pn],this._proxyLoggerProvider=new Da},e}(),Ua=Rd.getInstance();function Id(e,t,n,r){for(var i=0,o=e.length;i<o;i++){var a=e[i];t&&a.setTracerProvider(t),n&&a.setMeterProvider(n),r&&a.setLoggerProvider&&a.setLoggerProvider(r),a.getConfig().enabled||a.enable()}}function Pd(e){e.forEach(function(t){return t.disable()})}function kd(e){var t,n,r=e.tracerProvider||U.getTracerProvider(),i=e.meterProvider||Kr.getMeterProvider(),o=e.loggerProvider||Ua.getLoggerProvider(),a=(n=(t=e.instrumentations)===null||t===void 0?void 0:t.flat())!==null&&n!==void 0?n:[];return Id(a,r,i,o),function(){Pd(a)}}function ui(e){return typeof e=="function"}var Z=console.error.bind(console);function Be(e,t,n){var r=!!e[t]&&e.propertyIsEnumerable(t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}function Fe(e){e&&e.logger&&(ui(e.logger)?Z=e.logger:Z("new logger isn't a function, not replacing"))}function $a(e,t,n){if(!e||!e[t]){Z("no original function "+t+" to wrap");return}if(!n){Z("no wrapper function"),Z(new Error().stack);return}if(!ui(e[t])||!ui(n)){Z("original object and wrapper must be functions");return}var r=e[t],i=n(r,t);return Be(i,"__original",r),Be(i,"__unwrap",function(){e[t]===i&&Be(e,t,r)}),Be(i,"__wrapped",!0),Be(e,t,i),i}function Dd(e,t,n){if(e)Array.isArray(e)||(e=[e]);else{Z("must provide one or more modules to patch"),Z(new Error().stack);return}if(!(t&&Array.isArray(t))){Z("must provide one or more functions to wrap on modules");return}e.forEach(function(r){t.forEach(function(i){$a(r,i,n)})})}function ja(e,t){if(!e||!e[t]){Z("no function to unwrap."),Z(new Error().stack);return}if(!e[t].__unwrap)Z("no original to unwrap to -- has "+t+" already been unwrapped?");else return e[t].__unwrap()}function Md(e,t){if(e)Array.isArray(e)||(e=[e]);else{Z("must provide one or more modules to patch"),Z(new Error().stack);return}if(!(t&&Array.isArray(t))){Z("must provide one or more functions to unwrap on modules");return}e.forEach(function(n){t.forEach(function(r){ja(n,r)})})}Fe.wrap=$a,Fe.massWrap=Dd,Fe.unwrap=ja,Fe.massUnwrap=Md;var kn=Fe,ci=function(){return ci=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},ci.apply(this,arguments)},Ud=function(){function e(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this._config={},this._wrap=kn.wrap,this._unwrap=kn.unwrap,this._massWrap=kn.massWrap,this._massUnwrap=kn.massUnwrap,this.setConfig(r),this._diag=T.createComponentLogger({namespace:t}),this._tracer=U.getTracer(t,n),this._meter=Kr.getMeter(t,n),this._logger=Ua.getLogger(t,n),this._updateMetricInstruments()}return Object.defineProperty(e.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),e.prototype.setMeterProvider=function(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(e.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),e.prototype.setLoggerProvider=function(t){this._logger=t.getLogger(this.instrumentationName,this.instrumentationVersion)},e.prototype.getModuleDefinitions=function(){var t,n=(t=this.init())!==null&&t!==void 0?t:[];return Array.isArray(n)?n:[n]},e.prototype._updateMetricInstruments=function(){},e.prototype.getConfig=function(){return this._config},e.prototype.setConfig=function(t){this._config=ci({enabled:!0},t)},e.prototype.setTracerProvider=function(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(e.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),e.prototype._runSpanCustomizationHook=function(t,n,r,i){if(t)try{t(r,i)}catch(o){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:n},o)}},e}(),$d=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ve=function(e){$d(t,e);function t(n,r,i){var o=e.call(this,n,r,i)||this;return o._config.enabled&&o.enable(),o}return t}(Ud);function Dn(e,t,n){var r,i;try{i=e()}catch(o){r=o}finally{return t(r,i),i}}function q(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}var jd="exception.type",Bd="exception.message",Fd="exception.stacktrace",li=jd,pi=Bd,Vd=Fd,Hd="exception",fi=function(){return fi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},fi.apply(this,arguments)},Gd=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Ba=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},qd=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},zd=function(){function e(t,n,r,i,o,a,u,c,s,l){u===void 0&&(u=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:Sn.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=r,this._spanContext=i,this.parentSpanId=a,this.kind=o,this.links=u;var p=Date.now();this._performanceStartTime=it.now(),this._performanceOffset=p-(this._performanceStartTime+ri()),this._startTimeProvided=c!=null,this.startTime=this._getTime(c??p),this.resource=t.resource,this.instrumentationLibrary=t.instrumentationLibrary,this._spanLimits=t.getSpanLimits(),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,l!=null&&this.setAttributes(l),this._spanProcessor=t.getActiveSpanProcessor(),this._spanProcessor.onStart(this,n)}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(t,n){return n==null||this._isSpanEnded()?this:t.length===0?(T.warn("Invalid attribute key: "+t),this):la(n)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,t)?(this._droppedAttributesCount++,this):(this.attributes[t]=this._truncateToSize(n),this):(T.warn("Invalid attribute value set for key: "+t),this)},e.prototype.setAttributes=function(t){var n,r;try{for(var i=Gd(Object.entries(t)),o=i.next();!o.done;o=i.next()){var a=Ba(o.value,2),u=a[0],c=a[1];this.setAttribute(u,c)}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return this},e.prototype.addEvent=function(t,n,r){if(this._isSpanEnded())return this;if(this._spanLimits.eventCountLimit===0)return T.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(this._droppedEventsCount===0&&T.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),va(n)&&(va(r)||(r=n),n=void 0);var i=On(n);return this.events.push({name:t,attributes:i,time:this._getTime(r),droppedAttributesCount:0}),this},e.prototype.addLink=function(t){return this.links.push(t),this},e.prototype.addLinks=function(t){var n;return(n=this.links).push.apply(n,qd([],Ba(t),!1)),this},e.prototype.setStatus=function(t){return this._isSpanEnded()?this:(this.status=fi({},t),this.status.message!=null&&typeof t.message!="string"&&(T.warn("Dropping invalid status.message of type '"+typeof t.message+"', expected 'string'"),delete this.status.message),this)},e.prototype.updateName=function(t){return this._isSpanEnded()?this:(this.name=t,this)},e.prototype.end=function(t){if(this._isSpanEnded()){T.error(this.name+" "+this._spanContext.traceId+"-"+this._spanContext.spanId+" - You can only call end() on a span once.");return}this._ended=!0,this.endTime=this._getTime(t),this._duration=Vh(this.startTime,this.endTime),this._duration[0]<0&&(T.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&&T.warn("Dropped "+this._droppedEventsCount+" events because eventCountLimit reached"),this._spanProcessor.onEnd(this)},e.prototype._getTime=function(t){if(typeof t=="number"&&t<=it.now())return Ft(t+this._performanceOffset);if(typeof t=="number")return ot(t);if(t instanceof Date)return ot(t.getTime());if(ii(t))return t;if(this._startTimeProvided)return ot(Date.now());var n=it.now()-this._performanceStartTime;return ma(this.startTime,ot(n))},e.prototype.isRecording=function(){return this._ended===!1},e.prototype.recordException=function(t,n){var r={};typeof t=="string"?r[pi]=t:t&&(t.code?r[li]=t.code.toString():t.name&&(r[li]=t.name),t.message&&(r[pi]=t.message),t.stack&&(r[Vd]=t.stack)),r[li]||r[pi]?this.addEvent(Hd,r,n):T.warn("Failed to record an exception "+t)},Object.defineProperty(e.prototype,"duration",{get:function(){return this._duration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ended",{get:function(){return this._ended},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedAttributesCount",{get:function(){return this._droppedAttributesCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedEventsCount",{get:function(){return this._droppedEventsCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedLinksCount",{get:function(){return this._droppedLinksCount},enumerable:!1,configurable:!0}),e.prototype._isSpanEnded=function(){return this._ended&&T.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},e.prototype._truncateToLimitUtil=function(t,n){return t.length<=n?t:t.substring(0,n)},e.prototype._truncateToSize=function(t){var n=this,r=this._attributeValueLengthLimit;return r<=0?(T.warn("Attribute value limit must be positive, got "+r),t):typeof t=="string"?this._truncateToLimitUtil(t,r):Array.isArray(t)?t.map(function(i){return typeof i=="string"?n._truncateToLimitUtil(i,r):i}):t},e}(),he;(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(he||(he={}));var Mn=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:he.NOT_RECORD}},e.prototype.toString=function(){return"AlwaysOffSampler"},e}(),de=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:he.RECORD_AND_SAMPLED}},e.prototype.toString=function(){return"AlwaysOnSampler"},e}(),hi=function(){function e(t){var n,r,i,o;this._root=t.root,this._root||(Lt(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new de),this._remoteParentSampled=(n=t.remoteParentSampled)!==null&&n!==void 0?n:new de,this._remoteParentNotSampled=(r=t.remoteParentNotSampled)!==null&&r!==void 0?r:new Mn,this._localParentSampled=(i=t.localParentSampled)!==null&&i!==void 0?i:new de,this._localParentNotSampled=(o=t.localParentNotSampled)!==null&&o!==void 0?o:new Mn}return e.prototype.shouldSample=function(t,n,r,i,o,a){var u=U.getSpanContext(t);return!u||!Tn(u)?this._root.shouldSample(t,n,r,i,o,a):u.isRemote?u.traceFlags>.SAMPLED?this._remoteParentSampled.shouldSample(t,n,r,i,o,a):this._remoteParentNotSampled.shouldSample(t,n,r,i,o,a):u.traceFlags>.SAMPLED?this._localParentSampled.shouldSample(t,n,r,i,o,a):this._localParentNotSampled.shouldSample(t,n,r,i,o,a)},e.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},e}(),Fa=function(){function e(t){t===void 0&&(t=0),this._ratio=t,this._ratio=this._normalize(t),this._upperBound=Math.floor(this._ratio*4294967295)}return e.prototype.shouldSample=function(t,n){return{decision:na(n)&&this._accumulate(n)<this._upperBound?he.RECORD_AND_SAMPLED:he.NOT_RECORD}},e.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},e.prototype._normalize=function(t){return typeof t!="number"||isNaN(t)?0:t>=1?1:t<=0?0:t},e.prototype._accumulate=function(t){for(var n=0,r=0;r<t.length/8;r++){var i=r*8,o=parseInt(t.slice(i,i+8),16);n=(n^o)>>>0}return n},e}(),Kd=ht.AlwaysOn,ve=1;function Va(){var e=pe();return{sampler:Ha(e),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:e.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:e.OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:e.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:e.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:e.OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:e.OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:e.OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:e.OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT},mergeResourceWithDefaults:!0}}function Ha(e){switch(e===void 0&&(e=pe()),e.OTEL_TRACES_SAMPLER){case ht.AlwaysOn:return new de;case ht.AlwaysOff:return new Mn;case ht.ParentBasedAlwaysOn:return new hi({root:new de});case ht.ParentBasedAlwaysOff:return new hi({root:new Mn});case ht.TraceIdRatio:return new Fa(Ga(e));case ht.ParentBasedTraceIdRatio:return new hi({root:new Fa(Ga(e))});default:return T.error('OTEL_TRACES_SAMPLER value "'+e.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+Kd+'".'),new de}}function Ga(e){if(e.OTEL_TRACES_SAMPLER_ARG===void 0||e.OTEL_TRACES_SAMPLER_ARG==="")return T.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+ve+"."),ve;var t=Number(e.OTEL_TRACES_SAMPLER_ARG);return isNaN(t)?(T.error("OTEL_TRACES_SAMPLER_ARG="+e.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+ve+"."),ve):t<0||t>1?(T.error("OTEL_TRACES_SAMPLER_ARG="+e.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+ve+"."),ve):t}function Xd(e){var t={sampler:Ha()},n=Va(),r=Object.assign({},n,t,e);return r.generalLimits=Object.assign({},n.generalLimits,e.generalLimits||{}),r.spanLimits=Object.assign({},n.spanLimits,e.spanLimits||{}),r}function Wd(e){var t,n,r,i,o,a,u,c,s,l,p,f,v=Object.assign({},e.spanLimits),m=xh();return v.attributeCountLimit=(a=(o=(i=(n=(t=e.spanLimits)===null||t===void 0?void 0:t.attributeCountLimit)!==null&&n!==void 0?n:(r=e.generalLimits)===null||r===void 0?void 0:r.attributeCountLimit)!==null&&i!==void 0?i:m.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&o!==void 0?o:m.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&a!==void 0?a:xn,v.attributeValueLengthLimit=(f=(p=(l=(c=(u=e.spanLimits)===null||u===void 0?void 0:u.attributeValueLengthLimit)!==null&&c!==void 0?c:(s=e.generalLimits)===null||s===void 0?void 0:s.attributeValueLengthLimit)!==null&&l!==void 0?l:m.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&p!==void 0?p:m.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&f!==void 0?f:An,Object.assign({},e,{spanLimits:v})}var Yd=function(){function e(t,n){this._exporter=t,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var r=pe();this._maxExportBatchSize=typeof n?.maxExportBatchSize=="number"?n.maxExportBatchSize:r.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=typeof n?.maxQueueSize=="number"?n.maxQueueSize:r.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=typeof n?.scheduledDelayMillis=="number"?n.scheduledDelayMillis:r.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis=typeof n?.exportTimeoutMillis=="number"?n.exportTimeoutMillis:r.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new wd(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(T.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return e.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},e.prototype.onStart=function(t,n){},e.prototype.onEnd=function(t){this._shutdownOnce.isCalled||(t.spanContext().traceFlags>.SAMPLED)!==0&&this._addToBuffer(t)},e.prototype.shutdown=function(){return this._shutdownOnce.call()},e.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()})},e.prototype._addToBuffer=function(t){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&T.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(T.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(t),this._maybeStartTimer()},e.prototype._flushAll=function(){var t=this;return new Promise(function(n,r){for(var i=[],o=Math.ceil(t._finishedSpans.length/t._maxExportBatchSize),a=0,u=o;a<u;a++)i.push(t._flushOneBatch());Promise.all(i).then(function(){n()}).catch(r)})},e.prototype._flushOneBatch=function(){var t=this;return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise(function(n,r){var i=setTimeout(function(){r(new Error("Timeout"))},t._exportTimeoutMillis);R.with(sa(R.active()),function(){var o;t._finishedSpans.length<=t._maxExportBatchSize?(o=t._finishedSpans,t._finishedSpans=[]):o=t._finishedSpans.splice(0,t._maxExportBatchSize);for(var a=function(){return t._exporter.export(o,function(p){var f;clearTimeout(i),p.code===$.SUCCESS?n():r((f=p.error)!==null&&f!==void 0?f:new Error("BatchSpanProcessor: span export failed"))})},u=null,c=0,s=o.length;c<s;c++){var l=o[c];l.resource.asyncAttributesPending&&l.resource.waitForAsyncAttributes&&(u!=null||(u=[]),u.push(l.resource.waitForAsyncAttributes()))}u===null?a():Promise.all(u).then(a,function(p){Lt(p),r(p)})})})},e.prototype._maybeStartTimer=function(){var t=this;if(!this._isExporting){var n=function(){t._isExporting=!0,t._flushOneBatch().finally(function(){t._isExporting=!1,t._finishedSpans.length>0&&(t._clearTimer(),t._maybeStartTimer())}).catch(function(r){t._isExporting=!1,Lt(r)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return n();this._timer===void 0&&(this._timer=setTimeout(function(){return n()},this._scheduledDelayMillis))}},e.prototype._clearTimer=function(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)},e}(),Jd=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),qa=function(e){Jd(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.onInit(r),i}return t.prototype.onInit=function(n){var r=this;n?.disableAutoFlushOnDocumentHide!==!0&&typeof document<"u"&&(this._visibilityChangeListener=function(){document.visibilityState==="hidden"&&r.forceFlush().catch(function(i){Lt(i)})},this._pageHideListener=function(){r.forceFlush().catch(function(i){Lt(i)})},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))},t.prototype.onShutdown=function(){typeof document<"u"&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))},t}(Yd),Qd=8,Zd=16,tv=function(){function e(){this.generateTraceId=za(Zd),this.generateSpanId=za(Qd)}return e}(),Un=Array(32);function za(e){return function(){for(var t=0;t<e*2;t++)Un[t]=Math.floor(Math.random()*16)+48,Un[t]>=58&&(Un[t]+=39);return String.fromCharCode.apply(null,Un.slice(0,e*2))}}var ev=function(){function e(t,n,r){this._tracerProvider=r;var i=Xd(n);this._sampler=i.sampler,this._generalLimits=i.generalLimits,this._spanLimits=i.spanLimits,this._idGenerator=n.idGenerator||new tv,this.resource=r.resource,this.instrumentationLibrary=t}return e.prototype.startSpan=function(t,n,r){var i,o,a;n===void 0&&(n={}),r===void 0&&(r=R.active()),n.root&&(r=U.deleteSpan(r));var u=U.getSpan(r);if(Jr(r)){T.debug("Instrumentation suppressed, returning Noop Span");var c=U.wrapSpanContext(ta);return c}var s=u?.spanContext(),l=this._idGenerator.generateSpanId(),p,f,v;!s||!U.isSpanContextValid(s)?p=this._idGenerator.generateTraceId():(p=s.traceId,f=s.traceState,v=s.spanId);var m=(i=n.kind)!==null&&i!==void 0?i:De.INTERNAL,y=((o=n.links)!==null&&o!==void 0?o:[]).map(function(tt){return{context:tt.context,attributes:On(tt.attributes)}}),g=On(n.attributes),b=this._sampler.shouldSample(r,p,t,m,g,y);f=(a=b.traceState)!==null&&a!==void 0?a:f;var w=b.decision===wn.RECORD_AND_SAMPLED?gt.SAMPLED:gt.NONE,I={traceId:p,spanId:l,traceFlags:w,traceState:f};if(b.decision===wn.NOT_RECORD){T.debug("Recording is off, propagating context in a non-recording span");var c=U.wrapSpanContext(I);return c}var M=On(Object.assign(g,b.attributes)),j=new zd(this,r,t,I,m,v,y,n.startTime,void 0,M);return j},e.prototype.startActiveSpan=function(t,n,r,i){var o,a,u;if(!(arguments.length<2)){arguments.length===2?u=n:arguments.length===3?(o=n,u=r):(o=n,a=r,u=i);var c=a??R.active(),s=this.startSpan(t,o,c),l=U.setSpan(c,s);return R.with(l,u,void 0,s)}},e.prototype.getGeneralLimits=function(){return this._generalLimits},e.prototype.getSpanLimits=function(){return this._spanLimits},e.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},e}(),nv="service.name",rv="telemetry.sdk.name",iv="telemetry.sdk.language",ov="telemetry.sdk.version",av=nv,Ka=rv,Xa=iv,Wa=ov;function sv(){return"unknown_service"}var Nt=function(){return Nt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Nt.apply(this,arguments)},uv=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},cv=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},lv=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},He=function(){function e(t,n){var r=this,i;this._attributes=t,this.asyncAttributesPending=n!=null,this._syncAttributes=(i=this._attributes)!==null&&i!==void 0?i:{},this._asyncAttributesPromise=n?.then(function(o){return r._attributes=Object.assign({},r._attributes,o),r.asyncAttributesPending=!1,o},function(o){return T.debug("a resource's async attributes promise rejected: %s",o),r.asyncAttributesPending=!1,{}})}return e.empty=function(){return e.EMPTY},e.default=function(){var t;return new e((t={},t[av]=sv(),t[Xa]=ni[Xa],t[Ka]=ni[Ka],t[Wa]=ni[Wa],t))},Object.defineProperty(e.prototype,"attributes",{get:function(){var t;return this.asyncAttributesPending&&T.error("Accessing resource attributes before async attributes settled"),(t=this._attributes)!==null&&t!==void 0?t:{}},enumerable:!1,configurable:!0}),e.prototype.waitForAsyncAttributes=function(){return uv(this,void 0,void 0,function(){return cv(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]}})})},e.prototype.merge=function(t){var n=this,r;if(!t)return this;var i=Nt(Nt({},this._syncAttributes),(r=t._syncAttributes)!==null&&r!==void 0?r:t.attributes);if(!this._asyncAttributesPromise&&!t._asyncAttributesPromise)return new e(i);var o=Promise.all([this._asyncAttributesPromise,t._asyncAttributesPromise]).then(function(a){var u,c=lv(a,2),s=c[0],l=c[1];return Nt(Nt(Nt(Nt({},n._syncAttributes),s),(u=t._syncAttributes)!==null&&u!==void 0?u:t.attributes),l)});return new e(i,o)},e.EMPTY=new e({}),e}(),$n=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Ya=function(){function e(t){this._spanProcessors=t}return e.prototype.forceFlush=function(){var t,n,r=[];try{for(var i=$n(this._spanProcessors),o=i.next();!o.done;o=i.next()){var a=o.value;r.push(a.forceFlush())}}catch(u){t={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return new Promise(function(u){Promise.all(r).then(function(){u()}).catch(function(c){Lt(c||new Error("MultiSpanProcessor: forceFlush failed")),u()})})},e.prototype.onStart=function(t,n){var r,i;try{for(var o=$n(this._spanProcessors),a=o.next();!a.done;a=o.next()){var u=a.value;u.onStart(t,n)}}catch(c){r={error:c}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}},e.prototype.onEnd=function(t){var n,r;try{for(var i=$n(this._spanProcessors),o=i.next();!o.done;o=i.next()){var a=o.value;a.onEnd(t)}}catch(u){n={error:u}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},e.prototype.shutdown=function(){var t,n,r=[];try{for(var i=$n(this._spanProcessors),o=i.next();!o.done;o=i.next()){var a=o.value;r.push(a.shutdown())}}catch(u){t={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return new Promise(function(u,c){Promise.all(r).then(function(){u()},c)})},e}(),pv=function(){function e(){}return e.prototype.onStart=function(t,n){},e.prototype.onEnd=function(t){},e.prototype.shutdown=function(){return Promise.resolve()},e.prototype.forceFlush=function(){return Promise.resolve()},e}(),fv=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},hv=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},Ht;(function(e){e[e.resolved=0]="resolved",e[e.timeout=1]="timeout",e[e.error=2]="error",e[e.unresolved=3]="unresolved"})(Ht||(Ht={}));var dv=function(){function e(t){t===void 0&&(t={});var n,r;this._registeredSpanProcessors=[],this._tracers=new Map;var i=xa({},Va(),Wd(t));if(this.resource=(n=i.resource)!==null&&n!==void 0?n:He.empty(),i.mergeResourceWithDefaults&&(this.resource=He.default().merge(this.resource)),this._config=Object.assign({},i,{resource:this.resource}),!((r=t.spanProcessors)===null||r===void 0)&&r.length)this._registeredSpanProcessors=hv([],fv(t.spanProcessors),!1),this.activeSpanProcessor=new Ya(this._registeredSpanProcessors);else{var o=this._buildExporterFromEnv();if(o!==void 0){var a=new qa(o);this.activeSpanProcessor=a}else this.activeSpanProcessor=new pv}}return e.prototype.getTracer=function(t,n,r){var i=t+"@"+(n||"")+":"+(r?.schemaUrl||"");return this._tracers.has(i)||this._tracers.set(i,new ev({name:t,version:n,schemaUrl:r?.schemaUrl},this._config,this)),this._tracers.get(i)},e.prototype.addSpanProcessor=function(t){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(function(n){return T.error("Error while trying to shutdown current span processor",n)}),this._registeredSpanProcessors.push(t),this.activeSpanProcessor=new Ya(this._registeredSpanProcessors)},e.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},e.prototype.register=function(t){t===void 0&&(t={}),U.setGlobalTracerProvider(this),t.propagator===void 0&&(t.propagator=this._buildPropagatorFromEnv()),t.contextManager&&R.setGlobalContextManager(t.contextManager),t.propagator&&rt.setGlobalPropagator(t.propagator)},e.prototype.forceFlush=function(){var t=this._config.forceFlushTimeoutMillis,n=this._registeredSpanProcessors.map(function(r){return new Promise(function(i){var o,a=setTimeout(function(){i(new Error("Span processor did not completed within timeout period of "+t+" ms")),o=Ht.timeout},t);r.forceFlush().then(function(){clearTimeout(a),o!==Ht.timeout&&(o=Ht.resolved,i(o))}).catch(function(u){clearTimeout(a),o=Ht.error,i(u)})})});return new Promise(function(r,i){Promise.all(n).then(function(o){var a=o.filter(function(u){return u!==Ht.resolved});a.length>0?i(a):r()}).catch(function(o){return i([o])})})},e.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},e.prototype._getPropagator=function(t){var n;return(n=this.constructor._registeredPropagators.get(t))===null||n===void 0?void 0:n()},e.prototype._getSpanExporter=function(t){var n;return(n=this.constructor._registeredExporters.get(t))===null||n===void 0?void 0:n()},e.prototype._buildPropagatorFromEnv=function(){var t=this,n=Array.from(new Set(pe().OTEL_PROPAGATORS)),r=n.map(function(o){var a=t._getPropagator(o);return a||T.warn('Propagator "'+o+'" requested through environment variable is unavailable.'),a}),i=r.reduce(function(o,a){return a&&o.push(a),o},[]);if(i.length!==0)return n.length===1?i[0]:new ya({propagators:i})},e.prototype._buildExporterFromEnv=function(){var t=pe().OTEL_TRACES_EXPORTER;if(!(t==="none"||t==="")){var n=this._getSpanExporter(t);return n||T.error('Exporter "'+t+'" requested through environment variable is unavailable.'),n}},e._registeredPropagators=new Map([["tracecontext",function(){return new Ea}],["baggage",function(){return new ua}]]),e._registeredExporters=new Map,e}(),vv=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},mv=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},Ja=function(){function e(){this._enabled=!1,this._currentContext=jt}return e.prototype._bindFunction=function(t,n){t===void 0&&(t=jt);var r=this,i=function(){for(var o=this,a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];return r.with(t,function(){return n.apply(o,a)})};return Object.defineProperty(i,"length",{enumerable:!1,configurable:!0,writable:!1,value:n.length}),i},e.prototype.active=function(){return this._currentContext},e.prototype.bind=function(t,n){return t===void 0&&(t=this.active()),typeof n=="function"?this._bindFunction(t,n):n},e.prototype.disable=function(){return this._currentContext=jt,this._enabled=!1,this},e.prototype.enable=function(){return this._enabled?this:(this._enabled=!0,this._currentContext=jt,this)},e.prototype.with=function(t,n,r){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];var a=this._currentContext;this._currentContext=t||jt;try{return n.call.apply(n,mv([r],vv(i),!1))}finally{this._currentContext=a}},e}(),yv=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),gv=function(e){yv(t,e);function t(n){n===void 0&&(n={});var r=e.call(this,n)||this;if(n.contextManager)throw"contextManager should be defined in register method not in constructor";if(n.propagator)throw"propagator should be defined in register method not in constructor";return r}return t.prototype.register=function(n){n===void 0&&(n={}),n.contextManager===void 0&&(n.contextManager=new Ja),n.contextManager&&n.contextManager.enable(),e.prototype.register.call(this,n)},t}(dv),O;(function(e){e.CONNECT_END="connectEnd",e.CONNECT_START="connectStart",e.DECODED_BODY_SIZE="decodedBodySize",e.DOM_COMPLETE="domComplete",e.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",e.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",e.DOM_INTERACTIVE="domInteractive",e.DOMAIN_LOOKUP_END="domainLookupEnd",e.DOMAIN_LOOKUP_START="domainLookupStart",e.ENCODED_BODY_SIZE="encodedBodySize",e.FETCH_START="fetchStart",e.LOAD_EVENT_END="loadEventEnd",e.LOAD_EVENT_START="loadEventStart",e.NAVIGATION_START="navigationStart",e.REDIRECT_END="redirectEnd",e.REDIRECT_START="redirectStart",e.REQUEST_START="requestStart",e.RESPONSE_END="responseEnd",e.RESPONSE_START="responseStart",e.SECURE_CONNECTION_START="secureConnectionStart",e.UNLOAD_EVENT_END="unloadEventEnd",e.UNLOAD_EVENT_START="unloadEventStart"})(O||(O={}));var _v="http.response_content_length",bv="http.response_content_length_uncompressed",Ev=_v,Tv=bv,di;function wv(){return di||(di=document.createElement("a")),di}function Rt(e,t){return t in e}function z(e,t,n,r){var i=void 0,o=void 0;Rt(n,t)&&typeof n[t]=="number"&&(i=n[t]);var a=O.FETCH_START;if(Rt(n,a)&&typeof n[a]=="number"&&(o=n[a]),i!==void 0&&o!==void 0&&i>=o)return e.addEvent(t,i),e}function me(e,t,n){n===void 0&&(n=!1),n||(z(e,O.FETCH_START,t),z(e,O.DOMAIN_LOOKUP_START,t),z(e,O.DOMAIN_LOOKUP_END,t),z(e,O.CONNECT_START,t),Rt(t,"name")&&t.name.startsWith("https:")&&z(e,O.SECURE_CONNECTION_START,t),z(e,O.CONNECT_END,t),z(e,O.REQUEST_START,t),z(e,O.RESPONSE_START,t),z(e,O.RESPONSE_END,t));var r=t[O.ENCODED_BODY_SIZE];r!==void 0&&e.setAttribute(Ev,r);var i=t[O.DECODED_BODY_SIZE];i!==void 0&&r!==i&&e.setAttribute(Tv,i)}function Sv(e){return e.slice().sort(function(t,n){var r=t[O.FETCH_START],i=n[O.FETCH_START];return r>i?1:r<i?-1:0})}function Qa(){return typeof location<"u"?location.origin:void 0}function Za(e,t,n,r,i,o){i===void 0&&(i=new WeakSet);var a=bt(e);e=a.toString();var u=Av(e,t,n,r,i,o);if(u.length===0)return{mainRequest:void 0};if(u.length===1)return{mainRequest:u[0]};var c=Sv(u);if(a.origin!==Qa()&&c.length>1){var s=c[0],l=Ov(c,s[O.RESPONSE_END],n),p=s[O.RESPONSE_END],f=l[O.FETCH_START];return f<p&&(l=s,s=void 0),{corsPreFlightRequest:s,mainRequest:l}}else return{mainRequest:u[0]}}function Ov(e,t,n){for(var r=_t(n),i=_t(Ue(t)),o=e[1],a,u=e.length,c=1;c<u;c++){var s=e[c],l=_t(Ue(s[O.FETCH_START])),p=_t(Ue(s[O.RESPONSE_END])),f=r-p;l>=i&&(!a||f<a)&&(a=f,o=s)}return o}function Av(e,t,n,r,i,o){var a=_t(t),u=_t(n),c=r.filter(function(s){var l=_t(Ue(s[O.FETCH_START])),p=_t(Ue(s[O.RESPONSE_END]));return s.initiatorType.toLowerCase()===(o||"xmlhttprequest")&&s.name===e&&l>=a&&p<=u});return c.length>0&&(c=c.filter(function(s){return!i.has(s)})),c}function bt(e){if(typeof URL=="function")return new URL(e,typeof document<"u"?document.baseURI:typeof location<"u"?location.href:void 0);var t=wv();return t.href=e,t}function ts(e,t){if(e.nodeType===Node.DOCUMENT_NODE)return"/";var n=Cv(e,t);if(t&&n.indexOf("@id")>0)return n;var r="";return e.parentNode&&(r+=ts(e.parentNode,!1)),r+=n,r}function xv(e){if(!e.parentNode)return 0;var t=[e.nodeType];e.nodeType===Node.CDATA_SECTION_NODE&&t.push(Node.TEXT_NODE);var n=Array.from(e.parentNode.childNodes);return n=n.filter(function(r){var i=r.localName;return t.indexOf(r.nodeType)>=0&&i===e.localName}),n.length>=1?n.indexOf(e)+1:0}function Cv(e,t){var n=e.nodeType,r=xv(e),i="";if(n===Node.ELEMENT_NODE){var o=e.getAttribute("id");if(t&&o)return'//*[@id="'+o+'"]';i=e.localName}else if(n===Node.TEXT_NODE||n===Node.CDATA_SECTION_NODE)i="text()";else if(n===Node.COMMENT_NODE)i="comment()";else return"";return i&&r>1?"/"+i+"["+r+"]":"/"+i}function es(e,t){var n=t||[];(typeof n=="string"||n instanceof RegExp)&&(n=[n]);var r=bt(e);return r.origin===Qa()?!0:n.some(function(i){return Ra(e,i)})}var Ge;(function(e){e.DOCUMENT_LOAD="documentLoad",e.DOCUMENT_FETCH="documentFetch",e.RESOURCE_FETCH="resourceFetch"})(Ge||(Ge={}));var Lv="0.44.0",Nv="@opentelemetry/instrumentation-document-load";const Rv="http.url",Iv="http.user_agent",ye=Rv,Pv=Iv;var jn;(function(e){e.FIRST_PAINT="firstPaint",e.FIRST_CONTENTFUL_PAINT="firstContentfulPaint"})(jn||(jn={}));var kv=function(){var e,t,n={},r=(t=(e=it).getEntriesByType)===null||t===void 0?void 0:t.call(e,"navigation")[0];if(r){var i=Object.values(O);i.forEach(function(u){if(Rt(r,u)){var c=r[u];typeof c=="number"&&(n[u]=c)}})}else{var o=it,a=o.timing;if(a){var i=Object.values(O);i.forEach(function(c){if(Rt(a,c)){var s=a[c];typeof s=="number"&&(n[c]=s)}})}}return n},ns={"first-paint":jn.FIRST_PAINT,"first-contentful-paint":jn.FIRST_CONTENTFUL_PAINT},Dv=function(e){var t,n,r=(n=(t=it).getEntriesByType)===null||n===void 0?void 0:n.call(t,"paint");r&&r.forEach(function(i){var o=i.name,a=i.startTime;Rt(ns,o)&&e.addEvent(ns[o],a)})},Mv=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Uv=function(e){Mv(t,e);function t(n){n===void 0&&(n={});var r=e.call(this,Nv,Lv,n)||this;return r.component="document-load",r.version="1",r.moduleName=r.component,r}return t.prototype.init=function(){},t.prototype._onDocumentLoaded=function(){var n=this;window.setTimeout(function(){n._collectPerformance()})},t.prototype._addResourcesSpans=function(n){var r=this,i,o,a=(o=(i=it).getEntriesByType)===null||o===void 0?void 0:o.call(i,"resource");a&&a.forEach(function(u){r._initResourceSpan(u,n)})},t.prototype._collectPerformance=function(){var n=this,r=Array.from(document.getElementsByTagName("meta")).find(function(a){return a.getAttribute("name")===Nn}),i=kv(),o=r&&r.content||"";R.with(rt.extract(jt,{traceparent:o}),function(){var a,u=n._startSpan(Ge.DOCUMENT_LOAD,O.FETCH_START,i);u&&(R.with(U.setSpan(R.active(),u),function(){var c=n._startSpan(Ge.DOCUMENT_FETCH,O.FETCH_START,i);c&&(c.setAttribute(ye,location.href),R.with(U.setSpan(R.active(),c),function(){var s;n.getConfig().ignoreNetworkEvents||me(c,i),n._addCustomAttributesOnSpan(c,(s=n.getConfig().applyCustomAttributesOnSpan)===null||s===void 0?void 0:s.documentFetch),n._endSpan(c,O.RESPONSE_END,i)}))}),u.setAttribute(ye,location.href),u.setAttribute(Pv,navigator.userAgent),n._addResourcesSpans(u),n.getConfig().ignoreNetworkEvents||(z(u,O.FETCH_START,i),z(u,O.UNLOAD_EVENT_START,i),z(u,O.UNLOAD_EVENT_END,i),z(u,O.DOM_INTERACTIVE,i),z(u,O.DOM_CONTENT_LOADED_EVENT_START,i),z(u,O.DOM_CONTENT_LOADED_EVENT_END,i),z(u,O.DOM_COMPLETE,i),z(u,O.LOAD_EVENT_START,i),z(u,O.LOAD_EVENT_END,i)),n.getConfig().ignorePerformancePaintEvents||Dv(u),n._addCustomAttributesOnSpan(u,(a=n.getConfig().applyCustomAttributesOnSpan)===null||a===void 0?void 0:a.documentLoad),n._endSpan(u,O.LOAD_EVENT_END,i))})},t.prototype._endSpan=function(n,r,i){n&&(Rt(i,r)?n.end(i[r]):n.end())},t.prototype._initResourceSpan=function(n,r){var i,o=this._startSpan(Ge.RESOURCE_FETCH,O.FETCH_START,n,r);o&&(o.setAttribute(ye,n.name),this.getConfig().ignoreNetworkEvents||me(o,n),this._addCustomAttributesOnResourceSpan(o,n,(i=this.getConfig().applyCustomAttributesOnSpan)===null||i===void 0?void 0:i.resourceFetch),this._endSpan(o,O.RESPONSE_END,n))},t.prototype._startSpan=function(n,r,i,o){if(Rt(i,r)&&typeof i[r]=="number"){var a=this.tracer.startSpan(n,{startTime:i[r]},o?U.setSpan(R.active(),o):void 0);return a}},t.prototype._waitForPageLoad=function(){window.document.readyState==="complete"?this._onDocumentLoaded():(this._onDocumentLoaded=this._onDocumentLoaded.bind(this),window.addEventListener("load",this._onDocumentLoaded))},t.prototype._addCustomAttributesOnSpan=function(n,r){var i=this;r&&Dn(function(){return r(n)},function(o){o&&i._diag.error("addCustomAttributesOnSpan",o)})},t.prototype._addCustomAttributesOnResourceSpan=function(n,r,i){var o=this;i&&Dn(function(){return i(n,r)},function(a){a&&o._diag.error("addCustomAttributesOnResourceSpan",a)})},t.prototype.enable=function(){window.removeEventListener("load",this._onDocumentLoaded),this._waitForPageLoad()},t.prototype.disable=function(){window.removeEventListener("load",this._onDocumentLoaded)},t}(Ve),Bn;(function(e){e.COMPONENT="component",e.HTTP_ERROR_NAME="http.error_name",e.HTTP_STATUS_TEXT="http.status_text"})(Bn||(Bn={}));var $v="http.method",jv="http.url",Bv="http.host",Fv="http.scheme",Vv="http.status_code",Hv="http.user_agent",Gv="http.request_content_length_uncompressed",qv=$v,zv=jv,Kv=Bv,Xv=Fv,Wv=Vv,Yv=Hv,Jv=Gv,Qv=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},Zv=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},tm=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},em=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},rs=T.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-fetch/utils"});function nm(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e[0]instanceof URL||typeof e[0]=="string"){var n=e[1];if(!(n!=null&&n.body))return Promise.resolve();if(n.body instanceof ReadableStream){var r=rm(n.body),i=r.body,o=r.length;return n.body=i,o}else return Promise.resolve(im(n.body))}else{var a=e[0];return a!=null&&a.body?a.clone().text().then(function(u){return vi(u)}):Promise.resolve()}}function rm(e){if(!e.pipeThrough)return rs.warn("Platform has ReadableStream but not pipeThrough!"),{body:e,length:Promise.resolve(void 0)};var t=0,n,r=new Promise(function(o){n=o}),i=new TransformStream({start:function(){},transform:function(o,a){return Qv(this,void 0,void 0,function(){var u;return Zv(this,function(c){switch(c.label){case 0:return[4,o];case 1:return u=c.sent(),t+=u.byteLength,a.enqueue(o),[2]}})})},flush:function(){n(t)}});return{body:e.pipeThrough(i),length:r}}function im(e){if(typeof Document<"u"&&e instanceof Document)return new XMLSerializer().serializeToString(document).length;if(e instanceof Blob)return e.size;if(e.byteLength!==void 0)return e.byteLength;if(e instanceof FormData)return am(e);if(e instanceof URLSearchParams)return vi(e.toString());if(typeof e=="string")return vi(e);rs.warn("unknown body type")}var om=new TextEncoder;function vi(e){return om.encode(e).byteLength}function am(e){var t,n,r=0;try{for(var i=tm(e.entries()),o=i.next();!o.done;o=i.next()){var a=em(o.value,2),u=a[0],c=a[1];r+=u.length,c instanceof Blob?r+=c.size:r+=c.length}}catch(s){t={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}var is="0.57.2",sm=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),um=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},cm=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},mi,lm=300,os=typeof process=="object"&&((mi=process.release)===null||mi===void 0?void 0:mi.name)==="node",pm=function(e){sm(t,e);function t(n){n===void 0&&(n={});var r=e.call(this,"@opentelemetry/instrumentation-fetch",is,n)||this;return r.component="fetch",r.version=is,r.moduleName=r.component,r._usedResources=new WeakSet,r._tasksCount=0,r}return t.prototype.init=function(){},t.prototype._addChildSpan=function(n,r){var i=this.tracer.startSpan("CORS Preflight",{startTime:r[O.FETCH_START]},U.setSpan(R.active(),n));me(i,r,this.getConfig().ignoreNetworkEvents),i.end(r[O.RESPONSE_END])},t.prototype._addFinalSpanAttributes=function(n,r){var i=bt(r.url);n.setAttribute(Wv,r.status),r.statusText!=null&&n.setAttribute(Bn.HTTP_STATUS_TEXT,r.statusText),n.setAttribute(Kv,i.host),n.setAttribute(Xv,i.protocol.replace(":","")),typeof navigator<"u"&&n.setAttribute(Yv,navigator.userAgent)},t.prototype._addHeaders=function(n,r){if(!es(r,this.getConfig().propagateTraceHeaderCorsUrls)){var i={};rt.inject(R.active(),i),Object.keys(i).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}if(n instanceof Request)rt.inject(R.active(),n.headers,{set:function(o,a,u){return o.set(a,typeof u=="string"?u:String(u))}});else if(n.headers instanceof Headers)rt.inject(R.active(),n.headers,{set:function(o,a,u){return o.set(a,typeof u=="string"?u:String(u))}});else if(n.headers instanceof Map)rt.inject(R.active(),n.headers,{set:function(o,a,u){return o.set(a,typeof u=="string"?u:String(u))}});else{var i={};rt.inject(R.active(),i),n.headers=Object.assign({},i,n.headers||{})}},t.prototype._clearResources=function(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(performance.clearResourceTimings(),this._usedResources=new WeakSet)},t.prototype._createSpan=function(n,r){var i;if(r===void 0&&(r={}),Ia(n,this.getConfig().ignoreUrls)){this._diag.debug("ignoring span as url matches ignored url");return}var o=(r.method||"GET").toUpperCase(),a="HTTP "+o;return this.tracer.startSpan(a,{kind:De.CLIENT,attributes:(i={},i[Bn.COMPONENT]=this.moduleName,i[qv]=o,i[zv]=n,i)})},t.prototype._findResourceAndAddNetworkEvents=function(n,r,i){var o=r.entries;if(!o.length){if(!performance.getEntriesByType)return;o=performance.getEntriesByType("resource")}var a=Za(r.spanUrl,r.startTime,i,o,this._usedResources,"fetch");if(a.mainRequest){var u=a.mainRequest;this._markResourceAsUsed(u);var c=a.corsPreFlightRequest;c&&(this._addChildSpan(n,c),this._markResourceAsUsed(c)),me(n,u,this.getConfig().ignoreNetworkEvents)}},t.prototype._markResourceAsUsed=function(n){this._usedResources.add(n)},t.prototype._endSpan=function(n,r,i){var o=this,a=ot(Date.now()),u=Ft();this._addFinalSpanAttributes(n,i),setTimeout(function(){var c;(c=r.observer)===null||c===void 0||c.disconnect(),o._findResourceAndAddNetworkEvents(n,r,u),o._tasksCount--,o._clearResources(),n.end(a)},lm)},t.prototype._patchConstructor=function(){var n=this;return function(r){var i=n;return function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var u=this,c=bt(o[0]instanceof Request?o[0].url:String(o[0])).href,s=o[0]instanceof Request?o[0]:o[1]||{},l=i._createSpan(c,s);if(!l)return r.apply(this,o);var p=i._prepareSpanData(c);i.getConfig().measureRequestSize&&nm.apply(void 0,cm([],um(o),!1)).then(function(g){g&&l.setAttribute(Jv,g)}).catch(function(g){i._diag.warn("getFetchBodyLength",g)});function f(g,b){i._applyAttributesAfterFetch(g,s,b),i._endSpan(g,p,{status:b.status||0,statusText:b.message,url:c})}function v(g,b){i._applyAttributesAfterFetch(g,s,b),b.status>=200&&b.status<400?i._endSpan(g,p,b):i._endSpan(g,p,{status:b.status,statusText:b.statusText,url:c})}function m(g,b,w){try{var I=w.clone(),M=w.clone(),j=I.body;if(j){var tt=j.getReader(),X=function(){tt.read().then(function(D){var wt=D.done;wt?v(g,M):X()},function(D){f(g,D)})};X()}else v(g,w)}finally{b(w)}}function y(g,b,w){try{f(g,w)}finally{b(w)}}return new Promise(function(g,b){return R.with(U.setSpan(R.active(),l),function(){return i._addHeaders(s,c),i._tasksCount++,r.apply(u,s instanceof Request?[s]:[c,s]).then(m.bind(u,l,g),y.bind(u,l,b))})})}}},t.prototype._applyAttributesAfterFetch=function(n,r,i){var o=this,a=this.getConfig().applyCustomAttributesOnSpan;a&&Dn(function(){return a(n,r,i)},function(u){u&&o._diag.error("applyCustomAttributesOnSpan",u)})},t.prototype._prepareSpanData=function(n){var r=Ft(),i=[];if(typeof PerformanceObserver!="function")return{entries:i,startTime:r,spanUrl:n};var o=new PerformanceObserver(function(a){var u=a.getEntries();u.forEach(function(c){c.initiatorType==="fetch"&&c.name===n&&i.push(c)})});return o.observe({entryTypes:["resource"]}),{entries:i,observer:o,startTime:r,spanUrl:n}},t.prototype.enable=function(){if(os){this._diag.warn("this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()");return}q(fetch)&&(this._unwrap(Me,"fetch"),this._diag.debug("removing previous patch for constructor")),this._wrap(Me,"fetch",this._patchConstructor())},t.prototype.disable=function(){os||(this._unwrap(Me,"fetch"),this._usedResources=new WeakSet)},t}(Ve),fm="http.method",hm="http.url",dm="http.host",vm="http.scheme",mm="http.status_code",ym="http.user_agent",gm="http.request_content_length_uncompressed",_m=fm,bm=hm,Em=dm,Tm=vm,wm=mm,Sm=ym,Om=gm,Et;(function(e){e.METHOD_OPEN="open",e.METHOD_SEND="send",e.EVENT_ABORT="abort",e.EVENT_ERROR="error",e.EVENT_LOAD="loaded",e.EVENT_TIMEOUT="timeout"})(Et||(Et={}));var Am=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},xm=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Cm=T.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-xml-http-request/utils"});function Lm(e){if(typeof Document<"u"&&e instanceof Document)return new XMLSerializer().serializeToString(document).length;if(e instanceof Blob)return e.size;if(e.byteLength!==void 0)return e.byteLength;if(e instanceof FormData)return Rm(e);if(e instanceof URLSearchParams)return as(e.toString());if(typeof e=="string")return as(e);Cm.warn("unknown body type")}var Nm=new TextEncoder;function as(e){return Nm.encode(e).byteLength}function Rm(e){var t,n,r=0;try{for(var i=Am(e.entries()),o=i.next();!o.done;o=i.next()){var a=xm(o.value,2),u=a[0],c=a[1];r+=u.length,c instanceof Blob?r+=c.size:r+=c.length}}catch(s){t={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}var ss="0.57.2",yi;(function(e){e.HTTP_STATUS_TEXT="http.status_text"})(yi||(yi={}));var Im=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Pm=300,km=function(e){Im(t,e);function t(n){n===void 0&&(n={});var r=e.call(this,"@opentelemetry/instrumentation-xml-http-request",ss,n)||this;return r.component="xml-http-request",r.version=ss,r.moduleName=r.component,r._tasksCount=0,r._xhrMem=new WeakMap,r._usedResources=new WeakSet,r}return t.prototype.init=function(){},t.prototype._addHeaders=function(n,r){var i=bt(r).href;if(!es(i,this.getConfig().propagateTraceHeaderCorsUrls)){var o={};rt.inject(R.active(),o),Object.keys(o).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}var a={};rt.inject(R.active(),a),Object.keys(a).forEach(function(u){n.setRequestHeader(u,String(a[u]))})},t.prototype._addChildSpan=function(n,r){var i=this;R.with(U.setSpan(R.active(),n),function(){var o=i.tracer.startSpan("CORS Preflight",{startTime:r[O.FETCH_START]});me(o,r,i.getConfig().ignoreNetworkEvents),o.end(r[O.RESPONSE_END])})},t.prototype._addFinalSpanAttributes=function(n,r,i){if(typeof i=="string"){var o=bt(i);r.status!==void 0&&n.setAttribute(wm,r.status),r.statusText!==void 0&&n.setAttribute(yi.HTTP_STATUS_TEXT,r.statusText),n.setAttribute(Em,o.host),n.setAttribute(Tm,o.protocol.replace(":","")),n.setAttribute(Sm,navigator.userAgent)}},t.prototype._applyAttributesAfterXHR=function(n,r){var i=this,o=this.getConfig().applyCustomAttributesOnSpan;typeof o=="function"&&Dn(function(){return o(n,r)},function(a){a&&i._diag.error("applyCustomAttributesOnSpan",a)})},t.prototype._addResourceObserver=function(n,r){var i=this._xhrMem.get(n);!i||typeof PerformanceObserver!="function"||typeof PerformanceResourceTiming!="function"||(i.createdResources={observer:new PerformanceObserver(function(o){var a=o.getEntries(),u=bt(r);a.forEach(function(c){c.initiatorType==="xmlhttprequest"&&c.name===u.href&&i.createdResources&&i.createdResources.entries.push(c)})}),entries:[]},i.createdResources.observer.observe({entryTypes:["resource"]}))},t.prototype._clearResources=function(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(it.clearResourceTimings(),this._xhrMem=new WeakMap,this._usedResources=new WeakSet)},t.prototype._findResourceAndAddNetworkEvents=function(n,r,i,o,a){if(!(!i||!o||!a||!n.createdResources)){var u=n.createdResources.entries;(!u||!u.length)&&(u=it.getEntriesByType("resource"));var c=Za(bt(i).href,o,a,u,this._usedResources);if(c.mainRequest){var s=c.mainRequest;this._markResourceAsUsed(s);var l=c.corsPreFlightRequest;l&&(this._addChildSpan(r,l),this._markResourceAsUsed(l)),me(r,s,this.getConfig().ignoreNetworkEvents)}}},t.prototype._cleanPreviousSpanInformation=function(n){var r=this._xhrMem.get(n);if(r){var i=r.callbackToRemoveEvents;i&&i(),this._xhrMem.delete(n)}},t.prototype._createSpan=function(n,r,i){var o;if(Ia(r,this.getConfig().ignoreUrls)){this._diag.debug("ignoring span as url matches ignored url");return}var a=i.toUpperCase(),u=this.tracer.startSpan(a,{kind:De.CLIENT,attributes:(o={},o[_m]=i,o[bm]=bt(r).toString(),o)});return u.addEvent(Et.METHOD_OPEN),this._cleanPreviousSpanInformation(n),this._xhrMem.set(n,{span:u,spanUrl:r}),u},t.prototype._markResourceAsUsed=function(n){this._usedResources.add(n)},t.prototype._patchOpen=function(){var n=this;return function(r){var i=n;return function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var u=o[0],c=o[1];return i._createSpan(this,c,u),r.apply(this,o)}}},t.prototype._patchSend=function(){var n=this;function r(l,p,f,v){var m=p.callbackToRemoveEvents;typeof m=="function"&&m();var y=p.span,g=p.spanUrl,b=p.sendStartTime;y&&(n._findResourceAndAddNetworkEvents(p,y,g,b,f),y.addEvent(l,v),n._addFinalSpanAttributes(y,p,g),y.end(v),n._tasksCount--),n._clearResources()}function i(l,p){var f=n._xhrMem.get(p);if(f){f.status=p.status,f.statusText=p.statusText,n._xhrMem.delete(p),f.span&&n._applyAttributesAfterXHR(f.span,p);var v=Ft(),m=Date.now();setTimeout(function(){r(l,f,v,m)},Pm)}}function o(){i(Et.EVENT_ERROR,this)}function a(){i(Et.EVENT_ABORT,this)}function u(){i(Et.EVENT_TIMEOUT,this)}function c(){this.status<299?i(Et.EVENT_LOAD,this):i(Et.EVENT_ERROR,this)}function s(l){l.removeEventListener("abort",a),l.removeEventListener("error",o),l.removeEventListener("load",c),l.removeEventListener("timeout",u);var p=n._xhrMem.get(l);p&&(p.callbackToRemoveEvents=void 0)}return function(l){return function(){for(var p=this,f=[],v=0;v<arguments.length;v++)f[v]=arguments[v];var m=n._xhrMem.get(this);if(!m)return l.apply(this,f);var y=m.span,g=m.spanUrl;if(y&&g){if(n.getConfig().measureRequestSize&&f!=null&&f[0]){var b=f[0],w=Lm(b);w!==void 0&&y.setAttribute(Om,w)}R.with(U.setSpan(R.active(),y),function(){n._tasksCount++,m.sendStartTime=Ft(),y.addEvent(Et.METHOD_SEND),p.addEventListener("abort",a),p.addEventListener("error",o),p.addEventListener("load",c),p.addEventListener("timeout",u),m.callbackToRemoveEvents=function(){s(p),m.createdResources&&m.createdResources.observer.disconnect()},n._addHeaders(p,g),n._addResourceObserver(p,g)})}return l.apply(this,f)}}},t.prototype.enable=function(){this._diag.debug("applying patch to",this.moduleName,this.version),q(XMLHttpRequest.prototype.open)&&(this._unwrap(XMLHttpRequest.prototype,"open"),this._diag.debug("removing previous patch from method open")),q(XMLHttpRequest.prototype.send)&&(this._unwrap(XMLHttpRequest.prototype,"send"),this._diag.debug("removing previous patch from method send")),this._wrap(XMLHttpRequest.prototype,"open",this._patchOpen()),this._wrap(XMLHttpRequest.prototype,"send",this._patchSend())},t.prototype.disable=function(){this._diag.debug("removing patch from",this.moduleName,this.version),this._unwrap(XMLHttpRequest.prototype,"open"),this._unwrap(XMLHttpRequest.prototype,"send"),this._tasksCount=0,this._xhrMem=new WeakMap,this._usedResources=new WeakSet},t}(Ve);const gi=(e,t,n)=>{var r,i;const o=C({},t);return n?((r=Object.keys(o))==null||r.forEach(a=>{[...n].includes(a?.toLowerCase())||(o[a]="[REDACTED]")}),o):((i=Object.keys(o))==null||i.forEach(a=>{[...Dm,...e].includes(a?.toLowerCase())&&(o[a]="[REDACTED]")}),o)},Dm=["authorization","cookie","proxy-authorization","set-cookie","token"],Mm=["https://www.googleapis.com/identitytoolkit","https://securetoken.googleapis.com"],Um=["awsaccesskeyid","signature","sig","x-goog-signature"],us=e=>{var t,n;try{return new URL(e)}catch{return new URL(e,(n=(t=globalThis.location)==null?void 0:t.origin)!=null?n:"http://example.com")}},_i=e=>{try{const t=us(e);(t.username||t.password)&&(t.username="REDACTED",t.password="REDACTED");const n=t.searchParams;if(Um.forEach(r=>{for(const i of Array.from(n.keys()))i.toLowerCase()===r&&n.set(i,"REDACTED")}),!e.includes("://")&&!e.startsWith("//"))return t.pathname+t.search+t.hash;if(e.startsWith("//")){let r="//";return(t.username||t.password)&&(r+=t.username+":"+t.password+"@"),r+=t.host+t.pathname+t.search+t.hash,r}return t.toString()}catch{return e}},$m=new RegExp("sdk\\/evalx\\/[^/]+\\/contexts\\/(?<context>[^/?]*)\\??.*?"),jm=new RegExp("\\/eval\\/[^/]+\\/(?<context>[^/?]*)\\??.*?");function Bm(e){return!!(e.includes("/sdk/evalx")&&e.match($m)||e.includes("/eval/")&&e.match(jm))}const Fm=e=>["events.ld.catamorphic.com","events.launchdarkly.com"].some(t=>e.toLocaleLowerCase().includes(t)),Vm=e=>Bm(e),Hm=(e,t)=>t.some(n=>e.toLocaleLowerCase().includes(n)),Gm=(e,t,n)=>!Hm(e,t)&&!Vm(e)&&!Fm(e),qm=(e,t,n)=>{var r;if(n.some(u=>e.toLowerCase().includes(u)))return!1;let i=[];t===!0?(i=["localhost",/^\//],(r=window?.location)!=null&&r.host&&i.push(cs(window.location.host))):t instanceof Array&&(i=t);const o=Km(e);let a=!1;return i.forEach(u=>{o.match(u)&&(a=!0)}),a},zm=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),cs=e=>new RegExp("^https?://([^/]+\\.)?"+zm(e)+"([:/?#]|$)"),Km=e=>{if(e.startsWith("/")&&!e.startsWith("//"))return e;try{return new URL(e).origin}catch{return e}},ls=64*1024,Xm={"application/json":64*1024*1024,"text/plain":64*1024*1024},bi=(e,t,n,r)=>{var i,o,a;let u=ls;if(r){let c="";typeof r.get=="function"?c=(i=r.get("content-type"))!=null?i:"":c=(o=r["content-type"])!=null?o:"";try{c=c.split(";")[0]}catch{}u=(a=Xm[c])!=null?a:ls}if(e){if(t)try{const c=JSON.parse(e);Array.isArray(c)?c.forEach(s=>{Object.keys(s).forEach(l=>{t.includes(l.toLocaleLowerCase())&&(s[l]="[REDACTED]")})}):Object.keys(c).forEach(s=>{t.includes(s.toLocaleLowerCase())&&(c[s]="[REDACTED]")}),e=JSON.stringify(c)}catch{}if(n)try{const c=JSON.parse(e);Object.keys(c).forEach(s=>{n.includes(s.toLocaleLowerCase())||(c[s]="[REDACTED]")}),e=JSON.stringify(c)}catch{}}try{e=e.slice(0,u)}catch{}return e},Wm=(e,t,n)=>lt(void 0,null,function*(){let r;try{const i=e.clone().body;if(i){let o=i.getReader(),a=new TextDecoder,u,c="";for(;!(u=yield o.read()).done;){let s=u.value;c+=a.decode(s)}r=c,r=bi(r,n,t,e.headers)}else r=""}catch(i){r=`Unable to clone response: ${i}`}return r});var ps=function(){function e(t){this._delegate=t}return e.prototype.export=function(t,n){this._delegate.export(t,n)},e.prototype.forceFlush=function(){return this._delegate.forceFlush()},e.prototype.shutdown=function(){return this._delegate.shutdown()},e}(),Ym=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),fs=function(e){Ym(t,e);function t(n,r,i){var o=e.call(this,n)||this;return o.name="OTLPExporterError",o.data=i,o.code=r,o}return t}(Error);function Jm(e){if(!Number.isNaN(e)&&Number.isFinite(e)&&e>0)return e;throw new Error("Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '"+e+"')")}function Qm(e){if(e!=null)return function(){return e}}function Zm(e,t,n){var r,i,o,a,u,c;return{timeoutMillis:Jm((i=(r=e.timeoutMillis)!==null&&r!==void 0?r:t.timeoutMillis)!==null&&i!==void 0?i:n.timeoutMillis),concurrencyLimit:(a=(o=e.concurrencyLimit)!==null&&o!==void 0?o:t.concurrencyLimit)!==null&&a!==void 0?a:n.concurrencyLimit,compression:(c=(u=e.compression)!==null&&u!==void 0?u:t.compression)!==null&&c!==void 0?c:n.compression}}function ty(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}var ey=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},ny=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},ry=function(){function e(t){this._sendingPromises=[],this._concurrencyLimit=t}return e.prototype.pushPromise=function(t){var n=this;if(this.hasReachedLimit())throw new Error("Concurrency Limit reached");this._sendingPromises.push(t);var r=function(){var i=n._sendingPromises.indexOf(t);n._sendingPromises.splice(i,1)};t.then(r,r)},e.prototype.hasReachedLimit=function(){return this._sendingPromises.length>=this._concurrencyLimit},e.prototype.awaitAll=function(){return ey(this,void 0,void 0,function(){return ny(this,function(t){switch(t.label){case 0:return[4,Promise.all(this._sendingPromises)];case 1:return t.sent(),[2]}})})},e}();function iy(e){return new ry(e.concurrencyLimit)}function oy(e){return Object.prototype.hasOwnProperty.call(e,"partialSuccess")}function ay(){return{handleResponse:function(e){e==null||!oy(e)||e.partialSuccess==null||Object.keys(e.partialSuccess).length===0||T.warn("Received Partial Success response:",JSON.stringify(e.partialSuccess))}}}var sy=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},uy=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},cy=function(){function e(t,n,r,i,o){this._transport=t,this._serializer=n,this._responseHandler=r,this._promiseQueue=i,this._timeout=o,this._diagLogger=T.createComponentLogger({namespace:"OTLPExportDelegate"})}return e.prototype.export=function(t,n){var r=this;if(this._diagLogger.debug("items to be sent",t),this._promiseQueue.hasReachedLimit()){n({code:$.FAILED,error:new Error("Concurrent export limit reached")});return}var i=this._serializer.serializeRequest(t);if(i==null){n({code:$.FAILED,error:new Error("Nothing to send")});return}this._promiseQueue.pushPromise(this._transport.send(i,this._timeout).then(function(o){if(o.status==="success"){if(o.data!=null)try{r._responseHandler.handleResponse(r._serializer.deserializeResponse(o.data))}catch(a){r._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?",a,o.data)}n({code:$.SUCCESS});return}else if(o.status==="failure"&&o.error){n({code:$.FAILED,error:o.error});return}else o.status==="retryable"?n({code:$.FAILED,error:new fs("Export failed with retryable status")}):n({code:$.FAILED,error:new fs("Export failed with unknown error")})},function(o){return n({code:$.FAILED,error:o})}))},e.prototype.forceFlush=function(){return this._promiseQueue.awaitAll()},e.prototype.shutdown=function(){return sy(this,void 0,void 0,function(){return uy(this,function(t){switch(t.label){case 0:return this._diagLogger.debug("shutdown started"),[4,this.forceFlush()];case 1:return t.sent(),this._transport.shutdown(),[2]}})})},e}();function ly(e,t){return new cy(e.transport,e.serializer,ay(),e.promiseHandler,t.timeout)}function hs(e,t,n){return ly({transport:n,serializer:t,promiseHandler:iy(e)},{timeout:e.timeoutMillis})}function ds(e){var t=BigInt(1e9);return BigInt(e[0])*t+BigInt(e[1])}function py(e){var t=Number(BigInt.asUintN(32,e)),n=Number(BigInt.asUintN(32,e>>BigInt(32)));return{low:t,high:n}}function vs(e){var t=ds(e);return py(t)}function fy(e){var t=ds(e);return t.toString()}var hy=typeof BigInt<"u"?fy:_t;function ms(e){return e}function ys(e){if(e!==void 0)return ei(e)}var dy={encodeHrTime:vs,encodeSpanContext:ei,encodeOptionalSpanContext:ys};function gs(e){var t,n;if(e===void 0)return dy;var r=(t=e.useLongBits)!==null&&t!==void 0?t:!0,i=(n=e.useHex)!==null&&n!==void 0?n:!1;return{encodeHrTime:r?vs:hy,encodeSpanContext:i?ms:ei,encodeOptionalSpanContext:i?ms:ys}}var vy=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function _s(e){return{attributes:Gt(e.attributes),droppedAttributesCount:0}}function bs(e){return{name:e.name,version:e.version}}function Gt(e){return Object.keys(e).map(function(t){return Es(t,e[t])})}function Es(e,t){return{key:e,value:Ts(t)}}function Ts(e){var t=typeof e;return t==="string"?{stringValue:e}:t==="number"?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:t==="boolean"?{boolValue:e}:e instanceof Uint8Array?{bytesValue:e}:Array.isArray(e)?{arrayValue:{values:e.map(Ts)}}:t==="object"&&e!=null?{kvlistValue:{values:Object.entries(e).map(function(n){var r=vy(n,2),i=r[0],o=r[1];return Es(i,o)})}}:{}}var pt;(function(e){e[e.DELTA=0]="DELTA",e[e.CUMULATIVE=1]="CUMULATIVE"})(pt||(pt={}));var dt;(function(e){e[e.HISTOGRAM=0]="HISTOGRAM",e[e.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",e[e.GAUGE=2]="GAUGE",e[e.SUM=3]="SUM"})(dt||(dt={}));var my=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),ws=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},Ss=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},yy=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},gy=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},_y=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function by(e){return e!=null}function Os(e){var t=Object.keys(e);return t.length===0?"":(t=t.sort(),JSON.stringify(t.map(function(n){return[n,e[n]]})))}function Ey(e){var t,n;return e.name+":"+((t=e.version)!==null&&t!==void 0?t:"")+":"+((n=e.schemaUrl)!==null&&n!==void 0?n:"")}var As=function(e){my(t,e);function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return t}(Error);function qe(e,t){var n,r=new Promise(function(i,o){n=setTimeout(function(){o(new As("Operation timed out."))},t)});return Promise.race([e,r]).then(function(i){return clearTimeout(n),i},function(i){throw clearTimeout(n),i})}function Ty(e){return ws(this,void 0,void 0,function(){var t=this;return Ss(this,function(n){return[2,Promise.all(e.map(function(r){return ws(t,void 0,void 0,function(){var i,o;return Ss(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,r];case 1:return i=a.sent(),[2,{status:"fulfilled",value:i}];case 2:return o=a.sent(),[2,{status:"rejected",reason:o}];case 3:return[2]}})})}))]})})}function wy(e){return e.status==="rejected"}function xs(e,t){var n=[];return e.forEach(function(r){n.push.apply(n,gy([],yy(t(r)),!1))}),n}function Sy(e,t){var n,r;if(e.size!==t.size)return!1;try{for(var i=_y(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(!t.has(a))return!1}}catch(u){n={error:u}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!0}function Oy(e,t){for(var n=0,r=e.length-1,i=e.length;r>=n;){var o=n+Math.trunc((r-n)/2);e[o]<t?n=o+1:(i=o,r=o-1)}return i}function Ay(e,t){return e.toLowerCase()===t.toLowerCase()}var qt;(function(e){e[e.DROP=0]="DROP",e[e.SUM=1]="SUM",e[e.LAST_VALUE=2]="LAST_VALUE",e[e.HISTOGRAM=3]="HISTOGRAM",e[e.EXPONENTIAL_HISTOGRAM=4]="EXPONENTIAL_HISTOGRAM"})(qt||(qt={}));var xy=function(){function e(){this.kind=qt.DROP}return e.prototype.createAccumulation=function(){},e.prototype.merge=function(t,n){},e.prototype.diff=function(t,n){},e.prototype.toMetricData=function(t,n,r,i){},e}(),A;(function(e){e.COUNTER="COUNTER",e.GAUGE="GAUGE",e.HISTOGRAM="HISTOGRAM",e.UP_DOWN_COUNTER="UP_DOWN_COUNTER",e.OBSERVABLE_COUNTER="OBSERVABLE_COUNTER",e.OBSERVABLE_GAUGE="OBSERVABLE_GAUGE",e.OBSERVABLE_UP_DOWN_COUNTER="OBSERVABLE_UP_DOWN_COUNTER"})(A||(A={}));function It(e,t,n){var r,i,o,a;return Ry(e)||T.warn('Invalid metric name: "'+e+'". The metric name should be a ASCII string with a length no greater than 255 characters.'),{name:e,type:t,description:(r=n?.description)!==null&&r!==void 0?r:"",unit:(i=n?.unit)!==null&&i!==void 0?i:"",valueType:(o=n?.valueType)!==null&&o!==void 0?o:Ct.DOUBLE,advice:(a=n?.advice)!==null&&a!==void 0?a:{}}}function Cy(e,t){var n,r;return{name:(n=e.name)!==null&&n!==void 0?n:t.name,description:(r=e.description)!==null&&r!==void 0?r:t.description,type:t.type,unit:t.unit,valueType:t.valueType,advice:t.advice}}function Ly(e,t){return Ay(e.name,t.name)&&e.unit===t.unit&&e.type===t.type&&e.valueType===t.valueType}var Ny=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function Ry(e){return e.match(Ny)!=null}var Iy=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function Py(e){var t=e.map(function(){return 0});return t.push(0),{buckets:{boundaries:e,counts:t},sum:0,count:0,hasMinMax:!1,min:1/0,max:-1/0}}var Ei=function(){function e(t,n,r,i){r===void 0&&(r=!0),i===void 0&&(i=Py(n)),this.startTime=t,this._boundaries=n,this._recordMinMax=r,this._current=i}return e.prototype.record=function(t){if(!Number.isNaN(t)){this._current.count+=1,this._current.sum+=t,this._recordMinMax&&(this._current.min=Math.min(t,this._current.min),this._current.max=Math.max(t,this._current.max),this._current.hasMinMax=!0);var n=Oy(this._boundaries,t);this._current.buckets.counts[n]+=1}},e.prototype.setStartTime=function(t){this.startTime=t},e.prototype.toPointValue=function(){return this._current},e}(),Cs=function(){function e(t,n){this._boundaries=t,this._recordMinMax=n,this.kind=qt.HISTOGRAM}return e.prototype.createAccumulation=function(t){return new Ei(t,this._boundaries,this._recordMinMax)},e.prototype.merge=function(t,n){for(var r=t.toPointValue(),i=n.toPointValue(),o=r.buckets.counts,a=i.buckets.counts,u=new Array(o.length),c=0;c<o.length;c++)u[c]=o[c]+a[c];var s=1/0,l=-1/0;return this._recordMinMax&&(r.hasMinMax&&i.hasMinMax?(s=Math.min(r.min,i.min),l=Math.max(r.max,i.max)):r.hasMinMax?(s=r.min,l=r.max):i.hasMinMax&&(s=i.min,l=i.max)),new Ei(t.startTime,r.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:r.buckets.boundaries,counts:u},count:r.count+i.count,sum:r.sum+i.sum,hasMinMax:this._recordMinMax&&(r.hasMinMax||i.hasMinMax),min:s,max:l})},e.prototype.diff=function(t,n){for(var r=t.toPointValue(),i=n.toPointValue(),o=r.buckets.counts,a=i.buckets.counts,u=new Array(o.length),c=0;c<o.length;c++)u[c]=a[c]-o[c];return new Ei(n.startTime,r.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:r.buckets.boundaries,counts:u},count:i.count-r.count,sum:i.sum-r.sum,hasMinMax:!1,min:1/0,max:-1/0})},e.prototype.toMetricData=function(t,n,r,i){return{descriptor:t,aggregationTemporality:n,dataPointType:dt.HISTOGRAM,dataPoints:r.map(function(o){var a=Iy(o,2),u=a[0],c=a[1],s=c.toPointValue(),l=t.type===A.GAUGE||t.type===A.UP_DOWN_COUNTER||t.type===A.OBSERVABLE_GAUGE||t.type===A.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:u,startTime:c.startTime,endTime:i,value:{min:s.hasMinMax?s.min:void 0,max:s.hasMinMax?s.max:void 0,sum:l?void 0:s.sum,buckets:s.buckets,count:s.count}}})}},e}(),Ti=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},wi=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},Ls=function(){function e(t,n,r,i){t===void 0&&(t=new ky),n===void 0&&(n=0),r===void 0&&(r=0),i===void 0&&(i=0),this.backing=t,this.indexBase=n,this.indexStart=r,this.indexEnd=i}return Object.defineProperty(e.prototype,"offset",{get:function(){return this.indexStart},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this.backing.length===0||this.indexEnd===this.indexStart&&this.at(0)===0?0:this.indexEnd-this.indexStart+1},enumerable:!1,configurable:!0}),e.prototype.counts=function(){var t=this;return Array.from({length:this.length},function(n,r){return t.at(r)})},e.prototype.at=function(t){var n=this.indexBase-this.indexStart;return t<n&&(t+=this.backing.length),t-=n,this.backing.countAt(t)},e.prototype.incrementBucket=function(t,n){this.backing.increment(t,n)},e.prototype.decrementBucket=function(t,n){this.backing.decrement(t,n)},e.prototype.trim=function(){for(var t=0;t<this.length;t++)if(this.at(t)!==0){this.indexStart+=t;break}else if(t===this.length-1){this.indexStart=this.indexEnd=this.indexBase=0;return}for(var t=this.length-1;t>=0;t--)if(this.at(t)!==0){this.indexEnd-=this.length-t-1;break}this._rotate()},e.prototype.downscale=function(t){this._rotate();for(var n=1+this.indexEnd-this.indexStart,r=1<<t,i=0,o=0,a=this.indexStart;a<=this.indexEnd;){var u=a%r;u<0&&(u+=r);for(var c=u;c<r&&i<n;c++)this._relocateBucket(o,i),i++,a++;o++}this.indexStart>>=t,this.indexEnd>>=t,this.indexBase=this.indexStart},e.prototype.clone=function(){return new e(this.backing.clone(),this.indexBase,this.indexStart,this.indexEnd)},e.prototype._rotate=function(){var t=this.indexBase-this.indexStart;t!==0&&(t>0?(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,t),this.backing.reverse(t,this.backing.length)):(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,this.backing.length+t)),this.indexBase=this.indexStart)},e.prototype._relocateBucket=function(t,n){t!==n&&this.incrementBucket(t,this.backing.emptyBucket(n))},e}(),ky=function(){function e(t){t===void 0&&(t=[0]),this._counts=t}return Object.defineProperty(e.prototype,"length",{get:function(){return this._counts.length},enumerable:!1,configurable:!0}),e.prototype.countAt=function(t){return this._counts[t]},e.prototype.growTo=function(t,n,r){var i=new Array(t).fill(0);i.splice.apply(i,wi([r,this._counts.length-n],Ti(this._counts.slice(n)),!1)),i.splice.apply(i,wi([0,n],Ti(this._counts.slice(0,n)),!1)),this._counts=i},e.prototype.reverse=function(t,n){for(var r=Math.floor((t+n)/2)-t,i=0;i<r;i++){var o=this._counts[t+i];this._counts[t+i]=this._counts[n-i-1],this._counts[n-i-1]=o}},e.prototype.emptyBucket=function(t){var n=this._counts[t];return this._counts[t]=0,n},e.prototype.increment=function(t,n){this._counts[t]+=n},e.prototype.decrement=function(t,n){this._counts[t]>=n?this._counts[t]-=n:this._counts[t]=0},e.prototype.clone=function(){return new e(wi([],Ti(this._counts),!1))},e}(),Dy=52,My=2146435072,Uy=1048575,Si=1023,Ns=-Si+1,Rs=Si,Oi=Math.pow(2,-1022);function Is(e){var t=new DataView(new ArrayBuffer(8));t.setFloat64(0,e);var n=t.getUint32(0),r=(n&My)>>20;return r-Si}function Ps(e){var t=new DataView(new ArrayBuffer(8));t.setFloat64(0,e);var n=t.getUint32(0),r=t.getUint32(4),i=(n&Uy)*Math.pow(2,32);return i+r}function Ai(e,t){return e===0||e===Number.POSITIVE_INFINITY||e===Number.NEGATIVE_INFINITY||Number.isNaN(e)?e:e*Math.pow(2,t)}function $y(e){return e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,e++,e}var jy=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),ze=function(e){jy(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Error),By=function(){function e(t){this._shift=-t}return e.prototype.mapToIndex=function(t){if(t<Oi)return this._minNormalLowerBoundaryIndex();var n=Is(t),r=this._rightShift(Ps(t)-1,Dy);return n+r>>this._shift},e.prototype.lowerBoundary=function(t){var n=this._minNormalLowerBoundaryIndex();if(t<n)throw new ze("underflow: "+t+" is < minimum lower boundary: "+n);var r=this._maxNormalLowerBoundaryIndex();if(t>r)throw new ze("overflow: "+t+" is > maximum lower boundary: "+r);return Ai(1,t<<this._shift)},Object.defineProperty(e.prototype,"scale",{get:function(){return this._shift===0?0:-this._shift},enumerable:!1,configurable:!0}),e.prototype._minNormalLowerBoundaryIndex=function(){var t=Ns>>this._shift;return this._shift<2&&t--,t},e.prototype._maxNormalLowerBoundaryIndex=function(){return Rs>>this._shift},e.prototype._rightShift=function(t,n){return Math.floor(t*Math.pow(2,-n))},e}(),Fy=function(){function e(t){this._scale=t,this._scaleFactor=Ai(Math.LOG2E,t),this._inverseFactor=Ai(Math.LN2,-t)}return e.prototype.mapToIndex=function(t){if(t<=Oi)return this._minNormalLowerBoundaryIndex()-1;if(Ps(t)===0){var n=Is(t);return(n<<this._scale)-1}var r=Math.floor(Math.log(t)*this._scaleFactor),i=this._maxNormalLowerBoundaryIndex();return r>=i?i:r},e.prototype.lowerBoundary=function(t){var n=this._maxNormalLowerBoundaryIndex();if(t>=n){if(t===n)return 2*Math.exp((t-(1<<this._scale))/this._scaleFactor);throw new ze("overflow: "+t+" is > maximum lower boundary: "+n)}var r=this._minNormalLowerBoundaryIndex();if(t<=r){if(t===r)return Oi;if(t===r-1)return Math.exp((t+(1<<this._scale))/this._scaleFactor)/2;throw new ze("overflow: "+t+" is < minimum lower boundary: "+r)}return Math.exp(t*this._inverseFactor)},Object.defineProperty(e.prototype,"scale",{get:function(){return this._scale},enumerable:!1,configurable:!0}),e.prototype._minNormalLowerBoundaryIndex=function(){return Ns<<this._scale},e.prototype._maxNormalLowerBoundaryIndex=function(){return(Rs+1<<this._scale)-1},e}(),ks=-10,Ds=20,Vy=Array.from({length:31},function(e,t){return t>10?new Fy(t-10):new By(t-10)});function Ms(e){if(e>Ds||e<ks)throw new ze("expected scale >= "+ks+" && <= "+Ds+", got: "+e);return Vy[e+10]}var Hy=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Fn=function(){function e(t,n){this.low=t,this.high=n}return e.combine=function(t,n){return new e(Math.min(t.low,n.low),Math.max(t.high,n.high))},e}(),Gy=20,qy=160,xi=2,zy=function(){function e(t,n,r,i,o,a,u,c,s,l,p){t===void 0&&(t=t),n===void 0&&(n=qy),r===void 0&&(r=!0),i===void 0&&(i=0),o===void 0&&(o=0),a===void 0&&(a=0),u===void 0&&(u=Number.POSITIVE_INFINITY),c===void 0&&(c=Number.NEGATIVE_INFINITY),s===void 0&&(s=new Ls),l===void 0&&(l=new Ls),p===void 0&&(p=Ms(Gy)),this.startTime=t,this._maxSize=n,this._recordMinMax=r,this._sum=i,this._count=o,this._zeroCount=a,this._min=u,this._max=c,this._positive=s,this._negative=l,this._mapping=p,this._maxSize<xi&&(T.warn("Exponential Histogram Max Size set to "+this._maxSize+", changing to the minimum size of: "+xi),this._maxSize=xi)}return e.prototype.record=function(t){this.updateByIncrement(t,1)},e.prototype.setStartTime=function(t){this.startTime=t},e.prototype.toPointValue=function(){return{hasMinMax:this._recordMinMax,min:this.min,max:this.max,sum:this.sum,positive:{offset:this.positive.offset,bucketCounts:this.positive.counts()},negative:{offset:this.negative.offset,bucketCounts:this.negative.counts()},count:this.count,scale:this.scale,zeroCount:this.zeroCount}},Object.defineProperty(e.prototype,"sum",{get:function(){return this._sum},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"min",{get:function(){return this._min},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return this._max},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zeroCount",{get:function(){return this._zeroCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scale",{get:function(){return this._count===this._zeroCount?0:this._mapping.scale},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"positive",{get:function(){return this._positive},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"negative",{get:function(){return this._negative},enumerable:!1,configurable:!0}),e.prototype.updateByIncrement=function(t,n){if(!Number.isNaN(t)){if(t>this._max&&(this._max=t),t<this._min&&(this._min=t),this._count+=n,t===0){this._zeroCount+=n;return}this._sum+=t*n,t>0?this._updateBuckets(this._positive,t,n):this._updateBuckets(this._negative,-t,n)}},e.prototype.merge=function(t){this._count===0?(this._min=t.min,this._max=t.max):t.count!==0&&(t.min<this.min&&(this._min=t.min),t.max>this.max&&(this._max=t.max)),this.startTime=t.startTime,this._sum+=t.sum,this._count+=t.count,this._zeroCount+=t.zeroCount;var n=this._minScale(t);this._downscale(this.scale-n),this._mergeBuckets(this.positive,t,t.positive,n),this._mergeBuckets(this.negative,t,t.negative,n)},e.prototype.diff=function(t){this._min=1/0,this._max=-1/0,this._sum-=t.sum,this._count-=t.count,this._zeroCount-=t.zeroCount;var n=this._minScale(t);this._downscale(this.scale-n),this._diffBuckets(this.positive,t,t.positive,n),this._diffBuckets(this.negative,t,t.negative,n)},e.prototype.clone=function(){return new e(this.startTime,this._maxSize,this._recordMinMax,this._sum,this._count,this._zeroCount,this._min,this._max,this.positive.clone(),this.negative.clone(),this._mapping)},e.prototype._updateBuckets=function(t,n,r){var i=this._mapping.mapToIndex(n),o=!1,a=0,u=0;if(t.length===0?(t.indexStart=i,t.indexEnd=t.indexStart,t.indexBase=t.indexStart):i<t.indexStart&&t.indexEnd-i>=this._maxSize?(o=!0,u=i,a=t.indexEnd):i>t.indexEnd&&i-t.indexStart>=this._maxSize&&(o=!0,u=t.indexStart,a=i),o){var c=this._changeScale(a,u);this._downscale(c),i=this._mapping.mapToIndex(n)}this._incrementIndexBy(t,i,r)},e.prototype._incrementIndexBy=function(t,n,r){if(r!==0){if(t.length===0&&(t.indexStart=t.indexEnd=t.indexBase=n),n<t.indexStart){var i=t.indexEnd-n;i>=t.backing.length&&this._grow(t,i+1),t.indexStart=n}else if(n>t.indexEnd){var i=n-t.indexStart;i>=t.backing.length&&this._grow(t,i+1),t.indexEnd=n}var o=n-t.indexBase;o<0&&(o+=t.backing.length),t.incrementBucket(o,r)}},e.prototype._grow=function(t,n){var r=t.backing.length,i=t.indexBase-t.indexStart,o=r-i,a=$y(n);a>this._maxSize&&(a=this._maxSize);var u=a-i;t.backing.growTo(a,o,u)},e.prototype._changeScale=function(t,n){for(var r=0;t-n>=this._maxSize;)t>>=1,n>>=1,r++;return r},e.prototype._downscale=function(t){if(t!==0){if(t<0)throw new Error("impossible change of scale: "+this.scale);var n=this._mapping.scale-t;this._positive.downscale(t),this._negative.downscale(t),this._mapping=Ms(n)}},e.prototype._minScale=function(t){var n=Math.min(this.scale,t.scale),r=Fn.combine(this._highLowAtScale(this.positive,this.scale,n),this._highLowAtScale(t.positive,t.scale,n)),i=Fn.combine(this._highLowAtScale(this.negative,this.scale,n),this._highLowAtScale(t.negative,t.scale,n));return Math.min(n-this._changeScale(r.high,r.low),n-this._changeScale(i.high,i.low))},e.prototype._highLowAtScale=function(t,n,r){if(t.length===0)return new Fn(0,-1);var i=n-r;return new Fn(t.indexStart>>i,t.indexEnd>>i)},e.prototype._mergeBuckets=function(t,n,r,i){for(var o=r.offset,a=n.scale-i,u=0;u<r.length;u++)this._incrementIndexBy(t,o+u>>a,r.at(u))},e.prototype._diffBuckets=function(t,n,r,i){for(var o=r.offset,a=n.scale-i,u=0;u<r.length;u++){var c=o+u>>a,s=c-t.indexBase;s<0&&(s+=t.backing.length),t.decrementBucket(s,r.at(u))}t.trim()},e}(),Ky=function(){function e(t,n){this._maxSize=t,this._recordMinMax=n,this.kind=qt.EXPONENTIAL_HISTOGRAM}return e.prototype.createAccumulation=function(t){return new zy(t,this._maxSize,this._recordMinMax)},e.prototype.merge=function(t,n){var r=n.clone();return r.merge(t),r},e.prototype.diff=function(t,n){var r=n.clone();return r.diff(t),r},e.prototype.toMetricData=function(t,n,r,i){return{descriptor:t,aggregationTemporality:n,dataPointType:dt.EXPONENTIAL_HISTOGRAM,dataPoints:r.map(function(o){var a=Hy(o,2),u=a[0],c=a[1],s=c.toPointValue(),l=t.type===A.GAUGE||t.type===A.UP_DOWN_COUNTER||t.type===A.OBSERVABLE_GAUGE||t.type===A.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:u,startTime:c.startTime,endTime:i,value:{min:s.hasMinMax?s.min:void 0,max:s.hasMinMax?s.max:void 0,sum:l?void 0:s.sum,positive:{offset:s.positive.offset,bucketCounts:s.positive.bucketCounts},negative:{offset:s.negative.offset,bucketCounts:s.negative.bucketCounts},count:s.count,scale:s.scale,zeroCount:s.zeroCount}}})}},e}(),Xy=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Ci=function(){function e(t,n,r){n===void 0&&(n=0),r===void 0&&(r=[0,0]),this.startTime=t,this._current=n,this.sampleTime=r}return e.prototype.record=function(t){this._current=t,this.sampleTime=ot(Date.now())},e.prototype.setStartTime=function(t){this.startTime=t},e.prototype.toPointValue=function(){return this._current},e}(),Wy=function(){function e(){this.kind=qt.LAST_VALUE}return e.prototype.createAccumulation=function(t){return new Ci(t)},e.prototype.merge=function(t,n){var r=Ln(n.sampleTime)>=Ln(t.sampleTime)?n:t;return new Ci(t.startTime,r.toPointValue(),r.sampleTime)},e.prototype.diff=function(t,n){var r=Ln(n.sampleTime)>=Ln(t.sampleTime)?n:t;return new Ci(n.startTime,r.toPointValue(),r.sampleTime)},e.prototype.toMetricData=function(t,n,r,i){return{descriptor:t,aggregationTemporality:n,dataPointType:dt.GAUGE,dataPoints:r.map(function(o){var a=Xy(o,2),u=a[0],c=a[1];return{attributes:u,startTime:c.startTime,endTime:i,value:c.toPointValue()}})}},e}(),Yy=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Ke=function(){function e(t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1),this.startTime=t,this.monotonic=n,this._current=r,this.reset=i}return e.prototype.record=function(t){this.monotonic&&t<0||(this._current+=t)},e.prototype.setStartTime=function(t){this.startTime=t},e.prototype.toPointValue=function(){return this._current},e}(),Us=function(){function e(t){this.monotonic=t,this.kind=qt.SUM}return e.prototype.createAccumulation=function(t){return new Ke(t,this.monotonic)},e.prototype.merge=function(t,n){var r=t.toPointValue(),i=n.toPointValue();return n.reset?new Ke(n.startTime,this.monotonic,i,n.reset):new Ke(t.startTime,this.monotonic,r+i)},e.prototype.diff=function(t,n){var r=t.toPointValue(),i=n.toPointValue();return this.monotonic&&r>i?new Ke(n.startTime,this.monotonic,i,!0):new Ke(n.startTime,this.monotonic,i-r)},e.prototype.toMetricData=function(t,n,r,i){return{descriptor:t,aggregationTemporality:n,dataPointType:dt.SUM,dataPoints:r.map(function(o){var a=Yy(o,2),u=a[0],c=a[1];return{attributes:u,startTime:c.startTime,endTime:i,value:c.toPointValue()}}),isMonotonic:this.monotonic}},e}(),zt=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Tt=function(){function e(){}return e.Drop=function(){return $s},e.Sum=function(){return js},e.LastValue=function(){return Bs},e.Histogram=function(){return Fs},e.ExponentialHistogram=function(){return ig},e.Default=function(){return og},e}(),Jy=function(e){zt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createAggregator=function(n){return t.DEFAULT_INSTANCE},t.DEFAULT_INSTANCE=new xy,t}(Tt),Qy=function(e){zt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createAggregator=function(n){switch(n.type){case A.COUNTER:case A.OBSERVABLE_COUNTER:case A.HISTOGRAM:return t.MONOTONIC_INSTANCE;default:return t.NON_MONOTONIC_INSTANCE}},t.MONOTONIC_INSTANCE=new Us(!0),t.NON_MONOTONIC_INSTANCE=new Us(!1),t}(Tt),Zy=function(e){zt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createAggregator=function(n){return t.DEFAULT_INSTANCE},t.DEFAULT_INSTANCE=new Wy,t}(Tt),tg=function(e){zt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createAggregator=function(n){return t.DEFAULT_INSTANCE},t.DEFAULT_INSTANCE=new Cs([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0),t}(Tt),eg=function(e){zt(t,e);function t(n,r){r===void 0&&(r=!0);var i=e.call(this)||this;if(i._recordMinMax=r,n==null)throw new Error("ExplicitBucketHistogramAggregation should be created with explicit boundaries, if a single bucket histogram is required, please pass an empty array");n=n.concat(),n=n.sort(function(u,c){return u-c});var o=n.lastIndexOf(-1/0),a=n.indexOf(1/0);return a===-1&&(a=void 0),i._boundaries=n.slice(o+1,a),i}return t.prototype.createAggregator=function(n){return new Cs(this._boundaries,this._recordMinMax)},t}(Tt),ng=function(e){zt(t,e);function t(n,r){n===void 0&&(n=160),r===void 0&&(r=!0);var i=e.call(this)||this;return i._maxSize=n,i._recordMinMax=r,i}return t.prototype.createAggregator=function(n){return new Ky(this._maxSize,this._recordMinMax)},t}(Tt),rg=function(e){zt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype._resolve=function(n){switch(n.type){case A.COUNTER:case A.UP_DOWN_COUNTER:case A.OBSERVABLE_COUNTER:case A.OBSERVABLE_UP_DOWN_COUNTER:return js;case A.GAUGE:case A.OBSERVABLE_GAUGE:return Bs;case A.HISTOGRAM:return n.advice.explicitBucketBoundaries?new eg(n.advice.explicitBucketBoundaries):Fs}return T.warn("Unable to recognize instrument type: "+n.type),$s},t.prototype.createAggregator=function(n){return this._resolve(n).createAggregator(n)},t}(Tt),$s=new Jy,js=new Qy,Bs=new Zy,Fs=new tg,ig=new ng,og=new rg,ag=function(e){return Tt.Default()},sg=function(e){return pt.CUMULATIVE},Li=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},Ni=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},Vs=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},ug=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},cg=function(){function e(t){var n,r,i;this._shutdown=!1,this._aggregationSelector=(n=t?.aggregationSelector)!==null&&n!==void 0?n:ag,this._aggregationTemporalitySelector=(r=t?.aggregationTemporalitySelector)!==null&&r!==void 0?r:sg,this._metricProducers=(i=t?.metricProducers)!==null&&i!==void 0?i:[],this._cardinalitySelector=t?.cardinalitySelector}return e.prototype.setMetricProducer=function(t){if(this._sdkMetricProducer)throw new Error("MetricReader can not be bound to a MeterProvider again.");this._sdkMetricProducer=t,this.onInitialized()},e.prototype.selectAggregation=function(t){return this._aggregationSelector(t)},e.prototype.selectAggregationTemporality=function(t){return this._aggregationTemporalitySelector(t)},e.prototype.selectCardinalityLimit=function(t){return this._cardinalitySelector?this._cardinalitySelector(t):2e3},e.prototype.onInitialized=function(){},e.prototype.collect=function(t){return Li(this,void 0,void 0,function(){var n,r,i,o,a,u;return Ni(this,function(c){switch(c.label){case 0:if(this._sdkMetricProducer===void 0)throw new Error("MetricReader is not bound to a MetricProducer");if(this._shutdown)throw new Error("MetricReader is shutdown");return[4,Promise.all(ug([this._sdkMetricProducer.collect({timeoutMillis:t?.timeoutMillis})],Vs(this._metricProducers.map(function(s){return s.collect({timeoutMillis:t?.timeoutMillis})})),!1))];case 1:return n=Vs.apply(void 0,[c.sent()]),r=n[0],i=n.slice(1),o=r.errors.concat(xs(i,function(s){return s.errors})),a=r.resourceMetrics.resource,u=r.resourceMetrics.scopeMetrics.concat(xs(i,function(s){return s.resourceMetrics.scopeMetrics})),[2,{resourceMetrics:{resource:a,scopeMetrics:u},errors:o}]}})})},e.prototype.shutdown=function(t){return Li(this,void 0,void 0,function(){return Ni(this,function(n){switch(n.label){case 0:return this._shutdown?(T.error("Cannot call shutdown twice."),[2]):t?.timeoutMillis!=null?[3,2]:[4,this.onShutdown()];case 1:return n.sent(),[3,4];case 2:return[4,qe(this.onShutdown(),t.timeoutMillis)];case 3:n.sent(),n.label=4;case 4:return this._shutdown=!0,[2]}})})},e.prototype.forceFlush=function(t){return Li(this,void 0,void 0,function(){return Ni(this,function(n){switch(n.label){case 0:return this._shutdown?(T.warn("Cannot forceFlush on already shutdown MetricReader."),[2]):t?.timeoutMillis!=null?[3,2]:[4,this.onForceFlush()];case 1:return n.sent(),[2];case 2:return[4,qe(this.onForceFlush(),t.timeoutMillis)];case 3:return n.sent(),[2]}})})},e}(),lg=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Vn=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},Hn=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},pg=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},fg=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},hg=function(e){lg(t,e);function t(n){var r,i,o,a,u=e.call(this,{aggregationSelector:(r=n.exporter.selectAggregation)===null||r===void 0?void 0:r.bind(n.exporter),aggregationTemporalitySelector:(i=n.exporter.selectAggregationTemporality)===null||i===void 0?void 0:i.bind(n.exporter),metricProducers:n.metricProducers})||this;if(n.exportIntervalMillis!==void 0&&n.exportIntervalMillis<=0)throw Error("exportIntervalMillis must be greater than 0");if(n.exportTimeoutMillis!==void 0&&n.exportTimeoutMillis<=0)throw Error("exportTimeoutMillis must be greater than 0");if(n.exportTimeoutMillis!==void 0&&n.exportIntervalMillis!==void 0&&n.exportIntervalMillis<n.exportTimeoutMillis)throw Error("exportIntervalMillis must be greater than or equal to exportTimeoutMillis");return u._exportInterval=(o=n.exportIntervalMillis)!==null&&o!==void 0?o:6e4,u._exportTimeout=(a=n.exportTimeoutMillis)!==null&&a!==void 0?a:3e4,u._exporter=n.exporter,u}return t.prototype._runOnce=function(){return Vn(this,void 0,void 0,function(){var n;return Hn(this,function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,qe(this._doRun(),this._exportTimeout)];case 1:return r.sent(),[3,3];case 2:return n=r.sent(),n instanceof As?(T.error("Export took longer than %s milliseconds and timed out.",this._exportTimeout),[2]):(Lt(n),[3,3]);case 3:return[2]}})})},t.prototype._doRun=function(){var n,r;return Vn(this,void 0,void 0,function(){var i,o,a,u,c,s;return Hn(this,function(l){switch(l.label){case 0:return[4,this.collect({timeoutMillis:this._exportTimeout})];case 1:if(i=l.sent(),o=i.resourceMetrics,a=i.errors,a.length>0&&(s=T).error.apply(s,fg(["PeriodicExportingMetricReader: metrics collection errors"],pg(a),!1)),!o.resource.asyncAttributesPending)return[3,5];l.label=2;case 2:return l.trys.push([2,4,,5]),[4,(r=(n=o.resource).waitForAsyncAttributes)===null||r===void 0?void 0:r.call(n)];case 3:return l.sent(),[3,5];case 4:return u=l.sent(),T.debug("Error while resolving async portion of resource: ",u),Lt(u),[3,5];case 5:return o.scopeMetrics.length===0?[2]:[4,Od._export(this._exporter,o)];case 6:if(c=l.sent(),c.code!==$.SUCCESS)throw new Error("PeriodicExportingMetricReader: metrics export failed (error "+c.error+")");return[2]}})})},t.prototype.onInitialized=function(){var n=this;this._interval=setInterval(function(){n._runOnce()},this._exportInterval)},t.prototype.onForceFlush=function(){return Vn(this,void 0,void 0,function(){return Hn(this,function(n){switch(n.label){case 0:return[4,this._runOnce()];case 1:return n.sent(),[4,this._exporter.forceFlush()];case 2:return n.sent(),[2]}})})},t.prototype.onShutdown=function(){return Vn(this,void 0,void 0,function(){return Hn(this,function(n){switch(n.label){case 0:return this._interval&&clearInterval(this._interval),[4,this.onForceFlush()];case 1:return n.sent(),[4,this._exporter.shutdown()];case 2:return n.sent(),[2]}})})},t}(cg),dg=function(){function e(){this._registeredViews=[]}return e.prototype.addView=function(t){this._registeredViews.push(t)},e.prototype.findViews=function(t,n){var r=this,i=this._registeredViews.filter(function(o){return r._matchInstrument(o.instrumentSelector,t)&&r._matchMeter(o.meterSelector,n)});return i},e.prototype._matchInstrument=function(t,n){return(t.getType()===void 0||n.type===t.getType())&&t.getNameFilter().match(n.name)&&t.getUnitFilter().match(n.unit)},e.prototype._matchMeter=function(t,n){return t.getNameFilter().match(n.name)&&(n.version===void 0||t.getVersionFilter().match(n.version))&&(n.schemaUrl===void 0||t.getSchemaUrlFilter().match(n.schemaUrl))},e}(),Kt=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Gn=function(){function e(t,n){this._writableMetricStorage=t,this._descriptor=n}return e.prototype._record=function(t,n,r){if(n===void 0&&(n={}),r===void 0&&(r=R.active()),typeof t!="number"){T.warn("non-number value provided to metric "+this._descriptor.name+": "+t);return}this._descriptor.valueType===Ct.INT&&!Number.isInteger(t)&&(T.warn("INT value type cannot accept a floating-point value for "+this._descriptor.name+", ignoring the fractional digits."),t=Math.trunc(t),!Number.isInteger(t))||this._writableMetricStorage.record(t,n,r,ot(Date.now()))},e}(),vg=function(e){Kt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(n,r,i){this._record(n,r,i)},t}(Gn),mg=function(e){Kt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(n,r,i){if(n<0){T.warn("negative value provided to counter "+this._descriptor.name+": "+n);return}this._record(n,r,i)},t}(Gn),yg=function(e){Kt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(n,r,i){this._record(n,r,i)},t}(Gn),gg=function(e){Kt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(n,r,i){if(n<0){T.warn("negative value provided to histogram "+this._descriptor.name+": "+n);return}this._record(n,r,i)},t}(Gn),qn=function(){function e(t,n,r){this._observableRegistry=r,this._descriptor=t,this._metricStorages=n}return e.prototype.addCallback=function(t){this._observableRegistry.addCallback(t,this)},e.prototype.removeCallback=function(t){this._observableRegistry.removeCallback(t,this)},e}(),_g=function(e){Kt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(qn),bg=function(e){Kt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(qn),Eg=function(e){Kt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(qn);function Ri(e){return e instanceof qn}var Tg=function(){function e(t){this._meterSharedState=t}return e.prototype.createGauge=function(t,n){var r=It(t,A.GAUGE,n),i=this._meterSharedState.registerMetricStorage(r);return new yg(i,r)},e.prototype.createHistogram=function(t,n){var r=It(t,A.HISTOGRAM,n),i=this._meterSharedState.registerMetricStorage(r);return new gg(i,r)},e.prototype.createCounter=function(t,n){var r=It(t,A.COUNTER,n),i=this._meterSharedState.registerMetricStorage(r);return new mg(i,r)},e.prototype.createUpDownCounter=function(t,n){var r=It(t,A.UP_DOWN_COUNTER,n),i=this._meterSharedState.registerMetricStorage(r);return new vg(i,r)},e.prototype.createObservableGauge=function(t,n){var r=It(t,A.OBSERVABLE_GAUGE,n),i=this._meterSharedState.registerAsyncMetricStorage(r);return new bg(r,i,this._meterSharedState.observableRegistry)},e.prototype.createObservableCounter=function(t,n){var r=It(t,A.OBSERVABLE_COUNTER,n),i=this._meterSharedState.registerAsyncMetricStorage(r);return new _g(r,i,this._meterSharedState.observableRegistry)},e.prototype.createObservableUpDownCounter=function(t,n){var r=It(t,A.OBSERVABLE_UP_DOWN_COUNTER,n),i=this._meterSharedState.registerAsyncMetricStorage(r);return new Eg(r,i,this._meterSharedState.observableRegistry)},e.prototype.addBatchObservableCallback=function(t,n){this._meterSharedState.observableRegistry.addBatchCallback(t,n)},e.prototype.removeBatchObservableCallback=function(t,n){this._meterSharedState.observableRegistry.removeBatchCallback(t,n)},e}(),Hs=function(){function e(t){this._instrumentDescriptor=t}return e.prototype.getInstrumentDescriptor=function(){return this._instrumentDescriptor},e.prototype.updateDescription=function(t){this._instrumentDescriptor=It(this._instrumentDescriptor.name,this._instrumentDescriptor.type,{description:t,valueType:this._instrumentDescriptor.valueType,unit:this._instrumentDescriptor.unit,advice:this._instrumentDescriptor.advice})},e}(),wg=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Gs=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},Sg=function(){function e(t){this._hash=t,this._valueMap=new Map,this._keyMap=new Map}return e.prototype.get=function(t,n){return n!=null||(n=this._hash(t)),this._valueMap.get(n)},e.prototype.getOrDefault=function(t,n){var r=this._hash(t);if(this._valueMap.has(r))return this._valueMap.get(r);var i=n();return this._keyMap.has(r)||this._keyMap.set(r,t),this._valueMap.set(r,i),i},e.prototype.set=function(t,n,r){r!=null||(r=this._hash(t)),this._keyMap.has(r)||this._keyMap.set(r,t),this._valueMap.set(r,n)},e.prototype.has=function(t,n){return n!=null||(n=this._hash(t)),this._valueMap.has(n)},e.prototype.keys=function(){var t,n;return Gs(this,function(r){switch(r.label){case 0:t=this._keyMap.entries(),n=t.next(),r.label=1;case 1:return n.done===!0?[3,3]:[4,[n.value[1],n.value[0]]];case 2:return r.sent(),n=t.next(),[3,1];case 3:return[2]}})},e.prototype.entries=function(){var t,n;return Gs(this,function(r){switch(r.label){case 0:t=this._valueMap.entries(),n=t.next(),r.label=1;case 1:return n.done===!0?[3,3]:[4,[this._keyMap.get(n.value[0]),n.value[1],n.value[0]]];case 2:return r.sent(),n=t.next(),[3,1];case 3:return[2]}})},Object.defineProperty(e.prototype,"size",{get:function(){return this._valueMap.size},enumerable:!1,configurable:!0}),e}(),Xt=function(e){wg(t,e);function t(){return e.call(this,Os)||this}return t}(Sg),Og=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},qs=function(){function e(t,n){this._aggregator=t,this._activeCollectionStorage=new Xt,this._cumulativeMemoStorage=new Xt,this._overflowAttributes={"otel.metric.overflow":!0},this._cardinalityLimit=(n??2e3)-1,this._overflowHashCode=Os(this._overflowAttributes)}return e.prototype.record=function(t,n,r,i){var o=this,a=this._activeCollectionStorage.get(n);if(!a){if(this._activeCollectionStorage.size>=this._cardinalityLimit){var u=this._activeCollectionStorage.getOrDefault(this._overflowAttributes,function(){return o._aggregator.createAccumulation(i)});u?.record(t);return}a=this._aggregator.createAccumulation(i),this._activeCollectionStorage.set(n,a)}a?.record(t)},e.prototype.batchCumulate=function(t,n){var r=this;Array.from(t.entries()).forEach(function(i){var o=Og(i,3),a=o[0],u=o[1],c=o[2],s=r._aggregator.createAccumulation(n);s?.record(u);var l=s;if(r._cumulativeMemoStorage.has(a,c)){var p=r._cumulativeMemoStorage.get(a,c);l=r._aggregator.diff(p,s)}else if(r._cumulativeMemoStorage.size>=r._cardinalityLimit&&(a=r._overflowAttributes,c=r._overflowHashCode,r._cumulativeMemoStorage.has(a,c))){var p=r._cumulativeMemoStorage.get(a,c);l=r._aggregator.diff(p,s)}if(r._activeCollectionStorage.has(a,c)){var f=r._activeCollectionStorage.get(a,c);l=r._aggregator.merge(f,l)}r._cumulativeMemoStorage.set(a,s,c),r._activeCollectionStorage.set(a,l,c)})},e.prototype.collect=function(){var t=this._activeCollectionStorage;return this._activeCollectionStorage=new Xt,t},e}(),Ii=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},zs=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Ks=function(){function e(t,n){var r=this;this._aggregator=t,this._unreportedAccumulations=new Map,this._reportHistory=new Map,n.forEach(function(i){r._unreportedAccumulations.set(i,[])})}return e.prototype.buildMetrics=function(t,n,r,i){this._stashAccumulations(r);var o=this._getMergedUnreportedAccumulations(t),a=o,u;if(this._reportHistory.has(t)){var c=this._reportHistory.get(t),s=c.collectionTime;u=c.aggregationTemporality,u===pt.CUMULATIVE?a=e.merge(c.accumulations,o,this._aggregator):a=e.calibrateStartTime(c.accumulations,o,s)}else u=t.selectAggregationTemporality(n.type);this._reportHistory.set(t,{accumulations:a,collectionTime:i,aggregationTemporality:u});var l=Ag(a);if(l.length!==0)return this._aggregator.toMetricData(n,u,l,i)},e.prototype._stashAccumulations=function(t){var n,r,i=this._unreportedAccumulations.keys();try{for(var o=Ii(i),a=o.next();!a.done;a=o.next()){var u=a.value,c=this._unreportedAccumulations.get(u);c===void 0&&(c=[],this._unreportedAccumulations.set(u,c)),c.push(t)}}catch(s){n={error:s}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},e.prototype._getMergedUnreportedAccumulations=function(t){var n,r,i=new Xt,o=this._unreportedAccumulations.get(t);if(this._unreportedAccumulations.set(t,[]),o===void 0)return i;try{for(var a=Ii(o),u=a.next();!u.done;u=a.next()){var c=u.value;i=e.merge(i,c,this._aggregator)}}catch(s){n={error:s}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i},e.merge=function(t,n,r){for(var i=t,o=n.entries(),a=o.next();a.done!==!0;){var u=zs(a.value,3),c=u[0],s=u[1],l=u[2];if(t.has(c,l)){var p=t.get(c,l),f=r.merge(p,s);i.set(c,f,l)}else i.set(c,s,l);a=o.next()}return i},e.calibrateStartTime=function(t,n,r){var i,o;try{for(var a=Ii(t.keys()),u=a.next();!u.done;u=a.next()){var c=zs(u.value,2),s=c[0],l=c[1],p=n.get(s,l);p?.setStartTime(r)}}catch(f){i={error:f}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}return n},e}();function Ag(e){return Array.from(e.entries())}var xg=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Cg=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Lg=function(e){xg(t,e);function t(n,r,i,o,a){var u=e.call(this,n)||this;return u._attributesProcessor=i,u._aggregationCardinalityLimit=a,u._deltaMetricStorage=new qs(r,u._aggregationCardinalityLimit),u._temporalMetricStorage=new Ks(r,o),u}return t.prototype.record=function(n,r){var i=this,o=new Xt;Array.from(n.entries()).forEach(function(a){var u=Cg(a,2),c=u[0],s=u[1];o.set(i._attributesProcessor.process(c),s)}),this._deltaMetricStorage.batchCumulate(o,r)},t.prototype.collect=function(n,r){var i=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(n,this._instrumentDescriptor,i,r)},t}(Hs);function Xs(e,t){var n="";return e.unit!==t.unit&&(n+=" - Unit '"+e.unit+"' does not match '"+t.unit+`'
|
|
297
297
|
`),e.type!==t.type&&(n+=" - Type '"+e.type+"' does not match '"+t.type+`'
|
|
298
298
|
`),e.valueType!==t.valueType&&(n+=" - Value Type '"+e.valueType+"' does not match '"+t.valueType+`'
|
|
299
299
|
`),e.description!==t.description&&(n+=" - Description '"+e.description+"' does not match '"+t.description+`'
|
|
300
|
-
`),n}function
|
|
300
|
+
`),n}function Ng(e,t){return" - use valueType '"+e.valueType+"' on instrument creation or use an instrument name other than '"+t.name+"'"}function Rg(e,t){return" - use unit '"+e.unit+"' on instrument creation or use an instrument name other than '"+t.name+"'"}function Ig(e,t){var n={name:t.name,type:t.type,unit:t.unit},r=JSON.stringify(n);return" - create a new view with a name other than '"+e.name+"' and InstrumentSelector '"+r+"'"}function Pg(e,t){var n={name:t.name,type:t.type,unit:t.unit},r=JSON.stringify(n);return" - create a new view with a name other than '"+e.name+"' and InstrumentSelector '"+r+`'
|
|
301
301
|
- OR - create a new view with the name `+e.name+" and description '"+e.description+"' and InstrumentSelector "+r+`
|
|
302
|
-
- OR - create a new view with the name `+t.name+" and description '"+e.description+"' and InstrumentSelector "+r}function
|
|
302
|
+
- OR - create a new view with the name `+t.name+" and description '"+e.description+"' and InstrumentSelector "+r}function Ws(e,t){return e.valueType!==t.valueType?Ng(e,t):e.unit!==t.unit?Rg(e,t):e.type!==t.type?Ig(e,t):e.description!==t.description?Pg(e,t):""}var Pi=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},kg=function(){function e(){this._sharedRegistry=new Map,this._perCollectorRegistry=new Map}return e.create=function(){return new e},e.prototype.getStorages=function(t){var n,r,i,o,a=[];try{for(var u=Pi(this._sharedRegistry.values()),c=u.next();!c.done;c=u.next()){var s=c.value;a=a.concat(s)}}catch(v){n={error:v}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}var l=this._perCollectorRegistry.get(t);if(l!=null)try{for(var p=Pi(l.values()),f=p.next();!f.done;f=p.next()){var s=f.value;a=a.concat(s)}}catch(v){i={error:v}}finally{try{f&&!f.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}return a},e.prototype.register=function(t){this._registerStorage(t,this._sharedRegistry)},e.prototype.registerForCollector=function(t,n){var r=this._perCollectorRegistry.get(t);r==null&&(r=new Map,this._perCollectorRegistry.set(t,r)),this._registerStorage(n,r)},e.prototype.findOrUpdateCompatibleStorage=function(t){var n=this._sharedRegistry.get(t.name);return n===void 0?null:this._findOrUpdateCompatibleStorage(t,n)},e.prototype.findOrUpdateCompatibleCollectorStorage=function(t,n){var r=this._perCollectorRegistry.get(t);if(r===void 0)return null;var i=r.get(n.name);return i===void 0?null:this._findOrUpdateCompatibleStorage(n,i)},e.prototype._registerStorage=function(t,n){var r=t.getInstrumentDescriptor(),i=n.get(r.name);if(i===void 0){n.set(r.name,[t]);return}i.push(t)},e.prototype._findOrUpdateCompatibleStorage=function(t,n){var r,i,o=null;try{for(var a=Pi(n),u=a.next();!u.done;u=a.next()){var c=u.value,s=c.getInstrumentDescriptor();Ly(s,t)?(s.description!==t.description&&(t.description.length>s.description.length&&c.updateDescription(t.description),T.warn("A view or instrument with the name ",t.name,` has already been registered, but has a different description and is incompatible with another registered view.
|
|
303
303
|
`,`Details:
|
|
304
|
-
`,
|
|
305
|
-
To resolve the conflict:`,
|
|
304
|
+
`,Xs(s,t),`The longer description will be used.
|
|
305
|
+
To resolve the conflict:`,Ws(s,t))),o=c):T.warn("A view or instrument with the name ",t.name,` has already been registered and is incompatible with another registered view.
|
|
306
306
|
`,`Details:
|
|
307
|
-
`,
|
|
308
|
-
`,Uu(s,t))}}catch(l){r={error:l}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return o},e}(),_T=function(){function e(t){this._backingStorages=t}return e.prototype.record=function(t,n,r,i){this._backingStorages.forEach(function(o){o.record(t,n,r,i)})},e}(),ET=function(){function e(t,n){this._instrumentName=t,this._valueType=n,this._buffer=new Xe}return e.prototype.observe=function(t,n){if(n===void 0&&(n={}),typeof t!="number"){T.warn("non-number value provided to metric "+this._instrumentName+": "+t);return}this._valueType===Le.INT&&!Number.isInteger(t)&&(T.warn("INT value type cannot accept a floating-point value for "+this._instrumentName+", ignoring the fractional digits."),t=Math.trunc(t),!Number.isInteger(t))||this._buffer.set(n,t)},e}(),TT=function(){function e(){this._buffer=new Map}return e.prototype.observe=function(t,n,r){if(r===void 0&&(r={}),!!ro(t)){var i=this._buffer.get(t);if(i==null&&(i=new Xe,this._buffer.set(t,i)),typeof n!="number"){T.warn("non-number value provided to metric "+t._descriptor.name+": "+n);return}t._descriptor.valueType===Le.INT&&!Number.isInteger(n)&&(T.warn("INT value type cannot accept a floating-point value for "+t._descriptor.name+", ignoring the fractional digits."),n=Math.trunc(n),!Number.isInteger(n))||i.set(r,n)}},e}(),ao=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},so=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},ju=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},$u=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},bT=function(){function e(){this._callbacks=[],this._batchCallbacks=[]}return e.prototype.addCallback=function(t,n){var r=this._findCallback(t,n);r>=0||this._callbacks.push({callback:t,instrument:n})},e.prototype.removeCallback=function(t,n){var r=this._findCallback(t,n);r<0||this._callbacks.splice(r,1)},e.prototype.addBatchCallback=function(t,n){var r=new Set(n.filter(ro));if(r.size===0){T.error("BatchObservableCallback is not associated with valid instruments",n);return}var i=this._findBatchCallback(t,r);i>=0||this._batchCallbacks.push({callback:t,instruments:r})},e.prototype.removeBatchCallback=function(t,n){var r=new Set(n.filter(ro)),i=this._findBatchCallback(t,r);i<0||this._batchCallbacks.splice(i,1)},e.prototype.observe=function(t,n){return ao(this,void 0,void 0,function(){var r,i,o,a;return so(this,function(u){switch(u.label){case 0:return r=this._observeCallbacks(t,n),i=this._observeBatchCallbacks(t,n),[4,Y_($u($u([],ju(r),!1),ju(i),!1))];case 1:return o=u.sent(),a=o.filter(J_).map(function(c){return c.reason}),[2,a]}})})},e.prototype._observeCallbacks=function(t,n){var r=this;return this._callbacks.map(function(i){var o=i.callback,a=i.instrument;return ao(r,void 0,void 0,function(){var u,c;return so(this,function(s){switch(s.label){case 0:return u=new ET(a._descriptor.name,a._descriptor.valueType),c=Promise.resolve(o(u)),n!=null&&(c=Yt(c,n)),[4,c];case 1:return s.sent(),a._metricStorages.forEach(function(l){l.record(u._buffer,t)}),[2]}})})})},e.prototype._observeBatchCallbacks=function(t,n){var r=this;return this._batchCallbacks.map(function(i){var o=i.callback,a=i.instruments;return ao(r,void 0,void 0,function(){var u,c;return so(this,function(s){switch(s.label){case 0:return u=new TT,c=Promise.resolve(o(u)),n!=null&&(c=Yt(c,n)),[4,c];case 1:return s.sent(),a.forEach(function(l){var p=u._buffer.get(l);p!=null&&l._metricStorages.forEach(function(f){f.record(p,t)})}),[2]}})})})},e.prototype._findCallback=function(t,n){return this._callbacks.findIndex(function(r){return r.callback===t&&r.instrument===n})},e.prototype._findBatchCallback=function(t,n){return this._batchCallbacks.findIndex(function(r){return r.callback===t&&Q_(r.instruments,n)})},e}(),ST=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),OT=function(e){ST(t,e);function t(n,r,i,o,a){var u=e.call(this,n)||this;return u._attributesProcessor=i,u._aggregationCardinalityLimit=a,u._deltaMetricStorage=new Iu(r,u._aggregationCardinalityLimit),u._temporalMetricStorage=new Mu(r,o),u}return t.prototype.record=function(n,r,i,o){r=this._attributesProcessor.process(r,i),this._deltaMetricStorage.record(n,r,i,o)},t.prototype.collect=function(n,r){var i=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(n,this._instrumentDescriptor,i,r)},t}(xu),Bu=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),uo=function(){function e(){}return e.Noop=function(){return AT},e}(),wT=function(e){Bu(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.process=function(n,r){return n},t}(uo);(function(e){Bu(t,e);function t(n){var r=e.call(this)||this;return r._allowedAttributeNames=n,r}return t.prototype.process=function(n,r){var i=this,o={};return Object.keys(n).filter(function(a){return i._allowedAttributeNames.includes(a)}).forEach(function(a){return o[a]=n[a]}),o},t})(uo);var AT=new wT,LT=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},RT=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},CT=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},NT=function(){function e(t,n){this._meterProviderSharedState=t,this._instrumentationScope=n,this.metricStorageRegistry=new gT,this.observableRegistry=new bT,this.meter=new aT(this)}return e.prototype.registerMetricStorage=function(t){var n=this._registerMetricStorage(t,OT);return n.length===1?n[0]:new _T(n)},e.prototype.registerAsyncMetricStorage=function(t){var n=this._registerMetricStorage(t,hT);return n},e.prototype.collect=function(t,n,r){return LT(this,void 0,void 0,function(){var i,o,a;return RT(this,function(u){switch(u.label){case 0:return[4,this.observableRegistry.observe(n,r?.timeoutMillis)];case 1:return i=u.sent(),o=this.metricStorageRegistry.getStorages(t),o.length===0?[2,null]:(a=o.map(function(c){return c.collect(t,n)}).filter(K_),a.length===0?[2,{errors:i}]:[2,{scopeMetrics:{scope:this._instrumentationScope,metrics:a},errors:i}])}})})},e.prototype._registerMetricStorage=function(t,n){var r=this,i=this._meterProviderSharedState.viewRegistry.findViews(t,this._instrumentationScope),o=i.map(function(c){var s=nE(c,t),l=r.metricStorageRegistry.findOrUpdateCompatibleStorage(s);if(l!=null)return l;var p=c.aggregation.createAggregator(s),f=new n(s,p,c.attributesProcessor,r._meterProviderSharedState.metricCollectors,c.aggregationCardinalityLimit);return r.metricStorageRegistry.register(f),f});if(o.length===0){var a=this._meterProviderSharedState.selectAggregations(t.type),u=a.map(function(c){var s=CT(c,2),l=s[0],p=s[1],f=r.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(l,t);if(f!=null)return f;var m=p.createAggregator(t),v=l.selectCardinalityLimit(t.type),y=new n(t,m,uo.Noop(),[l],v);return r.metricStorageRegistry.registerForCollector(l,y),y});o=o.concat(u)}return o},e}(),xT=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},PT=function(){function e(t){this.resource=t,this.viewRegistry=new QE,this.metricCollectors=[],this.meterSharedStates=new Map}return e.prototype.getMeterSharedState=function(t){var n=W_(t),r=this.meterSharedStates.get(n);return r==null&&(r=new NT(this,t),this.meterSharedStates.set(n,r)),r},e.prototype.selectAggregations=function(t){var n,r,i=[];try{for(var o=xT(this.metricCollectors),a=o.next();!a.done;a=o.next()){var u=a.value;i.push([u,u.selectAggregation(t)])}}catch(c){n={error:c}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},e}(),Wn=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},Yn=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},IT=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},kT=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},MT=function(){function e(t,n){this._sharedState=t,this._metricReader=n}return e.prototype.collect=function(t){return Wn(this,void 0,void 0,function(){var n,r,i,o,a=this;return Yn(this,function(u){switch(u.label){case 0:return n=Qi(Date.now()),r=[],i=[],o=Array.from(this._sharedState.meterSharedStates.values()).map(function(c){return Wn(a,void 0,void 0,function(){var s;return Yn(this,function(l){switch(l.label){case 0:return[4,c.collect(this,n,t)];case 1:return s=l.sent(),s?.scopeMetrics!=null&&r.push(s.scopeMetrics),s?.errors!=null&&i.push.apply(i,kT([],IT(s.errors),!1)),[2]}})})}),[4,Promise.all(o)];case 1:return u.sent(),[2,{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:r},errors:i}]}})})},e.prototype.forceFlush=function(t){return Wn(this,void 0,void 0,function(){return Yn(this,function(n){switch(n.label){case 0:return[4,this._metricReader.forceFlush(t)];case 1:return n.sent(),[2]}})})},e.prototype.shutdown=function(t){return Wn(this,void 0,void 0,function(){return Yn(this,function(n){switch(n.label){case 0:return[4,this._metricReader.shutdown(t)];case 1:return n.sent(),[2]}})})},e.prototype.selectAggregationTemporality=function(t){return this._metricReader.selectAggregationTemporality(t)},e.prototype.selectAggregation=function(t){return this._metricReader.selectAggregation(t)},e.prototype.selectCardinalityLimit=function(t){var n,r,i;return(i=(r=(n=this._metricReader).selectCardinalityLimit)===null||r===void 0?void 0:r.call(n,t))!==null&&i!==void 0?i:2e3},e}(),Fu=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},Vu=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},Hu=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function DT(e,t){var n=t??Xt.empty();return e?Xt.default().merge(n):n}var UT=function(){function e(t){var n,r,i,o,a;if(this._shutdown=!1,this._sharedState=new PT(DT((a=t?.mergeResourceWithDefaults)!==null&&a!==void 0?a:!0,t?.resource)),t?.views!=null&&t.views.length>0)try{for(var u=Hu(t.views),c=u.next();!c.done;c=u.next()){var s=c.value;this._sharedState.viewRegistry.addView(s)}}catch(m){n={error:m}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}if(t?.readers!=null&&t.readers.length>0)try{for(var l=Hu(t.readers),p=l.next();!p.done;p=l.next()){var f=p.value;this.addMetricReader(f)}}catch(m){i={error:m}}finally{try{p&&!p.done&&(o=l.return)&&o.call(l)}finally{if(i)throw i.error}}}return e.prototype.getMeter=function(t,n,r){return n===void 0&&(n=""),r===void 0&&(r={}),this._shutdown?(T.warn("A shutdown MeterProvider cannot provide a Meter"),uh()):this._sharedState.getMeterSharedState({name:t,version:n,schemaUrl:r.schemaUrl}).meter},e.prototype.addMetricReader=function(t){var n=new MT(this._sharedState,t);t.setMetricProducer(n),this._sharedState.metricCollectors.push(n)},e.prototype.shutdown=function(t){return Fu(this,void 0,void 0,function(){return Vu(this,function(n){switch(n.label){case 0:return this._shutdown?(T.warn("shutdown may only be called once per MeterProvider"),[2]):(this._shutdown=!0,[4,Promise.all(this._sharedState.metricCollectors.map(function(r){return r.shutdown(t)}))]);case 1:return n.sent(),[2]}})})},e.prototype.forceFlush=function(t){return Fu(this,void 0,void 0,function(){return Vu(this,function(n){switch(n.label){case 0:return this._shutdown?(T.warn("invalid attempt to force flush after MeterProvider shutdown"),[2]):[4,Promise.all(this._sharedState.metricCollectors.map(function(r){return r.forceFlush(t)}))];case 1:return n.sent(),[2]}})})},e}();function jT(e,t){var n=ou(t);return{resource:au(e.resource),schemaUrl:void 0,scopeMetrics:$T(e.scopeMetrics,n)}}function $T(e,t){return Array.from(e.map(function(n){return{scope:su(n.scope),metrics:n.metrics.map(function(r){return BT(r,t)}),schemaUrl:n.scope.schemaUrl}}))}function BT(e,t){var n={name:e.descriptor.name,description:e.descriptor.description,unit:e.descriptor.unit},r=GT(e.aggregationTemporality);switch(e.dataPointType){case de.SUM:n.sum={aggregationTemporality:r,isMonotonic:e.isMonotonic,dataPoints:Gu(e,t)};break;case de.GAUGE:n.gauge={dataPoints:Gu(e,t)};break;case de.HISTOGRAM:n.histogram={aggregationTemporality:r,dataPoints:VT(e,t)};break;case de.EXPONENTIAL_HISTOGRAM:n.exponentialHistogram={aggregationTemporality:r,dataPoints:HT(e,t)};break}return n}function FT(e,t,n){var r={attributes:He(e.attributes),startTimeUnixNano:n.encodeHrTime(e.startTime),timeUnixNano:n.encodeHrTime(e.endTime)};switch(t){case Le.INT:r.asInt=e.value;break;case Le.DOUBLE:r.asDouble=e.value;break}return r}function Gu(e,t){return e.dataPoints.map(function(n){return FT(n,e.descriptor.valueType,t)})}function VT(e,t){return e.dataPoints.map(function(n){var r=n.value;return{attributes:He(n.attributes),bucketCounts:r.buckets.counts,explicitBounds:r.buckets.boundaries,count:r.count,sum:r.sum,min:r.min,max:r.max,startTimeUnixNano:t.encodeHrTime(n.startTime),timeUnixNano:t.encodeHrTime(n.endTime)}})}function HT(e,t){return e.dataPoints.map(function(n){var r=n.value;return{attributes:He(n.attributes),count:r.count,min:r.min,max:r.max,sum:r.sum,positive:{offset:r.positive.offset,bucketCounts:r.positive.bucketCounts},negative:{offset:r.negative.offset,bucketCounts:r.negative.bucketCounts},scale:r.scale,zeroCount:r.zeroCount,startTimeUnixNano:t.encodeHrTime(n.startTime),timeUnixNano:t.encodeHrTime(n.endTime)}})}function GT(e){switch(e){case le.DELTA:return 1;case le.CUMULATIVE:return 2}}function qT(e,t){return{resourceMetrics:e.map(function(n){return jT(n,t)})}}var zT=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},XT=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function KT(e,t){var n,r=e.spanContext(),i=e.status;return{traceId:t.encodeSpanContext(r.traceId),spanId:t.encodeSpanContext(r.spanId),parentSpanId:t.encodeOptionalSpanContext(e.parentSpanId),traceState:(n=r.traceState)===null||n===void 0?void 0:n.serialize(),name:e.name,kind:e.kind==null?0:e.kind+1,startTimeUnixNano:t.encodeHrTime(e.startTime),endTimeUnixNano:t.encodeHrTime(e.endTime),attributes:He(e.attributes),droppedAttributesCount:e.droppedAttributesCount,events:e.events.map(function(o){return YT(o,t)}),droppedEventsCount:e.droppedEventsCount,status:{code:i.code,message:i.message},links:e.links.map(function(o){return WT(o,t)}),droppedLinksCount:e.droppedLinksCount}}function WT(e,t){var n;return{attributes:e.attributes?He(e.attributes):[],spanId:t.encodeSpanContext(e.context.spanId),traceId:t.encodeSpanContext(e.context.traceId),traceState:(n=e.context.traceState)===null||n===void 0?void 0:n.serialize(),droppedAttributesCount:e.droppedAttributesCount||0}}function YT(e,t){return{attributes:e.attributes?He(e.attributes):[],name:e.name,timeUnixNano:t.encodeHrTime(e.time),droppedAttributesCount:e.droppedAttributesCount||0}}function JT(e,t){var n=ou(t);return{resourceSpans:ZT(e,n)}}function QT(e){var t,n,r=new Map;try{for(var i=zT(e),o=i.next();!o.done;o=i.next()){var a=o.value,u=r.get(a.resource);u||(u=new Map,r.set(a.resource,u));var c=a.instrumentationLibrary.name+"@"+(a.instrumentationLibrary.version||"")+":"+(a.instrumentationLibrary.schemaUrl||""),s=u.get(c);s||(s=[],u.set(c,s)),s.push(a)}}catch(l){t={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}function ZT(e,t){for(var n=QT(e),r=[],i=n.entries(),o=i.next();!o.done;){for(var a=XT(o.value,2),u=a[0],c=a[1],s=[],l=c.values(),p=l.next();!p.done;){var f=p.value;if(f.length>0){var m=f.map(function(y){return KT(y,t)});s.push({scope:su(f[0].instrumentationLibrary),spans:m,schemaUrl:f[0].instrumentationLibrary.schemaUrl})}p=l.next()}var v={resource:au(u),scopeSpans:s,schemaUrl:void 0};r.push(v),o=i.next()}return r}var qu={serializeRequest:function(e){var t=qT([e],{useLongBits:!1}),n=new TextEncoder;return n.encode(JSON.stringify(t))},deserializeResponse:function(e){var t=new TextDecoder;return JSON.parse(t.decode(e))}},zu={serializeRequest:function(e){var t=JT(e,{useHex:!0,useLongBits:!1}),n=new TextEncoder;return n.encode(JSON.stringify(t))},deserializeResponse:function(e){var t=new TextDecoder;return JSON.parse(t.decode(e))}},eb=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},tb=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},nb=5,rb=1e3,ib=5e3,ob=1.5,Xu=.2;function ab(){return Math.random()*(2*Xu)-Xu}var sb=function(){function e(t){this._transport=t}return e.prototype.retry=function(t,n,r){var i=this;return new Promise(function(o,a){setTimeout(function(){i._transport.send(t,n).then(o,a)},r)})},e.prototype.send=function(t,n){var r;return eb(this,void 0,void 0,function(){var i,o,a,u,c,s,l;return tb(this,function(p){switch(p.label){case 0:return i=Date.now()+n,[4,this._transport.send(t,n)];case 1:o=p.sent(),a=nb,u=rb,p.label=2;case 2:return o.status==="retryable"&&a>0?(a--,c=Math.max(Math.min(u,ib)+ab(),0),u=u*ob,s=(r=o.retryInMillis)!==null&&r!==void 0?r:c,l=i-Date.now(),s>l?[2,o]:[4,this.retry(t,l,s)]):[3,4];case 3:return o=p.sent(),[3,2];case 4:return[2,o]}})})},e.prototype.shutdown=function(){return this._transport.shutdown()},e}();function Ku(e){return new sb(e.transport)}function ub(e){var t=[429,502,503,504];return t.includes(e)}function cb(e){if(e!=null){var t=Number.parseInt(e,10);if(Number.isInteger(t))return t>0?t*1e3:-1;var n=new Date(e).getTime()-Date.now();return n>=0?n:0}}var lb=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},pb=function(){function e(t){this._parameters=t}return e.prototype.send=function(t,n){var r=this;return new Promise(function(i){var o=new XMLHttpRequest;o.timeout=n,o.open("POST",r._parameters.url);var a=r._parameters.headers();Object.entries(a).forEach(function(u){var c=lb(u,2),s=c[0],l=c[1];o.setRequestHeader(s,l)}),o.ontimeout=function(u){i({status:"failure",error:new Error("XHR request timed out")})},o.onreadystatechange=function(){o.status>=200&&o.status<=299?(T.debug("XHR success"),i({status:"success"})):o.status&&ub(o.status)?i({status:"retryable",retryInMillis:cb(o.getResponseHeader("Retry-After"))}):o.status!==0&&i({status:"failure",error:new Error("XHR request failed with non-retryable status")})},o.onabort=function(){i({status:"failure",error:new Error("XHR request aborted")})},o.onerror=function(){i({status:"failure",error:new Error("XHR request errored")})},o.send(t)})},e.prototype.shutdown=function(){},e}();function fb(e){return new pb(e)}var hb=function(){function e(t){this._params=t}return e.prototype.send=function(t){var n=this;return new Promise(function(r){navigator.sendBeacon(n._params.url,new Blob([t],{type:n._params.blobType}))?(T.debug("SendBeacon success"),r({status:"success"})):r({status:"failure",error:new Error("SendBeacon failed")})})},e.prototype.shutdown=function(){},e}();function db(e){return new hb(e)}function vb(e,t){return Zs(e,t,Ku({transport:fb(e)}))}function yb(e,t){return Zs(e,t,Ku({transport:db({url:e.url,blobType:e.headers()["Content-Type"]})}))}var mb=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function gb(e){return function(){var t,n={};return Object.entries((t=e?.())!==null&&t!==void 0?t:{}).forEach(function(r){var i=mb(r,2),o=i[0],a=i[1];typeof a<"u"?n[o]=String(a):T.warn('Header "'+o+'" has invalid value ('+a+") and will be ignored")}),n}}var Ke=function(){return Ke=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Ke.apply(this,arguments)};function _b(e,t,n){var r=Ke({},n()),i={};return function(){return t!=null&&Object.assign(i,t()),e!=null&&Object.assign(i,e()),Object.assign(i,r)}}function Eb(e){if(e!=null)try{return new URL(e),e}catch{throw new Error("Configuration: Could not parse user-provided export URL: '"+e+"'")}}function Tb(e,t,n){var r,i,o,a;return Ke(Ke({},O_(e,t,n)),{headers:_b(gb(e.headers),t.headers,n.headers),url:(i=(r=Eb(e.url))!==null&&r!==void 0?r:t.url)!==null&&i!==void 0?i:n.url,agentOptions:(a=(o=e.agentOptions)!==null&&o!==void 0?o:t.agentOptions)!==null&&a!==void 0?a:n.agentOptions})}function bb(e,t){return Ke(Ke({},w_()),{headers:function(){return e},url:"http://localhost:4318/"+t,agentOptions:{keepAlive:!0}})}function Sb(e,t,n){return Tb({url:e.url,timeoutMillis:e.timeoutMillis,headers:S_(e.headers),concurrencyLimit:e.concurrencyLimit},{},bb(n,t))}function Wu(e,t,n,r){var i=!!e.headers||typeof navigator.sendBeacon!="function",o=Sb(e,n,r);return i?vb(o,t):yb(o,t)}var Ob=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),wb=function(e){Ob(t,e);function t(n){return n===void 0&&(n={}),e.call(this,Wu(n,zu,"v1/traces",{"Content-Type":"application/json"}))||this}return t}(Js),Jn;(function(e){e[e.DELTA=0]="DELTA",e[e.CUMULATIVE=1]="CUMULATIVE",e[e.LOWMEMORY=2]="LOWMEMORY"})(Jn||(Jn={}));var Ab=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),co=function(){return le.CUMULATIVE},Yu=function(e){switch(e){case A.COUNTER:case A.OBSERVABLE_COUNTER:case A.GAUGE:case A.HISTOGRAM:case A.OBSERVABLE_GAUGE:return le.DELTA;case A.UP_DOWN_COUNTER:case A.OBSERVABLE_UP_DOWN_COUNTER:return le.CUMULATIVE}},Ju=function(e){switch(e){case A.COUNTER:case A.HISTOGRAM:return le.DELTA;case A.GAUGE:case A.UP_DOWN_COUNTER:case A.OBSERVABLE_UP_DOWN_COUNTER:case A.OBSERVABLE_COUNTER:case A.OBSERVABLE_GAUGE:return le.CUMULATIVE}};function Lb(){var e=pd(),t=e.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE.trim().toLowerCase();return t==="cumulative"?co:t==="delta"?Yu:t==="lowmemory"?Ju:(T.warn("OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE is set to '"+e.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE+"', but only 'cumulative' and 'delta' are allowed. Using default ('cumulative') instead."),co)}function Rb(e){return e!=null?e===Jn.DELTA?Yu:e===Jn.LOWMEMORY?Ju:co:Lb()}function Cb(e){return e!=null&&e.aggregationPreference?e.aggregationPreference:function(t){return Ee.Default()}}var Nb=function(e){Ab(t,e);function t(n,r){var i=e.call(this,n)||this;return i._aggregationSelector=Cb(r),i._aggregationTemporalitySelector=Rb(r?.temporalityPreference),i}return t.prototype.selectAggregation=function(n){return this._aggregationSelector(n)},t.prototype.selectAggregationTemporality=function(n){return this._aggregationTemporalitySelector(n)},t}(Js),xb=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Pb=function(e){xb(t,e);function t(n){return e.call(this,Wu(n??{},qu,"v1/metrics",{"Content-Type":"application/json"}),n)||this}return t}(Nb);function Ib(e,t){const n=e.spanContext();return{name:e.name,kind:e.kind,spanContext:()=>n,parentSpanId:e.parentSpanId,startTime:e.startTime,endTime:e.endTime,status:e.status,attributes:Wd(e.attributes,t),links:e.links,events:e.events,duration:e.duration,ended:e.ended,resource:e.resource,instrumentationLibrary:e.instrumentationLibrary,droppedAttributesCount:e.droppedAttributesCount,droppedEventsCount:e.droppedEventsCount,droppedLinksCount:e.droppedLinksCount}}function kb(e,t){if(!t.isSamplingEnabled())return e;const n=[],r={},i={};for(const o of e){o.parentSpanId&&(i[o.parentSpanId]=i[o.parentSpanId]||[],i[o.parentSpanId].push(o.spanContext().spanId));const a=t.shouldSample(o);a.sample?a.attributes?r[o.spanContext().spanId]=Ib(o,a.attributes):r[o.spanContext().spanId]=o:n.push(o.spanContext().spanId)}for(;n.length>0;){const o=n.shift(),a=i[o];if(a)for(const u of a)delete r[u],n.push(u)}return Object.values(r)}const Mb=(e,t,n)=>{if(typeof navigator>"u"||!navigator.sendBeacon)return!1;try{const r=new Blob([t],{type:n});return navigator.sendBeacon(e,r)}catch{return!1}},Qu=(e,t,n,r)=>{const i=o=>{if(Mb(e,t,n))return r({code:B.SUCCESS});r({code:B.FAILED,error:o})};try{const o=new Blob([t],{type:n});fetch(e,{method:"POST",body:o,keepalive:!0,headers:{"Content-Type":n},credentials:"omit"}).then(a=>{if(a.ok)return r({code:B.SUCCESS});r({code:B.FAILED,error:new Error(`keepalive fetch export failed with status ${a.status}`)})},a=>i(a))}catch(o){i(o)}};class Db extends wb{constructor(t,n){var r;super(Q(R({},t),{headers:{}})),C(this,"url"),C(this,"unloading",!1),this.sampler=n,this.url=(r=t?.url)!=null?r:""}setUnloading(t){this.unloading=t}export(t,n){const r=kb(t,this.sampler);if(r.length===0)return;if(this.unloading){const a=zu.serializeRequest(r);if(!a||!this.url)return n({code:B.FAILED,error:new Error("keepalive export failed: serializer returned empty or url missing")});Qu(this.url,a,"application/json",n);return}let i=0;const o=a=>{if(a.code===B.SUCCESS)return n({code:B.SUCCESS});if(i++,i>Ir)return n({code:B.FAILED,error:a.error});new Promise(u=>setTimeout(u,kr+Mr*Math.pow(2,i))).then(()=>{super.export(r,o)})};super.export(r,o)}}class Ub extends Pb{constructor(t){var n;super(Q(R({},t),{headers:{}})),C(this,"url"),C(this,"unloading",!1),this.url=(n=t?.url)!=null?n:""}setUnloading(t){this.unloading=t}export(t,n){if(this.unloading){const o=qu.serializeRequest(t);if(!o||!this.url)return n({code:B.FAILED,error:new Error("keepalive export failed: serializer returned empty or url missing")});Qu(this.url,o,"application/json",n);return}let r=0;const i=o=>{var a;if(o.code===B.SUCCESS)return n({code:B.SUCCESS});if(r++,r>Ir)return console.error(`[@launchdarkly/observability] failed to export OTeL metrics: ${(a=o.error)==null?void 0:a.message}`,o.error),n({code:B.FAILED,error:o.error});new Promise(u=>setTimeout(u,kr+Mr*Math.pow(2,r))).then(()=>{var u;console.warn(`[@launchdarkly/observability] retry ${r}, failed to export OTeL metrics: ${(u=o.error)==null?void 0:u.message}`,o.error),super.export(t,i)})};super.export(t,i)}}const jb="OT_ZONE_CONTEXT",$b="Navigation:";function Bb(){return!1}const lo=class et extends es{constructor(t={}){var n,r;super(et.moduleName,et.version,t),C(this,"_spansData",new WeakMap),C(this,"_zonePatched"),C(this,"_wrappedListeners",new WeakMap),C(this,"_eventsSpanMap",new WeakMap),C(this,"_eventNames"),C(this,"_shouldPreventSpanCreation"),C(this,"_getLDContextKeyAttributes"),this._getLDContextKeyAttributes=t.getLDContextKeyAttributes,this._eventNames=new Set((n=t?.eventNames)!=null?n:[]),((r=t.productAnalyticsEvents)==null?void 0:r.clicks)!==!1&&this._eventNames.add("click"),this._shouldPreventSpanCreation=typeof t?.shouldPreventSpanCreation=="function"?t.shouldPreventSpanCreation:Bb}init(){}_checkForTimeout(t,n){const r=this._spansData.get(n);r&&(t.source==="setTimeout"?r.hrTimeLastTimeout=yd():t.source!=="Promise.then"&&t.source!=="setTimeout"&&(r.hrTimeLastTimeout=void 0))}_allowEventName(t){return this._eventNames.has(t)}_createSpan(t,n){var r,i;const o=t?.target,a=t?.type;if(!(o instanceof HTMLElement)||!o.getAttribute||o.hasAttribute("disabled")||!this._allowEventName(a))return;const u=Is(o,!0);try{const c=this.tracer.startSpan(a,{attributes:{[we]:window.location.href,"event.type":a,"event.tag":o.tagName,"event.xpath":u,"event.id":o.id,"event.classname":o.className,"event.text":(r=o.textContent)!=null?r:"","event.url":window.location.href,"viewport.width":window.innerWidth,"viewport.height":window.innerHeight}},n?k.setSpan(x.active(),n):void 0);t instanceof MouseEvent&&(c.setAttribute("event.x",t.clientX),c.setAttribute("event.y",t.clientY),c.setAttribute("event.relativeX",t.clientX/window.innerWidth),c.setAttribute("event.relativeY",t.clientY/window.innerHeight),a==="scroll"&&(c.setAttribute("event.scrollX",window.scrollX),c.setAttribute("event.scrollY",window.scrollY)));const s=(i=this._getLDContextKeyAttributes)==null?void 0:i.call(this);return s&&c.setAttributes(s),this._shouldPreventSpanCreation(a,o,c)===!0?void 0:(this._spansData.set(c,{taskCount:0}),c)}catch(c){this._diag.error("failed to start create new user interaction span",c)}}_decrementTask(t){const n=this._spansData.get(t);n&&(n.taskCount--,n.taskCount===0&&this._tryToEndSpan(t,n.hrTimeLastTimeout))}_getCurrentSpan(t){const n=t.get(jb);return n&&k.getSpan(n)}_incrementTask(t){const n=this._spansData.get(t);n&&n.taskCount++}addPatchedListener(t,n,r,i){let o=this._wrappedListeners.get(r);o||(o=new Map,this._wrappedListeners.set(r,o));let a=o.get(n);return a||(a=new Map,o.set(n,a)),a.has(t)?!1:(a.set(t,i),!0)}removePatchedListener(t,n,r){const i=this._wrappedListeners.get(r);if(!i)return;const o=i.get(n);if(!o)return;const a=o.get(t);return a&&(o.delete(t),o.size===0&&(i.delete(n),i.size===0&&this._wrappedListeners.delete(r))),a}_invokeListener(t,n,r){return typeof t=="function"?t.apply(n,r):t.handleEvent(r[0])}_patchAddEventListener(){const t=this;let n=new Map;return r=>function(i,o,a){if(!o)return r.call(this,i,o,a);const u=a&&typeof a=="object"&&a.once,c=function(...s){var l;let p;const f=s[0];if(!(f!=null&&f.type))return t._invokeListener(o,this,s);if(Date.now()-((l=n.get(f.type))!=null?l:0)<1e3/60)return t._invokeListener(o,this,s);n.set(f.type,Date.now()),f&&(p=t._eventsSpanMap.get(f)),u&&t.removePatchedListener(this,i,o);const m=t._createSpan(f,p);return m?(f&&t._eventsSpanMap.set(f,m),x.with(k.setSpan(x.active(),m),()=>{const v=t._invokeListener(o,this,s);return m.end(),v})):t._invokeListener(o,this,s)};if(t.addPatchedListener(this,i,o,c))return r.call(this,i,c,a)}}_patchRemoveEventListener(){const t=this;return n=>function(r,i,o){const a=t.removePatchedListener(this,r,i);return a?n.call(this,r,a,o):n.call(this,r,i,o)}}_getPatchableEventTargets(){return window.EventTarget?[EventTarget.prototype]:[Node.prototype,Window.prototype]}_patchHistoryApi(){this._unpatchHistoryApi(),this._wrap(history,"replaceState",this._patchHistoryMethod()),this._wrap(history,"pushState",this._patchHistoryMethod()),this._wrap(history,"back",this._patchHistoryMethod()),this._wrap(history,"forward",this._patchHistoryMethod()),this._wrap(history,"go",this._patchHistoryMethod())}_patchHistoryMethod(){const t=this;return n=>function(...r){const i=`${location.pathname}${location.hash}${location.search}`,o=n.apply(this,r),a=`${location.pathname}${location.hash}${location.search}`;return i!==a&&t._updateInteractionName(a),o}}_unpatchHistoryApi(){te(history.replaceState)&&this._unwrap(history,"replaceState"),te(history.pushState)&&this._unwrap(history,"pushState"),te(history.back)&&this._unwrap(history,"back"),te(history.forward)&&this._unwrap(history,"forward"),te(history.go)&&this._unwrap(history,"go")}_updateInteractionName(t){const n=k.getSpan(x.active());n&&typeof n.updateName=="function"&&n.updateName(`${$b} ${t}`)}_patchZoneCancelTask(){const t=this;return n=>function(r){const i=Zone.current,o=t._getCurrentSpan(i);return o&&t._shouldCountTask(r,i)&&t._decrementTask(o),n.call(this,r)}}_patchZoneScheduleTask(){const t=this;return n=>function(r){const i=Zone.current,o=t._getCurrentSpan(i);return o&&t._shouldCountTask(r,i)&&(t._incrementTask(o),t._checkForTimeout(r,o)),n.call(this,r)}}_patchZoneRunTask(){const t=this;return n=>function(r,i,o){const a=Array.isArray(o)&&o[0]instanceof Event?o[0]:void 0,u=a?.target;let c;const s=this;if(u){if(c=t._createSpan(a),c)return t._incrementTask(c),s.run(()=>{try{return x.with(k.setSpan(x.active(),c),()=>{const l=Zone.current;return r._zone=l,n.call(l,r,i,o)})}finally{t._decrementTask(c)}})}else c=t._getCurrentSpan(s);try{return n.call(s,r,i,o)}finally{c&&t._shouldCountTask(r,s)&&t._decrementTask(c)}}}_shouldCountTask(t,n){if(t._zone&&(n=t._zone),!n||!t.data||t.data.isPeriodic)return!1;const r=this._getCurrentSpan(n);return!r||!this._spansData.get(r)?!1:t.type==="macroTask"||t.type==="microTask"}_tryToEndSpan(t,n){t&&this._spansData.get(t)&&(t.end(n),this._spansData.delete(t))}enable(){const t=this._getZoneWithPrototype();this._diag.debug("applying patch to",et.moduleName,et.version,"zone:",!!t),t?(te(t.prototype.runTask)&&(this._unwrap(t.prototype,"runTask"),this._diag.debug("removing previous patch from method runTask")),te(t.prototype.scheduleTask)&&(this._unwrap(t.prototype,"scheduleTask"),this._diag.debug("removing previous patch from method scheduleTask")),te(t.prototype.cancelTask)&&(this._unwrap(t.prototype,"cancelTask"),this._diag.debug("removing previous patch from method cancelTask")),this._zonePatched=!0,this._wrap(t.prototype,"runTask",this._patchZoneRunTask()),this._wrap(t.prototype,"scheduleTask",this._patchZoneScheduleTask()),this._wrap(t.prototype,"cancelTask",this._patchZoneCancelTask())):(this._zonePatched=!1,this._getPatchableEventTargets().forEach(n=>{te(n.addEventListener)&&(this._unwrap(n,"addEventListener"),this._diag.debug("removing previous patch from method addEventListener")),te(n.removeEventListener)&&(this._unwrap(n,"removeEventListener"),this._diag.debug("removing previous patch from method removeEventListener")),this._wrap(n,"addEventListener",this._patchAddEventListener()),this._wrap(n,"removeEventListener",this._patchRemoveEventListener())})),this._patchHistoryApi()}disable(){const t=this._getZoneWithPrototype();this._diag.debug("removing patch from",et.moduleName,et.version,"zone:",!!t),t&&this._zonePatched?(te(t.prototype.runTask)&&this._unwrap(t.prototype,"runTask"),te(t.prototype.scheduleTask)&&this._unwrap(t.prototype,"scheduleTask"),te(t.prototype.cancelTask)&&this._unwrap(t.prototype,"cancelTask")):this._getPatchableEventTargets().forEach(n=>{te(n.addEventListener)&&this._unwrap(n,"addEventListener"),te(n.removeEventListener)&&this._unwrap(n,"removeEventListener")}),this._unpatchHistoryApi()}_getZoneWithPrototype(){return window.Zone}};C(lo,"version","0.1.1"),C(lo,"moduleName","user-interaction");let Fb=lo;const po=class Oo extends es{constructor(t={}){super(Oo.moduleName,Oo.version,t),C(this,"_getLDContextKeyAttributes"),C(this,"_unlisten"),C(this,"_lastUrl",""),this._getLDContextKeyAttributes=t.getLDContextKeyAttributes}init(){}enable(){this._lastUrl=window.location.href,this._unlisten=Wp(t=>{var n;const r=this._lastUrl;if(this._lastUrl=t,r!==t)try{const i=this.tracer.startSpan(Gp,{attributes:{[we]:t,"page_view.previous_url":r,"page_view.url":t}}),o=(n=this._getLDContextKeyAttributes)==null?void 0:n.call(this);o&&i.setAttributes(o),i.end()}catch(i){this._diag.error("failed to create page view span",i)}})}disable(){var t;(t=this._unlisten)==null||t.call(this),this._unlisten=void 0}};C(po,"version","0.1.0"),C(po,"moduleName","location-change");let Vb=po,z={},gt,Qn;const We="highlight.record",Hb="highlight.session_id",fo=new Map,Zu=e=>`${e.spanContext().traceId}:${e.spanContext().spanId}`,ec="launchdarkly.js.log",Gb="launchdarkly.exception.id",tc="launchdarkly.sampling.ratio",nc="log.severity",rc="log.message",qb=(e,t)=>{var n,r,i,o,a,u,c,s,l,p;if(z.tracerProvider||z.meterProvider){console.warn("OTEL already initialized. Skipping...");return}gt=e;const f=e.backendUrl||void 0||"https://pub.highlight.io",m=[...(r=(n=e.networkRecordingOptions)==null?void 0:n.urlBlocklist)!=null?r:[],...s_],v=(i=e.environment)!=null?i:"production",y={url:e.otlpEndpoint+"/v1/traces",concurrencyLimit:10,timeoutMillis:3e4,compression:"gzip",keepAlive:!0,httpAgentOptions:{timeout:6e4,keepAlive:!0}},g=new Db(y,t),E=new Zn(g,{maxExportBatchSize:1024,maxQueueSize:2048,exportTimeoutMillis:y.timeoutMillis,scheduledDelayMillis:5e3}),S=new Xt({[fp]:(o=e.serviceName)!=null?o:"highlight-browser",[hp]:e.serviceVersion,"deployment.environment.name":v,"highlight.project_id":e.projectId,[mp]:navigator.userAgent,"browser.language":navigator.language,"telemetry.distro.name":"@highlight-run/observability","telemetry.distro.version":Qp});z.tracerProvider=new _m({resource:S,mergeResourceWithDefaults:!0,spanProcessors:[E]}),k.setGlobalTracerProvider(z.tracerProvider);const P=new Ub(Q(R({},y),{url:e.otlpEndpoint+"/v1/metrics"})),j=new JE({exporter:P,exportIntervalMillis:y.timeoutMillis,exportTimeoutMillis:y.timeoutMillis});z.meterProvider=new UT({resource:S,readers:[j]}),ct.setGlobalMeterProvider(z.meterProvider);let $=[];if(((a=e.instrumentations)==null?void 0:a["@opentelemetry/instrumentation-document-load"])!==!1&&$.push(new Um({applyCustomAttributesOnSpan:{documentLoad:sc,documentFetch:sc,resourceFetch:nS}})),((u=e.instrumentations)==null?void 0:u["@opentelemetry/instrumentation-user-interaction"])!==!1&&$.push(new Fb({productAnalyticsEvents:e.productAnalyticsEvents,getLDContextKeyAttributes:e.getLDContextKeyAttributes})),((c=e.productAnalyticsEvents)==null?void 0:c.pageViews)!==!1&&$.push(new Vb({getLDContextKeyAttributes:e.getLDContextKeyAttributes})),(s=e.networkRecordingOptions)!=null&&s.enabled){if(((l=e.instrumentations)==null?void 0:l["@opentelemetry/instrumentation-fetch"])!==!1){const X=new Og({propagateTraceHeaderCorsUrls:cc(e.tracingOrigins),applyCustomAttributesOnSpan:(U,Te,ye)=>{var W,Je;if(!U.attributes)return;const be=U;if(be.attributes[We]!==!1){if(ac(U,Te.body,Te.headers,e.networkRecordingOptions),!(ye instanceof Response)){U.setAttributes({"http.response.error":ye.message,[Qo]:ye.status});return}if(!((W=e.networkRecordingOptions)!=null&&W.requestResponseSanitizer&&(vo(U,e.networkRecordingOptions.requestResponseSanitizer),be.attributes[We]===!1))&&(Je=e.networkRecordingOptions)!=null&&Je.recordHeadersAndBody){const h=ce(void 0,null,function*(){var _,L,H,V,M,Qe;const Ze=yield E_(ye,(_=e.networkRecordingOptions)==null?void 0:_.bodyKeysToRecord,(L=e.networkRecordingOptions)==null?void 0:L.networkBodyKeysToRedact),rn=Object.fromEntries(ye.headers.entries()),GS=Fi((V=(H=e.networkRecordingOptions)==null?void 0:H.networkHeadersToRedact)!=null?V:[],rn,(M=e.networkRecordingOptions)==null?void 0:M.headerKeysToRecord),qS=ho(GS,"http.response.header");Object.assign(U.attributes,R({"http.response.body":Ze},qS)),(Qe=e.networkRecordingOptions)!=null&&Qe.requestResponseSanitizer&&vo(U,e.networkRecordingOptions.requestResponseSanitizer)});fo.set(Zu(U),h)}}}});$.push(X)}((p=e.instrumentations)==null?void 0:p["@opentelemetry/instrumentation-xml-http-request"])!==!1&&$.push(new o_({propagateTraceHeaderCorsUrls:cc(e.tracingOrigins),applyCustomAttributesOnSpan:(X,U)=>{var Te,ye,W,Je;const be=U;if(!(!X.attributes||X.attributes[We]===!1)){if(ac(X,be._body,be._requestHeaders,e.networkRecordingOptions),(Te=e.networkRecordingOptions)!=null&&Te.recordHeadersAndBody){let h="";(U.responseType===""||U.responseType==="text")&&(h=Hi(U.responseText,(ye=e.networkRecordingOptions)==null?void 0:ye.networkBodyKeysToRedact,(W=e.networkRecordingOptions)==null?void 0:W.bodyKeysToRecord,void 0));const _=Yb(U.getAllResponseHeaders());eS(X,_,h,e.networkRecordingOptions)}(Je=e.networkRecordingOptions)!=null&&Je.requestResponseSanitizer&&vo(X,e.networkRecordingOptions.requestResponseSanitizer)}}}))}ov({instrumentations:$});const ne=new Ns;return ne.enable(),z.tracerProvider.register({contextManager:ne,propagator:new _d({propagators:[new Kh,new Xb({backendUrl:f,otlpEndpoint:e.otlpEndpoint,tracingOrigins:e.tracingOrigins,urlBlocklist:m})]})}),Qn=zb(g,P,E,()=>z),z},zb=(e,t,n,r)=>{if(typeof document>"u"||typeof window>"u")return()=>{};const i=()=>{var u,c;e.setUnloading(!0),t.setUnloading(!0),n.setSkipPendingOnFlush(!0);const s=r();(u=s.tracerProvider)==null||u.forceFlush().catch(()=>{}),(c=s.meterProvider)==null||c.forceFlush().catch(()=>{})},o=()=>{document.visibilityState==="hidden"?i():document.visibilityState==="visible"&&(e.setUnloading(!1),t.setUnloading(!1),n.setSkipPendingOnFlush(!1))},a=()=>i();return document.addEventListener("visibilitychange",o),window.addEventListener("pagehide",a),()=>{document.removeEventListener("visibilitychange",o),window.removeEventListener("pagehide",a)}};class Zn extends Ls{constructor(){super(...arguments),C(this,"_pendingSpans",new Set),C(this,"_skipPendingOnFlush",!1)}setSkipPendingOnFlush(t){this._skipPendingOnFlush=t}onStart(t,n){t.setAttribute(Hb,Ae()),super.onStart(t,n)}onEnd(t){if(t.attributes[We]===!1)return;const n=Zu(t),r=fo.get(n);if(r){const i=r.catch(o=>{console.warn("[CustomBatchSpanProcessor] Failed to capture response body attributes",o)}).finally(()=>{fo.delete(n),this._pendingSpans.delete(i),t.attributes[We]!==!1&&super.onEnd(t)});this._pendingSpans.add(i);return}super.onEnd(t)}shutdown(){return ce(this,null,function*(){return this._skipPendingOnFlush||(yield Promise.allSettled(this._pendingSpans)),ma(Zn.prototype,this,"shutdown").call(this)})}forceFlush(){return ce(this,null,function*(){return this._skipPendingOnFlush||(yield Promise.allSettled(this._pendingSpans)),ma(Zn.prototype,this,"forceFlush").call(this)})}}class Xb extends Dd{constructor(t){super(),C(this,"highlightEndpoints"),C(this,"tracingOrigins"),C(this,"urlBlocklist"),this.highlightEndpoints=[t.backendUrl,`${t.otlpEndpoint}/v1/traces`,`${t.otlpEndpoint}/v1/logs`,`${t.otlpEndpoint}/v1/metrics`],this.tracingOrigins=t.tracingOrigins,this.urlBlocklist=t.urlBlocklist}inject(t,n,r){var i;const o=k.getSpan(t);if(!o||!o.attributes)return;const a=lc(o);typeof a=="string"&&(tS(a,this.highlightEndpoints,this.tracingOrigins,this.urlBlocklist)||o.setAttribute(We,!1),!y_(a,(i=this.tracingOrigins)!=null?i:[],this.urlBlocklist))||super.inject(t,n,r)}}const ic="highlight-browser",Kb=ic,oc=()=>{var e;return(e=z.tracerProvider)==null?void 0:e.getTracer(ic)},er=()=>{var e;return(e=z.meterProvider)==null?void 0:e.getMeter(Kb)},Wb=()=>ce(void 0,null,function*(){Qn&&(Qn(),Qn=void 0),yield Promise.allSettled([ce(void 0,null,function*(){z.tracerProvider?(yield z.tracerProvider.shutdown(),z.tracerProvider=void 0):console.warn("OTEL shutdown called without initialized tracerProvider.")}),ce(void 0,null,function*(){z.meterProvider?(yield z.meterProvider.shutdown(),z.meterProvider=void 0):console.warn("OTEL shutdown called without initialized meterProvider.")})])}),ac=(e,t,n,r)=>{var i;if(!e.attributes)return;const o=lc(e),a=Vi(o),u=Ks(a),c=typeof t=="string"?t:String(t);try{const s=t?JSON.parse(c):void 0;s!=null&&s.operationName&&e.setAttribute("graphql.operation.name",s.operationName)}catch{}if(e.setAttributes({"highlight.type":"http.request",[mt]:a,[we]:a,[gn]:u.pathname,[yp]:u.search}),e.setAttributes(Jb(u.searchParams,"url.query_params")),r!=null&&r.recordHeadersAndBody){const s=Hi(t,r.networkBodyKeysToRedact,r.bodyKeysToRecord,n);e.setAttribute("http.request.body",s);const l=Fi((i=r.networkHeadersToRedact)!=null?i:[],n,r.headerKeysToRecord),p=ho(l,"http.request.header");e.setAttributes(p)}},Yb=e=>{const t={};return e&&e.trim().split(/[\r\n]+/).forEach(n=>{const r=n.split(": "),i=r.shift();i&&(t[i]=r.join(": "))}),t},ho=(e,t)=>{const n={};return Object.entries(e).forEach(([r,i])=>{const o=r.toLowerCase().replace(/_/g,"-"),a=`${t}.${o}`,u=Zb(o,i);if(n[a]){const c=n[a];Array.isArray(c)?n[a]=[...c,...u]:n[a]=[c,...u]}else n[a]=u.length===1?u[0]:u}),n},Jb=(e,t)=>{const n={};for(const[r,i]of e.entries()){const o=`${t}.${r}`,a=n[o];a===void 0?n[o]=i:Array.isArray(a)?a.push(i):n[o]=[a,i]}return n},Qb=new Set(["accept","accept-charset","accept-encoding","accept-language","accept-ranges","allow","cache-control","connection","content-encoding","content-language","expect","if-match","if-none-match","pragma","proxy-authenticate","te","trailer","transfer-encoding","upgrade","vary","via","warning","www-authenticate","access-control-allow-headers","access-control-allow-methods","access-control-expose-headers","access-control-request-headers"]),Zb=(e,t)=>Qb.has(e)?t.split(",").map(n=>n.trim()).filter(n=>n.length>0):[t],eS=(e,t,n,r)=>{var i;e.setAttribute("http.response.body",n);const o=Fi((i=r.networkHeadersToRedact)!=null?i:[],t,r.headerKeysToRecord),a=ho(o,"http.response.header");e.setAttributes(a)},vo=(e,t)=>{var n,r,i,o,a,u,c,s,l,p;const f=e.attributes,m={},v={};for(const[P,j]of Object.entries(f))P.startsWith("http.request.header.")&&(m[P.slice(20)]=String(j)),P.startsWith("http.response.header.")&&(v[P.slice(21)]=String(j));let y={request:{sessionSecureID:"",id:"",url:(r=(n=f[we])!=null?n:f[mt])!=null?r:"",verb:(i=f["http.request.method"])!=null?i:"GET",headers:m,body:(o=f["http.request.body"])!=null?o:""},response:{status:Number((a=f[Qo])!=null?a:0),headers:v,body:(u=f["http.response.body"])!=null?u:""},urlBlocked:!1},g=!0;try{y.request.body=JSON.parse(y.request.body)}catch{g=!1}let E=!0;try{y.response.body=JSON.parse(y.response.body)}catch{E=!1}let S;try{S=t(y)}catch{return}if(!S){Object.assign(e.attributes,{[We]:!1});return}g&&(c=S.request)!=null&&c.body&&(S.request.body=JSON.stringify(S.request.body)),E&&(s=S.response)!=null&&s.body&&(S.response.body=JSON.stringify(S.response.body)),Object.assign(e.attributes,{"http.request.body":(l=S.request.body)!=null?l:"","http.response.body":(p=S.response.body)!=null?p:""})},tS=(e,t,n,r)=>r!=null&&r.some(i=>e.toLowerCase().includes(i))?!1:v_(e,t),sc=e=>{var t,n,r;if(!e.events)return;const i=e.events,o={unload:oe("unloadEventStart","unloadEventEnd",i),dom_interactive:oe("fetchStart","domInteractive",i),dom_content_loaded:oe("domContentLoadedEventStart","domContentLoadedEventEnd",i),dom_complete:oe("fetchStart","domComplete",i),load_event:oe("loadEventStart","loadEventEnd",i),document_load:oe("fetchStart","loadEventEnd",i),first_paint:oe("fetchStart","firstPaint",i),first_contentful_paint:oe("fetchStart","firstContentfulPaint",i),domain_lookup:oe("domainLookupStart","domainLookupEnd",i),connect:oe("connectStart","connectEnd",i),request:oe("requestStart","requestEnd",i),response:oe("responseStart","responseEnd",i)},a=(n=(t=gt?.getIntegrations)==null?void 0:t.call(gt))!=null?n:[];if(o.document_load!==void 0)for(const u of a)u.recordGauge((r=gt?.sessionSecureId)!=null?r:"",{name:qp,value:o.document_load/1e6});Object.entries(o).forEach(([u,c])=>{c!==void 0&&(e.setAttribute(`timings.${u}.ns`,c),e.setAttribute(`timings.${u}.readable`,uc(c)))})};function oe(e,t,n){const r=n.find(a=>a.name===e),i=n.find(a=>a.name===t);if(!r||!i)return;const o=r.time[0]*1e9+r.time[1];return i.time[0]*1e9+i.time[1]-o}const nS=(e,t)=>{const n={domain_lookup:(t.domainLookupEnd-t.domainLookupStart)*1e9,connect:(t.connectEnd-t.connectStart)*1e9,request:(t.responseEnd-t.requestStart)*1e9,response:(t.responseEnd-t.responseStart)*1e9};Object.entries(n).forEach(([r,i])=>{e.setAttribute(`timings.${r}.ns`,i),e.setAttribute(`timings.${r}.readable`,uc(i))})},uc=e=>{if(e>=36e11){const t=e/36e11;return`${Number(t.toFixed(1))}h`}else if(e>=6e10){const t=e/6e10;return`${Number(t.toFixed(1))}m`}else if(e>=1e9){const t=e/1e9;return`${Number(t.toFixed(1))}s`}else if(e>=1e6){const t=e/1e6;return`${Number(t.toFixed(1))}ms`}else if(e>=1e3){const t=e/1e3;return`${Number(t.toFixed(1))}µs`}else return`${Number(e.toFixed(1))}ns`},cc=e=>e===!0?[/localhost/,/^\//,Ws(window.location.host)]:Array.isArray(e)?e.map(t=>typeof t=="string"?new RegExp(t):t):/^$/,lc=e=>e.attributes[we]?e.attributes[we]:e.attributes[mt],rS=30,iS=()=>new Promise(e=>requestAnimationFrame(t=>requestAnimationFrame(n=>e(n-t)))),oS=()=>ce(void 0,null,function*(){const e=[];for(let t=0;t<rS;t++)e.push(yield iS());return e.reduce((t,n)=>t+n,0)/e.length}),aS=(e,t)=>{let n={},r=16.666666666666668;oS().then(c=>r=c);const i=c=>{var s;n!=null&&n.event||(n={event:c,location:window.location.href,timerStart:(s=window.performance)==null?void 0:s.now()},window.requestAnimationFrame(o))},o=()=>{if(!(n!=null&&n.timerStart))return;const c=window.performance.now()-n.timerStart-r;a(c),n={}},a=c=>{const s=(new Date().getTime()-t)/1e3;e({relativeTimestamp:s,jankAmount:c,querySelector:u(),newLocation:window.location.href!=n.location?window.location.href:void 0})},u=()=>{var c;return(c=n?.event)!=null&&c.target?Zp(n.event.target):""};return window.addEventListener("click",i,!0),window.addEventListener("keydown",i,!0),()=>{window.removeEventListener("keydown",i,!0),window.removeEventListener("click",i,!0)}},sS=typeof window<"u",pc=sS&&"performance"in window&&"memory"in performance?performance:{memory:{}},uS=(e,t)=>{let n=0,r=0;const i=()=>{const s=(new Date().getTime()-t)/1e3,l=pc.memory.jsHeapSizeLimit||0,p=pc.memory.usedJSHeapSize||0;e({jsHeapSizeLimit:l,usedJSHeapSize:p,relativeTimestamp:s,fps:n})};i();let o;o=setInterval(()=>{i()},1e3);let a=0,u=Date.now();const c=function(){var s=Date.now();a++,s>1e3+u&&(n=Math.round(a*1e3/(s-u)),a=0,u=s),r=requestAnimationFrame(c)};return c(),()=>{clearInterval(o),cancelAnimationFrame(r)}};var Ie,Zt,fc,tr,yo,_t=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},en=function(e){if(document.readyState==="loading")return"loading";var t=_t();if(t){if(e<t.domInteractive)return"loading";if(t.domContentLoadedEventStart===0||e<t.domContentLoadedEventStart)return"dom-interactive";if(t.domComplete===0||e<t.domComplete)return"dom-content-loaded"}return"complete"},cS=function(e){var t=e.nodeName;return e.nodeType===1?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},nr=function(e,t){var n="";try{for(;e&&e.nodeType!==9;){var r=e,i=r.id?"#"+r.id:cS(r)+(r.classList&&r.classList.value&&r.classList.value.trim()&&r.classList.value.trim().length?"."+r.classList.value.trim().replace(/\s+/g,"."):"");if(n.length+i.length>99)return n||i;if(n=n?i+">"+n:i,r.id)break;e=r.parentNode}}catch{}return n},hc=-1,dc=function(){return hc},Ye=function(e){addEventListener("pageshow",function(t){t.persisted&&(hc=t.timeStamp,e(t))},!0)},rr=function(){var e=_t();return e&&e.activationStart||0},ae=function(e,t){var n=_t(),r="navigate";return dc()>=0?r="back-forward-cache":n&&(document.prerendering||rr()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t===void 0?-1:t,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},Et=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver(function(i){Promise.resolve().then(function(){t(i.getEntries())})});return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}},se=function(e,t,n,r){var i,o;return function(a){t.value>=0&&(a||r)&&((o=t.value-(i||0))||i===void 0)&&(i=t.value,t.delta=o,t.rating=function(u,c){return u>c[1]?"poor":u>c[0]?"needs-improvement":"good"}(t.value,n),e(t))}},mo=function(e){requestAnimationFrame(function(){return requestAnimationFrame(function(){return e()})})},ir=function(e){var t=function(n){n.type!=="pagehide"&&document.visibilityState!=="hidden"||e(n)};addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0)},go=function(e){var t=!1;return function(n){t||(e(n),t=!0)}},Tt=-1,vc=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},or=function(e){document.visibilityState==="hidden"&&Tt>-1&&(Tt=e.type==="visibilitychange"?e.timeStamp:0,lS())},yc=function(){addEventListener("visibilitychange",or,!0),addEventListener("prerenderingchange",or,!0)},lS=function(){removeEventListener("visibilitychange",or,!0),removeEventListener("prerenderingchange",or,!0)},_o=function(){return Tt<0&&(Tt=vc(),yc(),Ye(function(){setTimeout(function(){Tt=vc(),yc()},0)})),{get firstHiddenTime(){return Tt}}},tn=function(e){document.prerendering?addEventListener("prerenderingchange",function(){return e()},!0):e()},mc=[1800,3e3],gc=function(e,t){t=t||{},tn(function(){var n,r=_o(),i=ae("FCP"),o=Et("paint",function(a){a.forEach(function(u){u.name==="first-contentful-paint"&&(o.disconnect(),u.startTime<r.firstHiddenTime&&(i.value=Math.max(u.startTime-rr(),0),i.entries.push(u),n(!0)))})});o&&(n=se(e,i,mc,t.reportAllChanges),Ye(function(a){i=ae("FCP"),n=se(e,i,mc,t.reportAllChanges),mo(function(){i.value=performance.now()-a.timeStamp,n(!0)})}))})},_c=[.1,.25],pS=function(e,t){(function(n,r){r=r||{},gc(go(function(){var i,o=ae("CLS",0),a=0,u=[],c=function(l){l.forEach(function(p){if(!p.hadRecentInput){var f=u[0],m=u[u.length-1];a&&p.startTime-m.startTime<1e3&&p.startTime-f.startTime<5e3?(a+=p.value,u.push(p)):(a=p.value,u=[p])}}),a>o.value&&(o.value=a,o.entries=u,i())},s=Et("layout-shift",c);s&&(i=se(n,o,_c,r.reportAllChanges),ir(function(){c(s.takeRecords()),i(!0)}),Ye(function(){a=0,o=ae("CLS",0),i=se(n,o,_c,r.reportAllChanges),mo(function(){return i()})}),setTimeout(i,0))}))})(function(n){(function(r){if(r.entries.length){var i=r.entries.reduce(function(u,c){return u&&u.value>c.value?u:c});if(i&&i.sources&&i.sources.length){var o=(a=i.sources).find(function(u){return u.node&&u.node.nodeType===1})||a[0];if(o)return void(r.attribution={largestShiftTarget:nr(o.node),largestShiftTime:i.startTime,largestShiftValue:i.value,largestShiftSource:o,largestShiftEntry:i,loadState:en(i.startTime)})}}var a;r.attribution={}})(n),e(n)},t)},fS=function(e,t){gc(function(n){(function(r){if(r.entries.length){var i=_t(),o=r.entries[r.entries.length-1];if(i){var a=i.activationStart||0,u=Math.max(0,i.responseStart-a);return void(r.attribution={timeToFirstByte:u,firstByteToFCP:r.value-u,loadState:en(r.entries[0].startTime),navigationEntry:i,fcpEntry:o})}}r.attribution={timeToFirstByte:0,firstByteToFCP:r.value,loadState:en(dc())}})(n),e(n)},t)},nn={passive:!0,capture:!0},hS=new Date,Ec=function(e,t){Ie||(Ie=t,Zt=e,fc=new Date,bc(removeEventListener),Tc())},Tc=function(){if(Zt>=0&&Zt<fc-hS){var e={entryType:"first-input",name:Ie.type,target:Ie.target,cancelable:Ie.cancelable,startTime:Ie.timeStamp,processingStart:Ie.timeStamp+Zt};tr.forEach(function(t){t(e)}),tr=[]}},dS=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;e.type=="pointerdown"?function(n,r){var i=function(){Ec(n,r),a()},o=function(){a()},a=function(){removeEventListener("pointerup",i,nn),removeEventListener("pointercancel",o,nn)};addEventListener("pointerup",i,nn),addEventListener("pointercancel",o,nn)}(t,e):Ec(t,e)}},bc=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach(function(t){return e(t,dS,nn)})},Sc=[100,300],vS=function(e,t){t=t||{},tn(function(){var n,r=_o(),i=ae("FID"),o=function(c){c.startTime<r.firstHiddenTime&&(i.value=c.processingStart-c.startTime,i.entries.push(c),n(!0))},a=function(c){c.forEach(o)},u=Et("first-input",a);n=se(e,i,Sc,t.reportAllChanges),u&&ir(go(function(){a(u.takeRecords()),u.disconnect()})),u&&Ye(function(){var c;i=ae("FID"),n=se(e,i,Sc,t.reportAllChanges),tr=[],Zt=-1,Ie=null,bc(addEventListener),c=o,tr.push(c),Tc()})})},yS=function(e,t){vS(function(n){(function(r){var i=r.entries[0];r.attribution={eventTarget:nr(i.target),eventType:i.name,eventTime:i.startTime,eventEntry:i,loadState:en(i.startTime)}})(n),e(n)},t)},Oc=0,Eo=1/0,ar=0,mS=function(e){e.forEach(function(t){t.interactionId&&(Eo=Math.min(Eo,t.interactionId),ar=Math.max(ar,t.interactionId),Oc=ar?(ar-Eo)/7+1:0)})},wc=function(){return yo?Oc:performance.interactionCount||0},gS=function(){"interactionCount"in performance||yo||(yo=Et("event",mS,{type:"event",buffered:!0,durationThreshold:0}))},Ac=[200,500],Lc=0,Rc=function(){return wc()-Lc},ve=[],To={},Cc=function(e){var t=ve[ve.length-1],n=To[e.interactionId];if(n||ve.length<10||e.duration>t.latency){if(n)n.entries.push(e),n.latency=Math.max(n.latency,e.duration);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};To[r.id]=r,ve.push(r)}ve.sort(function(i,o){return o.latency-i.latency}),ve.splice(10).forEach(function(i){delete To[i.id]})}},_S=function(e,t){t=t||{},tn(function(){var n;gS();var r,i=ae("INP"),o=function(u){u.forEach(function(l){l.interactionId&&Cc(l),l.entryType==="first-input"&&!ve.some(function(p){return p.entries.some(function(f){return l.duration===f.duration&&l.startTime===f.startTime})})&&Cc(l)});var c,s=(c=Math.min(ve.length-1,Math.floor(Rc()/50)),ve[c]);s&&s.latency!==i.value&&(i.value=s.latency,i.entries=s.entries,r())},a=Et("event",o,{durationThreshold:(n=t.durationThreshold)!==null&&n!==void 0?n:40});r=se(e,i,Ac,t.reportAllChanges),a&&("interactionId"in PerformanceEventTiming.prototype&&a.observe({type:"first-input",buffered:!0}),ir(function(){o(a.takeRecords()),i.value<0&&Rc()>0&&(i.value=0,i.entries=[]),r(!0)}),Ye(function(){ve=[],Lc=wc(),i=ae("INP"),r=se(e,i,Ac,t.reportAllChanges)}))})},ES=function(e,t){_S(function(n){(function(r){if(r.entries.length){var i=r.entries.sort(function(o,a){return a.duration-o.duration||a.processingEnd-a.processingStart-(o.processingEnd-o.processingStart)})[0];r.attribution={eventTarget:nr(i.target),eventType:i.name,eventTime:i.startTime,eventEntry:i,loadState:en(i.startTime)}}else r.attribution={}})(n),e(n)},t)},Nc=[2500,4e3],bo={},TS=function(e,t){(function(n,r){r=r||{},tn(function(){var i,o=_o(),a=ae("LCP"),u=function(l){var p=l[l.length-1];p&&p.startTime<o.firstHiddenTime&&(a.value=Math.max(p.startTime-rr(),0),a.entries=[p],i())},c=Et("largest-contentful-paint",u);if(c){i=se(n,a,Nc,r.reportAllChanges);var s=go(function(){bo[a.id]||(u(c.takeRecords()),c.disconnect(),bo[a.id]=!0,i(!0))});["keydown","click"].forEach(function(l){addEventListener(l,function(){return setTimeout(s,0)},!0)}),ir(s),Ye(function(l){a=ae("LCP"),i=se(n,a,Nc,r.reportAllChanges),mo(function(){a.value=performance.now()-l.timeStamp,bo[a.id]=!0,i(!0)})})}})})(function(n){(function(r){if(r.entries.length){var i=_t();if(i){var o=i.activationStart||0,a=r.entries[r.entries.length-1],u=a.url&&performance.getEntriesByType("resource").filter(function(m){return m.name===a.url})[0],c=Math.max(0,i.responseStart-o),s=Math.max(c,u?(u.requestStart||u.startTime)-o:0),l=Math.max(s,u?u.responseEnd-o:0),p=Math.max(l,a?a.startTime-o:0),f={element:nr(a.element),timeToFirstByte:c,resourceLoadDelay:s-c,resourceLoadTime:l-s,elementRenderDelay:p-l,navigationEntry:i,lcpEntry:a};return a.url&&(f.url=a.url),u&&(f.lcpResourceEntry=u),void(r.attribution=f)}}r.attribution={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadTime:0,elementRenderDelay:r.value}})(n),e(n)},t)},xc=[800,1800],bS=function e(t){document.prerendering?tn(function(){return e(t)}):document.readyState!=="complete"?addEventListener("load",function(){return e(t)},!0):setTimeout(t,0)},SS=function(e,t){t=t||{};var n=ae("TTFB"),r=se(e,n,xc,t.reportAllChanges);bS(function(){var i=_t();if(i){var o=i.responseStart;if(o<=0||o>performance.now())return;n.value=Math.max(o-rr(),0),n.entries=[i],r(!0),Ye(function(){n=ae("TTFB",0),(r=se(e,n,xc,t.reportAllChanges))(!0)})}})},OS=function(e,t){SS(function(n){(function(r){if(r.entries.length){var i=r.entries[0],o=i.activationStart||0,a=Math.max(i.domainLookupStart-o,0),u=Math.max(i.connectStart-o,0),c=Math.max(i.requestStart-o,0);r.attribution={waitingTime:a,dnsTime:u-a,connectionTime:c-u,requestTime:r.value-c,navigationEntry:i}}else r.attribution={waitingTime:0,dnsTime:0,connectionTime:0,requestTime:0}})(n),e(n)},t)};const wS=e=>(pS(e),fS(e),yS(e),TS(e),OS(e),ES(e),()=>{}),bt=typeof navigator<"u"&&"connection"in navigator?navigator.connection:{},AS=(e,t)=>{const n=()=>{const i=(new Date().getTime()-t)/1e3;e({relativeTimestamp:i,downlink:bt.downlink,downlinkMax:bt.downlinkMax,effectiveType:bt.effectiveType,rtt:bt.rtt,saveData:bt.saveData,type:bt.type})};n();let r;return r=setInterval(()=>{n()},1e3),()=>{clearInterval(r)}},LS=()=>{if(!("performance"in window&&"memory"in performance))return{getDeviceDetails:void 0,getCurrentDeviceDetails:void 0};const e=window.performance;return{getDeviceDetails:()=>({deviceMemory:RS(navigator.deviceMemory||0)}),getCurrentDeviceDetails:()=>{const t=So(e.memory.jsHeapSizeLimit),n=So(e.memory.totalJSHeapSize),r=So(e.memory.usedJSHeapSize);return{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}},So=e=>e/Math.pow(1e3,2),RS=e=>1024*e;function CS(e){return"regexValue"in e}function NS(e){return"matchValue"in e}function xS(e){const t=Math.trunc(e);return t===1?!0:t===0?!1:Math.floor(Math.random()*t)===0}class PS{constructor(t=xS){C(this,"regexCache",new Map),C(this,"config"),this.sampler=t}setConfig(t){this.config=t}isSamplingEnabled(){var t,n,r,i;return!!((n=(t=this.config)==null?void 0:t.logs)!=null&&n.length||(i=(r=this.config)==null?void 0:r.spans)!=null&&i.length)}shouldSample(t){var n,r;return t.name===ec?this.sampleLog((n=this.config)==null?void 0:n.logs,t):this.sampleSpan((r=this.config)==null?void 0:r.spans,t)}matchesValue(t,n){if(!t)return!1;if(NS(t))return t.matchValue===n;if(CS(t)){const r=t.regexValue;if(r===null)return!1;this.regexCache.has(r)||this.regexCache.set(r,new RegExp(r));const i=this.regexCache.get(r);if(typeof n=="string")return i.test(n)}return!1}matchesAttributes(t,n){if(t)for(const r of t){let i=!1;for(const o of Object.keys(n))if(this.matchesValue(r.key,o)){const a=n[o];if(this.matchesValue(r.attribute,a)){i=!0;break}}if(!i)return!1}return!0}matchEvent(t,n){return!(t.name&&!this.matchesValue(t.name,n.name)||t.attributes&&(!n.attributes||!this.matchesAttributes(t.attributes,n.attributes)))}matchesEvents(t,n){if(t)for(const r of t){let i=!1;for(const o of n)if(this.matchEvent(r,o)){i=!0;break}if(!i)return!1}return!0}matchesSpanConfig(t,n){return!(t.name&&!this.matchesValue(t.name,n.name)||!this.matchesAttributes(t.attributes,n.attributes)||!this.matchesEvents(t.events,n.events))}matchesLogConfig(t,n){if(t.severityText){const r=n[nc];if(!this.matchesValue(t.severityText,r))return!1}if(t.message){const r=n[rc];if(!this.matchesValue(t.message,r))return!1}return!!this.matchesAttributes(t.attributes,n)}sampleSpan(t,n){if(t){for(const r of t)if(this.matchesSpanConfig(r,n))return{sample:this.sampler(r.samplingRatio),attributes:{[tc]:r.samplingRatio}}}return{sample:!0}}sampleLog(t,n){if(t){for(const r of t)if(this.matchesLogConfig(r,n.attributes))return{sample:this.sampler(r.samplingRatio),attributes:{[tc]:r.samplingRatio}}}return{sample:!0}}}const Pc=()=>{const e={end:()=>{},spanContext:()=>({traceId:"",spanId:"",traceFlags:0}),setAttribute:(t,n)=>e,setAttributes:t=>e,addEvent:(t,n,r)=>e,addLinks:t=>e,setStatus:t=>e,recordException:()=>{},addLink:()=>e,updateName:()=>e,isRecording:()=>!1};return e},IS=()=>{if(typeof window>"u"||typeof PerformanceObserver>"u")return!1;const e=PerformanceObserver.supportedEntryTypes;return Array.isArray(e)&&e.includes("longtask")},kS=e=>{if(!IS())return()=>{};let t;try{t=new PerformanceObserver(n=>{var r;for(const i of n.getEntries()){const o=(r=i.attribution)==null?void 0:r[0];e({duration:i.duration,name:i.name,startTime:i.startTime,containerType:o?.containerType,containerSrc:o?.containerSrc,containerId:o?.containerId,containerName:o?.containerName})}}),t.observe({type:"longtask",buffered:!0})}catch{return()=>{}}return()=>{try{t.disconnect()}catch{}}},MS=new Set(["string","number","boolean"]),DS=()=>typeof window<"u"&&typeof window.ReportingObserver<"u",US=e=>{const t={};if(!e||typeof e!="object")return t;for(const[n,r]of Object.entries(e))if(r!=null)if(MS.has(typeof r))t[`report.body.${n}`]=r;else try{t[`report.body.${n}`]=JSON.stringify(r)}catch{}return t},jS=e=>{var t;const n=(t=e.body)!=null?t:{},r=n.message||n.reason||n.id||e.type;return typeof r=="string"?r:e.type},$S=(e,t)=>{if(!DS())return()=>{};const n=["deprecation","intervention","csp-violation"],r=window.ReportingObserver;let i;try{i=new r(o=>{var a,u;for(const c of o){const s=(a=c.type)!=null?a:"unknown",l=(u=c.body)!=null?u:{},p=R({"report.type":s,"report.url":c.url},US(l)),f=jS({type:s,body:l});e(s==="deprecation"?{kind:"log",level:"warn",type:s,message:f,url:c.url,attributes:p}:{kind:"error",type:s,message:f,url:c.url,attributes:p})}},{buffered:!0,types:n}),i.observe()}catch{return()=>{}}return()=>{try{i.disconnect()}catch{}}},BS="exception",FS=function(e,t,n){if(!e)return;const r=R({},n);typeof t=="string"?r[wr]=t:t&&(t.code?r[Ar]=t.code.toString():t.name&&(r[Ar]=t.name),t.message&&(r[wr]=t.message),t.stack&&(r[lp]=t.stack)),r[Ar]||r[wr]?e.addEvent(BS,r):Oe("otel","recordException","warn",`Failed to record an exception ${t}`)};class VS{constructor(t){C(this,"organizationID"),C(this,"_options"),C(this,"_integrations",[]),C(this,"_gauges",new Map),C(this,"_counters",new Map),C(this,"_histograms",new Map),C(this,"_up_down_counters",new Map),C(this,"sampler",new PS),C(this,"_started",!1),C(this,"_ldContextKeys"),C(this,"graphqlSDK"),this._options=t,this.organizationID=t.projectId}_productAnalyticsEvents(){var t;const n=(t=this._options)==null?void 0:t.productAnalytics;if(n===!1)return{};const r={clicks:!0,pageViews:!0,trackEvents:!0};if(n===void 0||n===!0)return r;for(const i of Object.keys(n))n[i]===!1&&(r[i]=!1);return r}setLDContextKeyAttributes(t){t&&(this._ldContextKeys=Object.fromEntries(Object.entries(t).map(([n,r])=>[`${Fp}.${n}`,r])))}getLDContextKeyAttributes(){return this._ldContextKeys}start(){return ce(this,null,function*(){var t,n,r,i,o,a,u,c,s,l,p,f,m,v,y;if(this._started)return;this._started=!0,qb({backendUrl:(n=(t=this._options)==null?void 0:t.backendUrl)!=null?n:"https://pub.observability.app.launchdarkly.com",otlpEndpoint:(o=(i=(r=this._options)==null?void 0:r.otel)==null?void 0:i.otlpEndpoint)!=null?o:"https://otel.observability.app.launchdarkly.com",projectId:this._options.projectId,sessionSecureId:this._options.sessionSecureId,environment:(u=(a=this._options)==null?void 0:a.environment)!=null?u:"production",networkRecordingOptions:typeof((c=this._options)==null?void 0:c.networkRecording)=="object"?this._options.networkRecording:void 0,tracingOrigins:(s=this._options)==null?void 0:s.tracingOrigins,serviceName:(p=(l=this._options)==null?void 0:l.serviceName)!=null?p:"browser",serviceVersion:(f=this._options)==null?void 0:f.version,instrumentations:(v=(m=this._options)==null?void 0:m.otel)==null?void 0:v.instrumentations,productAnalyticsEvents:this._productAnalyticsEvents(),getLDContextKeyAttributes:()=>this.getLDContextKeyAttributes(),getIntegrations:()=>this._integrations},this.sampler),this._gauges.clear(),this._counters.clear(),this._histograms.clear(),this._up_down_counters.clear();const g=new jl((y=this._options.backendUrl)!=null?y:"https://pub.observability.app.launchdarkly.com",{headers:{}});this.graphqlSDK=ap(g,Cp()),yield this.configureSampling(),this.setupListeners()})}stop(){return ce(this,null,function*(){this._started&&(this._started=!1,yield Wb())})}configureSampling(){return ce(this,null,function*(){try{const t=yield this.graphqlSDK.GetSamplingConfig({organization_verbose_id:`${this.organizationID}`});this.sampler.setConfig(t.sampling)}catch(t){Se("sampling","warn",`LaunchDarkly Observability: Failed to configure sampling: ${t}`)}})}_recordLog(t,n,r,i){this.startSpan(ec,o=>{var a,u,c,s;const l=typeof t=="string"?t:dn(t),p=i?i.map(f=>f.toString()).join(`
|
|
309
|
-
`):void 0;if(o?.addEvent("log",R({[nc]:n,[rc]:l,"code.stacktrace":p},r)),this._options.reportConsoleErrors&&n==="error"){const f=new Error(l);o?.recordException(f),o?.setStatus({code:Ln.ERROR,message:l}),i?this._recordErrorMessage({error:f,event:f.message,type:"custom",url:window.location.href,source:"frontend",lineNumber:(u=(a=i[0])==null?void 0:a.lineNumber)!=null?u:0,columnNumber:(s=(c=i[0])==null?void 0:c.columnNumber)!=null?s:0,stackTrace:i,timestamp:new Date().toISOString(),id:Fr()}):this.recordError(f)}})}_recordErrorMessage(t,n){try{t.payload&&(n=R(R({},JSON.parse(t.payload)),n||{}))}catch{}this.startSpan("highlight.exception",o=>{var a;FS(o,(a=t.error)!=null?a:new Error(t.event),{[Gb]:t.id}),o?.setAttributes(R({event:t.event,type:t.type,url:t.url,source:t.source,lineNumber:t.lineNumber,columnNumber:t.columnNumber},n))});const r=t,i=ff(r,["payload"]);for(const o of this._integrations)o.error(Ae(),Q(R({},i),{payload:JSON.stringify(n)}))}recordError(t,n,r,i,o){var a,u,c,s;t=t||new Error("Unknown error"),t instanceof Error&&t.cause&&(r=Q(R({},r),{"exception.cause":JSON.stringify(t.cause)}));let l=n?n+":"+t.message:t.message;o==="React.ErrorBoundary"&&(l="ErrorBoundary: "+l);const p=Sn(t),f={error:t,event:l,type:o??"custom",url:window.location.href,source:i??"frontend",lineNumber:(a=p[0])!=null&&a.lineNumber?(u=p[0])==null?void 0:u.lineNumber:0,columnNumber:(c=p[0])!=null&&c.columnNumber?(s=p[0])==null?void 0:s.columnNumber:0,stackTrace:p,timestamp:new Date().toISOString(),id:Fr()};this._recordErrorMessage(f,r)}recordCount(t){var n,r;let i=this._counters.get(t.name);if(!i){if(i=(n=er())==null?void 0:n.createCounter(t.name),!i)return;this._counters.set(t.name,i)}i.add(t.value,Q(R(R({},(r=this._ldContextKeys)!=null?r:{}),t.attributes),{"highlight.session_id":Ae()}))}recordGauge(t){var n,r,i;let o=this._gauges.get(t.name);if(!o){if(o=(n=er())==null?void 0:n.createGauge(t.name),!o)return;this._gauges.set(t.name,o)}const a=R(R({},(r=this._ldContextKeys)!=null?r:{}),t.attributes);o.record(t.value,Q(R({},a),{"highlight.session_id":Ae()}));const u={name:t.name,value:t.value,category:a.category,group:(i=a.group)==null?void 0:i.toString(),tags:Object.entries(a).map(([c,s])=>{var l;return{name:c??"",value:(l=s?.toString())!=null?l:""}})};for(const c of this._integrations)c.recordGauge(Ae(),u)}recordIncr(t){this.recordCount(Q(R({},t),{value:1}))}recordHistogram(t){var n,r;let i=this._histograms.get(t.name);if(!i){if(i=(n=er())==null?void 0:n.createHistogram(t.name),!i)return;this._histograms.set(t.name,i)}i.record(t.value,Q(R(R({},(r=this._ldContextKeys)!=null?r:{}),t.attributes),{"highlight.session_id":Ae()}))}recordUpDownCounter(t){var n,r;let i=this._up_down_counters.get(t.name);if(!i){if(i=(n=er())==null?void 0:n.createUpDownCounter(t.name),!i)return;this._up_down_counters.set(t.name,i)}i.add(t.value,Q(R(R({},(r=this._ldContextKeys)!=null?r:{}),t.attributes),{"highlight.session_id":Ae()}))}startSpan(t,n,r,i){const o=oc();if(!o){const u=Pc();return i===void 0&&r===void 0?n(u):i===void 0?r(u):i(u)}const a=(u,c)=>{const s=c(u);return s instanceof Promise?s.finally(()=>u.end()):(u.end(),s)};return i===void 0&&r===void 0?o.startActiveSpan(t,u=>a(u,n)):i===void 0?o.startActiveSpan(t,n,u=>a(u,r)):o.startActiveSpan(t,n,r,u=>a(u,i))}startManualSpan(t,n,r,i){const o=oc();if(!o){const a=Pc();return i===void 0&&r===void 0?n(a):i===void 0?r(a):i(a)}return i===void 0&&r===void 0?o.startActiveSpan(t,n):i===void 0?o.startActiveSpan(t,n,r):o.startActiveSpan(t,n,r,i)}register(t,n){this._integrations.push(new Kp(t,n))}getHooks(t){return this._integrations.flatMap(n=>{var r,i;return(i=(r=n.getHooks)==null?void 0:r.call(n,t))!=null?i:[]})}submitViewportMetrics({height:t,width:n,availHeight:r,availWidth:i}){this.recordGauge({name:Me.ViewportHeight,value:t,attributes:{category:ie.Device,group:window.location.href}}),this.recordGauge({name:Me.ViewportWidth,value:n,attributes:{category:ie.Device,group:window.location.href}}),this.recordGauge({name:Me.ScreenHeight,value:r,attributes:{category:ie.Device,group:window.location.href}}),this.recordGauge({name:Me.ScreenWidth,value:i,attributes:{category:ie.Device,group:window.location.href}}),this.recordGauge({name:Me.ViewportArea,value:t*n,attributes:{category:ie.Device,group:window.location.href}})}setupListeners(){var t;this._options.disableConsoleRecording||yf(r=>{var i;this._recordLog((i=r.value)==null?void 0:i.join(" "),r.type,r.attributes?JSON.parse(r.attributes):{},r.trace)},{level:(t=this._options.consoleMethodsToRecord)!=null?t:[...hf],logger:"console",stringifyOptions:{depthOfLimit:10,numOfKeysLimit:100,stringLengthLimit:1e3}}),this._options.enablePerformanceRecording!==!1&&(uS(r=>{Object.entries(r).filter(([i])=>i!=="relativeTimestamp").forEach(([i,o])=>o&&this.recordGauge({name:i,value:o,attributes:{category:ie.Performance,group:window.location.href}}))},0),aS(r=>{this.recordGauge({name:"Jank",value:r.jankAmount,attributes:{category:ie.WebVital,group:r.querySelector}})},0)),wf(r=>{var i;if(Lf.includes(r.event)||Rf.some(u=>r.event.includes(u)))return;const o=new Error(r.event);o.stack=dn(r.stackTrace.map(u=>u.toString()));let a={};try{r.payload&&(a=JSON.parse(r.payload))}catch{}this._recordErrorMessage(Q(R({},r),{error:(i=r.error)!=null?i:o}),a)},{enablePromisePatch:!!this._options.enablePromisePatch}),wS(r=>{const{name:i,value:o}=r,{hostname:a,pathname:u,href:c}=window.location,s={group:window.location.pathname,category:ie.WebVital,[we]:Vi(c),[gn]:u,[pp]:a};switch(r.name){case"LCP":{const l=r.attribution;l.element&&(s["web_vital.element"]=l.element),l.url&&(s["web_vital.attribution.url"]=Vi(l.url));break}case"CLS":{const l=r.attribution;l.largestShiftTarget&&(s["web_vital.element"]=l.largestShiftTarget),l.loadState&&(s["web_vital.load_state"]=l.loadState);break}case"INP":{const l=r.attribution;l.eventTarget&&(s["web_vital.element"]=l.eventTarget),l.eventType&&(s["web_vital.event_type"]=l.eventType),l.loadState&&(s["web_vital.load_state"]=l.loadState);break}case"FID":{const l=r.attribution;l.eventTarget&&(s["web_vital.element"]=l.eventTarget),l.eventType&&(s["web_vital.event_type"]=l.eventType);break}case"FCP":{const l=r.attribution;l.loadState&&(s["web_vital.load_state"]=l.loadState);break}}this.recordGauge({name:i,value:o,attributes:s})}),ef(r=>{this.submitViewportMetrics(r)}),AS(r=>{const i={category:ie.Performance,group:window.location.href};r.saveData!==void 0&&(i.saveData=r.saveData.toString()),r.effectiveType!==void 0&&(i.effectiveType=r.effectiveType.toString()),r.type!==void 0&&(i.type=r.type.toString()),Object.entries(r).filter(([o])=>o!=="relativeTimestamp").forEach(([o,a])=>{cp(a)&&this.recordGauge({name:o,value:a,attributes:i})})},new Date().getTime());const{getDeviceDetails:n}=LS();n&&this.recordGauge({name:Me.DeviceMemory,value:n().deviceMemory,attributes:{category:ie.Device,group:window.location.href}}),this._options.enableLongtaskRecording!==!1&&kS(r=>{const i={category:ie.Performance,name:r.name,[gn]:window.location.pathname};r.containerType&&(i.container_type=r.containerType),r.containerSrc&&(i.container_src=r.containerSrc),r.containerId&&(i.container_id=r.containerId),r.containerName&&(i.container_name=r.containerName),this.recordHistogram({name:"long_task.duration",value:r.duration,attributes:i})}),this._options.enableReportingObserver!==!1&&$S(r=>{var i;const o=Q(R({},r.attributes),{[gn]:window.location.pathname});if(r.kind==="log")this._recordLog(r.message,(i=r.level)!=null?i:"warn",o);else{const a=new Error(r.message);this.recordError(a,void 0,Object.fromEntries(Object.entries(o).map(([u,c])=>[u,c===void 0?"":String(c)])),"reporting-observer","custom")}})}recordLog(t,n,r){return this._recordLog(t,n,r)}}class HS extends of{constructor(t){super(t),C(this,"observe"),C(this,"options"),this.options=t}initialize(t,n){try{if(typeof window>"u"||typeof document>"u"){console.warn("@launchdarkly/observability is not initializing because it is not supported in this environment.");return}if(!t){console.warn("@launchdarkly/observability is not initializing because the SDK credential is undefined.");return}this.configureSession(t,n),this.observe=new VS(Q(R({},n),{projectId:t,sessionSecureId:this.sessionSecureID})),n!=null&&n.manualStart||this.observe.start(),re.LDObserve.load(this.observe)}catch(r){Se("Error initializing @launchdarkly/observability SDK","error",r)}}getMetadata(){return{name:"@launchdarkly/observability"}}register(t,n){var r;(r=this.observe)==null||r.register(t,n)}getHooks(t){var n,r,i,o;const a=R(R({[dp]:t.sdk.name,[vp]:t.sdk.version,[xp]:t.clientSideId,[Dp]:"LaunchDarkly"},(n=t.application)!=null&&n.id?{[jp]:t.application.id}:{}),(r=t.application)!=null&&r.version?{[$p]:t.application.version}:{});return this.initialize((o=(i=t.sdkKey)!=null?i:t.mobileKey)!=null?o:t.clientSideId,this.options),[{getMetadata:()=>({name:"@launchdarkly/observability/hooks"}),afterIdentify:(u,c,s)=>{var l,p,f,m,v,y,g,E,S;for(const j of(f=(p=(l=this.observe)==null?void 0:l.getHooks)==null?void 0:p.call(l,t))!=null?f:[])(m=j.afterIdentify)==null||m.call(j,u,c,s);const P=pa(u.context);if((v=this.observe)==null||v.setLDContextKeyAttributes(P),s.status==="completed"){const j=Q(R({},P),{key:(E=(g=(y=this.options)==null?void 0:y.contextFriendlyName)==null?void 0:g.call(y,u.context))!=null?E:Dr(u.context),timeout:u.timeout,canonicalKey:Dr(u.context),[zp]:s.status});(S=this.observe)==null||S.recordLog("LD.identify","info",R(R({},a),j))}return c},afterEvaluation:(u,c,s)=>{var l,p,f,m,v;for(const E of(f=(p=(l=this.observe)==null?void 0:l.getHooks)==null?void 0:p.call(l,t))!=null?f:[])(m=E.afterEvaluation)==null||m.call(E,u,c,s);const y=R({[Pp]:u.flagKey,[Mp]:JSON.stringify(s.value)},s.variationIndex?{[Up]:s.variationIndex}:{});if(s.reason)for(const E in sa){const S=E,P=s.reason[S];P&&(y[sa[S]]=P)}u.context&&(y[Ip]=JSON.stringify(pa(u.context)),y[kp]=Dr(u.context));const g=R(R({},a),y);return(v=this.observe)==null||v.startSpan(Np,E=>{E&&E.addEvent(J,g)}),c},afterTrack:u=>{var c,s,l,p,f,m,v,y,g;for(const S of(l=(s=(c=this.observe)==null?void 0:c.getHooks)==null?void 0:s.call(c,t))!=null?l:[])(p=S.afterTrack)==null||p.call(S,u);if(!(((f=this.options)==null?void 0:f.productAnalytics)!==!1&&(typeof((m=this.options)==null?void 0:m.productAnalytics)!="object"||this.options.productAnalytics.trackEvents!==!1)))return;const E=R(Q(R(R({[we]:window.location.href},(y=(v=this.observe)==null?void 0:v.getLDContextKeyAttributes())!=null?y:{}),a),{key:u.key,value:u.metricValue}),typeof u.data=="object"?u.data:{});(g=this.observe)==null||g.startSpan(Hp,S=>{S&&S.setAttributes(E)})}}]}}re.default=HS,Object.defineProperties(re,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
307
|
+
`,Xs(s,t),`To resolve the conflict:
|
|
308
|
+
`,Ws(s,t))}}catch(l){r={error:l}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return o},e}(),Dg=function(){function e(t){this._backingStorages=t}return e.prototype.record=function(t,n,r,i){this._backingStorages.forEach(function(o){o.record(t,n,r,i)})},e}(),Mg=function(){function e(t,n){this._instrumentName=t,this._valueType=n,this._buffer=new Xt}return e.prototype.observe=function(t,n){if(n===void 0&&(n={}),typeof t!="number"){T.warn("non-number value provided to metric "+this._instrumentName+": "+t);return}this._valueType===Ct.INT&&!Number.isInteger(t)&&(T.warn("INT value type cannot accept a floating-point value for "+this._instrumentName+", ignoring the fractional digits."),t=Math.trunc(t),!Number.isInteger(t))||this._buffer.set(n,t)},e}(),Ug=function(){function e(){this._buffer=new Map}return e.prototype.observe=function(t,n,r){if(r===void 0&&(r={}),!!Ri(t)){var i=this._buffer.get(t);if(i==null&&(i=new Xt,this._buffer.set(t,i)),typeof n!="number"){T.warn("non-number value provided to metric "+t._descriptor.name+": "+n);return}t._descriptor.valueType===Ct.INT&&!Number.isInteger(n)&&(T.warn("INT value type cannot accept a floating-point value for "+t._descriptor.name+", ignoring the fractional digits."),n=Math.trunc(n),!Number.isInteger(n))||i.set(r,n)}},e}(),ki=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},Di=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},Ys=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Js=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},$g=function(){function e(){this._callbacks=[],this._batchCallbacks=[]}return e.prototype.addCallback=function(t,n){var r=this._findCallback(t,n);r>=0||this._callbacks.push({callback:t,instrument:n})},e.prototype.removeCallback=function(t,n){var r=this._findCallback(t,n);r<0||this._callbacks.splice(r,1)},e.prototype.addBatchCallback=function(t,n){var r=new Set(n.filter(Ri));if(r.size===0){T.error("BatchObservableCallback is not associated with valid instruments",n);return}var i=this._findBatchCallback(t,r);i>=0||this._batchCallbacks.push({callback:t,instruments:r})},e.prototype.removeBatchCallback=function(t,n){var r=new Set(n.filter(Ri)),i=this._findBatchCallback(t,r);i<0||this._batchCallbacks.splice(i,1)},e.prototype.observe=function(t,n){return ki(this,void 0,void 0,function(){var r,i,o,a;return Di(this,function(u){switch(u.label){case 0:return r=this._observeCallbacks(t,n),i=this._observeBatchCallbacks(t,n),[4,Ty(Js(Js([],Ys(r),!1),Ys(i),!1))];case 1:return o=u.sent(),a=o.filter(wy).map(function(c){return c.reason}),[2,a]}})})},e.prototype._observeCallbacks=function(t,n){var r=this;return this._callbacks.map(function(i){var o=i.callback,a=i.instrument;return ki(r,void 0,void 0,function(){var u,c;return Di(this,function(s){switch(s.label){case 0:return u=new Mg(a._descriptor.name,a._descriptor.valueType),c=Promise.resolve(o(u)),n!=null&&(c=qe(c,n)),[4,c];case 1:return s.sent(),a._metricStorages.forEach(function(l){l.record(u._buffer,t)}),[2]}})})})},e.prototype._observeBatchCallbacks=function(t,n){var r=this;return this._batchCallbacks.map(function(i){var o=i.callback,a=i.instruments;return ki(r,void 0,void 0,function(){var u,c;return Di(this,function(s){switch(s.label){case 0:return u=new Ug,c=Promise.resolve(o(u)),n!=null&&(c=qe(c,n)),[4,c];case 1:return s.sent(),a.forEach(function(l){var p=u._buffer.get(l);p!=null&&l._metricStorages.forEach(function(f){f.record(p,t)})}),[2]}})})})},e.prototype._findCallback=function(t,n){return this._callbacks.findIndex(function(r){return r.callback===t&&r.instrument===n})},e.prototype._findBatchCallback=function(t,n){return this._batchCallbacks.findIndex(function(r){return r.callback===t&&Sy(r.instruments,n)})},e}(),jg=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Bg=function(e){jg(t,e);function t(n,r,i,o,a){var u=e.call(this,n)||this;return u._attributesProcessor=i,u._aggregationCardinalityLimit=a,u._deltaMetricStorage=new qs(r,u._aggregationCardinalityLimit),u._temporalMetricStorage=new Ks(r,o),u}return t.prototype.record=function(n,r,i,o){r=this._attributesProcessor.process(r,i),this._deltaMetricStorage.record(n,r,i,o)},t.prototype.collect=function(n,r){var i=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(n,this._instrumentDescriptor,i,r)},t}(Hs),Qs=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Mi=function(){function e(){}return e.Noop=function(){return Vg},e}(),Fg=function(e){Qs(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.process=function(n,r){return n},t}(Mi);(function(e){Qs(t,e);function t(n){var r=e.call(this)||this;return r._allowedAttributeNames=n,r}return t.prototype.process=function(n,r){var i=this,o={};return Object.keys(n).filter(function(a){return i._allowedAttributeNames.includes(a)}).forEach(function(a){return o[a]=n[a]}),o},t})(Mi);var Vg=new Fg,Hg=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},Gg=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},qg=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},zg=function(){function e(t,n){this._meterProviderSharedState=t,this._instrumentationScope=n,this.metricStorageRegistry=new kg,this.observableRegistry=new $g,this.meter=new Tg(this)}return e.prototype.registerMetricStorage=function(t){var n=this._registerMetricStorage(t,Bg);return n.length===1?n[0]:new Dg(n)},e.prototype.registerAsyncMetricStorage=function(t){var n=this._registerMetricStorage(t,Lg);return n},e.prototype.collect=function(t,n,r){return Hg(this,void 0,void 0,function(){var i,o,a;return Gg(this,function(u){switch(u.label){case 0:return[4,this.observableRegistry.observe(n,r?.timeoutMillis)];case 1:return i=u.sent(),o=this.metricStorageRegistry.getStorages(t),o.length===0?[2,null]:(a=o.map(function(c){return c.collect(t,n)}).filter(by),a.length===0?[2,{errors:i}]:[2,{scopeMetrics:{scope:this._instrumentationScope,metrics:a},errors:i}])}})})},e.prototype._registerMetricStorage=function(t,n){var r=this,i=this._meterProviderSharedState.viewRegistry.findViews(t,this._instrumentationScope),o=i.map(function(c){var s=Cy(c,t),l=r.metricStorageRegistry.findOrUpdateCompatibleStorage(s);if(l!=null)return l;var p=c.aggregation.createAggregator(s),f=new n(s,p,c.attributesProcessor,r._meterProviderSharedState.metricCollectors,c.aggregationCardinalityLimit);return r.metricStorageRegistry.register(f),f});if(o.length===0){var a=this._meterProviderSharedState.selectAggregations(t.type),u=a.map(function(c){var s=qg(c,2),l=s[0],p=s[1],f=r.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(l,t);if(f!=null)return f;var v=p.createAggregator(t),m=l.selectCardinalityLimit(t.type),y=new n(t,v,Mi.Noop(),[l],m);return r.metricStorageRegistry.registerForCollector(l,y),y});o=o.concat(u)}return o},e}(),Kg=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Xg=function(){function e(t){this.resource=t,this.viewRegistry=new dg,this.metricCollectors=[],this.meterSharedStates=new Map}return e.prototype.getMeterSharedState=function(t){var n=Ey(t),r=this.meterSharedStates.get(n);return r==null&&(r=new zg(this,t),this.meterSharedStates.set(n,r)),r},e.prototype.selectAggregations=function(t){var n,r,i=[];try{for(var o=Kg(this.metricCollectors),a=o.next();!a.done;a=o.next()){var u=a.value;i.push([u,u.selectAggregation(t)])}}catch(c){n={error:c}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},e}(),zn=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},Kn=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},Wg=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Yg=function(e,t,n){if(arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},Jg=function(){function e(t,n){this._sharedState=t,this._metricReader=n}return e.prototype.collect=function(t){return zn(this,void 0,void 0,function(){var n,r,i,o,a=this;return Kn(this,function(u){switch(u.label){case 0:return n=ot(Date.now()),r=[],i=[],o=Array.from(this._sharedState.meterSharedStates.values()).map(function(c){return zn(a,void 0,void 0,function(){var s;return Kn(this,function(l){switch(l.label){case 0:return[4,c.collect(this,n,t)];case 1:return s=l.sent(),s?.scopeMetrics!=null&&r.push(s.scopeMetrics),s?.errors!=null&&i.push.apply(i,Yg([],Wg(s.errors),!1)),[2]}})})}),[4,Promise.all(o)];case 1:return u.sent(),[2,{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:r},errors:i}]}})})},e.prototype.forceFlush=function(t){return zn(this,void 0,void 0,function(){return Kn(this,function(n){switch(n.label){case 0:return[4,this._metricReader.forceFlush(t)];case 1:return n.sent(),[2]}})})},e.prototype.shutdown=function(t){return zn(this,void 0,void 0,function(){return Kn(this,function(n){switch(n.label){case 0:return[4,this._metricReader.shutdown(t)];case 1:return n.sent(),[2]}})})},e.prototype.selectAggregationTemporality=function(t){return this._metricReader.selectAggregationTemporality(t)},e.prototype.selectAggregation=function(t){return this._metricReader.selectAggregation(t)},e.prototype.selectCardinalityLimit=function(t){var n,r,i;return(i=(r=(n=this._metricReader).selectCardinalityLimit)===null||r===void 0?void 0:r.call(n,t))!==null&&i!==void 0?i:2e3},e}(),Zs=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},tu=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},eu=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function Qg(e,t){var n=t??He.empty();return e?He.default().merge(n):n}var Zg=function(){function e(t){var n,r,i,o,a;if(this._shutdown=!1,this._sharedState=new Xg(Qg((a=t?.mergeResourceWithDefaults)!==null&&a!==void 0?a:!0,t?.resource)),t?.views!=null&&t.views.length>0)try{for(var u=eu(t.views),c=u.next();!c.done;c=u.next()){var s=c.value;this._sharedState.viewRegistry.addView(s)}}catch(v){n={error:v}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}if(t?.readers!=null&&t.readers.length>0)try{for(var l=eu(t.readers),p=l.next();!p.done;p=l.next()){var f=p.value;this.addMetricReader(f)}}catch(v){i={error:v}}finally{try{p&&!p.done&&(o=l.return)&&o.call(l)}finally{if(i)throw i.error}}}return e.prototype.getMeter=function(t,n,r){return n===void 0&&(n=""),r===void 0&&(r={}),this._shutdown?(T.warn("A shutdown MeterProvider cannot provide a Meter"),Ef()):this._sharedState.getMeterSharedState({name:t,version:n,schemaUrl:r.schemaUrl}).meter},e.prototype.addMetricReader=function(t){var n=new Jg(this._sharedState,t);t.setMetricProducer(n),this._sharedState.metricCollectors.push(n)},e.prototype.shutdown=function(t){return Zs(this,void 0,void 0,function(){return tu(this,function(n){switch(n.label){case 0:return this._shutdown?(T.warn("shutdown may only be called once per MeterProvider"),[2]):(this._shutdown=!0,[4,Promise.all(this._sharedState.metricCollectors.map(function(r){return r.shutdown(t)}))]);case 1:return n.sent(),[2]}})})},e.prototype.forceFlush=function(t){return Zs(this,void 0,void 0,function(){return tu(this,function(n){switch(n.label){case 0:return this._shutdown?(T.warn("invalid attempt to force flush after MeterProvider shutdown"),[2]):[4,Promise.all(this._sharedState.metricCollectors.map(function(r){return r.forceFlush(t)}))];case 1:return n.sent(),[2]}})})},e}();function t_(e,t){var n=gs(t);return{resource:_s(e.resource),schemaUrl:void 0,scopeMetrics:e_(e.scopeMetrics,n)}}function e_(e,t){return Array.from(e.map(function(n){return{scope:bs(n.scope),metrics:n.metrics.map(function(r){return n_(r,t)}),schemaUrl:n.scope.schemaUrl}}))}function n_(e,t){var n={name:e.descriptor.name,description:e.descriptor.description,unit:e.descriptor.unit},r=a_(e.aggregationTemporality);switch(e.dataPointType){case dt.SUM:n.sum={aggregationTemporality:r,isMonotonic:e.isMonotonic,dataPoints:nu(e,t)};break;case dt.GAUGE:n.gauge={dataPoints:nu(e,t)};break;case dt.HISTOGRAM:n.histogram={aggregationTemporality:r,dataPoints:i_(e,t)};break;case dt.EXPONENTIAL_HISTOGRAM:n.exponentialHistogram={aggregationTemporality:r,dataPoints:o_(e,t)};break}return n}function r_(e,t,n){var r={attributes:Gt(e.attributes),startTimeUnixNano:n.encodeHrTime(e.startTime),timeUnixNano:n.encodeHrTime(e.endTime)};switch(t){case Ct.INT:r.asInt=e.value;break;case Ct.DOUBLE:r.asDouble=e.value;break}return r}function nu(e,t){return e.dataPoints.map(function(n){return r_(n,e.descriptor.valueType,t)})}function i_(e,t){return e.dataPoints.map(function(n){var r=n.value;return{attributes:Gt(n.attributes),bucketCounts:r.buckets.counts,explicitBounds:r.buckets.boundaries,count:r.count,sum:r.sum,min:r.min,max:r.max,startTimeUnixNano:t.encodeHrTime(n.startTime),timeUnixNano:t.encodeHrTime(n.endTime)}})}function o_(e,t){return e.dataPoints.map(function(n){var r=n.value;return{attributes:Gt(n.attributes),count:r.count,min:r.min,max:r.max,sum:r.sum,positive:{offset:r.positive.offset,bucketCounts:r.positive.bucketCounts},negative:{offset:r.negative.offset,bucketCounts:r.negative.bucketCounts},scale:r.scale,zeroCount:r.zeroCount,startTimeUnixNano:t.encodeHrTime(n.startTime),timeUnixNano:t.encodeHrTime(n.endTime)}})}function a_(e){switch(e){case pt.DELTA:return 1;case pt.CUMULATIVE:return 2}}function s_(e,t){return{resourceMetrics:e.map(function(n){return t_(n,t)})}}var u_=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},c_=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function l_(e,t){var n,r=e.spanContext(),i=e.status;return{traceId:t.encodeSpanContext(r.traceId),spanId:t.encodeSpanContext(r.spanId),parentSpanId:t.encodeOptionalSpanContext(e.parentSpanId),traceState:(n=r.traceState)===null||n===void 0?void 0:n.serialize(),name:e.name,kind:e.kind==null?0:e.kind+1,startTimeUnixNano:t.encodeHrTime(e.startTime),endTimeUnixNano:t.encodeHrTime(e.endTime),attributes:Gt(e.attributes),droppedAttributesCount:e.droppedAttributesCount,events:e.events.map(function(o){return f_(o,t)}),droppedEventsCount:e.droppedEventsCount,status:{code:i.code,message:i.message},links:e.links.map(function(o){return p_(o,t)}),droppedLinksCount:e.droppedLinksCount}}function p_(e,t){var n;return{attributes:e.attributes?Gt(e.attributes):[],spanId:t.encodeSpanContext(e.context.spanId),traceId:t.encodeSpanContext(e.context.traceId),traceState:(n=e.context.traceState)===null||n===void 0?void 0:n.serialize(),droppedAttributesCount:e.droppedAttributesCount||0}}function f_(e,t){return{attributes:e.attributes?Gt(e.attributes):[],name:e.name,timeUnixNano:t.encodeHrTime(e.time),droppedAttributesCount:e.droppedAttributesCount||0}}function h_(e,t){var n=gs(t);return{resourceSpans:v_(e,n)}}function d_(e){var t,n,r=new Map;try{for(var i=u_(e),o=i.next();!o.done;o=i.next()){var a=o.value,u=r.get(a.resource);u||(u=new Map,r.set(a.resource,u));var c=a.instrumentationLibrary.name+"@"+(a.instrumentationLibrary.version||"")+":"+(a.instrumentationLibrary.schemaUrl||""),s=u.get(c);s||(s=[],u.set(c,s)),s.push(a)}}catch(l){t={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}function v_(e,t){for(var n=d_(e),r=[],i=n.entries(),o=i.next();!o.done;){for(var a=c_(o.value,2),u=a[0],c=a[1],s=[],l=c.values(),p=l.next();!p.done;){var f=p.value;if(f.length>0){var v=f.map(function(y){return l_(y,t)});s.push({scope:bs(f[0].instrumentationLibrary),spans:v,schemaUrl:f[0].instrumentationLibrary.schemaUrl})}p=l.next()}var m={resource:_s(u),scopeSpans:s,schemaUrl:void 0};r.push(m),o=i.next()}return r}var ru={serializeRequest:function(e){var t=s_([e],{useLongBits:!1}),n=new TextEncoder;return n.encode(JSON.stringify(t))},deserializeResponse:function(e){var t=new TextDecoder;return JSON.parse(t.decode(e))}},iu={serializeRequest:function(e){var t=h_(e,{useHex:!0,useLongBits:!1}),n=new TextEncoder;return n.encode(JSON.stringify(t))},deserializeResponse:function(e){var t=new TextDecoder;return JSON.parse(t.decode(e))}},m_=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(l){try{s(r.next(l))}catch(p){a(p)}}function c(l){try{s(r.throw(l))}catch(p){a(p)}}function s(l){l.done?o(l.value):i(l.value).then(u,c)}s((r=r.apply(e,[])).next())})},y_=function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1],o=s;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(s);break}o[2]&&n.ops.pop(),n.trys.pop();continue}s=t.call(e,n)}catch(l){s=[6,l],i=0}finally{r=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},g_=5,__=1e3,b_=5e3,E_=1.5,ou=.2;function T_(){return Math.random()*(2*ou)-ou}var w_=function(){function e(t){this._transport=t}return e.prototype.retry=function(t,n,r){var i=this;return new Promise(function(o,a){setTimeout(function(){i._transport.send(t,n).then(o,a)},r)})},e.prototype.send=function(t,n){var r;return m_(this,void 0,void 0,function(){var i,o,a,u,c,s,l;return y_(this,function(p){switch(p.label){case 0:return i=Date.now()+n,[4,this._transport.send(t,n)];case 1:o=p.sent(),a=g_,u=__,p.label=2;case 2:return o.status==="retryable"&&a>0?(a--,c=Math.max(Math.min(u,b_)+T_(),0),u=u*E_,s=(r=o.retryInMillis)!==null&&r!==void 0?r:c,l=i-Date.now(),s>l?[2,o]:[4,this.retry(t,l,s)]):[3,4];case 3:return o=p.sent(),[3,2];case 4:return[2,o]}})})},e.prototype.shutdown=function(){return this._transport.shutdown()},e}();function au(e){return new w_(e.transport)}function S_(e){var t=[429,502,503,504];return t.includes(e)}function O_(e){if(e!=null){var t=Number.parseInt(e,10);if(Number.isInteger(t))return t>0?t*1e3:-1;var n=new Date(e).getTime()-Date.now();return n>=0?n:0}}var A_=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},x_=function(){function e(t){this._parameters=t}return e.prototype.send=function(t,n){var r=this;return new Promise(function(i){var o=new XMLHttpRequest;o.timeout=n,o.open("POST",r._parameters.url);var a=r._parameters.headers();Object.entries(a).forEach(function(u){var c=A_(u,2),s=c[0],l=c[1];o.setRequestHeader(s,l)}),o.ontimeout=function(u){i({status:"failure",error:new Error("XHR request timed out")})},o.onreadystatechange=function(){o.status>=200&&o.status<=299?(T.debug("XHR success"),i({status:"success"})):o.status&&S_(o.status)?i({status:"retryable",retryInMillis:O_(o.getResponseHeader("Retry-After"))}):o.status!==0&&i({status:"failure",error:new Error("XHR request failed with non-retryable status")})},o.onabort=function(){i({status:"failure",error:new Error("XHR request aborted")})},o.onerror=function(){i({status:"failure",error:new Error("XHR request errored")})},o.send(t)})},e.prototype.shutdown=function(){},e}();function C_(e){return new x_(e)}var L_=function(){function e(t){this._params=t}return e.prototype.send=function(t){var n=this;return new Promise(function(r){navigator.sendBeacon(n._params.url,new Blob([t],{type:n._params.blobType}))?(T.debug("SendBeacon success"),r({status:"success"})):r({status:"failure",error:new Error("SendBeacon failed")})})},e.prototype.shutdown=function(){},e}();function N_(e){return new L_(e)}function R_(e,t){return hs(e,t,au({transport:C_(e)}))}function I_(e,t){return hs(e,t,au({transport:N_({url:e.url,blobType:e.headers()["Content-Type"]})}))}var P_=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(u){a={error:u}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function k_(e){return function(){var t,n={};return Object.entries((t=e?.())!==null&&t!==void 0?t:{}).forEach(function(r){var i=P_(r,2),o=i[0],a=i[1];typeof a<"u"?n[o]=String(a):T.warn('Header "'+o+'" has invalid value ('+a+") and will be ignored")}),n}}var Wt=function(){return Wt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Wt.apply(this,arguments)};function D_(e,t,n){var r=Wt({},n()),i={};return function(){return t!=null&&Object.assign(i,t()),e!=null&&Object.assign(i,e()),Object.assign(i,r)}}function M_(e){if(e!=null)try{return new URL(e),e}catch{throw new Error("Configuration: Could not parse user-provided export URL: '"+e+"'")}}function U_(e,t,n){var r,i,o,a;return Wt(Wt({},Zm(e,t,n)),{headers:D_(k_(e.headers),t.headers,n.headers),url:(i=(r=M_(e.url))!==null&&r!==void 0?r:t.url)!==null&&i!==void 0?i:n.url,agentOptions:(a=(o=e.agentOptions)!==null&&o!==void 0?o:t.agentOptions)!==null&&a!==void 0?a:n.agentOptions})}function $_(e,t){return Wt(Wt({},ty()),{headers:function(){return e},url:"http://localhost:4318/"+t,agentOptions:{keepAlive:!0}})}function j_(e,t,n){return U_({url:e.url,timeoutMillis:e.timeoutMillis,headers:Qm(e.headers),concurrencyLimit:e.concurrencyLimit},{},$_(n,t))}function su(e,t,n,r){var i=!!e.headers||typeof navigator.sendBeacon!="function",o=j_(e,n,r);return i?R_(o,t):I_(o,t)}var B_=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),F_=function(e){B_(t,e);function t(n){return n===void 0&&(n={}),e.call(this,su(n,iu,"v1/traces",{"Content-Type":"application/json"}))||this}return t}(ps),Xn;(function(e){e[e.DELTA=0]="DELTA",e[e.CUMULATIVE=1]="CUMULATIVE",e[e.LOWMEMORY=2]="LOWMEMORY"})(Xn||(Xn={}));var V_=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ui=function(){return pt.CUMULATIVE},uu=function(e){switch(e){case A.COUNTER:case A.OBSERVABLE_COUNTER:case A.GAUGE:case A.HISTOGRAM:case A.OBSERVABLE_GAUGE:return pt.DELTA;case A.UP_DOWN_COUNTER:case A.OBSERVABLE_UP_DOWN_COUNTER:return pt.CUMULATIVE}},cu=function(e){switch(e){case A.COUNTER:case A.HISTOGRAM:return pt.DELTA;case A.GAUGE:case A.UP_DOWN_COUNTER:case A.OBSERVABLE_UP_DOWN_COUNTER:case A.OBSERVABLE_COUNTER:case A.OBSERVABLE_GAUGE:return pt.CUMULATIVE}};function H_(){var e=pe(),t=e.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE.trim().toLowerCase();return t==="cumulative"?Ui:t==="delta"?uu:t==="lowmemory"?cu:(T.warn("OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE is set to '"+e.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE+"', but only 'cumulative' and 'delta' are allowed. Using default ('cumulative') instead."),Ui)}function G_(e){return e!=null?e===Xn.DELTA?uu:e===Xn.LOWMEMORY?cu:Ui:H_()}function q_(e){return e!=null&&e.aggregationPreference?e.aggregationPreference:function(t){return Tt.Default()}}var z_=function(e){V_(t,e);function t(n,r){var i=e.call(this,n)||this;return i._aggregationSelector=q_(r),i._aggregationTemporalitySelector=G_(r?.temporalityPreference),i}return t.prototype.selectAggregation=function(n){return this._aggregationSelector(n)},t.prototype.selectAggregationTemporality=function(n){return this._aggregationTemporalitySelector(n)},t}(ps),K_=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),X_=function(e){K_(t,e);function t(n){return e.call(this,su(n??{},ru,"v1/metrics",{"Content-Type":"application/json"}),n)||this}return t}(z_);function W_(e,t){const n=e.spanContext();return{name:e.name,kind:e.kind,spanContext:()=>n,parentSpanId:e.parentSpanId,startTime:e.startTime,endTime:e.endTime,status:e.status,attributes:xa(e.attributes,t),links:e.links,events:e.events,duration:e.duration,ended:e.ended,resource:e.resource,instrumentationLibrary:e.instrumentationLibrary,droppedAttributesCount:e.droppedAttributesCount,droppedEventsCount:e.droppedEventsCount,droppedLinksCount:e.droppedLinksCount}}function Y_(e,t){if(!t.isSamplingEnabled())return e;const n=[],r={},i={};for(const o of e){o.parentSpanId&&(i[o.parentSpanId]=i[o.parentSpanId]||[],i[o.parentSpanId].push(o.spanContext().spanId));const a=t.shouldSample(o);a.sample?a.attributes?r[o.spanContext().spanId]=W_(o,a.attributes):r[o.spanContext().spanId]=o:n.push(o.spanContext().spanId)}for(;n.length>0;){const o=n.shift(),a=i[o];if(a)for(const u of a)delete r[u],n.push(u)}return Object.values(r)}const J_=(e,t,n)=>{if(typeof navigator>"u"||!navigator.sendBeacon)return!1;try{const r=new Blob([t],{type:n});return navigator.sendBeacon(e,r)}catch{return!1}},lu=(e,t,n,r)=>{const i=o=>{if(J_(e,t,n))return r({code:$.SUCCESS});r({code:$.FAILED,error:o})};try{const o=new Blob([t],{type:n});fetch(e,{method:"POST",body:o,keepalive:!0,headers:{"Content-Type":n},credentials:"omit"}).then(a=>{if(a.ok)return r({code:$.SUCCESS});r({code:$.FAILED,error:new Error(`keepalive fetch export failed with status ${a.status}`)})},a=>i(a))}catch(o){i(o)}};class Q_ extends F_{constructor(t,n){var r;super(Q(C({},t),{headers:{}})),L(this,"url"),L(this,"unloading",!1),this.sampler=n,this.url=(r=t?.url)!=null?r:""}setUnloading(t){this.unloading=t}export(t,n){const r=Y_(t,this.sampler);if(r.length===0)return;if(this.unloading){const a=iu.serializeRequest(r);if(!a||!this.url)return n({code:$.FAILED,error:new Error("keepalive export failed: serializer returned empty or url missing")});lu(this.url,a,"application/json",n);return}let i=0;const o=a=>{if(a.code===$.SUCCESS)return n({code:$.SUCCESS});if(i++,i>Lr)return n({code:$.FAILED,error:a.error});new Promise(u=>setTimeout(u,Nr+Rr*Math.pow(2,i))).then(()=>{super.export(r,o)})};super.export(r,o)}}class Z_ extends X_{constructor(t){var n;super(Q(C({},t),{headers:{}})),L(this,"url"),L(this,"unloading",!1),this.url=(n=t?.url)!=null?n:""}setUnloading(t){this.unloading=t}export(t,n){if(this.unloading){const o=ru.serializeRequest(t);if(!o||!this.url)return n({code:$.FAILED,error:new Error("keepalive export failed: serializer returned empty or url missing")});lu(this.url,o,"application/json",n);return}let r=0;const i=o=>{var a;if(o.code===$.SUCCESS)return n({code:$.SUCCESS});if(r++,r>Lr)return console.error(`[@launchdarkly/observability] failed to export OTeL metrics: ${(a=o.error)==null?void 0:a.message}`,o.error),n({code:$.FAILED,error:o.error});new Promise(u=>setTimeout(u,Nr+Rr*Math.pow(2,r))).then(()=>{var u;console.warn(`[@launchdarkly/observability] retry ${r}, failed to export OTeL metrics: ${(u=o.error)==null?void 0:u.message}`,o.error),super.export(t,i)})};super.export(t,i)}}const tb="OT_ZONE_CONTEXT",eb="Navigation:";function nb(){return!1}const $i=class ee extends Ve{constructor(t={}){var n,r;super(ee.moduleName,ee.version,t),L(this,"_spansData",new WeakMap),L(this,"_zonePatched"),L(this,"_wrappedListeners",new WeakMap),L(this,"_eventsSpanMap",new WeakMap),L(this,"_eventNames"),L(this,"_shouldPreventSpanCreation"),L(this,"_getLDContextKeyAttributes"),this._getLDContextKeyAttributes=t.getLDContextKeyAttributes,this._eventNames=new Set((n=t?.eventNames)!=null?n:[]),((r=t.productAnalyticsEvents)==null?void 0:r.clicks)!==!1&&this._eventNames.add("click"),this._shouldPreventSpanCreation=typeof t?.shouldPreventSpanCreation=="function"?t.shouldPreventSpanCreation:nb}init(){}_checkForTimeout(t,n){const r=this._spansData.get(n);r&&(t.source==="setTimeout"?r.hrTimeLastTimeout=Ft():t.source!=="Promise.then"&&t.source!=="setTimeout"&&(r.hrTimeLastTimeout=void 0))}_allowEventName(t){return this._eventNames.has(t)}_createSpan(t,n){var r,i;const o=t?.target,a=t?.type;if(!(o instanceof HTMLElement)||!o.getAttribute||o.hasAttribute("disabled")||!this._allowEventName(a))return;const u=ts(o,!0);try{const c=this.tracer.startSpan(a,{attributes:{[At]:window.location.href,"event.type":a,"event.tag":o.tagName,"event.xpath":u,"event.id":o.id,"event.classname":o.className,"event.text":(r=o.textContent)!=null?r:"","event.url":window.location.href,"viewport.width":window.innerWidth,"viewport.height":window.innerHeight}},n?U.setSpan(R.active(),n):void 0);t instanceof MouseEvent&&(c.setAttribute("event.x",t.clientX),c.setAttribute("event.y",t.clientY),c.setAttribute("event.relativeX",t.clientX/window.innerWidth),c.setAttribute("event.relativeY",t.clientY/window.innerHeight),a==="scroll"&&(c.setAttribute("event.scrollX",window.scrollX),c.setAttribute("event.scrollY",window.scrollY)));const s=(i=this._getLDContextKeyAttributes)==null?void 0:i.call(this);return s&&c.setAttributes(s),this._shouldPreventSpanCreation(a,o,c)===!0?void 0:(this._spansData.set(c,{taskCount:0}),c)}catch(c){this._diag.error("failed to start create new user interaction span",c)}}_decrementTask(t){const n=this._spansData.get(t);n&&(n.taskCount--,n.taskCount===0&&this._tryToEndSpan(t,n.hrTimeLastTimeout))}_getCurrentSpan(t){const n=t.get(tb);return n&&U.getSpan(n)}_incrementTask(t){const n=this._spansData.get(t);n&&n.taskCount++}addPatchedListener(t,n,r,i){let o=this._wrappedListeners.get(r);o||(o=new Map,this._wrappedListeners.set(r,o));let a=o.get(n);return a||(a=new Map,o.set(n,a)),a.has(t)?!1:(a.set(t,i),!0)}removePatchedListener(t,n,r){const i=this._wrappedListeners.get(r);if(!i)return;const o=i.get(n);if(!o)return;const a=o.get(t);return a&&(o.delete(t),o.size===0&&(i.delete(n),i.size===0&&this._wrappedListeners.delete(r))),a}_invokeListener(t,n,r){return typeof t=="function"?t.apply(n,r):t.handleEvent(r[0])}_patchAddEventListener(){const t=this;let n=new Map;return r=>function(i,o,a){if(!o)return r.call(this,i,o,a);const u=a&&typeof a=="object"&&a.once,c=function(...s){var l;let p;const f=s[0];if(!(f!=null&&f.type))return t._invokeListener(o,this,s);if(Date.now()-((l=n.get(f.type))!=null?l:0)<1e3/60)return t._invokeListener(o,this,s);n.set(f.type,Date.now()),f&&(p=t._eventsSpanMap.get(f)),u&&t.removePatchedListener(this,i,o);const v=t._createSpan(f,p);return v?(f&&t._eventsSpanMap.set(f,v),R.with(U.setSpan(R.active(),v),()=>{const m=t._invokeListener(o,this,s);return v.end(),m})):t._invokeListener(o,this,s)};if(t.addPatchedListener(this,i,o,c))return r.call(this,i,c,a)}}_patchRemoveEventListener(){const t=this;return n=>function(r,i,o){const a=t.removePatchedListener(this,r,i);return a?n.call(this,r,a,o):n.call(this,r,i,o)}}_getPatchableEventTargets(){return window.EventTarget?[EventTarget.prototype]:[Node.prototype,Window.prototype]}_patchHistoryApi(){this._unpatchHistoryApi(),this._wrap(history,"replaceState",this._patchHistoryMethod()),this._wrap(history,"pushState",this._patchHistoryMethod()),this._wrap(history,"back",this._patchHistoryMethod()),this._wrap(history,"forward",this._patchHistoryMethod()),this._wrap(history,"go",this._patchHistoryMethod())}_patchHistoryMethod(){const t=this;return n=>function(...r){const i=`${location.pathname}${location.hash}${location.search}`,o=n.apply(this,r),a=`${location.pathname}${location.hash}${location.search}`;return i!==a&&t._updateInteractionName(a),o}}_unpatchHistoryApi(){q(history.replaceState)&&this._unwrap(history,"replaceState"),q(history.pushState)&&this._unwrap(history,"pushState"),q(history.back)&&this._unwrap(history,"back"),q(history.forward)&&this._unwrap(history,"forward"),q(history.go)&&this._unwrap(history,"go")}_updateInteractionName(t){const n=U.getSpan(R.active());n&&typeof n.updateName=="function"&&n.updateName(`${eb} ${t}`)}_patchZoneCancelTask(){const t=this;return n=>function(r){const i=Zone.current,o=t._getCurrentSpan(i);return o&&t._shouldCountTask(r,i)&&t._decrementTask(o),n.call(this,r)}}_patchZoneScheduleTask(){const t=this;return n=>function(r){const i=Zone.current,o=t._getCurrentSpan(i);return o&&t._shouldCountTask(r,i)&&(t._incrementTask(o),t._checkForTimeout(r,o)),n.call(this,r)}}_patchZoneRunTask(){const t=this;return n=>function(r,i,o){const a=Array.isArray(o)&&o[0]instanceof Event?o[0]:void 0,u=a?.target;let c;const s=this;if(u){if(c=t._createSpan(a),c)return t._incrementTask(c),s.run(()=>{try{return R.with(U.setSpan(R.active(),c),()=>{const l=Zone.current;return r._zone=l,n.call(l,r,i,o)})}finally{t._decrementTask(c)}})}else c=t._getCurrentSpan(s);try{return n.call(s,r,i,o)}finally{c&&t._shouldCountTask(r,s)&&t._decrementTask(c)}}}_shouldCountTask(t,n){if(t._zone&&(n=t._zone),!n||!t.data||t.data.isPeriodic)return!1;const r=this._getCurrentSpan(n);return!r||!this._spansData.get(r)?!1:t.type==="macroTask"||t.type==="microTask"}_tryToEndSpan(t,n){t&&this._spansData.get(t)&&(t.end(n),this._spansData.delete(t))}enable(){const t=this._getZoneWithPrototype();this._diag.debug("applying patch to",ee.moduleName,ee.version,"zone:",!!t),t?(q(t.prototype.runTask)&&(this._unwrap(t.prototype,"runTask"),this._diag.debug("removing previous patch from method runTask")),q(t.prototype.scheduleTask)&&(this._unwrap(t.prototype,"scheduleTask"),this._diag.debug("removing previous patch from method scheduleTask")),q(t.prototype.cancelTask)&&(this._unwrap(t.prototype,"cancelTask"),this._diag.debug("removing previous patch from method cancelTask")),this._zonePatched=!0,this._wrap(t.prototype,"runTask",this._patchZoneRunTask()),this._wrap(t.prototype,"scheduleTask",this._patchZoneScheduleTask()),this._wrap(t.prototype,"cancelTask",this._patchZoneCancelTask())):(this._zonePatched=!1,this._getPatchableEventTargets().forEach(n=>{q(n.addEventListener)&&(this._unwrap(n,"addEventListener"),this._diag.debug("removing previous patch from method addEventListener")),q(n.removeEventListener)&&(this._unwrap(n,"removeEventListener"),this._diag.debug("removing previous patch from method removeEventListener")),this._wrap(n,"addEventListener",this._patchAddEventListener()),this._wrap(n,"removeEventListener",this._patchRemoveEventListener())})),this._patchHistoryApi()}disable(){const t=this._getZoneWithPrototype();this._diag.debug("removing patch from",ee.moduleName,ee.version,"zone:",!!t),t&&this._zonePatched?(q(t.prototype.runTask)&&this._unwrap(t.prototype,"runTask"),q(t.prototype.scheduleTask)&&this._unwrap(t.prototype,"scheduleTask"),q(t.prototype.cancelTask)&&this._unwrap(t.prototype,"cancelTask")):this._getPatchableEventTargets().forEach(n=>{q(n.addEventListener)&&this._unwrap(n,"addEventListener"),q(n.removeEventListener)&&this._unwrap(n,"removeEventListener")}),this._unpatchHistoryApi()}_getZoneWithPrototype(){return window.Zone}};L($i,"version","0.1.1"),L($i,"moduleName","user-interaction");let rb=$i;const ji=class Ji extends Ve{constructor(t={}){super(Ji.moduleName,Ji.version,t),L(this,"_getLDContextKeyAttributes"),L(this,"_unlisten"),L(this,"_lastUrl",""),this._getLDContextKeyAttributes=t.getLDContextKeyAttributes}init(){}enable(){this._lastUrl=window.location.href,this._unlisten=sp(t=>{var n;const r=this._lastUrl;if(this._lastUrl=t,r!==t)try{const i=this.tracer.startSpan(np,{attributes:{[At]:t,"page_view.previous_url":r,"page_view.url":t}}),o=(n=this._getLDContextKeyAttributes)==null?void 0:n.call(this);o&&i.setAttributes(o),i.end()}catch(i){this._diag.error("failed to create page view span",i)}})}disable(){var t;(t=this._unlisten)==null||t.call(this),this._unlisten=void 0}};L(ji,"version","0.1.0"),L(ji,"moduleName","location-change");let ib=ji,K={},ge,Wn;const Yt="highlight.record",ob="highlight.session_id",Bi=new Map,pu=e=>`${e.spanContext().traceId}:${e.spanContext().spanId}`,fu="launchdarkly.js.log",ab="launchdarkly.exception.id",hu="launchdarkly.sampling.ratio",du="log.severity",vu="log.message",sb=(e,t)=>{var n,r,i,o,a,u,c,s,l,p;if(K.tracerProvider||K.meterProvider){console.warn("OTEL already initialized. Skipping...");return}ge=e;const f=e.backendUrl||void 0||"https://pub.highlight.io",v=[...(r=(n=e.networkRecordingOptions)==null?void 0:n.urlBlocklist)!=null?r:[],...Mm],m=(i=e.environment)!=null?i:"production",y={url:e.otlpEndpoint+"/v1/traces",concurrencyLimit:10,timeoutMillis:3e4,compression:"gzip",keepAlive:!0,httpAgentOptions:{timeout:6e4,keepAlive:!0}},g=new Q_(y,t),b=new Yn(g,{maxExportBatchSize:1024,maxQueueSize:2048,exportTimeoutMillis:y.timeoutMillis,scheduledDelayMillis:5e3}),w=new He({[Sl]:(o=e.serviceName)!=null?o:"highlight-browser",[Ol]:e.serviceVersion,"deployment.environment.name":m,"highlight.project_id":e.projectId,[Ll]:navigator.userAgent,"browser.language":navigator.language,"telemetry.distro.name":"@highlight-run/observability","telemetry.distro.version":lp});K.tracerProvider=new gv({resource:w,mergeResourceWithDefaults:!0,spanProcessors:[b]}),U.setGlobalTracerProvider(K.tracerProvider);const I=new Z_(Q(C({},y),{url:e.otlpEndpoint+"/v1/metrics"})),M=new hg({exporter:I,exportIntervalMillis:y.timeoutMillis,exportTimeoutMillis:y.timeoutMillis});K.meterProvider=new Zg({resource:w,readers:[M]}),Kr.setGlobalMeterProvider(K.meterProvider);let j=[];if(((a=e.instrumentations)==null?void 0:a["@opentelemetry/instrumentation-document-load"])!==!1&&j.push(new Uv({applyCustomAttributesOnSpan:{documentLoad:_u,documentFetch:_u,resourceFetch:gb}})),((u=e.instrumentations)==null?void 0:u["@opentelemetry/instrumentation-user-interaction"])!==!1&&j.push(new rb({productAnalyticsEvents:e.productAnalyticsEvents,getLDContextKeyAttributes:e.getLDContextKeyAttributes})),((c=e.productAnalyticsEvents)==null?void 0:c.pageViews)!==!1&&j.push(new ib({getLDContextKeyAttributes:e.getLDContextKeyAttributes})),(s=e.networkRecordingOptions)!=null&&s.enabled){if(((l=e.instrumentations)==null?void 0:l["@opentelemetry/instrumentation-fetch"])!==!1){const X=new pm({propagateTraceHeaderCorsUrls:Eu(e.tracingOrigins),applyCustomAttributesOnSpan:(D,wt,mt)=>{var W,Qt;if(!D.attributes)return;const St=D;if(St.attributes[Yt]!==!1){if(gu(D,wt.body,wt.headers,e.networkRecordingOptions),!(mt instanceof Response)){D.setAttributes({"http.response.error":mt.message,[Ao]:mt.status});return}if(!((W=e.networkRecordingOptions)!=null&&W.requestResponseSanitizer&&(Vi(D,e.networkRecordingOptions.requestResponseSanitizer),St.attributes[Yt]===!1))&&(Qt=e.networkRecordingOptions)!=null&&Qt.recordHeadersAndBody){const h=lt(void 0,null,function*(){var _,x,H,V,k,Zt;const te=yield Wm(mt,(_=e.networkRecordingOptions)==null?void 0:_.bodyKeysToRecord,(x=e.networkRecordingOptions)==null?void 0:x.networkBodyKeysToRedact),Qe=Object.fromEntries(mt.headers.entries()),aE=gi((V=(H=e.networkRecordingOptions)==null?void 0:H.networkHeadersToRedact)!=null?V:[],Qe,(k=e.networkRecordingOptions)==null?void 0:k.headerKeysToRecord),sE=Fi(aE,"http.response.header");Object.assign(D.attributes,C({"http.response.body":te},sE)),(Zt=e.networkRecordingOptions)!=null&&Zt.requestResponseSanitizer&&Vi(D,e.networkRecordingOptions.requestResponseSanitizer)});Bi.set(pu(D),h)}}}});j.push(X)}((p=e.instrumentations)==null?void 0:p["@opentelemetry/instrumentation-xml-http-request"])!==!1&&j.push(new km({propagateTraceHeaderCorsUrls:Eu(e.tracingOrigins),applyCustomAttributesOnSpan:(X,D)=>{var wt,mt,W,Qt;const St=D;if(!(!X.attributes||X.attributes[Yt]===!1)){if(gu(X,St._body,St._requestHeaders,e.networkRecordingOptions),(wt=e.networkRecordingOptions)!=null&&wt.recordHeadersAndBody){let h="";(D.responseType===""||D.responseType==="text")&&(h=bi(D.responseText,(mt=e.networkRecordingOptions)==null?void 0:mt.networkBodyKeysToRedact,(W=e.networkRecordingOptions)==null?void 0:W.bodyKeysToRecord,void 0));const _=fb(D.getAllResponseHeaders());mb(X,_,h,e.networkRecordingOptions)}(Qt=e.networkRecordingOptions)!=null&&Qt.requestResponseSanitizer&&Vi(X,e.networkRecordingOptions.requestResponseSanitizer)}}}))}kd({instrumentations:j});const tt=new Ja;return tt.enable(),K.tracerProvider.register({contextManager:tt,propagator:new ya({propagators:[new ua,new cb({backendUrl:f,otlpEndpoint:e.otlpEndpoint,tracingOrigins:e.tracingOrigins,urlBlocklist:v})]})}),Wn=ub(g,I,b,()=>K),K},ub=(e,t,n,r)=>{if(typeof document>"u"||typeof window>"u")return()=>{};const i=()=>{var u,c;e.setUnloading(!0),t.setUnloading(!0),n.setSkipPendingOnFlush(!0);const s=r();(u=s.tracerProvider)==null||u.forceFlush().catch(()=>{}),(c=s.meterProvider)==null||c.forceFlush().catch(()=>{})},o=()=>{document.visibilityState==="hidden"?i():document.visibilityState==="visible"&&(e.setUnloading(!1),t.setUnloading(!1),n.setSkipPendingOnFlush(!1))},a=()=>i();return document.addEventListener("visibilitychange",o),window.addEventListener("pagehide",a),()=>{document.removeEventListener("visibilitychange",o),window.removeEventListener("pagehide",a)}};class Yn extends qa{constructor(){super(...arguments),L(this,"_pendingSpans",new Set),L(this,"_skipPendingOnFlush",!1)}setSkipPendingOnFlush(t){this._skipPendingOnFlush=t}onStart(t,n){t.setAttribute(ob,xt()),super.onStart(t,n)}onEnd(t){if(t.attributes[Yt]===!1)return;const n=pu(t),r=Bi.get(n);if(r){const i=r.catch(o=>{console.warn("[CustomBatchSpanProcessor] Failed to capture response body attributes",o)}).finally(()=>{Bi.delete(n),this._pendingSpans.delete(i),t.attributes[Yt]!==!1&&super.onEnd(t)});this._pendingSpans.add(i);return}super.onEnd(t)}shutdown(){return lt(this,null,function*(){return this._skipPendingOnFlush||(yield Promise.allSettled(this._pendingSpans)),qo(Yn.prototype,this,"shutdown").call(this)})}forceFlush(){return lt(this,null,function*(){return this._skipPendingOnFlush||(yield Promise.allSettled(this._pendingSpans)),qo(Yn.prototype,this,"forceFlush").call(this)})}}class cb extends Ea{constructor(t){super(),L(this,"highlightEndpoints"),L(this,"tracingOrigins"),L(this,"urlBlocklist"),this.highlightEndpoints=[t.backendUrl,`${t.otlpEndpoint}/v1/traces`,`${t.otlpEndpoint}/v1/logs`,`${t.otlpEndpoint}/v1/metrics`],this.tracingOrigins=t.tracingOrigins,this.urlBlocklist=t.urlBlocklist}inject(t,n,r){var i;const o=U.getSpan(t);if(!o||!o.attributes)return;const a=Tu(o);typeof a=="string"&&(yb(a,this.highlightEndpoints,this.tracingOrigins,this.urlBlocklist)||o.setAttribute(Yt,!1),!qm(a,(i=this.tracingOrigins)!=null?i:[],this.urlBlocklist))||super.inject(t,n,r)}}const mu="highlight-browser",lb=mu,yu=()=>{var e;return(e=K.tracerProvider)==null?void 0:e.getTracer(mu)},Jn=()=>{var e;return(e=K.meterProvider)==null?void 0:e.getMeter(lb)},pb=()=>lt(void 0,null,function*(){Wn&&(Wn(),Wn=void 0),yield Promise.allSettled([lt(void 0,null,function*(){K.tracerProvider?(yield K.tracerProvider.shutdown(),K.tracerProvider=void 0):console.warn("OTEL shutdown called without initialized tracerProvider.")}),lt(void 0,null,function*(){K.meterProvider?(yield K.meterProvider.shutdown(),K.meterProvider=void 0):console.warn("OTEL shutdown called without initialized meterProvider.")})])}),gu=(e,t,n,r)=>{var i;if(!e.attributes)return;const o=Tu(e),a=_i(o),u=us(a),c=typeof t=="string"?t:String(t);try{const s=t?JSON.parse(c):void 0;s!=null&&s.operationName&&e.setAttribute("graphql.operation.name",s.operationName)}catch{}if(e.setAttributes({"highlight.type":"http.request",[ye]:a,[At]:a,[hn]:u.pathname,[Cl]:u.search}),e.setAttributes(hb(u.searchParams,"url.query_params")),r!=null&&r.recordHeadersAndBody){const s=bi(t,r.networkBodyKeysToRedact,r.bodyKeysToRecord,n);e.setAttribute("http.request.body",s);const l=gi((i=r.networkHeadersToRedact)!=null?i:[],n,r.headerKeysToRecord),p=Fi(l,"http.request.header");e.setAttributes(p)}},fb=e=>{const t={};return e&&e.trim().split(/[\r\n]+/).forEach(n=>{const r=n.split(": "),i=r.shift();i&&(t[i]=r.join(": "))}),t},Fi=(e,t)=>{const n={};return Object.entries(e).forEach(([r,i])=>{const o=r.toLowerCase().replace(/_/g,"-"),a=`${t}.${o}`,u=vb(o,i);if(n[a]){const c=n[a];Array.isArray(c)?n[a]=[...c,...u]:n[a]=[c,...u]}else n[a]=u.length===1?u[0]:u}),n},hb=(e,t)=>{const n={};for(const[r,i]of e.entries()){const o=`${t}.${r}`,a=n[o];a===void 0?n[o]=i:Array.isArray(a)?a.push(i):n[o]=[a,i]}return n},db=new Set(["accept","accept-charset","accept-encoding","accept-language","accept-ranges","allow","cache-control","connection","content-encoding","content-language","expect","if-match","if-none-match","pragma","proxy-authenticate","te","trailer","transfer-encoding","upgrade","vary","via","warning","www-authenticate","access-control-allow-headers","access-control-allow-methods","access-control-expose-headers","access-control-request-headers"]),vb=(e,t)=>db.has(e)?t.split(",").map(n=>n.trim()).filter(n=>n.length>0):[t],mb=(e,t,n,r)=>{var i;e.setAttribute("http.response.body",n);const o=gi((i=r.networkHeadersToRedact)!=null?i:[],t,r.headerKeysToRecord),a=Fi(o,"http.response.header");e.setAttributes(a)},Vi=(e,t)=>{var n,r,i,o,a,u,c,s,l,p;const f=e.attributes,v={},m={};for(const[I,M]of Object.entries(f))I.startsWith("http.request.header.")&&(v[I.slice(20)]=String(M)),I.startsWith("http.response.header.")&&(m[I.slice(21)]=String(M));let y={request:{sessionSecureID:"",id:"",url:(r=(n=f[At])!=null?n:f[ye])!=null?r:"",verb:(i=f["http.request.method"])!=null?i:"GET",headers:v,body:(o=f["http.request.body"])!=null?o:""},response:{status:Number((a=f[Ao])!=null?a:0),headers:m,body:(u=f["http.response.body"])!=null?u:""},urlBlocked:!1},g=!0;try{y.request.body=JSON.parse(y.request.body)}catch{g=!1}let b=!0;try{y.response.body=JSON.parse(y.response.body)}catch{b=!1}let w;try{w=t(y)}catch{return}if(!w){Object.assign(e.attributes,{[Yt]:!1});return}g&&(c=w.request)!=null&&c.body&&(w.request.body=JSON.stringify(w.request.body)),b&&(s=w.response)!=null&&s.body&&(w.response.body=JSON.stringify(w.response.body)),Object.assign(e.attributes,{"http.request.body":(l=w.request.body)!=null?l:"","http.response.body":(p=w.response.body)!=null?p:""})},yb=(e,t,n,r)=>r!=null&&r.some(i=>e.toLowerCase().includes(i))?!1:Gm(e,t),_u=e=>{var t,n,r;if(!e.events)return;const i=e.events,o={unload:at("unloadEventStart","unloadEventEnd",i),dom_interactive:at("fetchStart","domInteractive",i),dom_content_loaded:at("domContentLoadedEventStart","domContentLoadedEventEnd",i),dom_complete:at("fetchStart","domComplete",i),load_event:at("loadEventStart","loadEventEnd",i),document_load:at("fetchStart","loadEventEnd",i),first_paint:at("fetchStart","firstPaint",i),first_contentful_paint:at("fetchStart","firstContentfulPaint",i),domain_lookup:at("domainLookupStart","domainLookupEnd",i),connect:at("connectStart","connectEnd",i),request:at("requestStart","requestEnd",i),response:at("responseStart","responseEnd",i)},a=(n=(t=ge?.getIntegrations)==null?void 0:t.call(ge))!=null?n:[];if(o.document_load!==void 0)for(const u of a)u.recordGauge((r=ge?.sessionSecureId)!=null?r:"",{name:rp,value:o.document_load/1e6});Object.entries(o).forEach(([u,c])=>{c!==void 0&&(e.setAttribute(`timings.${u}.ns`,c),e.setAttribute(`timings.${u}.readable`,bu(c)))})};function at(e,t,n){const r=n.find(a=>a.name===e),i=n.find(a=>a.name===t);if(!r||!i)return;const o=r.time[0]*1e9+r.time[1];return i.time[0]*1e9+i.time[1]-o}const gb=(e,t)=>{const n={domain_lookup:(t.domainLookupEnd-t.domainLookupStart)*1e9,connect:(t.connectEnd-t.connectStart)*1e9,request:(t.responseEnd-t.requestStart)*1e9,response:(t.responseEnd-t.responseStart)*1e9};Object.entries(n).forEach(([r,i])=>{e.setAttribute(`timings.${r}.ns`,i),e.setAttribute(`timings.${r}.readable`,bu(i))})},bu=e=>{if(e>=36e11){const t=e/36e11;return`${Number(t.toFixed(1))}h`}else if(e>=6e10){const t=e/6e10;return`${Number(t.toFixed(1))}m`}else if(e>=1e9){const t=e/1e9;return`${Number(t.toFixed(1))}s`}else if(e>=1e6){const t=e/1e6;return`${Number(t.toFixed(1))}ms`}else if(e>=1e3){const t=e/1e3;return`${Number(t.toFixed(1))}µs`}else return`${Number(e.toFixed(1))}ns`},Eu=e=>e===!0?[/localhost/,/^\//,cs(window.location.host)]:Array.isArray(e)?e.map(t=>typeof t=="string"?new RegExp(t):t):/^$/,Tu=e=>e.attributes[At]?e.attributes[At]:e.attributes[ye],_b=30,bb=()=>new Promise(e=>requestAnimationFrame(t=>requestAnimationFrame(n=>e(n-t)))),Eb=()=>lt(void 0,null,function*(){const e=[];for(let t=0;t<_b;t++)e.push(yield bb());return e.reduce((t,n)=>t+n,0)/e.length}),Tb=(e,t)=>{let n={},r=16.666666666666668;Eb().then(c=>r=c);const i=c=>{var s;n!=null&&n.event||(n={event:c,location:window.location.href,timerStart:(s=window.performance)==null?void 0:s.now()},window.requestAnimationFrame(o))},o=()=>{if(!(n!=null&&n.timerStart))return;const c=window.performance.now()-n.timerStart-r;a(c),n={}},a=c=>{const s=(new Date().getTime()-t)/1e3;e({relativeTimestamp:s,jankAmount:c,querySelector:u(),newLocation:window.location.href!=n.location?window.location.href:void 0})},u=()=>{var c;return(c=n?.event)!=null&&c.target?pp(n.event.target):""};return window.addEventListener("click",i,!0),window.addEventListener("keydown",i,!0),()=>{window.removeEventListener("keydown",i,!0),window.removeEventListener("click",i,!0)}},wb=typeof window<"u",wu=wb&&"performance"in window&&"memory"in performance?performance:{memory:{}},Sb=(e,t)=>{let n=0,r=0;const i=()=>{const s=(new Date().getTime()-t)/1e3,l=wu.memory.jsHeapSizeLimit||0,p=wu.memory.usedJSHeapSize||0;e({jsHeapSizeLimit:l,usedJSHeapSize:p,relativeTimestamp:s,fps:n})};i();let o;o=setInterval(()=>{i()},1e3);let a=0,u=Date.now();const c=function(){var s=Date.now();a++,s>1e3+u&&(n=Math.round(a*1e3/(s-u)),a=0,u=s),r=requestAnimationFrame(c)};return c(),()=>{clearInterval(o),cancelAnimationFrame(r)}};var Pt,Xe,Su,Qn,Hi,_e=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},We=function(e){if(document.readyState==="loading")return"loading";var t=_e();if(t){if(e<t.domInteractive)return"loading";if(t.domContentLoadedEventStart===0||e<t.domContentLoadedEventStart)return"dom-interactive";if(t.domComplete===0||e<t.domComplete)return"dom-content-loaded"}return"complete"},Ob=function(e){var t=e.nodeName;return e.nodeType===1?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},Zn=function(e,t){var n="";try{for(;e&&e.nodeType!==9;){var r=e,i=r.id?"#"+r.id:Ob(r)+(r.classList&&r.classList.value&&r.classList.value.trim()&&r.classList.value.trim().length?"."+r.classList.value.trim().replace(/\s+/g,"."):"");if(n.length+i.length>99)return n||i;if(n=n?i+">"+n:i,r.id)break;e=r.parentNode}}catch{}return n},Ou=-1,Au=function(){return Ou},Jt=function(e){addEventListener("pageshow",function(t){t.persisted&&(Ou=t.timeStamp,e(t))},!0)},tr=function(){var e=_e();return e&&e.activationStart||0},st=function(e,t){var n=_e(),r="navigate";return Au()>=0?r="back-forward-cache":n&&(document.prerendering||tr()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t===void 0?-1:t,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},be=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver(function(i){Promise.resolve().then(function(){t(i.getEntries())})});return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}},ut=function(e,t,n,r){var i,o;return function(a){t.value>=0&&(a||r)&&((o=t.value-(i||0))||i===void 0)&&(i=t.value,t.delta=o,t.rating=function(u,c){return u>c[1]?"poor":u>c[0]?"needs-improvement":"good"}(t.value,n),e(t))}},Gi=function(e){requestAnimationFrame(function(){return requestAnimationFrame(function(){return e()})})},er=function(e){var t=function(n){n.type!=="pagehide"&&document.visibilityState!=="hidden"||e(n)};addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0)},qi=function(e){var t=!1;return function(n){t||(e(n),t=!0)}},Ee=-1,xu=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},nr=function(e){document.visibilityState==="hidden"&&Ee>-1&&(Ee=e.type==="visibilitychange"?e.timeStamp:0,Ab())},Cu=function(){addEventListener("visibilitychange",nr,!0),addEventListener("prerenderingchange",nr,!0)},Ab=function(){removeEventListener("visibilitychange",nr,!0),removeEventListener("prerenderingchange",nr,!0)},zi=function(){return Ee<0&&(Ee=xu(),Cu(),Jt(function(){setTimeout(function(){Ee=xu(),Cu()},0)})),{get firstHiddenTime(){return Ee}}},Ye=function(e){document.prerendering?addEventListener("prerenderingchange",function(){return e()},!0):e()},Lu=[1800,3e3],Nu=function(e,t){t=t||{},Ye(function(){var n,r=zi(),i=st("FCP"),o=be("paint",function(a){a.forEach(function(u){u.name==="first-contentful-paint"&&(o.disconnect(),u.startTime<r.firstHiddenTime&&(i.value=Math.max(u.startTime-tr(),0),i.entries.push(u),n(!0)))})});o&&(n=ut(e,i,Lu,t.reportAllChanges),Jt(function(a){i=st("FCP"),n=ut(e,i,Lu,t.reportAllChanges),Gi(function(){i.value=performance.now()-a.timeStamp,n(!0)})}))})},Ru=[.1,.25],xb=function(e,t){(function(n,r){r=r||{},Nu(qi(function(){var i,o=st("CLS",0),a=0,u=[],c=function(l){l.forEach(function(p){if(!p.hadRecentInput){var f=u[0],v=u[u.length-1];a&&p.startTime-v.startTime<1e3&&p.startTime-f.startTime<5e3?(a+=p.value,u.push(p)):(a=p.value,u=[p])}}),a>o.value&&(o.value=a,o.entries=u,i())},s=be("layout-shift",c);s&&(i=ut(n,o,Ru,r.reportAllChanges),er(function(){c(s.takeRecords()),i(!0)}),Jt(function(){a=0,o=st("CLS",0),i=ut(n,o,Ru,r.reportAllChanges),Gi(function(){return i()})}),setTimeout(i,0))}))})(function(n){(function(r){if(r.entries.length){var i=r.entries.reduce(function(u,c){return u&&u.value>c.value?u:c});if(i&&i.sources&&i.sources.length){var o=(a=i.sources).find(function(u){return u.node&&u.node.nodeType===1})||a[0];if(o)return void(r.attribution={largestShiftTarget:Zn(o.node),largestShiftTime:i.startTime,largestShiftValue:i.value,largestShiftSource:o,largestShiftEntry:i,loadState:We(i.startTime)})}}var a;r.attribution={}})(n),e(n)},t)},Cb=function(e,t){Nu(function(n){(function(r){if(r.entries.length){var i=_e(),o=r.entries[r.entries.length-1];if(i){var a=i.activationStart||0,u=Math.max(0,i.responseStart-a);return void(r.attribution={timeToFirstByte:u,firstByteToFCP:r.value-u,loadState:We(r.entries[0].startTime),navigationEntry:i,fcpEntry:o})}}r.attribution={timeToFirstByte:0,firstByteToFCP:r.value,loadState:We(Au())}})(n),e(n)},t)},Je={passive:!0,capture:!0},Lb=new Date,Iu=function(e,t){Pt||(Pt=t,Xe=e,Su=new Date,ku(removeEventListener),Pu())},Pu=function(){if(Xe>=0&&Xe<Su-Lb){var e={entryType:"first-input",name:Pt.type,target:Pt.target,cancelable:Pt.cancelable,startTime:Pt.timeStamp,processingStart:Pt.timeStamp+Xe};Qn.forEach(function(t){t(e)}),Qn=[]}},Nb=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;e.type=="pointerdown"?function(n,r){var i=function(){Iu(n,r),a()},o=function(){a()},a=function(){removeEventListener("pointerup",i,Je),removeEventListener("pointercancel",o,Je)};addEventListener("pointerup",i,Je),addEventListener("pointercancel",o,Je)}(t,e):Iu(t,e)}},ku=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach(function(t){return e(t,Nb,Je)})},Du=[100,300],Rb=function(e,t){t=t||{},Ye(function(){var n,r=zi(),i=st("FID"),o=function(c){c.startTime<r.firstHiddenTime&&(i.value=c.processingStart-c.startTime,i.entries.push(c),n(!0))},a=function(c){c.forEach(o)},u=be("first-input",a);n=ut(e,i,Du,t.reportAllChanges),u&&er(qi(function(){a(u.takeRecords()),u.disconnect()})),u&&Jt(function(){var c;i=st("FID"),n=ut(e,i,Du,t.reportAllChanges),Qn=[],Xe=-1,Pt=null,ku(addEventListener),c=o,Qn.push(c),Pu()})})},Ib=function(e,t){Rb(function(n){(function(r){var i=r.entries[0];r.attribution={eventTarget:Zn(i.target),eventType:i.name,eventTime:i.startTime,eventEntry:i,loadState:We(i.startTime)}})(n),e(n)},t)},Mu=0,Ki=1/0,rr=0,Pb=function(e){e.forEach(function(t){t.interactionId&&(Ki=Math.min(Ki,t.interactionId),rr=Math.max(rr,t.interactionId),Mu=rr?(rr-Ki)/7+1:0)})},Uu=function(){return Hi?Mu:performance.interactionCount||0},kb=function(){"interactionCount"in performance||Hi||(Hi=be("event",Pb,{type:"event",buffered:!0,durationThreshold:0}))},$u=[200,500],ju=0,Bu=function(){return Uu()-ju},vt=[],Xi={},Fu=function(e){var t=vt[vt.length-1],n=Xi[e.interactionId];if(n||vt.length<10||e.duration>t.latency){if(n)n.entries.push(e),n.latency=Math.max(n.latency,e.duration);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};Xi[r.id]=r,vt.push(r)}vt.sort(function(i,o){return o.latency-i.latency}),vt.splice(10).forEach(function(i){delete Xi[i.id]})}},Db=function(e,t){t=t||{},Ye(function(){var n;kb();var r,i=st("INP"),o=function(u){u.forEach(function(l){l.interactionId&&Fu(l),l.entryType==="first-input"&&!vt.some(function(p){return p.entries.some(function(f){return l.duration===f.duration&&l.startTime===f.startTime})})&&Fu(l)});var c,s=(c=Math.min(vt.length-1,Math.floor(Bu()/50)),vt[c]);s&&s.latency!==i.value&&(i.value=s.latency,i.entries=s.entries,r())},a=be("event",o,{durationThreshold:(n=t.durationThreshold)!==null&&n!==void 0?n:40});r=ut(e,i,$u,t.reportAllChanges),a&&("interactionId"in PerformanceEventTiming.prototype&&a.observe({type:"first-input",buffered:!0}),er(function(){o(a.takeRecords()),i.value<0&&Bu()>0&&(i.value=0,i.entries=[]),r(!0)}),Jt(function(){vt=[],ju=Uu(),i=st("INP"),r=ut(e,i,$u,t.reportAllChanges)}))})},Mb=function(e,t){Db(function(n){(function(r){if(r.entries.length){var i=r.entries.sort(function(o,a){return a.duration-o.duration||a.processingEnd-a.processingStart-(o.processingEnd-o.processingStart)})[0];r.attribution={eventTarget:Zn(i.target),eventType:i.name,eventTime:i.startTime,eventEntry:i,loadState:We(i.startTime)}}else r.attribution={}})(n),e(n)},t)},Vu=[2500,4e3],Wi={},Ub=function(e,t){(function(n,r){r=r||{},Ye(function(){var i,o=zi(),a=st("LCP"),u=function(l){var p=l[l.length-1];p&&p.startTime<o.firstHiddenTime&&(a.value=Math.max(p.startTime-tr(),0),a.entries=[p],i())},c=be("largest-contentful-paint",u);if(c){i=ut(n,a,Vu,r.reportAllChanges);var s=qi(function(){Wi[a.id]||(u(c.takeRecords()),c.disconnect(),Wi[a.id]=!0,i(!0))});["keydown","click"].forEach(function(l){addEventListener(l,function(){return setTimeout(s,0)},!0)}),er(s),Jt(function(l){a=st("LCP"),i=ut(n,a,Vu,r.reportAllChanges),Gi(function(){a.value=performance.now()-l.timeStamp,Wi[a.id]=!0,i(!0)})})}})})(function(n){(function(r){if(r.entries.length){var i=_e();if(i){var o=i.activationStart||0,a=r.entries[r.entries.length-1],u=a.url&&performance.getEntriesByType("resource").filter(function(v){return v.name===a.url})[0],c=Math.max(0,i.responseStart-o),s=Math.max(c,u?(u.requestStart||u.startTime)-o:0),l=Math.max(s,u?u.responseEnd-o:0),p=Math.max(l,a?a.startTime-o:0),f={element:Zn(a.element),timeToFirstByte:c,resourceLoadDelay:s-c,resourceLoadTime:l-s,elementRenderDelay:p-l,navigationEntry:i,lcpEntry:a};return a.url&&(f.url=a.url),u&&(f.lcpResourceEntry=u),void(r.attribution=f)}}r.attribution={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadTime:0,elementRenderDelay:r.value}})(n),e(n)},t)},Hu=[800,1800],$b=function e(t){document.prerendering?Ye(function(){return e(t)}):document.readyState!=="complete"?addEventListener("load",function(){return e(t)},!0):setTimeout(t,0)},jb=function(e,t){t=t||{};var n=st("TTFB"),r=ut(e,n,Hu,t.reportAllChanges);$b(function(){var i=_e();if(i){var o=i.responseStart;if(o<=0||o>performance.now())return;n.value=Math.max(o-tr(),0),n.entries=[i],r(!0),Jt(function(){n=st("TTFB",0),(r=ut(e,n,Hu,t.reportAllChanges))(!0)})}})},Bb=function(e,t){jb(function(n){(function(r){if(r.entries.length){var i=r.entries[0],o=i.activationStart||0,a=Math.max(i.domainLookupStart-o,0),u=Math.max(i.connectStart-o,0),c=Math.max(i.requestStart-o,0);r.attribution={waitingTime:a,dnsTime:u-a,connectionTime:c-u,requestTime:r.value-c,navigationEntry:i}}else r.attribution={waitingTime:0,dnsTime:0,connectionTime:0,requestTime:0}})(n),e(n)},t)};const Fb=e=>(xb(e),Cb(e),Ib(e),Ub(e),Bb(e),Mb(e),()=>{}),Te=typeof navigator<"u"&&"connection"in navigator?navigator.connection:{},Vb=(e,t)=>{const n=()=>{const i=(new Date().getTime()-t)/1e3;e({relativeTimestamp:i,downlink:Te.downlink,downlinkMax:Te.downlinkMax,effectiveType:Te.effectiveType,rtt:Te.rtt,saveData:Te.saveData,type:Te.type})};n();let r;return r=setInterval(()=>{n()},1e3),()=>{clearInterval(r)}},Hb=()=>{if(!("performance"in window&&"memory"in performance))return{getDeviceDetails:void 0,getCurrentDeviceDetails:void 0};const e=window.performance;return{getDeviceDetails:()=>({deviceMemory:Gb(navigator.deviceMemory||0)}),getCurrentDeviceDetails:()=>{const t=Yi(e.memory.jsHeapSizeLimit),n=Yi(e.memory.totalJSHeapSize),r=Yi(e.memory.usedJSHeapSize);return{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}},Yi=e=>e/Math.pow(1e3,2),Gb=e=>1024*e;function qb(e){return"regexValue"in e}function zb(e){return"matchValue"in e}function Kb(e){const t=Math.trunc(e);return t===1?!0:t===0?!1:Math.floor(Math.random()*t)===0}class Xb{constructor(t=Kb){L(this,"regexCache",new Map),L(this,"config"),this.sampler=t}setConfig(t){this.config=t}isSamplingEnabled(){var t,n,r,i;return!!((n=(t=this.config)==null?void 0:t.logs)!=null&&n.length||(i=(r=this.config)==null?void 0:r.spans)!=null&&i.length)}shouldSample(t){var n,r;return t.name===fu?this.sampleLog((n=this.config)==null?void 0:n.logs,t):this.sampleSpan((r=this.config)==null?void 0:r.spans,t)}matchesValue(t,n){if(!t)return!1;if(zb(t))return t.matchValue===n;if(qb(t)){const r=t.regexValue;if(r===null)return!1;this.regexCache.has(r)||this.regexCache.set(r,new RegExp(r));const i=this.regexCache.get(r);if(typeof n=="string")return i.test(n)}return!1}matchesAttributes(t,n){if(t)for(const r of t){let i=!1;for(const o of Object.keys(n))if(this.matchesValue(r.key,o)){const a=n[o];if(this.matchesValue(r.attribute,a)){i=!0;break}}if(!i)return!1}return!0}matchEvent(t,n){return!(t.name&&!this.matchesValue(t.name,n.name)||t.attributes&&(!n.attributes||!this.matchesAttributes(t.attributes,n.attributes)))}matchesEvents(t,n){if(t)for(const r of t){let i=!1;for(const o of n)if(this.matchEvent(r,o)){i=!0;break}if(!i)return!1}return!0}matchesSpanConfig(t,n){return!(t.name&&!this.matchesValue(t.name,n.name)||!this.matchesAttributes(t.attributes,n.attributes)||!this.matchesEvents(t.events,n.events))}matchesLogConfig(t,n){if(t.severityText){const r=n[du];if(!this.matchesValue(t.severityText,r))return!1}if(t.message){const r=n[vu];if(!this.matchesValue(t.message,r))return!1}return!!this.matchesAttributes(t.attributes,n)}sampleSpan(t,n){if(t){for(const r of t)if(this.matchesSpanConfig(r,n))return{sample:this.sampler(r.samplingRatio),attributes:{[hu]:r.samplingRatio}}}return{sample:!0}}sampleLog(t,n){if(t){for(const r of t)if(this.matchesLogConfig(r,n.attributes))return{sample:this.sampler(r.samplingRatio),attributes:{[hu]:r.samplingRatio}}}return{sample:!0}}}const Gu=()=>{const e={end:()=>{},spanContext:()=>({traceId:"",spanId:"",traceFlags:0}),setAttribute:(t,n)=>e,setAttributes:t=>e,addEvent:(t,n,r)=>e,addLinks:t=>e,setStatus:t=>e,recordException:()=>{},addLink:()=>e,updateName:()=>e,isRecording:()=>!1};return e},Wb=()=>{if(typeof window>"u"||typeof PerformanceObserver>"u")return!1;const e=PerformanceObserver.supportedEntryTypes;return Array.isArray(e)&&e.includes("longtask")},Yb=e=>{if(!Wb())return()=>{};let t;try{t=new PerformanceObserver(n=>{var r;for(const i of n.getEntries()){const o=(r=i.attribution)==null?void 0:r[0];e({duration:i.duration,name:i.name,startTime:i.startTime,containerType:o?.containerType,containerSrc:o?.containerSrc,containerId:o?.containerId,containerName:o?.containerName})}}),t.observe({type:"longtask",buffered:!0})}catch{return()=>{}}return()=>{try{t.disconnect()}catch{}}},Jb=new Set(["string","number","boolean"]),Qb=()=>typeof window<"u"&&typeof window.ReportingObserver<"u",Zb=e=>{const t={};if(!e||typeof e!="object")return t;for(const[n,r]of Object.entries(e))if(r!=null)if(Jb.has(typeof r))t[`report.body.${n}`]=r;else try{t[`report.body.${n}`]=JSON.stringify(r)}catch{}return t},tE=e=>{var t;const n=(t=e.body)!=null?t:{},r=n.message||n.reason||n.id||e.type;return typeof r=="string"?r:e.type},eE=(e,t)=>{if(!Qb())return()=>{};const n=["deprecation","intervention","csp-violation"],r=window.ReportingObserver;let i;try{i=new r(o=>{var a,u;for(const c of o){const s=(a=c.type)!=null?a:"unknown",l=(u=c.body)!=null?u:{},p=C({"report.type":s,"report.url":c.url},Zb(l)),f=tE({type:s,body:l});e(s==="deprecation"?{kind:"log",level:"warn",type:s,message:f,url:c.url,attributes:p}:{kind:"error",type:s,message:f,url:c.url,attributes:p})}},{buffered:!0,types:n}),i.observe()}catch{return()=>{}}return()=>{try{i.disconnect()}catch{}}},nE="exception",rE=function(e,t,n){if(!e)return;const r=C({},n);typeof t=="string"?r[Tr]=t:t&&(t.code?r[wr]=t.code.toString():t.name&&(r[wr]=t.name),t.message&&(r[Tr]=t.message),t.stack&&(r[Tl]=t.stack)),r[wr]||r[Tr]?e.addEvent(nE,r):kt("otel","recordException","warn",`Failed to record an exception ${t}`)};class iE{constructor(t){L(this,"organizationID"),L(this,"_options"),L(this,"_integrations",[]),L(this,"_gauges",new Map),L(this,"_counters",new Map),L(this,"_histograms",new Map),L(this,"_up_down_counters",new Map),L(this,"sampler",new Xb),L(this,"_started",!1),L(this,"_ldContextKeys"),L(this,"graphqlSDK"),this._options=t,this.organizationID=t.projectId}_productAnalyticsEvents(){var t;const n=(t=this._options)==null?void 0:t.productAnalytics;if(n===!1)return{};const r={clicks:!0,pageViews:!0,trackEvents:!0};if(n===void 0||n===!0)return r;for(const i of Object.keys(n))n[i]===!1&&(r[i]=!1);return r}setLDContextKeyAttributes(t){t&&(this._ldContextKeys=Object.fromEntries(Object.entries(t).map(([n,r])=>[`${Zl}.${n}`,r])))}getLDContextKeyAttributes(){return this._ldContextKeys}start(){return lt(this,null,function*(){var t,n,r,i,o,a,u,c,s,l,p,f,v,m,y;if(this._started)return;this._started=!0,sb({backendUrl:(n=(t=this._options)==null?void 0:t.backendUrl)!=null?n:"https://pub.observability.app.launchdarkly.com",otlpEndpoint:(o=(i=(r=this._options)==null?void 0:r.otel)==null?void 0:i.otlpEndpoint)!=null?o:"https://otel.observability.app.launchdarkly.com",projectId:this._options.projectId,sessionSecureId:this._options.sessionSecureId,environment:(u=(a=this._options)==null?void 0:a.environment)!=null?u:"production",networkRecordingOptions:typeof((c=this._options)==null?void 0:c.networkRecording)=="object"?this._options.networkRecording:void 0,tracingOrigins:(s=this._options)==null?void 0:s.tracingOrigins,serviceName:(p=(l=this._options)==null?void 0:l.serviceName)!=null?p:"browser",serviceVersion:(f=this._options)==null?void 0:f.version,instrumentations:(m=(v=this._options)==null?void 0:v.otel)==null?void 0:m.instrumentations,productAnalyticsEvents:this._productAnalyticsEvents(),getLDContextKeyAttributes:()=>this.getLDContextKeyAttributes(),getIntegrations:()=>this._integrations},this.sampler),this._gauges.clear(),this._counters.clear(),this._histograms.clear(),this._up_down_counters.clear();const g=new Yc((y=this._options.backendUrl)!=null?y:"https://pub.observability.app.launchdarkly.com",{headers:{}});this.graphqlSDK=gl(g,Fl()),yield this.configureSampling(),this.setupListeners()})}stop(){return lt(this,null,function*(){this._started&&(this._started=!1,yield pb())})}configureSampling(){return lt(this,null,function*(){try{const t=yield this.graphqlSDK.GetSamplingConfig({organization_verbose_id:`${this.organizationID}`});this.sampler.setConfig(t.sampling)}catch(t){Ot("sampling","warn",`LaunchDarkly Observability: Failed to configure sampling: ${t}`)}})}_recordLog(t,n,r,i){this.startSpan(fu,o=>{var a,u,c,s,l;const p=typeof t=="string"?t:cn(t),f=i?i.map(v=>v.toString()).join(`
|
|
309
|
+
`):void 0;if(o?.addEvent("log",C(C({[du]:n,[vu]:p,"code.stacktrace":f},(a=this._ldContextKeys)!=null?a:{}),r)),this._options.reportConsoleErrors&&n==="error"){const v=new Error(p);o?.recordException(v),o?.setStatus({code:Sn.ERROR,message:p}),i?this._recordErrorMessage({error:v,event:v.message,type:"custom",url:window.location.href,source:"frontend",lineNumber:(c=(u=i[0])==null?void 0:u.lineNumber)!=null?c:0,columnNumber:(l=(s=i[0])==null?void 0:s.columnNumber)!=null?l:0,stackTrace:i,timestamp:new Date().toISOString(),id:Ur()}):this.recordError(v)}})}_recordErrorMessage(t,n){try{t.payload&&(n=C(C({},JSON.parse(t.payload)),n||{}))}catch{}this.startSpan("highlight.exception",o=>{var a;rE(o,(a=t.error)!=null?a:new Error(t.event),{[ab]:t.id}),o?.setAttributes(C({event:t.event,type:t.type,url:t.url,source:t.source,lineNumber:t.lineNumber,columnNumber:t.columnNumber},n))});const r=t,i=wp(r,["payload"]);for(const o of this._integrations)o.error(xt(),Q(C({},i),{payload:JSON.stringify(n)}))}recordError(t,n,r,i,o){var a,u,c,s;t=t||new Error("Unknown error"),t instanceof Error&&t.cause&&(r=Q(C({},r),{"exception.cause":JSON.stringify(t.cause)}));let l=n?n+":"+t.message:t.message;o==="React.ErrorBoundary"&&(l="ErrorBoundary: "+l);const p=_n(t),f={error:t,event:l,type:o??"custom",url:window.location.href,source:i??"frontend",lineNumber:(a=p[0])!=null&&a.lineNumber?(u=p[0])==null?void 0:u.lineNumber:0,columnNumber:(c=p[0])!=null&&c.columnNumber?(s=p[0])==null?void 0:s.columnNumber:0,stackTrace:p,timestamp:new Date().toISOString(),id:Ur()};this._recordErrorMessage(f,r)}recordCount(t){var n,r;let i=this._counters.get(t.name);if(!i){if(i=(n=Jn())==null?void 0:n.createCounter(t.name),!i)return;this._counters.set(t.name,i)}i.add(t.value,Q(C(C({},(r=this._ldContextKeys)!=null?r:{}),t.attributes),{"highlight.session_id":xt()}))}recordGauge(t){var n,r,i;let o=this._gauges.get(t.name);if(!o){if(o=(n=Jn())==null?void 0:n.createGauge(t.name),!o)return;this._gauges.set(t.name,o)}const a=C(C({},(r=this._ldContextKeys)!=null?r:{}),t.attributes);o.record(t.value,Q(C({},a),{"highlight.session_id":xt()}));const u={name:t.name,value:t.value,category:a.category,group:(i=a.group)==null?void 0:i.toString(),tags:Object.entries(a).map(([c,s])=>{var l;return{name:c??"",value:(l=s?.toString())!=null?l:""}})};for(const c of this._integrations)c.recordGauge(xt(),u)}recordIncr(t){this.recordCount(Q(C({},t),{value:1}))}recordHistogram(t){var n,r;let i=this._histograms.get(t.name);if(!i){if(i=(n=Jn())==null?void 0:n.createHistogram(t.name),!i)return;this._histograms.set(t.name,i)}i.record(t.value,Q(C(C({},(r=this._ldContextKeys)!=null?r:{}),t.attributes),{"highlight.session_id":xt()}))}recordUpDownCounter(t){var n,r;let i=this._up_down_counters.get(t.name);if(!i){if(i=(n=Jn())==null?void 0:n.createUpDownCounter(t.name),!i)return;this._up_down_counters.set(t.name,i)}i.add(t.value,Q(C(C({},(r=this._ldContextKeys)!=null?r:{}),t.attributes),{"highlight.session_id":xt()}))}startSpan(t,n,r,i){const o=yu();if(!o){const u=Gu();return i===void 0&&r===void 0?n(u):i===void 0?r(u):i(u)}const a=(u,c)=>{this._ldContextKeys&&u.setAttributes(this._ldContextKeys);const s=c(u);return s instanceof Promise?s.finally(()=>u.end()):(u.end(),s)};return i===void 0&&r===void 0?o.startActiveSpan(t,u=>a(u,n)):i===void 0?o.startActiveSpan(t,n,u=>a(u,r)):o.startActiveSpan(t,n,r,u=>a(u,i))}startManualSpan(t,n,r,i){const o=yu();if(!o){const a=Gu();return i===void 0&&r===void 0?n(a):i===void 0?r(a):i(a)}return i===void 0&&r===void 0?o.startActiveSpan(t,n):i===void 0?o.startActiveSpan(t,n,r):o.startActiveSpan(t,n,r,i)}register(t,n){this._integrations.push(new ap(t,n))}getHooks(t){return this._integrations.flatMap(n=>{var r,i;return(i=(r=n.getHooks)==null?void 0:r.call(n,t))!=null?i:[]})}submitViewportMetrics({height:t,width:n,availHeight:r,availWidth:i}){this.recordGauge({name:Mt.ViewportHeight,value:t,attributes:{category:nt.Device,group:window.location.href}}),this.recordGauge({name:Mt.ViewportWidth,value:n,attributes:{category:nt.Device,group:window.location.href}}),this.recordGauge({name:Mt.ScreenHeight,value:r,attributes:{category:nt.Device,group:window.location.href}}),this.recordGauge({name:Mt.ScreenWidth,value:i,attributes:{category:nt.Device,group:window.location.href}}),this.recordGauge({name:Mt.ViewportArea,value:t*n,attributes:{category:nt.Device,group:window.location.href}})}setupListeners(){var t;this._options.disableConsoleRecording||xp(r=>{var i;this._recordLog((i=r.value)==null?void 0:i.join(" "),r.type,r.attributes?JSON.parse(r.attributes):{},r.trace)},{level:(t=this._options.consoleMethodsToRecord)!=null?t:[...Sp],logger:"console",stringifyOptions:{depthOfLimit:10,numOfKeysLimit:100,stringLengthLimit:1e3}}),this._options.enablePerformanceRecording!==!1&&(Sb(r=>{Object.entries(r).filter(([i])=>i!=="relativeTimestamp").forEach(([i,o])=>o&&this.recordGauge({name:i,value:o,attributes:{category:nt.Performance,group:window.location.href}}))},0),Tb(r=>{this.recordGauge({name:"Jank",value:r.jankAmount,attributes:{category:nt.WebVital,group:r.querySelector}})},0)),Mp(r=>{var i;if($p.includes(r.event)||jp.some(u=>r.event.includes(u)))return;const o=new Error(r.event);o.stack=cn(r.stackTrace.map(u=>u.toString()));let a={};try{r.payload&&(a=JSON.parse(r.payload))}catch{}this._recordErrorMessage(Q(C({},r),{error:(i=r.error)!=null?i:o}),a)},{enablePromisePatch:!!this._options.enablePromisePatch}),Fb(r=>{const{name:i,value:o}=r,{hostname:a,pathname:u,href:c}=window.location,s={group:window.location.pathname,category:nt.WebVital,[At]:_i(c),[hn]:u,[wl]:a};switch(r.name){case"LCP":{const l=r.attribution;l.element&&(s["web_vital.element"]=l.element),l.url&&(s["web_vital.attribution.url"]=_i(l.url));break}case"CLS":{const l=r.attribution;l.largestShiftTarget&&(s["web_vital.element"]=l.largestShiftTarget),l.loadState&&(s["web_vital.load_state"]=l.loadState);break}case"INP":{const l=r.attribution;l.eventTarget&&(s["web_vital.element"]=l.eventTarget),l.eventType&&(s["web_vital.event_type"]=l.eventType),l.loadState&&(s["web_vital.load_state"]=l.loadState);break}case"FID":{const l=r.attribution;l.eventTarget&&(s["web_vital.element"]=l.eventTarget),l.eventType&&(s["web_vital.event_type"]=l.eventType);break}case"FCP":{const l=r.attribution;l.loadState&&(s["web_vital.load_state"]=l.loadState);break}}this.recordGauge({name:i,value:o,attributes:s})}),fp(r=>{this.submitViewportMetrics(r)}),Vb(r=>{const i={category:nt.Performance,group:window.location.href};r.saveData!==void 0&&(i.saveData=r.saveData.toString()),r.effectiveType!==void 0&&(i.effectiveType=r.effectiveType.toString()),r.type!==void 0&&(i.type=r.type.toString()),Object.entries(r).filter(([o])=>o!=="relativeTimestamp").forEach(([o,a])=>{El(a)&&this.recordGauge({name:o,value:a,attributes:i})})},new Date().getTime());const{getDeviceDetails:n}=Hb();n&&this.recordGauge({name:Mt.DeviceMemory,value:n().deviceMemory,attributes:{category:nt.Device,group:window.location.href}}),this._options.enableLongtaskRecording!==!1&&Yb(r=>{const i={category:nt.Performance,name:r.name,[hn]:window.location.pathname};r.containerType&&(i.container_type=r.containerType),r.containerSrc&&(i.container_src=r.containerSrc),r.containerId&&(i.container_id=r.containerId),r.containerName&&(i.container_name=r.containerName),this.recordHistogram({name:"long_task.duration",value:r.duration,attributes:i})}),this._options.enableReportingObserver!==!1&&eE(r=>{var i;const o=Q(C({},r.attributes),{[hn]:window.location.pathname});if(r.kind==="log")this._recordLog(r.message,(i=r.level)!=null?i:"warn",o);else{const a=new Error(r.message);this.recordError(a,void 0,Object.fromEntries(Object.entries(o).map(([u,c])=>[u,c===void 0?"":String(c)])),"reporting-observer","custom")}})}recordLog(t,n,r){return this._recordLog(t,n,r)}}class oE extends mp{constructor(t){super(t),L(this,"observe"),L(this,"options"),this.options=t}initialize(t,n){try{if(typeof window>"u"||typeof document>"u"){console.warn("@launchdarkly/observability is not initializing because it is not supported in this environment.");return}if(!t){console.warn("@launchdarkly/observability is not initializing because the SDK credential is undefined.");return}this.configureSession(t,n),this.observe=new iE(Q(C({},n),{projectId:t,sessionSecureId:this.sessionSecureID})),n!=null&&n.manualStart||this.observe.start(),et.LDObserve.load(this.observe)}catch(r){Ot("Error initializing @launchdarkly/observability SDK","error",r)}}getMetadata(){return{name:"@launchdarkly/observability"}}register(t,n){var r;(r=this.observe)==null||r.register(t,n)}getHooks(t){var n,r,i,o;const a=C(C({[Al]:t.sdk.name,[xl]:t.sdk.version,[Hl]:t.clientSideId,[Xl]:"LaunchDarkly"},(n=t.application)!=null&&n.id?{[Yl]:t.application.id}:{}),(r=t.application)!=null&&r.version?{[Jl]:t.application.version}:{});return this.initialize((o=(i=t.sdkKey)!=null?i:t.mobileKey)!=null?o:t.clientSideId,this.options),[{getMetadata:()=>({name:"@launchdarkly/observability/hooks"}),afterIdentify:(u,c,s)=>{var l,p,f,v,m,y,g,b,w;for(const M of(f=(p=(l=this.observe)==null?void 0:l.getHooks)==null?void 0:p.call(l,t))!=null?f:[])(v=M.afterIdentify)==null||v.call(M,u,c,s);const I=jo(u.context);if((m=this.observe)==null||m.setLDContextKeyAttributes(I),s.status==="completed"){const M=Q(C({},I),{key:(b=(g=(y=this.options)==null?void 0:y.contextFriendlyName)==null?void 0:g.call(y,u.context))!=null?b:Ir(u.context),timeout:u.timeout,canonicalKey:Ir(u.context),[ip]:s.status});(w=this.observe)==null||w.recordLog("LD.identify","info",C(C({},a),M))}return c},afterEvaluation:(u,c,s)=>{var l,p,f,v,m;for(const b of(f=(p=(l=this.observe)==null?void 0:l.getHooks)==null?void 0:p.call(l,t))!=null?f:[])(v=b.afterEvaluation)==null||v.call(b,u,c,s);const y=C({[Gl]:u.flagKey,[Kl]:JSON.stringify(s.value)},s.variationIndex?{[Wl]:s.variationIndex}:{});if(s.reason)for(const b in Do){const w=b,I=s.reason[w];I&&(y[Do[w]]=I)}u.context&&(y[ql]=JSON.stringify(jo(u.context)),y[zl]=Ir(u.context));const g=C(C({},a),y);return(m=this.observe)==null||m.startSpan(Vl,b=>{b&&b.addEvent(J,g)}),c},afterTrack:u=>{var c,s,l,p,f,v,m,y,g;for(const w of(l=(s=(c=this.observe)==null?void 0:c.getHooks)==null?void 0:s.call(c,t))!=null?l:[])(p=w.afterTrack)==null||p.call(w,u);if(!(((f=this.options)==null?void 0:f.productAnalytics)!==!1&&(typeof((v=this.options)==null?void 0:v.productAnalytics)!="object"||this.options.productAnalytics.trackEvents!==!1)))return;const b=C(Q(C(C({[At]:window.location.href},(y=(m=this.observe)==null?void 0:m.getLDContextKeyAttributes())!=null?y:{}),a),{key:u.key,value:u.metricValue}),typeof u.data=="object"?u.data:{});(g=this.observe)==null||g.startSpan(ep,w=>{w&&w.setAttributes(b)})}}]}}et.default=oE,Object.defineProperties(et,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
310
310
|
//# sourceMappingURL=index.umd.js.map
|