@launchdarkly/observability 1.1.3 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,14 +1,14 @@
1
- (function(rt,be){typeof exports=="object"&&typeof module<"u"?be(exports):typeof define=="function"&&define.amd?define(["exports"],be):(rt=typeof globalThis<"u"?globalThis:rt||self,be(rt.Observability={}))})(this,function(rt){"use strict";var be=Object.defineProperty,Nc=(e,t,n)=>t in e?be(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,mt=(e,t,n)=>Nc(e,typeof t!="symbol"?t+"":t,n),xc=(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 Eo=Object.create(null),St=(e,t,...n)=>{const r=`[@launchdarkly plugins]: (${e}): `;console[t].apply(console,[r,...n]),Pc(r,...n)},Ot=(e,t,n,...r)=>{Eo[`${e}-${t}`]||(Eo[`${e}-${t}`]=!0,St(e,n,...r))},Pc=(e,...t)=>xc(void 0,null,function*(){try{const{LDObserve:n}=yield Promise.resolve().then(()=>ef);n.recordLog(`${e}${t}`,"warn")}catch{}});class Ic{constructor(t,n){mt(this,"debug"),mt(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])}}let To=class{constructor(){mt(this,"_sdk"),mt(this,"_isLoaded",!1),mt(this,"_callBuffer",[]),mt(this,"_capacity",1e5),mt(this,"_droppedEvents",0),mt(this,"_exceededCapacity",!1),mt(this,"_logger",new Ic)}_bufferCall(t,n){if(this._isLoaded)try{return this._sdk[t](...n)}catch(r){St(`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,St("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){St(`Error executing buffered call to ${n}:`,"error",i)}this._callBuffer=[]}};var kc=Object.defineProperty,Mc=Object.defineProperties,Dc=Object.getOwnPropertyDescriptors,rn=Object.getOwnPropertySymbols,bo=Object.prototype.hasOwnProperty,So=Object.prototype.propertyIsEnumerable,ir=(e,t,n)=>t in e?kc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,P=(e,t)=>{for(var n in t||(t={}))bo.call(t,n)&&ir(e,n,t[n]);if(rn)for(var n of rn(t))So.call(t,n)&&ir(e,n,t[n]);return e},on=(e,t)=>Mc(e,Dc(t)),Se=(e,t)=>{var n={};for(var r in e)bo.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&rn)for(var r of rn(e))t.indexOf(r)<0&&So.call(e,r)&&(n[r]=e[r]);return n},Oe=(e,t,n)=>ir(e,typeof t!="symbol"?t+"":t,n),ee=(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 an(e,t){throw new Error(t)}function Uc(e){return typeof e=="object"&&e!==null}function jc(e,t){throw new Error("Unexpected invariant triggered.")}const $c=/\r\n|[\n\r]/g;function or(e,t){let n=0,r=1;for(const i of e.body.matchAll($c)){if(typeof i.index=="number"||jc(),i.index>=t)break;n=i.index+i[0].length,r+=1}return{line:r,column:t+1-n}}function Bc(e){return Oo(e.source,or(e.source,e.start))}function Oo(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),m=c%80,v=[];for(let y=0;y<p.length;y+=80)v.push(p.slice(y,y+80));return s+wo([[`${a} |`,v[0]],...v.slice(1,f+1).map(y=>["|",y]),["|","^".padStart(m)],["|",v[f+1]]])}return s+wo([[`${a-1} |`,l[i-1]],[`${a} |`,p],["|","^".padStart(c)],[`${a+1} |`,l[i+1]]])}function wo(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 Fc(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 Vc=class Cc extends Error{constructor(t,...n){var r,i,o;const{nodes:a,source:u,positions:c,path:s,originalError:l,extensions:p}=Fc(n);super(t),this.name="GraphQLError",this.path=s??void 0,this.originalError=l??void 0,this.nodes=Ao(Array.isArray(a)?a:a?[a]:void 0);const f=Ao((r=this.nodes)===null||r===void 0?void 0:r.map(v=>v.loc).filter(v=>v!=null));this.source=u??(f==null||(i=f[0])===null||i===void 0?void 0:i.source),this.positions=c??f?.map(v=>v.start),this.locations=c&&u?c.map(v=>or(u,v)):f?.map(v=>or(v.source,v.start));const m=Uc(l?.extensions)?l?.extensions:void 0;this.extensions=(o=p??m)!==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,Cc):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+=`
1
+ (function(re,bt){typeof exports=="object"&&typeof module<"u"?bt(exports):typeof define=="function"&&define.amd?define(["exports"],bt):(re=typeof globalThis<"u"?globalThis:re||self,bt(re.Observability={}))})(this,function(re){"use strict";var bt=Object.defineProperty,Nc=(t,e,n)=>e in t?bt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,me=(t,e,n)=>Nc(t,typeof e!="symbol"?e+"":e,n),xc=(t,e,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(t,e)).next())});const To=Object.create(null),Se=(t,e,...n)=>{const r=`[@launchdarkly plugins]: (${t}): `;console[e].apply(console,[r,...n]),Pc(r,...n)},Oe=(t,e,n,...r)=>{To[`${t}-${e}`]||(To[`${t}-${e}`]=!0,Se(t,n,...r))},Pc=(t,...e)=>xc(void 0,null,function*(){try{const{LDObserve:n}=yield Promise.resolve().then(()=>tf);n.recordLog(`${t}${e}`,"warn")}catch{}});class Ic{constructor(e,n){me(this,"debug"),me(this,"name"),this.debug=e,this.name=n}log(...e){if(this.debug){let n=`[${Date.now()}]`;this.name&&(n+=` - ${this.name}`),console.log.apply(console,[n,...e])}}warn(...e){let n=`[${Date.now()}]`;this.name&&(n+=` - ${this.name}`),console.warn.apply(console,[n,...e])}}let bo=class{constructor(){me(this,"_sdk"),me(this,"_isLoaded",!1),me(this,"_callBuffer",[]),me(this,"_capacity",1e5),me(this,"_droppedEvents",0),me(this,"_exceededCapacity",!1),me(this,"_logger",new Ic)}_bufferCall(e,n){if(this._isLoaded)try{return this._sdk[e](...n)}catch(r){Se(`Error executing buffered call to ${e}:`,"error",r)}else{this._enqueue({method:e,args:n});return}}_enqueue(e){this._callBuffer.length<this._capacity?(this._callBuffer.push(e),this._exceededCapacity=!1):(this._exceededCapacity||(this._exceededCapacity=!0,Se("Exceeded event queue capacity. Increase capacity to avoid dropping events.","warn")),this._droppedEvents+=1)}load(e){this._sdk=e,this._isLoaded=!0;for(const{method:n,args:r}of this._callBuffer)try{this._sdk[n](...r)}catch(i){Se(`Error executing buffered call to ${n}:`,"error",i)}this._callBuffer=[]}};var kc=Object.defineProperty,Mc=Object.defineProperties,Dc=Object.getOwnPropertyDescriptors,rn=Object.getOwnPropertySymbols,So=Object.prototype.hasOwnProperty,Oo=Object.prototype.propertyIsEnumerable,or=(t,e,n)=>e in t?kc(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,I=(t,e)=>{for(var n in e||(e={}))So.call(e,n)&&or(t,n,e[n]);if(rn)for(var n of rn(e))Oo.call(e,n)&&or(t,n,e[n]);return t},on=(t,e)=>Mc(t,Dc(e)),St=(t,e)=>{var n={};for(var r in t)So.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&rn)for(var r of rn(t))e.indexOf(r)<0&&Oo.call(t,r)&&(n[r]=t[r]);return n},Ot=(t,e,n)=>or(t,typeof e!="symbol"?e+"":e,n),tt=(t,e,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(t,e)).next())});function an(t,e){throw new Error(e)}function Uc(t){return typeof t=="object"&&t!==null}function jc(t,e){throw new Error("Unexpected invariant triggered.")}const $c=/\r\n|[\n\r]/g;function ar(t,e){let n=0,r=1;for(const i of t.body.matchAll($c)){if(typeof i.index=="number"||jc(),i.index>=e)break;n=i.index+i[0].length,r+=1}return{line:r,column:e+1-n}}function Bc(t){return wo(t.source,ar(t.source,t.start))}function wo(t,e){const n=t.locationOffset.column-1,r="".padStart(n)+t.body,i=e.line-1,o=t.locationOffset.line-1,a=e.line+o,u=e.line===1?n:0,c=e.column+u,s=`${t.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),m=c%80,v=[];for(let y=0;y<p.length;y+=80)v.push(p.slice(y,y+80));return s+Ao([[`${a} |`,v[0]],...v.slice(1,f+1).map(y=>["|",y]),["|","^".padStart(m)],["|",v[f+1]]])}return s+Ao([[`${a-1} |`,l[i-1]],[`${a} |`,p],["|","^".padStart(c)],[`${a+1} |`,l[i+1]]])}function Ao(t){const e=t.filter(([r,i])=>i!==void 0),n=Math.max(...e.map(([r])=>r.length));return e.map(([r,i])=>r.padStart(n)+(i?" "+i:"")).join(`
3
+ `)}function Fc(t){const e=t[0];return e==null||"kind"in e||"length"in e?{nodes:e,source:t[1],positions:t[2],path:t[3],originalError:t[4],extensions:t[5]}:e}let Vc=class Cc extends Error{constructor(e,...n){var r,i,o;const{nodes:a,source:u,positions:c,path:s,originalError:l,extensions:p}=Fc(n);super(e),this.name="GraphQLError",this.path=s??void 0,this.originalError=l??void 0,this.nodes=Lo(Array.isArray(a)?a:a?[a]:void 0);const f=Lo((r=this.nodes)===null||r===void 0?void 0:r.map(v=>v.loc).filter(v=>v!=null));this.source=u??(f==null||(i=f[0])===null||i===void 0?void 0:i.source),this.positions=c??f?.map(v=>v.start),this.locations=c&&u?c.map(v=>ar(u,v)):f?.map(v=>ar(v.source,v.start));const m=Uc(l?.extensions)?l?.extensions:void 0;this.extensions=(o=p??m)!==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,Cc):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(const n of this.nodes)n.loc&&(e+=`
4
4
 
5
- `+Bc(n.loc));else if(this.source&&this.locations)for(const n of this.locations)t+=`
5
+ `+Bc(n.loc));else if(this.source&&this.locations)for(const n of this.locations)e+=`
6
6
 
7
- `+Oo(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 Ao(e){return e===void 0||e.length===0?void 0:e}function G(e,t,n){return new Vc(`Syntax Error: ${n}`,{source:e,positions:[t]})}let Hc=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}}};class Lo{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 Ro={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"]},Gc=new Set(Object.keys(Ro));function Co(e){const t=e?.kind;return typeof t=="string"&&Gc.has(t)}var ne;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(ne||(ne={}));var ar;(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"})(ar||(ar={}));var O;(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"})(O||(O={}));function sr(e){return e===9||e===32}function we(e){return e>=48&&e<=57}function No(e){return e>=97&&e<=122||e>=65&&e<=90}function xo(e){return No(e)||e===95}function zc(e){return No(e)||we(e)||e===95}function qc(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=Xc(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 Xc(e){let t=0;for(;t<e.length&&sr(e.charCodeAt(t));)++t;return t}function Kc(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(m=>m.length===0||sr(m.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&&sr(e.charCodeAt(0));return(l&&!f||o)&&(p+=`
7
+ `+wo(this.source,n);return e}toJSON(){const e={message:this.message};return this.locations!=null&&(e.locations=this.locations),this.path!=null&&(e.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}};function Lo(t){return t===void 0||t.length===0?void 0:t}function G(t,e,n){return new Vc(`Syntax Error: ${n}`,{source:t,positions:[e]})}let Hc=class{constructor(e,n,r){this.start=e.start,this.end=n.end,this.startToken=e,this.endToken=n,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}};class Ro{constructor(e,n,r,i,o,a){this.kind=e,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 Co={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"]},Gc=new Set(Object.keys(Co));function No(t){const e=t?.kind;return typeof e=="string"&&Gc.has(e)}var nt;(function(t){t.QUERY="query",t.MUTATION="mutation",t.SUBSCRIPTION="subscription"})(nt||(nt={}));var sr;(function(t){t.QUERY="QUERY",t.MUTATION="MUTATION",t.SUBSCRIPTION="SUBSCRIPTION",t.FIELD="FIELD",t.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",t.FRAGMENT_SPREAD="FRAGMENT_SPREAD",t.INLINE_FRAGMENT="INLINE_FRAGMENT",t.VARIABLE_DEFINITION="VARIABLE_DEFINITION",t.SCHEMA="SCHEMA",t.SCALAR="SCALAR",t.OBJECT="OBJECT",t.FIELD_DEFINITION="FIELD_DEFINITION",t.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",t.INTERFACE="INTERFACE",t.UNION="UNION",t.ENUM="ENUM",t.ENUM_VALUE="ENUM_VALUE",t.INPUT_OBJECT="INPUT_OBJECT",t.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(sr||(sr={}));var O;(function(t){t.NAME="Name",t.DOCUMENT="Document",t.OPERATION_DEFINITION="OperationDefinition",t.VARIABLE_DEFINITION="VariableDefinition",t.SELECTION_SET="SelectionSet",t.FIELD="Field",t.ARGUMENT="Argument",t.FRAGMENT_SPREAD="FragmentSpread",t.INLINE_FRAGMENT="InlineFragment",t.FRAGMENT_DEFINITION="FragmentDefinition",t.VARIABLE="Variable",t.INT="IntValue",t.FLOAT="FloatValue",t.STRING="StringValue",t.BOOLEAN="BooleanValue",t.NULL="NullValue",t.ENUM="EnumValue",t.LIST="ListValue",t.OBJECT="ObjectValue",t.OBJECT_FIELD="ObjectField",t.DIRECTIVE="Directive",t.NAMED_TYPE="NamedType",t.LIST_TYPE="ListType",t.NON_NULL_TYPE="NonNullType",t.SCHEMA_DEFINITION="SchemaDefinition",t.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",t.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",t.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",t.FIELD_DEFINITION="FieldDefinition",t.INPUT_VALUE_DEFINITION="InputValueDefinition",t.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",t.UNION_TYPE_DEFINITION="UnionTypeDefinition",t.ENUM_TYPE_DEFINITION="EnumTypeDefinition",t.ENUM_VALUE_DEFINITION="EnumValueDefinition",t.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",t.DIRECTIVE_DEFINITION="DirectiveDefinition",t.SCHEMA_EXTENSION="SchemaExtension",t.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",t.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",t.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",t.UNION_TYPE_EXTENSION="UnionTypeExtension",t.ENUM_TYPE_EXTENSION="EnumTypeExtension",t.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(O||(O={}));function ur(t){return t===9||t===32}function wt(t){return t>=48&&t<=57}function xo(t){return t>=97&&t<=122||t>=65&&t<=90}function Po(t){return xo(t)||t===95}function zc(t){return xo(t)||wt(t)||t===95}function qc(t){var e;let n=Number.MAX_SAFE_INTEGER,r=null,i=-1;for(let a=0;a<t.length;++a){var o;const u=t[a],c=Xc(u);c!==u.length&&(r=(o=r)!==null&&o!==void 0?o:a,i=a,a!==0&&c<n&&(n=c))}return t.map((a,u)=>u===0?a:a.slice(n)).slice((e=r)!==null&&e!==void 0?e:0,i+1)}function Xc(t){let e=0;for(;e<t.length&&ur(t.charCodeAt(e));)++e;return e}function Kc(t,e){const n=t.replace(/"""/g,'\\"""'),r=n.split(/\r\n|[\n\r]/g),i=r.length===1,o=r.length>1&&r.slice(1).every(m=>m.length===0||ur(m.charCodeAt(0))),a=n.endsWith('\\"""'),u=t.endsWith('"')&&!a,c=t.endsWith("\\"),s=u||c,l=!i||t.length>70||s||o||a;let p="";const f=i&&ur(t.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 Wc=class{constructor(t){const n=new Lo(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=Jc(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===d.COMMENT);return t}};function Yc(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 re(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function sn(e,t){return Po(e.charCodeAt(t))&&Io(e.charCodeAt(t+1))}function Po(e){return e>=55296&&e<=56319}function Io(e){return e>=56320&&e<=57343}function kt(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 Lo(t,n,r,o,a,i)}function Jc(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 Qc(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?il(e,i):tl(e,i)}if(we(o)||o===45)return Zc(e,i,o);if(xo(o))return ol(e,i);throw G(e.source,i,o===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:re(o)||sn(n,i)?`Unexpected character: ${kt(e,i)}.`:`Invalid character: ${kt(e,i)}.`)}return F(e,d.EOF,r,r)}function Qc(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(re(o))++i;else if(sn(n,i))i+=2;else break}return F(e,d.COMMENT,t,i,n.slice(t+1,i))}function Zc(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),we(o))throw G(e.source,i,`Invalid number, unexpected digit after 0: ${kt(e,i)}.`)}else i=ur(e,i,o),o=r.charCodeAt(i);if(o===46&&(a=!0,o=r.charCodeAt(++i),i=ur(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=ur(e,i,o),o=r.charCodeAt(i)),o===46||xo(o))throw G(e.source,i,`Invalid number, expected digit but got: ${kt(e,i)}.`);return F(e,a?d.FLOAT:d.INT,t,i,r.slice(t,i))}function ur(e,t,n){if(!we(n))throw G(e.source,t,`Invalid number, expected digit but got: ${kt(e,t)}.`);const r=e.source.body;let i=t+1;for(;we(r.charCodeAt(i));)++i;return i}function tl(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?el(e,i):nl(e,i):rl(e,i);a+=c.value,i+=c.size,o=i;continue}if(u===10||u===13)break;if(re(u))++i;else if(sn(n,i))i+=2;else throw G(e.source,i,`Invalid character within String: ${kt(e,i)}.`)}throw G(e.source,i,"Unterminated string.")}function el(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||!re(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|Ae(o),r<0)break}throw G(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+i)}".`)}function nl(e,t){const n=e.source.body,r=ko(n,t+2);if(re(r))return{value:String.fromCodePoint(r),size:6};if(Po(r)&&n.charCodeAt(t+6)===92&&n.charCodeAt(t+7)===117){const i=ko(n,t+8);if(Io(i))return{value:String.fromCodePoint(r,i),size:12}}throw G(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function ko(e,t){return Ae(e.charCodeAt(t))<<12|Ae(e.charCodeAt(t+1))<<8|Ae(e.charCodeAt(t+2))<<4|Ae(e.charCodeAt(t+3))}function Ae(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function rl(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 il(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,qc(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(re(s))++o;else if(sn(n,o))o+=2;else throw G(e.source,o,`Invalid character within String: ${kt(e,o)}.`)}throw G(e.source,o,"Unterminated string.")}function ol(e,t){const n=e.source.body,r=n.length;let i=t+1;for(;i<r;){const o=n.charCodeAt(i);if(zc(o))++i;else break}return F(e,d.NAME,t,i,n.slice(t,i))}const al=10,Mo=2;function cr(e){return un(e,[])}function un(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return sl(e,t);default:return String(e)}}function sl(e,t){if(e===null)return"null";if(t.includes(e))return"[Circular]";const n=[...t,e];if(ul(e)){const r=e.toJSON();if(r!==e)return typeof r=="string"?r:un(r,n)}else if(Array.isArray(e))return ll(e,n);return cl(e,n)}function ul(e){return typeof e.toJSON=="function"}function cl(e,t){const n=Object.entries(e);return n.length===0?"{}":t.length>Mo?"["+pl(e)+"]":"{ "+n.map(([r,i])=>r+": "+un(i,t)).join(", ")+" }"}function ll(e,t){if(e.length===0)return"[]";if(t.length>Mo)return"[Array]";const n=Math.min(al,e.length),r=e.length-n,i=[];for(let o=0;o<n;++o)i.push(un(e[o],t));return r===1?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function pl(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 fl=globalThis.process&&process.env.NODE_ENV==="production",hl=fl?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=cr(e);throw new Error(`Cannot use ${r} "${o}" from another module or realm.
9
+ `),'"""'+p+'"""'}var d;(function(t){t.SOF="<SOF>",t.EOF="<EOF>",t.BANG="!",t.DOLLAR="$",t.AMP="&",t.PAREN_L="(",t.PAREN_R=")",t.SPREAD="...",t.COLON=":",t.EQUALS="=",t.AT="@",t.BRACKET_L="[",t.BRACKET_R="]",t.BRACE_L="{",t.PIPE="|",t.BRACE_R="}",t.NAME="Name",t.INT="Int",t.FLOAT="Float",t.STRING="String",t.BLOCK_STRING="BlockString",t.COMMENT="Comment"})(d||(d={}));let Wc=class{constructor(e){const n=new Ro(d.SOF,0,0,0,0);this.source=e,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 e=this.token;if(e.kind!==d.EOF)do if(e.next)e=e.next;else{const n=Jc(this,e.end);e.next=n,n.prev=e,e=n}while(e.kind===d.COMMENT);return e}};function Yc(t){return t===d.BANG||t===d.DOLLAR||t===d.AMP||t===d.PAREN_L||t===d.PAREN_R||t===d.SPREAD||t===d.COLON||t===d.EQUALS||t===d.AT||t===d.BRACKET_L||t===d.BRACKET_R||t===d.BRACE_L||t===d.PIPE||t===d.BRACE_R}function rt(t){return t>=0&&t<=55295||t>=57344&&t<=1114111}function sn(t,e){return Io(t.charCodeAt(e))&&ko(t.charCodeAt(e+1))}function Io(t){return t>=55296&&t<=56319}function ko(t){return t>=56320&&t<=57343}function ke(t,e){const n=t.source.body.codePointAt(e);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(t,e,n,r,i){const o=t.line,a=1+n-t.lineStart;return new Ro(e,n,r,o,a,i)}function Jc(t,e){const n=t.source.body,r=n.length;let i=e;for(;i<r;){const o=n.charCodeAt(i);switch(o){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++t.line,t.lineStart=i;continue;case 13:n.charCodeAt(i+1)===10?i+=2:++i,++t.line,t.lineStart=i;continue;case 35:return Qc(t,i);case 33:return F(t,d.BANG,i,i+1);case 36:return F(t,d.DOLLAR,i,i+1);case 38:return F(t,d.AMP,i,i+1);case 40:return F(t,d.PAREN_L,i,i+1);case 41:return F(t,d.PAREN_R,i,i+1);case 46:if(n.charCodeAt(i+1)===46&&n.charCodeAt(i+2)===46)return F(t,d.SPREAD,i,i+3);break;case 58:return F(t,d.COLON,i,i+1);case 61:return F(t,d.EQUALS,i,i+1);case 64:return F(t,d.AT,i,i+1);case 91:return F(t,d.BRACKET_L,i,i+1);case 93:return F(t,d.BRACKET_R,i,i+1);case 123:return F(t,d.BRACE_L,i,i+1);case 124:return F(t,d.PIPE,i,i+1);case 125:return F(t,d.BRACE_R,i,i+1);case 34:return n.charCodeAt(i+1)===34&&n.charCodeAt(i+2)===34?il(t,i):el(t,i)}if(wt(o)||o===45)return Zc(t,i,o);if(Po(o))return ol(t,i);throw G(t.source,i,o===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:rt(o)||sn(n,i)?`Unexpected character: ${ke(t,i)}.`:`Invalid character: ${ke(t,i)}.`)}return F(t,d.EOF,r,r)}function Qc(t,e){const n=t.source.body,r=n.length;let i=e+1;for(;i<r;){const o=n.charCodeAt(i);if(o===10||o===13)break;if(rt(o))++i;else if(sn(n,i))i+=2;else break}return F(t,d.COMMENT,e,i,n.slice(e+1,i))}function Zc(t,e,n){const r=t.source.body;let i=e,o=n,a=!1;if(o===45&&(o=r.charCodeAt(++i)),o===48){if(o=r.charCodeAt(++i),wt(o))throw G(t.source,i,`Invalid number, unexpected digit after 0: ${ke(t,i)}.`)}else i=cr(t,i,o),o=r.charCodeAt(i);if(o===46&&(a=!0,o=r.charCodeAt(++i),i=cr(t,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(t,i,o),o=r.charCodeAt(i)),o===46||Po(o))throw G(t.source,i,`Invalid number, expected digit but got: ${ke(t,i)}.`);return F(t,a?d.FLOAT:d.INT,e,i,r.slice(e,i))}function cr(t,e,n){if(!wt(n))throw G(t.source,e,`Invalid number, expected digit but got: ${ke(t,e)}.`);const r=t.source.body;let i=e+1;for(;wt(r.charCodeAt(i));)++i;return i}function el(t,e){const n=t.source.body,r=n.length;let i=e+1,o=i,a="";for(;i<r;){const u=n.charCodeAt(i);if(u===34)return a+=n.slice(o,i),F(t,d.STRING,e,i+1,a);if(u===92){a+=n.slice(o,i);const c=n.charCodeAt(i+1)===117?n.charCodeAt(i+2)===123?tl(t,i):nl(t,i):rl(t,i);a+=c.value,i+=c.size,o=i;continue}if(u===10||u===13)break;if(rt(u))++i;else if(sn(n,i))i+=2;else throw G(t.source,i,`Invalid character within String: ${ke(t,i)}.`)}throw G(t.source,i,"Unterminated string.")}function tl(t,e){const n=t.source.body;let r=0,i=3;for(;i<12;){const o=n.charCodeAt(e+i++);if(o===125){if(i<5||!rt(r))break;return{value:String.fromCodePoint(r),size:i}}if(r=r<<4|At(o),r<0)break}throw G(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+i)}".`)}function nl(t,e){const n=t.source.body,r=Mo(n,e+2);if(rt(r))return{value:String.fromCodePoint(r),size:6};if(Io(r)&&n.charCodeAt(e+6)===92&&n.charCodeAt(e+7)===117){const i=Mo(n,e+8);if(ko(i))return{value:String.fromCodePoint(r,i),size:12}}throw G(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+6)}".`)}function Mo(t,e){return At(t.charCodeAt(e))<<12|At(t.charCodeAt(e+1))<<8|At(t.charCodeAt(e+2))<<4|At(t.charCodeAt(e+3))}function At(t){return t>=48&&t<=57?t-48:t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:-1}function rl(t,e){const n=t.source.body;switch(n.charCodeAt(e+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(t.source,e,`Invalid character escape sequence: "${n.slice(e,e+2)}".`)}function il(t,e){const n=t.source.body,r=n.length;let i=t.lineStart,o=e+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(t,d.BLOCK_STRING,e,o+3,qc(c).join(`
11
+ `));return t.line+=c.length-1,t.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(rt(s))++o;else if(sn(n,o))o+=2;else throw G(t.source,o,`Invalid character within String: ${ke(t,o)}.`)}throw G(t.source,o,"Unterminated string.")}function ol(t,e){const n=t.source.body,r=n.length;let i=e+1;for(;i<r;){const o=n.charCodeAt(i);if(zc(o))++i;else break}return F(t,d.NAME,e,i,n.slice(e,i))}const al=10,Do=2;function lr(t){return un(t,[])}function un(t,e){switch(typeof t){case"string":return JSON.stringify(t);case"function":return t.name?`[function ${t.name}]`:"[function]";case"object":return sl(t,e);default:return String(t)}}function sl(t,e){if(t===null)return"null";if(e.includes(t))return"[Circular]";const n=[...e,t];if(ul(t)){const r=t.toJSON();if(r!==t)return typeof r=="string"?r:un(r,n)}else if(Array.isArray(t))return ll(t,n);return cl(t,n)}function ul(t){return typeof t.toJSON=="function"}function cl(t,e){const n=Object.entries(t);return n.length===0?"{}":e.length>Do?"["+pl(t)+"]":"{ "+n.map(([r,i])=>r+": "+un(i,e)).join(", ")+" }"}function ll(t,e){if(t.length===0)return"[]";if(e.length>Do)return"[Array]";const n=Math.min(al,t.length),r=t.length-n,i=[];for(let o=0;o<n;++o)i.push(un(t[o],e));return r===1?i.push("... 1 more item"):r>1&&i.push(`... ${r} more items`),"["+i.join(", ")+"]"}function pl(t){const e=Object.prototype.toString.call(t).replace(/^\[object /,"").replace(/]$/,"");if(e==="Object"&&typeof t.constructor=="function"){const n=t.constructor.name;if(typeof n=="string"&&n!=="")return n}return e}const fl=globalThis.process&&process.env.NODE_ENV==="production",hl=fl?function(t,e){return t instanceof e}:function(t,e){if(t instanceof e)return!0;if(typeof t=="object"&&t!==null){var n;const r=e.prototype[Symbol.toStringTag],i=Symbol.toStringTag in t?t[Symbol.toStringTag]:(n=t.constructor)===null||n===void 0?void 0:n.name;if(r===i){const o=lr(t);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,36 +19,36 @@ 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 Do{constructor(t,n="GraphQL request",r={line:1,column:1}){typeof t=="string"||an(!1,`Body must be a string. Received: ${cr(t)}.`),this.body=t,this.name=n,this.locationOffset=r,this.locationOffset.line>0||an(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||an(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function dl(e){return hl(e,Do)}function Uo(e,t){const n=new vl(e,t),r=n.parseDocument();return Object.defineProperty(r,"tokenCount",{enumerable:!1,value:n.tokenCount}),r}let vl=class{constructor(t,n={}){const r=dl(t)?t:new Do(t);this._lexer=new Wc(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:ne.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 ne.QUERY;case"mutation":return ne.MUTATION;case"subscription":return ne.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,`${cn(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(ar,n.value))return n;throw this.unexpected(t)}node(t,n){return this._options.noLocation!==!0&&(n.loc=new Hc(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 ${jo(t)}, found ${cn(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 ${cn(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 ${cn(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 cn(e){const t=e.value;return jo(e.kind)+(t!=null?` "${t}"`:"")}function jo(e){return Yc(e)?`"${e}"`:e}function yl(e){return`"${e.replace(ml,_l)}"`}const ml=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function _l(e){return gl[e.charCodeAt(0)]}const gl=["\\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"],El=Object.freeze({});function Tl(e,t,n=Ro){const r=new Map;for(const E of Object.values(O))r.set(E,bl(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[$,nt]of c){const X=$-j;nt===null?(s.splice(X,1),j++):s[X]=nt}}else{s=P({},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 x;if(!Array.isArray(s)){var v,y;Co(s)||an(!1,`Invalid AST Node: ${cr(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(x=j?.call(t,s,l,p,f,m),x===El)break;if(x===!1){if(!E){f.pop();continue}}else if(x!==void 0&&(c.push([l,x]),!E))if(Co(x))s=x;else{f.pop();continue}}if(x===void 0&&S&&c.push([l,s]),E)f.pop();else{var _;i={inArray:o,index:u,keys:a,edits:c,prev:i},o=Array.isArray(s),a=o?s:(_=n[s.kind])!==null&&_!==void 0?_:[],u=-1,c=[],p&&m.push(p),p=s}}while(i!==void 0);return c.length!==0?c[c.length-1][1]:e}function bl(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 Sl(e){return Tl(e,wl)}const Ol=80,wl={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>b(e.definitions,`
22
+ spurious results.`)}}return!1};class Uo{constructor(e,n="GraphQL request",r={line:1,column:1}){typeof e=="string"||an(!1,`Body must be a string. Received: ${lr(e)}.`),this.body=e,this.name=n,this.locationOffset=r,this.locationOffset.line>0||an(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||an(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function dl(t){return hl(t,Uo)}function jo(t,e){const n=new vl(t,e),r=n.parseDocument();return Object.defineProperty(r,"tokenCount",{enumerable:!1,value:n.tokenCount}),r}let vl=class{constructor(e,n={}){const r=dl(e)?e:new Uo(e);this._lexer=new Wc(r),this._options=n,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){const e=this.expectToken(d.NAME);return this.node(e,{kind:O.NAME,value:e.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 e=this.peekDescription(),n=e?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(e)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 e=this._lexer.token;if(this.peek(d.BRACE_L))return this.node(e,{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(e,{kind:O.OPERATION_DEFINITION,operation:n,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(d.NAME);switch(e.value){case"query":return nt.QUERY;case"mutation":return nt.MUTATION;case"subscription":return nt.SUBSCRIPTION}throw this.unexpected(e)}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 e=this._lexer.token;return this.expectToken(d.DOLLAR),this.node(e,{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 e=this._lexer.token,n=this.parseName();let r,i;return this.expectOptionalToken(d.COLON)?(r=n,i=this.parseName()):i=n,this.node(e,{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(e){const n=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(d.PAREN_L,n,d.PAREN_R)}parseArgument(e=!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(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(d.SPREAD);const n=this.expectOptionalKeyword("on");return!n&&this.peek(d.NAME)?this.node(e,{kind:O.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:O.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const e=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(e,{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(e,{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(e){const n=this._lexer.token;switch(n.kind){case d.BRACKET_L:return this.parseList(e);case d.BRACE_L:return this.parseObject(e);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(e)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 e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:O.STRING,value:e.value,block:e.kind===d.BLOCK_STRING})}parseList(e){const n=()=>this.parseValueLiteral(e);return this.node(this._lexer.token,{kind:O.LIST,values:this.any(d.BRACKET_L,n,d.BRACKET_R)})}parseObject(e){const n=()=>this.parseObjectField(e);return this.node(this._lexer.token,{kind:O.OBJECT,fields:this.any(d.BRACE_L,n,d.BRACE_R)})}parseObjectField(e){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(e)})}parseDirectives(e){const n=[];for(;this.peek(d.AT);)n.push(this.parseDirective(e));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const n=this._lexer.token;return this.expectToken(d.AT),this.node(n,{kind:O.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let n;if(this.expectOptionalToken(d.BRACKET_L)){const r=this.parseTypeReference();this.expectToken(d.BRACKET_R),n=this.node(e,{kind:O.LIST_TYPE,type:r})}else n=this.parseNamedType();return this.expectOptionalToken(d.BANG)?this.node(e,{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 e=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(e,{kind:O.SCHEMA_DEFINITION,description:n,directives:r,operationTypes:i})}parseOperationTypeDefinition(){const e=this._lexer.token,n=this.parseOperationType();this.expectToken(d.COLON);const r=this.parseNamedType();return this.node(e,{kind:O.OPERATION_TYPE_DEFINITION,operation:n,type:r})}parseScalarTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");const r=this.parseName(),i=this.parseConstDirectives();return this.node(e,{kind:O.SCALAR_TYPE_DEFINITION,description:n,name:r,directives:i})}parseObjectTypeDefinition(){const e=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(e,{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 e=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(e,{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 e=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(e,{kind:O.INPUT_VALUE_DEFINITION,description:n,name:r,type:i,defaultValue:o,directives:a})}parseInterfaceTypeDefinition(){const e=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(e,{kind:O.INTERFACE_TYPE_DEFINITION,description:n,name:r,interfaces:i,directives:o,fields:a})}parseUnionTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");const r=this.parseName(),i=this.parseConstDirectives(),o=this.parseUnionMemberTypes();return this.node(e,{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 e=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");const r=this.parseName(),i=this.parseConstDirectives(),o=this.parseEnumValuesDefinition();return this.node(e,{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 e=this._lexer.token,n=this.parseDescription(),r=this.parseEnumValueName(),i=this.parseConstDirectives();return this.node(e,{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,`${cn(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");const r=this.parseName(),i=this.parseConstDirectives(),o=this.parseInputFieldsDefinition();return this.node(e,{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 e=this._lexer.lookahead();if(e.kind===d.NAME)switch(e.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(e)}parseSchemaExtension(){const e=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(e,{kind:O.SCHEMA_EXTENSION,directives:n,operationTypes:r})}parseScalarTypeExtension(){const e=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(e,{kind:O.SCALAR_TYPE_EXTENSION,name:n,directives:r})}parseObjectTypeExtension(){const e=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(e,{kind:O.OBJECT_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:o})}parseInterfaceTypeExtension(){const e=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(e,{kind:O.INTERFACE_TYPE_EXTENSION,name:n,interfaces:r,directives:i,fields:o})}parseUnionTypeExtension(){const e=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(e,{kind:O.UNION_TYPE_EXTENSION,name:n,directives:r,types:i})}parseEnumTypeExtension(){const e=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(e,{kind:O.ENUM_TYPE_EXTENSION,name:n,directives:r,values:i})}parseInputObjectTypeExtension(){const e=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(e,{kind:O.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:r,fields:i})}parseDirectiveDefinition(){const e=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(e,{kind:O.DIRECTIVE_DEFINITION,description:n,name:r,arguments:i,repeatable:o,locations:a})}parseDirectiveLocations(){return this.delimitedMany(d.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(sr,n.value))return n;throw this.unexpected(e)}node(e,n){return this._options.noLocation!==!0&&(n.loc=new Hc(e,this._lexer.lastToken,this._lexer.source)),n}peek(e){return this._lexer.token.kind===e}expectToken(e){const n=this._lexer.token;if(n.kind===e)return this.advanceLexer(),n;throw G(this._lexer.source,n.start,`Expected ${$o(e)}, found ${cn(n)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e?(this.advanceLexer(),!0):!1}expectKeyword(e){const n=this._lexer.token;if(n.kind===d.NAME&&n.value===e)this.advanceLexer();else throw G(this._lexer.source,n.start,`Expected "${e}", found ${cn(n)}.`)}expectOptionalKeyword(e){const n=this._lexer.token;return n.kind===d.NAME&&n.value===e?(this.advanceLexer(),!0):!1}unexpected(e){const n=e??this._lexer.token;return G(this._lexer.source,n.start,`Unexpected ${cn(n)}.`)}any(e,n,r){this.expectToken(e);const i=[];for(;!this.expectOptionalToken(r);)i.push(n.call(this));return i}optionalMany(e,n,r){if(this.expectOptionalToken(e)){const i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}return[]}many(e,n,r){this.expectToken(e);const i=[];do i.push(n.call(this));while(!this.expectOptionalToken(r));return i}delimitedMany(e,n){this.expectOptionalToken(e);const r=[];do r.push(n.call(this));while(this.expectOptionalToken(e));return r}advanceLexer(){const{maxTokens:e}=this._options,n=this._lexer.advance();if(n.kind!==d.EOF&&(++this._tokenCounter,e!==void 0&&this._tokenCounter>e))throw G(this._lexer.source,n.start,`Document contains more that ${e} tokens. Parsing aborted.`)}};function cn(t){const e=t.value;return $o(t.kind)+(e!=null?` "${e}"`:"")}function $o(t){return Yc(t)?`"${t}"`:t}function yl(t){return`"${t.replace(ml,_l)}"`}const ml=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function _l(t){return gl[t.charCodeAt(0)]}const gl=["\\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"],El=Object.freeze({});function Tl(t,e,n=Co){const r=new Map;for(const E of Object.values(O))r.set(E,bl(e,E));let i,o=Array.isArray(t),a=[t],u=-1,c=[],s=t,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;No(s)||an(!1,`Invalid AST Node: ${lr(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(e,s,l,p,f,m),P===El)break;if(P===!1){if(!E){f.pop();continue}}else if(P!==void 0&&(c.push([l,P]),!E))if(No(P))s=P;else{f.pop();continue}}if(P===void 0&&S&&c.push([l,s]),E)f.pop();else{var _;i={inArray:o,index:u,keys:a,edits:c,prev:i},o=Array.isArray(s),a=o?s:(_=n[s.kind])!==null&&_!==void 0?_:[],u=-1,c=[],p&&m.push(p),p=s}}while(i!==void 0);return c.length!==0?c[c.length-1][1]:t}function bl(t,e){const n=t[e];return typeof n=="object"?n:typeof n=="function"?{enter:n,leave:void 0}:{enter:t.enter,leave:t.leave}}function Sl(t){return Tl(t,wl)}const Ol=80,wl={Name:{leave:t=>t.value},Variable:{leave:t=>"$"+t.name},Document:{leave:t=>b(t.definitions,`
23
23
 
24
- `)},OperationDefinition:{leave(e){const t=C("(",b(e.variableDefinitions,", "),")"),n=b([e.operation,b([e.name,t]),b(e.directives," ")]," ");return(n==="query"?"":n+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:n,directives:r})=>e+": "+t+C(" = ",n)+C(" ",b(r," "))},SelectionSet:{leave:({selections:e})=>st(e)},Field:{leave({alias:e,name:t,arguments:n,directives:r,selectionSet:i}){const o=C("",e,": ")+t;let a=o+C("(",b(n,", "),")");return a.length>Ol&&(a=o+C(`(
24
+ `)},OperationDefinition:{leave(t){const e=C("(",b(t.variableDefinitions,", "),")"),n=b([t.operation,b([t.name,e]),b(t.directives," ")]," ");return(n==="query"?"":n+" ")+t.selectionSet}},VariableDefinition:{leave:({variable:t,type:e,defaultValue:n,directives:r})=>t+": "+e+C(" = ",n)+C(" ",b(r," "))},SelectionSet:{leave:({selections:t})=>ue(t)},Field:{leave({alias:t,name:e,arguments:n,directives:r,selectionSet:i}){const o=C("",t,": ")+e;let a=o+C("(",b(n,", "),")");return a.length>Ol&&(a=o+C(`(
25
25
  `,ln(b(n,`
26
26
  `)),`
27
- )`)),b([a,b(r," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+C(" ",b(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:n})=>b(["...",C("on ",e),b(t," "),n]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${e}${C("(",b(n,", "),")")} on ${t} ${C("",b(r," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?Kc(e):yl(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+b(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+b(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+C("(",b(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:n})=>C("",e,`
28
- `)+b(["schema",b(t," "),st(n)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:n})=>C("",e,`
29
- `)+b(["scalar",t,b(n," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>C("",e,`
30
- `)+b(["type",t,C("implements ",b(n," & ")),b(r," "),st(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:n,type:r,directives:i})=>C("",e,`
31
- `)+t+($o(n)?C(`(
27
+ )`)),b([a,b(r," "),i]," ")}},Argument:{leave:({name:t,value:e})=>t+": "+e},FragmentSpread:{leave:({name:t,directives:e})=>"..."+t+C(" ",b(e," "))},InlineFragment:{leave:({typeCondition:t,directives:e,selectionSet:n})=>b(["...",C("on ",t),b(e," "),n]," ")},FragmentDefinition:{leave:({name:t,typeCondition:e,variableDefinitions:n,directives:r,selectionSet:i})=>`fragment ${t}${C("(",b(n,", "),")")} on ${e} ${C("",b(r," ")," ")}`+i},IntValue:{leave:({value:t})=>t},FloatValue:{leave:({value:t})=>t},StringValue:{leave:({value:t,block:e})=>e?Kc(t):yl(t)},BooleanValue:{leave:({value:t})=>t?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:t})=>t},ListValue:{leave:({values:t})=>"["+b(t,", ")+"]"},ObjectValue:{leave:({fields:t})=>"{"+b(t,", ")+"}"},ObjectField:{leave:({name:t,value:e})=>t+": "+e},Directive:{leave:({name:t,arguments:e})=>"@"+t+C("(",b(e,", "),")")},NamedType:{leave:({name:t})=>t},ListType:{leave:({type:t})=>"["+t+"]"},NonNullType:{leave:({type:t})=>t+"!"},SchemaDefinition:{leave:({description:t,directives:e,operationTypes:n})=>C("",t,`
28
+ `)+b(["schema",b(e," "),ue(n)]," ")},OperationTypeDefinition:{leave:({operation:t,type:e})=>t+": "+e},ScalarTypeDefinition:{leave:({description:t,name:e,directives:n})=>C("",t,`
29
+ `)+b(["scalar",e,b(n," ")]," ")},ObjectTypeDefinition:{leave:({description:t,name:e,interfaces:n,directives:r,fields:i})=>C("",t,`
30
+ `)+b(["type",e,C("implements ",b(n," & ")),b(r," "),ue(i)]," ")},FieldDefinition:{leave:({description:t,name:e,arguments:n,type:r,directives:i})=>C("",t,`
31
+ `)+e+(Bo(n)?C(`(
32
32
  `,ln(b(n,`
33
33
  `)),`
34
- )`):C("(",b(n,", "),")"))+": "+r+C(" ",b(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:n,defaultValue:r,directives:i})=>C("",e,`
35
- `)+b([t+": "+n,C("= ",r),b(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:n,directives:r,fields:i})=>C("",e,`
36
- `)+b(["interface",t,C("implements ",b(n," & ")),b(r," "),st(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:n,types:r})=>C("",e,`
37
- `)+b(["union",t,b(n," "),C("= ",b(r," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:n,values:r})=>C("",e,`
38
- `)+b(["enum",t,b(n," "),st(r)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:n})=>C("",e,`
39
- `)+b([t,b(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:n,fields:r})=>C("",e,`
40
- `)+b(["input",t,b(n," "),st(r)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:n,repeatable:r,locations:i})=>C("",e,`
41
- `)+"directive @"+t+($o(n)?C(`(
34
+ )`):C("(",b(n,", "),")"))+": "+r+C(" ",b(i," "))},InputValueDefinition:{leave:({description:t,name:e,type:n,defaultValue:r,directives:i})=>C("",t,`
35
+ `)+b([e+": "+n,C("= ",r),b(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:t,name:e,interfaces:n,directives:r,fields:i})=>C("",t,`
36
+ `)+b(["interface",e,C("implements ",b(n," & ")),b(r," "),ue(i)]," ")},UnionTypeDefinition:{leave:({description:t,name:e,directives:n,types:r})=>C("",t,`
37
+ `)+b(["union",e,b(n," "),C("= ",b(r," | "))]," ")},EnumTypeDefinition:{leave:({description:t,name:e,directives:n,values:r})=>C("",t,`
38
+ `)+b(["enum",e,b(n," "),ue(r)]," ")},EnumValueDefinition:{leave:({description:t,name:e,directives:n})=>C("",t,`
39
+ `)+b([e,b(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:t,name:e,directives:n,fields:r})=>C("",t,`
40
+ `)+b(["input",e,b(n," "),ue(r)]," ")},DirectiveDefinition:{leave:({description:t,name:e,arguments:n,repeatable:r,locations:i})=>C("",t,`
41
+ `)+"directive @"+e+(Bo(n)?C(`(
42
42
  `,ln(b(n,`
43
43
  `)),`
44
- )`):C("(",b(n,", "),")"))+(r?" repeatable":"")+" on "+b(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>b(["extend schema",b(e," "),st(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>b(["extend scalar",e,b(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>b(["extend type",e,C("implements ",b(t," & ")),b(n," "),st(r)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:n,fields:r})=>b(["extend interface",e,C("implements ",b(t," & ")),b(n," "),st(r)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:n})=>b(["extend union",e,b(t," "),C("= ",b(n," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:n})=>b(["extend enum",e,b(t," "),st(n)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:n})=>b(["extend input",e,b(t," "),st(n)]," ")}};function b(e,t=""){var n;return(n=e?.filter(r=>r).join(t))!==null&&n!==void 0?n:""}function st(e){return C(`{
45
- `,ln(b(e,`
44
+ )`):C("(",b(n,", "),")"))+(r?" repeatable":"")+" on "+b(i," | ")},SchemaExtension:{leave:({directives:t,operationTypes:e})=>b(["extend schema",b(t," "),ue(e)]," ")},ScalarTypeExtension:{leave:({name:t,directives:e})=>b(["extend scalar",t,b(e," ")]," ")},ObjectTypeExtension:{leave:({name:t,interfaces:e,directives:n,fields:r})=>b(["extend type",t,C("implements ",b(e," & ")),b(n," "),ue(r)]," ")},InterfaceTypeExtension:{leave:({name:t,interfaces:e,directives:n,fields:r})=>b(["extend interface",t,C("implements ",b(e," & ")),b(n," "),ue(r)]," ")},UnionTypeExtension:{leave:({name:t,directives:e,types:n})=>b(["extend union",t,b(e," "),C("= ",b(n," | "))]," ")},EnumTypeExtension:{leave:({name:t,directives:e,values:n})=>b(["extend enum",t,b(e," "),ue(n)]," ")},InputObjectTypeExtension:{leave:({name:t,directives:e,fields:n})=>b(["extend input",t,b(e," "),ue(n)]," ")}};function b(t,e=""){var n;return(n=t?.filter(r=>r).join(e))!==null&&n!==void 0?n:""}function ue(t){return C(`{
45
+ `,ln(b(t,`
46
46
  `)),`
47
- }`)}function C(e,t,n=""){return t!=null&&t!==""?e+t+n:""}function ln(e){return C(" ",e.replace(/\n/g,`
48
- `))}function $o(e){var t;return(t=e?.some(n=>n.includes(`
49
- `)))!==null&&t!==void 0?t:!1}const lr=JSON,Al=e=>e.toUpperCase(),Ll=e=>{const t={};return e.forEach((n,r)=>{t[r]=n}),t},Rl=(e,t,n)=>e.document?e:{document:e,variables:t,requestHeaders:n,signal:void 0},Cl=(e,t,n)=>e.query?e:{query:e,variables:t,requestHeaders:n,signal:void 0},Nl=(e,t)=>e.documents?e:{documents:e,requestHeaders:t,signal:void 0},Bo=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},pr=e=>{if(typeof e=="string"){let n;try{const r=Uo(e);n=Bo(r)}catch{}return{query:e,operationName:n}}const t=Bo(e);return{query:Sl(e),operationName:t}};let Fo=class rr extends Error{constructor(t,n){const r=`${rr.extractMessage(t)}: ${JSON.stringify({response:t,request:n})}`;super(r),Object.setPrototypeOf(this,rr.prototype),this.response=t,this.request=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,rr)}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 fr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function pn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var hr={exports:{}};(function(e,t){var n=typeof self<"u"?self:fr,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 g={next:function(){var L=h.shift();return{done:L===void 0,value:L}}};return u.iterable&&(g[Symbol.iterator]=function(){return g}),g}function v(h){this.map={},h instanceof v?h.forEach(function(g,L){this.append(L,g)},this):Array.isArray(h)?h.forEach(function(g){this.append(g[0],g[1])},this):h&&Object.getOwnPropertyNames(h).forEach(function(g){this.append(g,h[g])},this)}v.prototype.append=function(h,g){h=p(h),g=f(g);var L=this.map[h];this.map[h]=L?L+", "+g:g},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,g){this.map[p(h)]=f(g)},v.prototype.forEach=function(h,g){for(var L in this.map)this.map.hasOwnProperty(L)&&h.call(g,this.map[L],L,this)},v.prototype.keys=function(){var h=[];return this.forEach(function(g,L){h.push(L)}),m(h)},v.prototype.values=function(){var h=[];return this.forEach(function(g){h.push(g)}),m(h)},v.prototype.entries=function(){var h=[];return this.forEach(function(g,L){h.push([L,g])}),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 _(h){return new Promise(function(g,L){h.onload=function(){g(h.result)},h.onerror=function(){L(h.error)}})}function E(h){var g=new FileReader,L=_(g);return g.readAsArrayBuffer(h),L}function S(h){var g=new FileReader,L=_(g);return g.readAsText(h),L}function x(h){for(var g=new Uint8Array(h),L=new Array(g.length),H=0;H<g.length;H++)L[H]=String.fromCharCode(g[H]);return L.join("")}function j(h){if(h.slice)return h.slice(0);var g=new Uint8Array(h.byteLength);return g.set(new Uint8Array(h)),g.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(x(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(Tt)}),this.json=function(){return this.text().then(JSON.parse)},this}var nt=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function X(h){var g=h.toUpperCase();return nt.indexOf(g)>-1?g:h}function U(h,g){g=g||{};var L=g.body;if(h instanceof U){if(h.bodyUsed)throw new TypeError("Already read");this.url=h.url,this.credentials=h.credentials,g.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=g.credentials||this.credentials||"same-origin",(g.headers||!this.headers)&&(this.headers=new v(g.headers)),this.method=X(g.method||this.method||"GET"),this.mode=g.mode||this.mode||null,this.signal=g.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 Tt(h){var g=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," ");g.append(decodeURIComponent(V),decodeURIComponent(M))}}),g}function yt(h){var g=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 Qt=V.join(":").trim();g.append(M,Qt)}}),g}$.call(U.prototype);function W(h,g){g||(g={}),this.type="default",this.status=g.status===void 0?200:g.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in g?g.statusText:"OK",this.headers=new v(g.headers),this.url=g.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 Jt=[301,302,303,307,308];W.redirect=function(h,g){if(Jt.indexOf(g)===-1)throw new RangeError("Invalid status code");return new W(null,{status:g,headers:{location:h}})},a.DOMException=o.DOMException;try{new a.DOMException}catch{a.DOMException=function(g,L){this.message=g,this.name=L;var H=Error(g);this.stack=H.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function bt(h,g){return new Promise(function(L,H){var V=new U(h,g);if(V.signal&&V.signal.aborted)return H(new a.DOMException("Aborted","AbortError"));var M=new XMLHttpRequest;function Qt(){M.abort()}M.onload=function(){var Zt={status:M.status,statusText:M.statusText,headers:yt(M.getAllResponseHeaders()||"")};Zt.url="responseURL"in M?M.responseURL:Zt.headers.get("X-Request-URL");var nn="response"in M?M.response:M.responseText;L(new W(nn,Zt))},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(Zt,nn){M.setRequestHeader(nn,Zt)}),V.signal&&(V.signal.addEventListener("abort",Qt),M.onreadystatechange=function(){M.readyState===4&&V.signal.removeEventListener("abort",Qt)}),M.send(typeof V._bodyInit>"u"?null:V._bodyInit)})}return bt.polyfill=!0,o.fetch||(o.fetch=bt,o.Headers=v,o.Request=U,o.Response=W),a.Headers=v,a.Request=U,a.Response=W,a.fetch=bt,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})(hr,hr.exports);var dr=hr.exports;const fn=pn(dr),xl=Object.freeze(Object.defineProperty({__proto__:null,default:fn},Symbol.toStringTag,{value:"Module"})),ie=e=>{let t={};return e&&(typeof Headers<"u"&&e instanceof Headers||xl&&dr.Headers&&e instanceof dr.Headers?t=Ll(e):Array.isArray(e)?e.forEach(([n,r])=>{n&&r!==void 0&&(t[n]=r)}):t=e),t},Vo=e=>e.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),Pl=e=>{if(!Array.isArray(e.query)){const r=e,i=[`query=${encodeURIComponent(Vo(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:Vo(i),variables:t.variables?t.jsonSerializer.stringify(t.variables[o]):void 0}),r),[]);return`query=${encodeURIComponent(t.jsonSerializer.stringify(n))}`},Il=e=>t=>ee(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=Ml(i,o,a,c.jsonSerializer),typeof f=="string"&&(l["Content-Type"]="application/json")):p=Pl({query:i,variables:o,operationName:a,jsonSerializer:(n=c.jsonSerializer)!=null?n:lr});const m=P({method:e,headers:l,body:f},c);let v=r,y=m;if(s){const _=yield Promise.resolve(s(on(P({},m),{url:r,operationName:a,variables:o}))),{url:E}=_,S=Se(_,["url"]);v=E,y=S}return p&&(v=`${v}?${p}`),yield u(v,y)});let kl=class{constructor(t,n={}){this.url=t,this.requestConfig=n,this.rawRequest=(...r)=>ee(this,null,function*(){const[i,o,a]=r,u=Cl(i,o,a),c=this.requestConfig,{headers:s,fetch:l=fn,method:p="POST",requestMiddleware:f,responseMiddleware:m}=c,v=Se(c,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:y}=this;u.signal!==void 0&&(v.signal=u.signal);const{operationName:_}=pr(u.query);return vr({url:y,query:u.query,variables:u.variables,headers:P(P({},ie(yr(s))),ie(u.requestHeaders)),operationName:_,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 ee(this,null,function*(){const[r,i]=n,o=Rl(t,r,i),a=this.requestConfig,{headers:u,fetch:c=fn,method:s="POST",requestMiddleware:l,responseMiddleware:p}=a,f=Se(a,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:m}=this;o.signal!==void 0&&(f.signal=o.signal);const{query:v,operationName:y}=pr(o.document);return vr({url:m,query:v,variables:o.variables,headers:P(P({},ie(yr(u))),ie(o.requestHeaders)),operationName:y,fetch:c,method:s,fetchOptions:f,middleware:l}).then(_=>(p&&p(_),_.data)).catch(_=>{throw p&&p(_),_})})}batchRequests(t,n){var r;const i=Nl(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})=>pr(l).query),s=i.documents.map(({variables:l})=>l);return vr({url:this.url,query:c,variables:s,headers:P(P({},ie(yr(a))),ie(i.requestHeaders)),operationName:void 0,fetch:(r=this.requestConfig.fetch)!=null?r:fn,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 vr=e=>ee(void 0,null,function*(){var t,n;const{query:r,variables:i,fetchOptions:o}=e,a=Il(Al((t=e.method)!=null?t:"post")),u=Array.isArray(e.query),c=yield a(e),s=yield Dl(c,(n=o.jsonSerializer)!=null?n:lr),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=Se(f,["errors"]),v=o.errorPolicy==="ignore"?m:s;return on(P({},u?{data:v}:v),{headers:c.headers,status:c.status})}else{const f=typeof s=="string"?{error:s}:s;throw new Fo(on(P({},f),{status:c.status,headers:c.headers}),{query:r,variables:i})}}),Ml=(e,t,n,r)=>{const i=r??lr;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)},Dl=(e,t)=>ee(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 mr={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)}}})(mr,mr.exports);var Ul=mr.exports;const Le=pn(Ul);var hn=function(){return hn=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},hn.apply(this,arguments)},dn=new Map,_r=new Map,Ho=!0,vn=!1;function Go(e){return e.replace(/[\s,]+/g," ").trim()}function jl(e){return Go(e.source.body.substring(e.start,e.end))}function $l(e){var t=new Set,n=[];return e.definitions.forEach(function(r){if(r.kind==="FragmentDefinition"){var i=r.name.value,o=jl(r.loc),a=_r.get(i);a&&!a.has(o)?Ho&&console.warn("Warning: fragment with name "+i+` already exists.
47
+ }`)}function C(t,e,n=""){return e!=null&&e!==""?t+e+n:""}function ln(t){return C(" ",t.replace(/\n/g,`
48
+ `))}function Bo(t){var e;return(e=t?.some(n=>n.includes(`
49
+ `)))!==null&&e!==void 0?e:!1}const pr=JSON,Al=t=>t.toUpperCase(),Ll=t=>{const e={};return t.forEach((n,r)=>{e[r]=n}),e},Rl=(t,e,n)=>t.document?t:{document:t,variables:e,requestHeaders:n,signal:void 0},Cl=(t,e,n)=>t.query?t:{query:t,variables:e,requestHeaders:n,signal:void 0},Nl=(t,e)=>t.documents?t:{documents:t,requestHeaders:e,signal:void 0},Fo=t=>{var e,n;let r;const i=t.definitions.filter(o=>o.kind==="OperationDefinition");return i.length===1&&(r=(n=(e=i[0])==null?void 0:e.name)==null?void 0:n.value),r},fr=t=>{if(typeof t=="string"){let n;try{const r=jo(t);n=Fo(r)}catch{}return{query:t,operationName:n}}const e=Fo(t);return{query:Sl(t),operationName:e}};let Vo=class ir extends Error{constructor(e,n){const r=`${ir.extractMessage(e)}: ${JSON.stringify({response:e,request:n})}`;super(r),Object.setPrototypeOf(this,ir.prototype),this.response=e,this.request=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,ir)}static extractMessage(e){var n,r,i;return(i=(r=(n=e.errors)==null?void 0:n[0])==null?void 0:r.message)!=null?i:`GraphQL Error (Code: ${e.status})`}};var hr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function pn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var dr={exports:{}};(function(t,e){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 m(h){var g={next:function(){var L=h.shift();return{done:L===void 0,value:L}}};return u.iterable&&(g[Symbol.iterator]=function(){return g}),g}function v(h){this.map={},h instanceof v?h.forEach(function(g,L){this.append(L,g)},this):Array.isArray(h)?h.forEach(function(g){this.append(g[0],g[1])},this):h&&Object.getOwnPropertyNames(h).forEach(function(g){this.append(g,h[g])},this)}v.prototype.append=function(h,g){h=p(h),g=f(g);var L=this.map[h];this.map[h]=L?L+", "+g:g},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,g){this.map[p(h)]=f(g)},v.prototype.forEach=function(h,g){for(var L in this.map)this.map.hasOwnProperty(L)&&h.call(g,this.map[L],L,this)},v.prototype.keys=function(){var h=[];return this.forEach(function(g,L){h.push(L)}),m(h)},v.prototype.values=function(){var h=[];return this.forEach(function(g){h.push(g)}),m(h)},v.prototype.entries=function(){var h=[];return this.forEach(function(g,L){h.push([L,g])}),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 _(h){return new Promise(function(g,L){h.onload=function(){g(h.result)},h.onerror=function(){L(h.error)}})}function E(h){var g=new FileReader,L=_(g);return g.readAsArrayBuffer(h),L}function S(h){var g=new FileReader,L=_(g);return g.readAsText(h),L}function P(h){for(var g=new Uint8Array(h),L=new Array(g.length),H=0;H<g.length;H++)L[H]=String.fromCharCode(g[H]);return L.join("")}function j(h){if(h.slice)return h.slice(0);var g=new Uint8Array(h.byteLength);return g.set(new Uint8Array(h)),g.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 g=h.toUpperCase();return ne.indexOf(g)>-1?g:h}function U(h,g){g=g||{};var L=g.body;if(h instanceof U){if(h.bodyUsed)throw new TypeError("Already read");this.url=h.url,this.credentials=h.credentials,g.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=g.credentials||this.credentials||"same-origin",(g.headers||!this.headers)&&(this.headers=new v(g.headers)),this.method=X(g.method||this.method||"GET"),this.mode=g.mode||this.mode||null,this.signal=g.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 g=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," ");g.append(decodeURIComponent(V),decodeURIComponent(M))}}),g}function ye(h){var g=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();g.append(M,Qe)}}),g}$.call(U.prototype);function W(h,g){g||(g={}),this.type="default",this.status=g.status===void 0?200:g.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in g?g.statusText:"OK",this.headers=new v(g.headers),this.url=g.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,g){if(Je.indexOf(g)===-1)throw new RangeError("Invalid status code");return new W(null,{status:g,headers:{location:h}})},a.DOMException=o.DOMException;try{new a.DOMException}catch{a.DOMException=function(g,L){this.message=g,this.name=L;var H=Error(g);this.stack=H.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function be(h,g){return new Promise(function(L,H){var V=new U(h,g);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 nn="response"in M?M.response:M.responseText;L(new W(nn,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,nn){M.setRequestHeader(nn,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;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e})(dr,dr.exports);var vr=dr.exports;const fn=pn(vr),xl=Object.freeze(Object.defineProperty({__proto__:null,default:fn},Symbol.toStringTag,{value:"Module"})),it=t=>{let e={};return t&&(typeof Headers<"u"&&t instanceof Headers||xl&&vr.Headers&&t instanceof vr.Headers?e=Ll(t):Array.isArray(t)?t.forEach(([n,r])=>{n&&r!==void 0&&(e[n]=r)}):e=t),e},Ho=t=>t.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),Pl=t=>{if(!Array.isArray(t.query)){const r=t,i=[`query=${encodeURIComponent(Ho(r.query))}`];return t.variables&&i.push(`variables=${encodeURIComponent(r.jsonSerializer.stringify(r.variables))}`),r.operationName&&i.push(`operationName=${encodeURIComponent(r.operationName)}`),i.join("&")}if(typeof t.variables<"u"&&!Array.isArray(t.variables))throw new Error("Cannot create query with given variable type, array expected");const e=t,n=t.query.reduce((r,i,o)=>(r.push({query:Ho(i),variables:e.variables?e.jsonSerializer.stringify(e.variables[o]):void 0}),r),[]);return`query=${encodeURIComponent(e.jsonSerializer.stringify(n))}`},Il=t=>e=>tt(void 0,null,function*(){var n;const{url:r,query:i,variables:o,operationName:a,fetch:u,fetchOptions:c,middleware:s}=e,l=I({},e.headers);let p="",f;t==="POST"?(f=Ml(i,o,a,c.jsonSerializer),typeof f=="string"&&(l["Content-Type"]="application/json")):p=Pl({query:i,variables:o,operationName:a,jsonSerializer:(n=c.jsonSerializer)!=null?n:pr});const m=I({method:t,headers:l,body:f},c);let v=r,y=m;if(s){const _=yield Promise.resolve(s(on(I({},m),{url:r,operationName:a,variables:o}))),{url:E}=_,S=St(_,["url"]);v=E,y=S}return p&&(v=`${v}?${p}`),yield u(v,y)});let kl=class{constructor(e,n={}){this.url=e,this.requestConfig=n,this.rawRequest=(...r)=>tt(this,null,function*(){const[i,o,a]=r,u=Cl(i,o,a),c=this.requestConfig,{headers:s,fetch:l=fn,method:p="POST",requestMiddleware:f,responseMiddleware:m}=c,v=St(c,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:y}=this;u.signal!==void 0&&(v.signal=u.signal);const{operationName:_}=fr(u.query);return yr({url:y,query:u.query,variables:u.variables,headers:I(I({},it(mr(s))),it(u.requestHeaders)),operationName:_,fetch:l,method:p,fetchOptions:v,middleware:f}).then(E=>(m&&m(E),E)).catch(E=>{throw m&&m(E),E})})}request(e,...n){return tt(this,null,function*(){const[r,i]=n,o=Rl(e,r,i),a=this.requestConfig,{headers:u,fetch:c=fn,method:s="POST",requestMiddleware:l,responseMiddleware:p}=a,f=St(a,["headers","fetch","method","requestMiddleware","responseMiddleware"]),{url:m}=this;o.signal!==void 0&&(f.signal=o.signal);const{query:v,operationName:y}=fr(o.document);return yr({url:m,query:v,variables:o.variables,headers:I(I({},it(mr(u))),it(o.requestHeaders)),operationName:y,fetch:c,method:s,fetchOptions:f,middleware:l}).then(_=>(p&&p(_),_.data)).catch(_=>{throw p&&p(_),_})})}batchRequests(e,n){var r;const i=Nl(e,n),o=this.requestConfig,{headers:a}=o,u=St(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 yr({url:this.url,query:c,variables:s,headers:I(I({},it(mr(a))),it(i.requestHeaders)),operationName:void 0,fetch:(r=this.requestConfig.fetch)!=null?r:fn,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(e){return this.requestConfig.headers=e,this}setHeader(e,n){const{headers:r}=this.requestConfig;return r?r[e]=n:this.requestConfig.headers={[e]:n},this}setEndpoint(e){return this.url=e,this}};const yr=t=>tt(void 0,null,function*(){var e,n;const{query:r,variables:i,fetchOptions:o}=t,a=Il(Al((e=t.method)!=null?e:"post")),u=Array.isArray(t.query),c=yield a(t),s=yield Dl(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,m=St(f,["errors"]),v=o.errorPolicy==="ignore"?m:s;return on(I({},u?{data:v}:v),{headers:c.headers,status:c.status})}else{const f=typeof s=="string"?{error:s}:s;throw new Vo(on(I({},f),{status:c.status,headers:c.headers}),{query:r,variables:i})}}),Ml=(t,e,n,r)=>{const i=r??pr;if(!Array.isArray(t))return i.stringify({query:t,variables:e,operationName:n});if(typeof e<"u"&&!Array.isArray(e))throw new Error("Cannot create request body with given variable type, array expected");const o=t.reduce((a,u,c)=>(a.push({query:u,variables:e?e[c]:void 0}),a),[]);return i.stringify(o)},Dl=(t,e)=>tt(void 0,null,function*(){let n;return t.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"))?e.parse(yield t.text()):t.text()}),mr=t=>typeof t=="function"?t():t;var _r={exports:{}};(function(t,e){e=t.exports=n,e.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)}}})(_r,_r.exports);var Ul=_r.exports;const Lt=pn(Ul);var hn=function(){return hn=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},hn.apply(this,arguments)},dn=new Map,gr=new Map,Go=!0,vn=!1;function zo(t){return t.replace(/[\s,]+/g," ").trim()}function jl(t){return zo(t.source.body.substring(t.start,t.end))}function $l(t){var e=new Set,n=[];return t.definitions.forEach(function(r){if(r.kind==="FragmentDefinition"){var i=r.name.value,o=jl(r.loc),a=gr.get(i);a&&!a.has(o)?Go&&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||_r.set(i,a=new Set),a.add(o),t.has(o)||(t.add(o),n.push(r))}else n.push(r)}),hn(hn({},e),{definitions:n})}function Bl(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 Fl(e){var t=Go(e);if(!dn.has(t)){var n=Uo(e,{experimentalFragmentVariables:vn,allowLegacyFragmentVariables:vn});if(!n||n.kind!=="Document")throw new Error("Not a valid GraphQL document.");dn.set(t,Bl($l(n)))}return dn.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]}),Fl(r)}function Vl(){dn.clear(),_r.clear()}function Hl(){Ho=!1}function Gl(){vn=!0}function zl(){vn=!1}var Re={gql:Y,resetCaches:Vl,disableFragmentWarnings:Hl,enableExperimentalFragmentVariables:Gl,disableExperimentalFragmentVariables:zl};(function(e){e.gql=Re.gql,e.resetCaches=Re.resetCaches,e.disableFragmentWarnings=Re.disableFragmentWarnings,e.enableExperimentalFragmentVariables=Re.enableExperimentalFragmentVariables,e.disableExperimentalFragmentVariables=Re.disableExperimentalFragmentVariables})(Y||(Y={})),Y.default=Y;const zo=Y`
51
+ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a||gr.set(i,a=new Set),a.add(o),e.has(o)||(e.add(o),n.push(r))}else n.push(r)}),hn(hn({},t),{definitions:n})}function Bl(t){var e=new Set(t.definitions);e.forEach(function(r){r.loc&&delete r.loc,Object.keys(r).forEach(function(i){var o=r[i];o&&typeof o=="object"&&e.add(o)})});var n=t.loc;return n&&(delete n.startToken,delete n.endToken),t}function Fl(t){var e=zo(t);if(!dn.has(e)){var n=jo(t,{experimentalFragmentVariables:vn,allowLegacyFragmentVariables:vn});if(!n||n.kind!=="Document")throw new Error("Not a valid GraphQL document.");dn.set(e,Bl($l(n)))}return dn.get(e)}function Y(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];typeof t=="string"&&(t=[t]);var r=t[0];return e.forEach(function(i,o){i&&i.kind==="Document"?r+=i.loc.source.body:r+=i,r+=t[o+1]}),Fl(r)}function Vl(){dn.clear(),gr.clear()}function Hl(){Go=!1}function Gl(){vn=!0}function zl(){vn=!1}var Rt={gql:Y,resetCaches:Vl,disableFragmentWarnings:Hl,enableExperimentalFragmentVariables:Gl,disableExperimentalFragmentVariables:zl};(function(t){t.gql=Rt.gql,t.resetCaches=Rt.resetCaches,t.disableFragmentWarnings=Rt.disableFragmentWarnings,t.enableExperimentalFragmentVariables=Rt.enableExperimentalFragmentVariables,t.disableExperimentalFragmentVariables=Rt.disableExperimentalFragmentVariables})(Y||(Y={})),Y.default=Y;const qo=Y`
52
52
  fragment MatchParts on MatchConfig {
53
53
  regexValue
54
54
  matchValue
@@ -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
- ${zo}
223
+ ${qo}
224
224
  `,Zl=Y`
225
225
  query Ignore($id: ID!) {
226
226
  ignore(id: $id)
227
227
  }
228
- `,tp=Y`
228
+ `,ep=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
- ${zo}
278
- `,ep=(e,t,n,r)=>e();function np(e,t=ep){return{PushPayload(n,r){return t(i=>e.request(ql,n,P(P({},r),i)),"PushPayload","mutation",n)},PushSessionEvents(n,r){return t(i=>e.request(Xl,n,P(P({},r),i)),"PushSessionEvents","mutation",n)},identifySession(n,r){return t(i=>e.request(Kl,n,P(P({},r),i)),"identifySession","mutation",n)},addSessionProperties(n,r){return t(i=>e.request(Wl,n,P(P({},r),i)),"addSessionProperties","mutation",n)},pushMetrics(n,r){return t(i=>e.request(Yl,n,P(P({},r),i)),"pushMetrics","mutation",n)},addSessionFeedback(n,r){return t(i=>e.request(Jl,n,P(P({},r),i)),"addSessionFeedback","mutation",n)},initializeSession(n,r){return t(i=>e.request(Ql,n,P(P({},r),i)),"initializeSession","mutation",n)},Ignore(n,r){return t(i=>e.request(Zl,n,P(P({},r),i)),"Ignore","query",n)},GetSamplingConfig(n,r){return t(i=>e.request(tp,n,P(P({},r),i)),"GetSamplingConfig","query",n)}}}function rp(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 ip(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 gr(e){return Object.prototype.toString.call(e)==="[object Object]"}function qo(e,t){if(t===0)return!0;const n=Object.keys(e);for(const r of n)if(gr(e[r])&&qo(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]=ip(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 gr(u)&&Object.keys(u).length>n.numOfKeysLimit||typeof u=="function"?!0:u instanceof Event&&u.isTrusted===!1?Object.keys(u).length===1:!!(gr(u)&&qo(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 op(e){return typeof e=="number"&&!isNaN(e)&&isFinite(e)}const Tr="exception.message",ap="exception.stacktrace",br="exception.type",Xo="http.response.status_code",sp="server.address",up="service.name",cp="service.version",lp="telemetry.sdk.name",pp="telemetry.sdk.version",wt="url.full",Ko="url.path",fp="url.query",hp="user_agent.original",Sr=15*60*1e3;/*! js-cookie v3.0.5 | MIT */function yn(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 dp={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=yn({},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,"",yn({},o,{expires:-1}))},withAttributes:function(i){return Or(this.converter,yn({},this.attributes,i))},withConverter:function(i){return Or(yn({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var wr=Or(dp,{path:"/"});let Ar="localStorage",Lr=!0,vp=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]}},yp=class{getItem(t){var n;return(n=wr.get(t))!=null?n:""}setItem(t,n){if(!Lr)return;const r=new Date;r.setTime(r.getTime()+Sr),wr.set(t,n,{expires:r})}removeItem(t){Lr&&wr.remove(t)}};const oe=new vp,mn=new yp,Ce=()=>{let e=null;if(typeof window>"u")return oe;try{switch(Ar){case"localStorage":e=window.localStorage;break;case"sessionStorage":e=window.sessionStorage;break}e||(Ot("storage","getPersistentStorage","debug",`persistent storage was not found for mode ${Ar}; using global storage`),e=oe)}catch(t){Ot("storage","getPersistentStorage","debug","failed to get persistent storage; using global storage",t),e=oe}return e},mp=e=>{Ar=e},Wo=e=>{Lr=e},Rr=e=>{try{return Ce().getItem(e)}catch(t){return Ot("storage","getItem","debug",`failed to get item ${e}; using global storage`,t),oe.getItem(e)}},Yo=(e,t)=>{mn.setItem(e,t);try{return Ce().setItem(e,t)}catch(n){return Ot("storage","setItem","debug",`failed to set item ${e}; using global storage`,n),oe.setItem(e,t)}},Jo=e=>{mn.removeItem(e);try{return Ce().removeItem(e)}catch(t){return Ot("storage","removeItem","debug",`failed to remove item ${e}; using global storage`,t),oe.removeItem(e)}};var ae=(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))(ae||{});const _n=e=>`${ae.SESSION_DATA}_${e}`,At=()=>{var e;return typeof globalThis<"u"&&(e=globalThis.persistentSessionSecureID)!=null&&e.length?globalThis.persistentSessionSecureID:Qo()},_p=e=>{typeof globalThis<"u"&&e!=null&&e.length&&(globalThis.persistentSessionSecureID=e)},Qo=()=>{var e;return(e=Rr(ae.SESSION_ID))!=null?e:""},Zo=e=>{Yo(ae.SESSION_ID,e)},gp=e=>{const t=_n(e);return JSON.parse(Rr(t)||"{}")},Ep=e=>{e||(e=Qo());let t=gp(e);if(t&&t.lastPushTime&&Date.now()-t.lastPushTime<Sr)return t;Jo(_n(e))},ta=function(e){if(!(e!=null&&e.sessionSecureID))return;const t=e.sessionSecureID;_p(t);const n=_n(t);Yo(n,JSON.stringify(e)),bp(n)},Tp=function(){const e=mn.getItem(ae.SESSION_ID);Zo(e);const t=_n(e),n=mn.getItem(t);try{ta(JSON.parse(n))}catch{}};function bp(e){const t=`${ae.SESSION_DATA}_`;for(let n=Ce().length-1;n>=0;n--){const r=Ce().key(n);if(r&&r.startsWith(t)&&r!==e)try{const i=JSON.parse(Rr(r)||"{}");i.lastPushTime!==void 0&&Date.now()-i.lastPushTime>=Sr&&(Ot("highlightSession","pruneSessionData","debug",`removing session data for stale key ${r}`),Jo(r))}catch(i){Ot("highlightSession","pruneSessionData","error",`failed to parse session data for key ${r}`,i)}}}var ea=(e=>(e.BillingQuotaExceeded="BillingQuotaExceeded",e))(ea||{});const Cr=3,Nr=1e3,xr=500,Sp=[ea.BillingQuotaExceeded.toString()],Op=e=>{var t;return((t=e.response.errors)==null?void 0:t.find(n=>Sp.includes(n.message)))===void 0},wp=()=>{const e=(t,n,r,i,o=0)=>ee(void 0,null,function*(){try{return yield t()}catch(a){if(a instanceof Fo&&!Op(a))throw a;if(o<Cr)return yield new Promise(u=>setTimeout(u,Nr+xr*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",na="launchdarkly",Ap="evaluation",Lp=`${J}.set.id`,Rp=`${J}.key`,Cp=`${J}.contextKeys`,Np=`${J}.context.id`,xp=`${J}.result.value`,Pp=`${J}.provider.name`,ra={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`},Ip=`${J}.result.variationIndex`,kp=`${na}.application.id`,Mp=`${na}.application.version`,Dp="context",Up=`${Dp}.contextKeys`,jp="$ld:telemetry:session:init",ia="$ld:telemetry:track",$p="launchdarkly.track",Bp="page_view",Fp="document_load",Vp="result.status";function oa(e){return e.includes("%")||e.includes(":")?e.replace(/%/g,"%25").replace(/:/g,"%3A"):e}function aa(e){return e.kind==="multi"}function Pr(e){return aa(e)?Object.keys(e).sort().filter(t=>t!=="kind").map(t=>`${t}:${oa(e[t].key)}`).join(":"):"kind"in e&&e.kind==="user"?e.key:"kind"in e?`${e.kind}:${oa(e.key)}`:e.key}function sa(e){return aa(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}}let Hp=class{constructor(t,n){Oe(this,"client"),Oe(this,"metadata"),this.client=t,this.metadata=n}getHooks(t){return[]}init(t){this.client.track(jp,{sessionID:t})}recordGauge(t,n){}identify(t,n,r={},i){}error(t,n){}track(t,n){const r=n.event;this.client.track(r?`${ia}:${r}`:ia,on(P({},n),{sessionID:t}))}},Gp=class extends To{constructor(t,n){super(),Oe(this,"client"),this.client=new Hp(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 zp=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}},qp="10.0.1",Xp={version:qp},Kp=Xp.version;function Wp(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 Yp=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 ua={exports:{}};/**
277
+ ${qo}
278
+ `,tp=(t,e,n,r)=>t();function np(t,e=tp){return{PushPayload(n,r){return e(i=>t.request(ql,n,I(I({},r),i)),"PushPayload","mutation",n)},PushSessionEvents(n,r){return e(i=>t.request(Xl,n,I(I({},r),i)),"PushSessionEvents","mutation",n)},identifySession(n,r){return e(i=>t.request(Kl,n,I(I({},r),i)),"identifySession","mutation",n)},addSessionProperties(n,r){return e(i=>t.request(Wl,n,I(I({},r),i)),"addSessionProperties","mutation",n)},pushMetrics(n,r){return e(i=>t.request(Yl,n,I(I({},r),i)),"pushMetrics","mutation",n)},addSessionFeedback(n,r){return e(i=>t.request(Jl,n,I(I({},r),i)),"addSessionFeedback","mutation",n)},initializeSession(n,r){return e(i=>t.request(Ql,n,I(I({},r),i)),"initializeSession","mutation",n)},Ignore(n,r){return e(i=>t.request(Zl,n,I(I({},r),i)),"Ignore","query",n)},GetSamplingConfig(n,r){return e(i=>t.request(ep,n,I(I({},r),i)),"GetSamplingConfig","query",n)}}}function rp(t,e,n){try{if(!(e in t))return()=>{};const r=t[e],i=n(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=i,()=>{t[e]=r}}catch{return()=>{}}}function ip(t){if(!t||!t.outerHTML)return"";let e="";for(;t.parentElement;){let n=t.localName;if(!n)break;n=n.toLowerCase();let r=t.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(t)+")"),e=n+(e?">"+e:""),t=r}return e}function Er(t){return Object.prototype.toString.call(t)==="[object Object]"}function Xo(t,e){if(e===0)return!0;const n=Object.keys(t);for(const r of n)if(Er(t[r])&&Xo(t[r],e-1))return!0;return!1}function Tr(t,e){const n={numOfKeysLimit:50,depthOfLimit:4};Object.assign(n,e);const r=[],i=[];return JSON.stringify(t,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]=ip(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 Er(u)&&Object.keys(u).length>n.numOfKeysLimit||typeof u=="function"?!0:u instanceof Event&&u.isTrusted===!1?Object.keys(u).length===1:!!(Er(u)&&Xo(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 op(t){return typeof t=="number"&&!isNaN(t)&&isFinite(t)}const br="exception.message",ap="exception.stacktrace",Sr="exception.type",Ko="http.response.status_code",sp="server.address",up="service.name",cp="service.version",lp="telemetry.sdk.name",pp="telemetry.sdk.version",we="url.full",yn="url.path",fp="url.query",hp="user_agent.original",Or=15*60*1e3;/*! js-cookie v3.0.5 | MIT */function mn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}var dp={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function wr(t,e){function n(i,o,a){if(typeof document<"u"){a=mn({},e,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+"="+t.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]=t.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,"",mn({},o,{expires:-1}))},withAttributes:function(i){return wr(this.converter,mn({},this.attributes,i))},withConverter:function(i){return wr(mn({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var Ar=wr(dp,{path:"/"});let Lr="localStorage",Rr=!0,vp=class{constructor(){Ot(this,"storage",{})}get length(){return Object.keys(this.storage).length}key(e){var n;return(n=Object.keys(this.storage)[e])!=null?n:null}getItem(e){var n;return(n=this.storage[e])!=null?n:""}setItem(e,n){this.storage[e]=n}removeItem(e){delete this.storage[e]}},yp=class{getItem(e){var n;return(n=Ar.get(e))!=null?n:""}setItem(e,n){if(!Rr)return;const r=new Date;r.setTime(r.getTime()+Or),Ar.set(e,n,{expires:r})}removeItem(e){Rr&&Ar.remove(e)}};const ot=new vp,_n=new yp,Ct=()=>{let t=null;if(typeof window>"u")return ot;try{switch(Lr){case"localStorage":t=window.localStorage;break;case"sessionStorage":t=window.sessionStorage;break}t||(Oe("storage","getPersistentStorage","debug",`persistent storage was not found for mode ${Lr}; using global storage`),t=ot)}catch(e){Oe("storage","getPersistentStorage","debug","failed to get persistent storage; using global storage",e),t=ot}return t},mp=t=>{Lr=t},Wo=t=>{Rr=t},Cr=t=>{try{return Ct().getItem(t)}catch(e){return Oe("storage","getItem","debug",`failed to get item ${t}; using global storage`,e),ot.getItem(t)}},Yo=(t,e)=>{_n.setItem(t,e);try{return Ct().setItem(t,e)}catch(n){return Oe("storage","setItem","debug",`failed to set item ${t}; using global storage`,n),ot.setItem(t,e)}},Jo=t=>{_n.removeItem(t);try{return Ct().removeItem(t)}catch(e){return Oe("storage","removeItem","debug",`failed to remove item ${t}; using global storage`,e),ot.removeItem(t)}};var at=(t=>(t.SEGMENT_LAST_SENT_HASH_KEY="HIGHLIGHT_SEGMENT_LAST_SENT_HASH_KEY",t.SESSION_ID="sessionID",t.SESSION_DATA="sessionData",t.USER_IDENTIFIER="highlightIdentifier",t.USER_OBJECT="highlightUserObject",t))(at||{});const gn=t=>`${at.SESSION_DATA}_${t}`,Ae=()=>{var t;return typeof globalThis<"u"&&(t=globalThis.persistentSessionSecureID)!=null&&t.length?globalThis.persistentSessionSecureID:Qo()},_p=t=>{typeof globalThis<"u"&&t!=null&&t.length&&(globalThis.persistentSessionSecureID=t)},Qo=()=>{var t;return(t=Cr(at.SESSION_ID))!=null?t:""},Zo=t=>{Yo(at.SESSION_ID,t)},gp=t=>{const e=gn(t);return JSON.parse(Cr(e)||"{}")},Ep=t=>{t||(t=Qo());let e=gp(t);if(e&&e.lastPushTime&&Date.now()-e.lastPushTime<Or)return e;Jo(gn(t))},ea=function(t){if(!(t!=null&&t.sessionSecureID))return;const e=t.sessionSecureID;_p(e);const n=gn(e);Yo(n,JSON.stringify(t)),bp(n)},Tp=function(){const t=_n.getItem(at.SESSION_ID);Zo(t);const e=gn(t),n=_n.getItem(e);try{ea(JSON.parse(n))}catch{}};function bp(t){const e=`${at.SESSION_DATA}_`;for(let n=Ct().length-1;n>=0;n--){const r=Ct().key(n);if(r&&r.startsWith(e)&&r!==t)try{const i=JSON.parse(Cr(r)||"{}");i.lastPushTime!==void 0&&Date.now()-i.lastPushTime>=Or&&(Oe("highlightSession","pruneSessionData","debug",`removing session data for stale key ${r}`),Jo(r))}catch(i){Oe("highlightSession","pruneSessionData","error",`failed to parse session data for key ${r}`,i)}}}var ta=(t=>(t.BillingQuotaExceeded="BillingQuotaExceeded",t))(ta||{});const Nr=3,xr=1e3,Pr=500,Sp=[ta.BillingQuotaExceeded.toString()],Op=t=>{var e;return((e=t.response.errors)==null?void 0:e.find(n=>Sp.includes(n.message)))===void 0},wp=()=>{const t=(e,n,r,i,o=0)=>tt(void 0,null,function*(){try{return yield e()}catch(a){if(a instanceof Vo&&!Op(a))throw a;if(o<Nr)return yield new Promise(u=>setTimeout(u,xr+Pr*Math.pow(2,o))),yield t(e,n,r,i,o+1);throw console.error(`highlight.io: data request failed after ${o} retries`),a}});return t},J="feature_flag",na="launchdarkly",Ap="evaluation",Lp=`${J}.set.id`,Rp=`${J}.key`,Cp=`${J}.contextKeys`,Np=`${J}.context.id`,xp=`${J}.result.value`,Pp=`${J}.provider.name`,ra={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`},Ip=`${J}.result.variationIndex`,kp=`${na}.application.id`,Mp=`${na}.application.version`,Dp="context",Up=`${Dp}.contextKeys`,jp="$ld:telemetry:session:init",ia="$ld:telemetry:track",$p="launchdarkly.track",Bp="page_view",Fp="document_load",Vp="result.status";function oa(t){return t.includes("%")||t.includes(":")?t.replace(/%/g,"%25").replace(/:/g,"%3A"):t}function aa(t){return t.kind==="multi"}function Ir(t){return aa(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>`${e}:${oa(t[e].key)}`).join(":"):"kind"in t&&t.kind==="user"?t.key:"kind"in t?`${t.kind}:${oa(t.key)}`:t.key}function sa(t){return aa(t)?Object.keys(t).sort().filter(e=>e!=="kind").map(e=>({[e]:t[e].key})).reduce((e,n)=>I(I({},e),n),{}):"kind"in t?{[t.kind]:t.key}:{user:t.key}}let Hp=class{constructor(e,n){Ot(this,"client"),Ot(this,"metadata"),this.client=e,this.metadata=n}getHooks(e){return[]}init(e){this.client.track(jp,{sessionID:e})}recordGauge(e,n){}identify(e,n,r={},i){}error(e,n){}track(e,n){const r=n.event;this.client.track(r?`${ia}:${r}`:ia,on(I({},n),{sessionID:e}))}},Gp=class extends bo{constructor(e,n){super(),Ot(this,"client"),this.client=new Hp(e,n)}getHooks(e){return[{getMetadata:()=>({name:"highlight.run/ld"}),afterIdentify:(n,r,i)=>(this.load(this.client),r)}]}init(e){return this._bufferCall("init",[e])}recordGauge(e,n){return this._bufferCall("recordGauge",[e,n])}identify(e,n,r={},i){return this._bufferCall("identify",[e,n,r,i])}error(e,n){return this._bufferCall("error",[e,n])}track(e,n){return this._bufferCall("track",[e,n])}};const zp=t=>{t(window.location.href);const e=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(){t(window.location.href)};return window.addEventListener("locationchange",i),()=>{window.removeEventListener("popstate",r),window.removeEventListener("locationchange",i),history.pushState=e,history.replaceState=n}},qp="10.1.0",Xp={version:qp},Kp=Xp.version;function Wp(t){if(t.id.length)return`#${t.id}`;if(t.classList.length){let e=[];for(const n of t.classList)e.push(`.${n}`);return`${t.nodeName.toLowerCase()}${e.join(",")}`}return t.nodeName.toLowerCase()}const Yp=t=>{let e;const n=()=>{clearTimeout(e),e=setTimeout(()=>{var r,i;t({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 ua={exports:{}};/**
279
279
  * @preserve
280
280
  * JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013)
281
281
  *
@@ -285,7 +285,7 @@ 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})()})(ua);var Jp=ua.exports;const Qp=pn(Jp),Ir=28,se="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",Zp=2246822507,ca=e=>{var t,n="";if(e){const r=Qp(e).result();for(let i=0;i<Ir;i++){const o=((r^i*Zp)>>>0)%se.length;n+=se.charAt(o)}}else{const r=typeof window<"u"&&((t=window.crypto)==null?void 0:t.getRandomValues),i=new Uint32Array(Ir);r&&window.crypto.getRandomValues(i);for(let o=0;o<Ir;o++)r?n+=se.charAt(i[o]%se.length):n+=se.charAt(Math.floor(Math.random()*se.length))}return n};let tf=class{constructor(t){Oe(this,"sessionSecureID");try{t!=null&&t.storageMode&&mp(t?.storageMode),Wo(!!(t!=null&&t.sessionCookie)),t!=null&&t.sessionCookie?Tp():Wo(!1)}catch(n){St("Error initializing @launchdarkly observability plugin","error",n)}}configureSession(t,n){try{const r=At();let i=Ep(r);i!=null&&i.sessionSecureID?this.sessionSecureID=i.sessionSecureID:(n!=null&&n.sessionKey?this.sessionSecureID=ca(`${t}-${n.sessionKey}`):this.sessionSecureID=ca(),Zo(this.sessionSecureID),ta({sessionSecureID:this.sessionSecureID,sessionKey:n?.sessionKey,projectID:0,sessionStartTime:Date.now(),lastPushTime:Date.now()}))}catch(r){St("Error configuring session in @launchdarkly observability plugin","error",r)}}};class la extends To{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",[])}}rt.LDObserve=void 0,typeof globalThis<"u"?globalThis.LDObserve?rt.LDObserve=globalThis.LDObserve:(rt.LDObserve=new la,globalThis.LDObserve=rt.LDObserve):rt.LDObserve=new la;const ef=Object.freeze(Object.defineProperty({__proto__:null,get LDObserve(){return rt.LDObserve}},Symbol.toStringTag,{value:"Module"}));var nf=Object.defineProperty,rf=Object.defineProperties,of=Object.getOwnPropertyDescriptors,gn=Object.getOwnPropertySymbols,af=Object.getPrototypeOf,pa=Object.prototype.hasOwnProperty,fa=Object.prototype.propertyIsEnumerable,sf=Reflect.get,kr=(e,t,n)=>t in e?nf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,I=(e,t)=>{for(var n in t||(t={}))pa.call(t,n)&&kr(e,n,t[n]);if(gn)for(var n of gn(t))fa.call(t,n)&&kr(e,n,t[n]);return e},et=(e,t)=>rf(e,of(t)),uf=(e,t)=>{var n={};for(var r in e)pa.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&&fa.call(e,r)&&(n[r]=e[r]);return n},R=(e,t,n)=>kr(e,typeof t!="symbol"?t+"":t,n),ha=(e,t,n)=>sf(af(e),n,t),ut=(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 cf=["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||{}),ct=(e=>(e.Device="Device",e.WebVital="WebVital",e.Performance="Performance",e.Frontend="Frontend",e.Backend="Backend",e))(ct||{}),da={exports:{}},va={exports:{}},ya;function lf(){return ya||(ya=1,function(e,t){(function(n,r){e.exports=r()})(fr,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 _=0;_<l.length;_++)y[l[_]]!==void 0&&this["set"+r(l[_])](y[l[_]])}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()||"",_=this.getLineNumber()||"",E=this.getColumnNumber()||"",S=this.getFunctionName()||"";return this.getIsEval()?y?"[eval] ("+y+":"+_+":"+E+")":"[eval]:"+_+":"+E:S?S+" ("+y+":"+_+":"+E+")":y+":"+_+":"+E}},p.fromString=function(y){var _=y.indexOf("("),E=y.lastIndexOf(")"),S=y.substring(0,_),x=y.substring(_+1,E).split(","),j=y.substring(E+1);if(j.indexOf("@")===0)var $=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(j,""),nt=$[1],X=$[2],U=$[3];return new p({functionName:S,args:x||void 0,fileName:nt,lineNumber:X||void 0,columnNumber:U||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(_){this[y]=!!_}}(o[f]);for(var m=0;m<a.length;m++)p.prototype["get"+r(a[m])]=i(a[m]),p.prototype["set"+r(a[m])]=function(y){return function(_){if(!n(_))throw new TypeError(y+" must be a Number");this[y]=Number(_)}}(a[m]);for(var v=0;v<u.length;v++)p.prototype["get"+r(u[v])]=i(u[v]),p.prototype["set"+r(u[v])]=function(y){return function(_){this[y]=String(_)}}(u[v]);return p})}(va)),va.exports}(function(e,t){(function(n,r){e.exports=r(lf())})(fr,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(`
288
+ */(function(t){(function(){var e;function n(r,i){var o=this instanceof n?this:e;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},e=new n,t.exports=n})()})(ua);var Jp=ua.exports;const Qp=pn(Jp),kr=28,st="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",Zp=2246822507,ca=t=>{var e,n="";if(t){const r=Qp(t).result();for(let i=0;i<kr;i++){const o=((r^i*Zp)>>>0)%st.length;n+=st.charAt(o)}}else{const r=typeof window<"u"&&((e=window.crypto)==null?void 0:e.getRandomValues),i=new Uint32Array(kr);r&&window.crypto.getRandomValues(i);for(let o=0;o<kr;o++)r?n+=st.charAt(i[o]%st.length):n+=st.charAt(Math.floor(Math.random()*st.length))}return n};let ef=class{constructor(e){Ot(this,"sessionSecureID");try{e!=null&&e.storageMode&&mp(e?.storageMode),Wo(!!(e!=null&&e.sessionCookie)),e!=null&&e.sessionCookie?Tp():Wo(!1)}catch(n){Se("Error initializing @launchdarkly observability plugin","error",n)}}configureSession(e,n){try{const r=Ae();let i=Ep(r);i!=null&&i.sessionSecureID?this.sessionSecureID=i.sessionSecureID:(n!=null&&n.sessionKey?this.sessionSecureID=ca(`${e}-${n.sessionKey}`):this.sessionSecureID=ca(),Zo(this.sessionSecureID),ea({sessionSecureID:this.sessionSecureID,sessionKey:n?.sessionKey,projectID:0,sessionStartTime:Date.now(),lastPushTime:Date.now()}))}catch(r){Se("Error configuring session in @launchdarkly observability plugin","error",r)}}};class la extends bo{start(){return this._sdk.start()}stop(){return this._sdk.stop()}recordGauge(e){return this._bufferCall("recordGauge",[e])}recordCount(e){return this._bufferCall("recordCount",[e])}recordIncr(e){return this._bufferCall("recordIncr",[e])}recordHistogram(e){return this._bufferCall("recordHistogram",[e])}recordUpDownCounter(e){return this._bufferCall("recordUpDownCounter",[e])}startSpan(e,n,r,i){return this._bufferCall("startSpan",[e,n,r,i])}startManualSpan(e,n,r,i){return this._bufferCall("startManualSpan",[e,n,r,i])}register(e,n){return this._bufferCall("register",[e,n])}recordLog(e,n,r){return this._bufferCall("recordLog",[e,n,r])}recordError(e,n,r,i,o){return this._bufferCall("recordError",[e,n,r,i,o])}setLDContextKeyAttributes(e){return this._bufferCall("setLDContextKeyAttributes",[e])}getLDContextKeyAttributes(){return this._bufferCall("getLDContextKeyAttributes",[])}}re.LDObserve=void 0,typeof globalThis<"u"?globalThis.LDObserve?re.LDObserve=globalThis.LDObserve:(re.LDObserve=new la,globalThis.LDObserve=re.LDObserve):re.LDObserve=new la;const tf=Object.freeze(Object.defineProperty({__proto__:null,get LDObserve(){return re.LDObserve}},Symbol.toStringTag,{value:"Module"}));var nf=Object.defineProperty,rf=Object.defineProperties,of=Object.getOwnPropertyDescriptors,En=Object.getOwnPropertySymbols,af=Object.getPrototypeOf,pa=Object.prototype.hasOwnProperty,fa=Object.prototype.propertyIsEnumerable,sf=Reflect.get,Mr=(t,e,n)=>e in t?nf(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,x=(t,e)=>{for(var n in e||(e={}))pa.call(e,n)&&Mr(t,n,e[n]);if(En)for(var n of En(e))fa.call(e,n)&&Mr(t,n,e[n]);return t},Q=(t,e)=>rf(t,of(e)),uf=(t,e)=>{var n={};for(var r in t)pa.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&En)for(var r of En(t))e.indexOf(r)<0&&fa.call(t,r)&&(n[r]=t[r]);return n},R=(t,e,n)=>Mr(t,typeof e!="symbol"?e+"":e,n),ha=(t,e,n)=>sf(af(t),n,e),ce=(t,e,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(t,e)).next())});const cf=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"];var Me=(t=>(t.DeviceMemory="DeviceMemory",t.ViewportHeight="ViewportHeight",t.ViewportWidth="ViewportWidth",t.ScreenHeight="ScreenHeight",t.ScreenWidth="ScreenWidth",t.ViewportArea="ViewportArea",t))(Me||{}),ie=(t=>(t.Device="Device",t.WebVital="WebVital",t.Performance="Performance",t.Frontend="Frontend",t.Backend="Backend",t))(ie||{}),da={exports:{}},va={exports:{}},ya;function lf(){return ya||(ya=1,function(t,e){(function(n,r){t.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 _=0;_<l.length;_++)y[l[_]]!==void 0&&this["set"+r(l[_])](y[l[_]])}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()||"",_=this.getLineNumber()||"",E=this.getColumnNumber()||"",S=this.getFunctionName()||"";return this.getIsEval()?y?"[eval] ("+y+":"+_+":"+E+")":"[eval]:"+_+":"+E:S?S+" ("+y+":"+_+":"+E+")":y+":"+_+":"+E}},p.fromString=function(y){var _=y.indexOf("("),E=y.lastIndexOf(")"),S=y.substring(0,_),P=y.substring(_+1,E).split(","),j=y.substring(E+1);if(j.indexOf("@")===0)var $=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(j,""),ne=$[1],X=$[2],U=$[3];return new p({functionName:S,args:P||void 0,fileName:ne,lineNumber:X||void 0,columnNumber:U||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(_){this[y]=!!_}}(o[f]);for(var m=0;m<a.length;m++)p.prototype["get"+r(a[m])]=i(a[m]),p.prototype["set"+r(a[m])]=function(y){return function(_){if(!n(_))throw new TypeError(y+" must be a Number");this[y]=Number(_)}}(a[m]);for(var v=0;v<u.length;v++)p.prototype["get"+r(u[v])]=i(u[v]),p.prototype["set"+r(u[v])]=function(y){return function(_){this[y]=String(_)}}(u[v]);return p})}(va)),va.exports}(function(t,e){(function(n,r){t.exports=r(lf())})(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
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()),m=p.join(" ")||void 0,v=["eval","<anonymous>"].indexOf(f[0])>-1?void 0:f[0];return new n({functionName:m,fileName:v,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(`
@@ -293,17 +293,17 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):a
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)}}})})(da);var pf=da.exports;const ma=pn(pf);function En(e){try{return ma.parse(e)}catch(t){try{return ma.parse(new Error)}catch(n){return console.warn("Highlight Warning: failed to parse error",{originalError:t,secondaryError:n}),[]}}}function ff(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=En(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]?rp(a,u,c=>(...s)=>{c.apply(this,s);try{e(hf(u,t,...s))}catch(l){c("highlight logger error:",l,...s)}}):()=>{}}}function hf(e,t,...n){const r=En(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)=>I(I({},o),a),{}),t.stringifyOptions),time:Date.now()}}const df={start:0,end:3},vf={start:4,end:5},Mr={start:6,end:7},Dr={start:8,end:8},yf={start:9,end:9},mf={start:10,end:15};function _f(){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 ue(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 gf(e){return e[Dr.start]=(e[Dr.start]|128)&191,e[Mr.start]=e[Mr.start]&15|64,`${ue(e,df)}-${ue(e,vf)}-${ue(e,Mr)}-${ue(e,Dr)}${ue(e,yf)}-${ue(e,mf)}`}function Ef(){const e=_f();return gf(e)}function _a(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():Ef()}function Ur(e,t,n,r){var i,o,a,u;let c=r??t,s=En(c),l={};t instanceof Error&&(t=t.message,t.cause&&(l={"exception.cause":t.cause}));const p=bf(s);e({error:c,event:Le(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?Le(l):void 0,id:_a()})}const Tf=(e,{enablePromisePatch:t})=>{if(typeof window>"u")return()=>{};const n=window.onerror=(a,u,c,s,l)=>{Ur(e,a,u,l)},r=window.onunhandledrejection=a=>{if(a.reason){const u=a.promise;u.getStack?Ur(e,a.reason,a.type,u.getStack()):Ur(e,a.reason,a.type)}},i=window.Promise,o=class extends i{constructor(a){super(a),R(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}},bf=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},Sf=['["\\"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}','["{}"]','"{}"','[""]','""','["\\"\\""]','""'],Of=["websocket error",'\\"ResizeObserver loop'];var wf=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},Dt="1.9.0",ga=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function Af(e){var t=new Set([e]),n=new Set,r=e.match(ga);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(ga);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 Lf=Af(Dt),Rf=Dt.split(".")[0],Ne=Symbol.for("opentelemetry.js.api."+Rf),xe=wf;function Pe(e,t,n,r){var i;r===void 0&&(r=!1);var o=xe[Ne]=(i=xe[Ne])!==null&&i!==void 0?i:{version:Dt};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!==Dt){var a=new Error("@opentelemetry/api: Registration of version v"+o.version+" for "+e+" does not match previously registered API v"+Dt);return n.error(a.stack||a.message),!1}return o[e]=t,n.debug("@opentelemetry/api: Registered a global for "+e+" v"+Dt+"."),!0}function Ut(e){var t,n,r=(t=xe[Ne])===null||t===void 0?void 0:t.version;if(!(!r||!Lf(r)))return(n=xe[Ne])===null||n===void 0?void 0:n[e]}function Ie(e,t){t.debug("@opentelemetry/api: Unregistering a global for "+e+" v"+Dt+".");var n=xe[Ne];n&&delete n[e]}var Cf=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},Nf=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))},xf=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 ke("debug",this._namespace,t)},e.prototype.error=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return ke("error",this._namespace,t)},e.prototype.info=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return ke("info",this._namespace,t)},e.prototype.warn=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return ke("warn",this._namespace,t)},e.prototype.verbose=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return ke("verbose",this._namespace,t)},e}();function ke(e,t,n){var r=Ut("diag");if(r)return n.unshift(t),r[e].apply(r,Nf([],Cf(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 Pf(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 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="diag",pt=function(){function e(){function t(i){return function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var u=Ut("diag");if(u)return u[i].apply(u,kf([],If(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=Ut("diag"),p=Pf((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 Pe("diag",p,n,!0)};n.setLogger=r,n.disable=function(){Ie(Mf,n)},n.createComponentLogger=function(i){return new xf(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}(),Df=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},Uf=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.")},jf=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=Df(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=Uf(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}(),$f=Symbol("BaggageEntryMetadata"),Bf=pt.instance();function Ff(e){return e===void 0&&(e={}),new jf(new Map(Object.entries(e)))}function Ea(e){return typeof e!="string"&&(Bf.error("Cannot create baggage metadata from unknown type: "+typeof e),e=""),{__TYPE__:$f,toString:function(){return e}}}function Me(e){return Symbol.for(e)}var Vf=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 Vf,$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)}}(),Hf=function(){function e(){}return e.prototype.createGauge=function(t,n){return Qf},e.prototype.createHistogram=function(t,n){return Zf},e.prototype.createCounter=function(t,n){return Jf},e.prototype.createUpDownCounter=function(t,n){return th},e.prototype.createObservableGauge=function(t,n){return nh},e.prototype.createObservableCounter=function(t,n){return eh},e.prototype.createObservableUpDownCounter=function(t,n){return rh},e.prototype.addBatchObservableCallback=function(t,n){},e.prototype.removeBatchObservableCallback=function(t){},e}(),Tn=function(){function e(){}return e}(),Gf=function(e){$t(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(n,r){},t}(Tn),zf=function(e){$t(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(n,r){},t}(Tn),qf=function(e){$t(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(n,r){},t}(Tn),Xf=function(e){$t(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(n,r){},t}(Tn),jr=function(){function e(){}return e.prototype.addCallback=function(t){},e.prototype.removeCallback=function(t){},e}(),Kf=function(e){$t(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(jr),Wf=function(e){$t(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(jr),Yf=function(e){$t(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(jr),Ta=new Hf,Jf=new Gf,Qf=new qf,Zf=new Xf,th=new zf,eh=new Kf,nh=new Wf,rh=new Yf;function ih(){return Ta}var Lt;(function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"})(Lt||(Lt={}));var oh={get:function(e,t){if(e!=null)return e[t]},keys:function(e){return e==null?[]:Object.keys(e)}},ah={set:function(e,t,n){e!=null&&(e[t]=n)}},sh=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},uh=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))},ch=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,uh([r],sh(i),!1))},e.prototype.bind=function(t,n){return n},e.prototype.enable=function(){return this},e.prototype.disable=function(){return this},e}(),lh=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},ph=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))},$r="context",fh=new ch,bn=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalContextManager=function(t){return Pe($r,t,pt.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,ph([t,n,r],lh(o),!1))},e.prototype.bind=function(t,n){return this._getContextManager().bind(t,n)},e.prototype._getContextManager=function(){return Ut($r)||fh},e.prototype.disable=function(){this._getContextManager().disable(),Ie($r,pt.instance())},e}(),ft;(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(ft||(ft={}));var ba="0000000000000000",Sa="00000000000000000000000000000000",Oa={traceId:Sa,spanId:ba,traceFlags:ft.NONE},De=function(){function e(t){t===void 0&&(t=Oa),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}(),Br=Me("OpenTelemetry Context Key SPAN");function Fr(e){return e.getValue(Br)||void 0}function hh(){return Fr(bn.getInstance().active())}function Vr(e,t){return e.setValue(Br,t)}function dh(e){return e.deleteValue(Br)}function vh(e,t){return Vr(e,new De(t))}function wa(e){var t;return(t=Fr(e))===null||t===void 0?void 0:t.spanContext()}var yh=/^([0-9a-f]{32})$/i,mh=/^[0-9a-f]{16}$/i;function Aa(e){return yh.test(e)&&e!==Sa}function _h(e){return mh.test(e)&&e!==ba}function Ue(e){return Aa(e.traceId)&&_h(e.spanId)}function gh(e){return new De(e)}var Hr=bn.getInstance(),La=function(){function e(){}return e.prototype.startSpan=function(t,n,r){r===void 0&&(r=Hr.active());var i=!!(n!=null&&n.root);if(i)return new De;var o=r&&wa(r);return Eh(o)&&Ue(o)?new De(o):new De},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??Hr.active(),s=this.startSpan(t,o,c),l=Vr(c,s);return Hr.with(l,u,void 0,s)}},e}();function Eh(e){return typeof e=="object"&&typeof e.spanId=="string"&&typeof e.traceId=="string"&&typeof e.traceFlags=="number"}var Th=new La,bh=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):Th},e}(),Sh=function(){function e(){}return e.prototype.getTracer=function(t,n,r){return new La},e}(),Oh=new Sh,Ra=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 bh(this,t,n,r)},e.prototype.getDelegate=function(){var t;return(t=this._delegate)!==null&&t!==void 0?t:Oh},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}(),Sn;(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(Sn||(Sn={}));var je;(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"})(je||(je={}));var On;(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(On||(On={}));var N=bn.getInstance(),T=pt.instance(),wh=function(){function e(){}return e.prototype.getMeter=function(t,n,r){return Ta},e}(),Ah=new wh,Gr="metrics",Lh=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalMeterProvider=function(t){return Pe(Gr,t,pt.instance())},e.prototype.getMeterProvider=function(){return Ut(Gr)||Ah},e.prototype.getMeter=function(t,n,r){return this.getMeterProvider().getMeter(t,n,r)},e.prototype.disable=function(){Ie(Gr,pt.instance())},e}(),ce=Lh.getInstance(),Rh=function(){function e(){}return e.prototype.inject=function(t,n){},e.prototype.extract=function(t,n){return t},e.prototype.fields=function(){return[]},e}(),zr=Me("OpenTelemetry Baggage Key");function Ca(e){return e.getValue(zr)||void 0}function Ch(){return Ca(bn.getInstance().active())}function Nh(e,t){return e.setValue(zr,t)}function xh(e){return e.deleteValue(zr)}var qr="propagation",Ph=new Rh,Ih=function(){function e(){this.createBaggage=Ff,this.getBaggage=Ca,this.getActiveBaggage=Ch,this.setBaggage=Nh,this.deleteBaggage=xh}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalPropagator=function(t){return Pe(qr,t,pt.instance())},e.prototype.inject=function(t,n,r){return r===void 0&&(r=ah),this._getGlobalPropagator().inject(t,n,r)},e.prototype.extract=function(t,n,r){return r===void 0&&(r=oh),this._getGlobalPropagator().extract(t,n,r)},e.prototype.fields=function(){return this._getGlobalPropagator().fields()},e.prototype.disable=function(){Ie(qr,pt.instance())},e.prototype._getGlobalPropagator=function(){return Ut(qr)||Ph},e}(),Q=Ih.getInstance(),Xr="trace",kh=function(){function e(){this._proxyTracerProvider=new Ra,this.wrapSpanContext=gh,this.isSpanContextValid=Ue,this.deleteSpan=dh,this.getSpan=Fr,this.getActiveSpan=hh,this.getSpanContext=wa,this.setSpan=Vr,this.setSpanContext=vh}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalTracerProvider=function(t){var n=Pe(Xr,this._proxyTracerProvider,pt.instance());return n&&this._proxyTracerProvider.setDelegate(t),n},e.prototype.getTracerProvider=function(){return Ut(Xr)||this._proxyTracerProvider},e.prototype.getTracer=function(t,n){return this.getTracerProvider().getTracer(t,n)},e.prototype.disable=function(){Ie(Xr,pt.instance()),this._proxyTracerProvider=new Ra},e}(),k=kh.getInstance(),Mh=Me("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Na(e){return e.getValue(Mh)===!0}var Dh="=",Kr=";",Wr=",",Yr="baggage",Uh=180,jh=4096,$h=8192,Bh=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 Fh(e){return e.reduce(function(t,n){var r=""+t+(t!==""?Wr:"")+n;return r.length>$h?t:r},"")}function Vh(e){return e.getAllEntries().map(function(t){var n=Bh(t,2),r=n[0],i=n[1],o=encodeURIComponent(r)+"="+encodeURIComponent(i.value);return i.metadata!==void 0&&(o+=Kr+i.metadata.toString()),o})}function Hh(e){var t=e.split(Kr);if(!(t.length<=0)){var n=t.shift();if(n){var r=n.indexOf(Dh);if(!(r<=0)){var i=decodeURIComponent(n.substring(0,r).trim()),o=decodeURIComponent(n.substring(r+1).trim()),a;return t.length>0&&(a=Ea(t.join(Kr))),{key:i,value:o,metadata:a}}}}}var Gh=function(){function e(){}return e.prototype.inject=function(t,n,r){var i=Q.getBaggage(t);if(!(!i||Na(t))){var o=Vh(i).filter(function(u){return u.length<=jh}).slice(0,Uh),a=Fh(o);a.length>0&&r.set(n,Yr,a)}},e.prototype.extract=function(t,n,r){var i=r.get(n,Yr),o=Array.isArray(i)?i.join(Wr):i;if(!o)return t;var a={};if(o.length===0)return t;var u=o.split(Wr);return u.forEach(function(c){var s=Hh(c);if(s){var l={value:s.value};s.metadata&&(l.metadata=s.metadata),a[s.key]=l}}),Object.entries(a).length===0?t:Q.setBaggage(t,Q.createBaggage(a))},e.prototype.fields=function(){return[Yr]},e}(),Jr;(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"})(Jr||(Jr={}));var zh=",",qh=["OTEL_SDK_DISABLED"];function Xh(e){return qh.indexOf(e)>-1}var Kh=["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 Wh(e){return Kh.indexOf(e)>-1}var Yh=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];function Jh(e){return Yh.indexOf(e)>-1}var Qr=1/0,Zr=128,Qh=128,Zh=128,xa={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:Qr,OTEL_ATTRIBUTE_COUNT_LIMIT:Zr,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:Qr,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:Zr,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:Qr,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:Zr,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:Qh,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:Zh,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:Jr.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 td(e,t,n){if(typeof n[e]<"u"){var r=String(n[e]);t[e]=r.toLowerCase()==="true"}}function ed(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 nd(e,t,n,r){r===void 0&&(r=zh);var i=n[e];typeof i=="string"&&(t[e]=i.split(r).map(function(o){return o.trim()}))}var rd={ALL:D.ALL,VERBOSE:D.VERBOSE,DEBUG:D.DEBUG,INFO:D.INFO,WARN:D.WARN,ERROR:D.ERROR,NONE:D.NONE};function id(e,t,n){var r=n[e];if(typeof r=="string"){var i=rd[r.toUpperCase()];i!=null&&(t[e]=i)}}function od(e){var t={};for(var n in xa){var r=n;switch(r){case"OTEL_LOG_LEVEL":id(r,t,e);break;default:if(Xh(r))td(r,t,e);else if(Wh(r))ed(r,t,e);else if(Jh(r))nd(r,t,e);else{var i=e[r];typeof i<"u"&&i!==null&&(t[r]=String(i))}}}return t}var ad=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{};function sd(){var e=od(ad);return Object.assign({},xa,e)}var ti=performance,ud=9,cd=6,ld=Math.pow(10,cd),Pa=Math.pow(10,ud);function Ia(e){var t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*ld);return[n,r]}function pd(){var e=ti.timeOrigin;if(typeof e!="number"){var t=ti;e=t.timing&&t.timing.fetchStart}return e}function fd(e){var t=Ia(pd()),n=Ia(ti.now());return hd(t,n)}function hd(e,t){var n=[e[0]+t[0],e[1]+t[1]];return n[1]>=Pa&&(n[1]-=Pa,n[0]+=1),n}var B;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(B||(B={}));var dd=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.")},vd=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=dd(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}(),ei="[_0-9a-z-*/]",yd="[a-z]"+ei+"{0,255}",md="[a-z0-9]"+ei+"{0,240}@[a-z]"+ei+"{0,13}",_d=new RegExp("^(?:"+yd+"|"+md+")$"),gd=/^[ -~]{0,255}[!-~]$/,Ed=/,|=/;function Td(e){return _d.test(e)}function bd(e){return gd.test(e)&&!Ed.test(e)}var ka=32,Sd=512,Ma=",",Da="=",Od=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+Da+t.get(r)),n},[]).join(Ma)},e.prototype._parse=function(t){t.length>Sd||(this._internalState=t.split(Ma).reverse().reduce(function(n,r){var i=r.trim(),o=i.indexOf(Da);if(o!==-1){var a=i.slice(0,o),u=i.slice(o+1,r.length);Td(a)&&bd(u)&&n.set(a,u)}return n},new Map),this._internalState.size>ka&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,ka))))},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}(),ni="traceparent",ri="tracestate",wd="00",Ad="(?!ff)[\\da-f]{2}",Ld="(?![0]{32})[\\da-f]{32}",Rd="(?![0]{16})[\\da-f]{16}",Cd="[\\da-f]{2}",Nd=new RegExp("^\\s?("+Ad+")-("+Ld+")-("+Rd+")-("+Cd+")(-.*)?\\s?$");function xd(e){var t=Nd.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}var Pd=function(){function e(){}return e.prototype.inject=function(t,n,r){var i=k.getSpanContext(t);if(!(!i||Na(t)||!Ue(i))){var o=wd+"-"+i.traceId+"-"+i.spanId+"-0"+Number(i.traceFlags||ft.NONE).toString(16);r.set(n,ni,o),i.traceState&&r.set(n,ri,i.traceState.serialize())}},e.prototype.extract=function(t,n,r){var i=r.get(n,ni);if(!i)return t;var o=Array.isArray(i)?i[0]:i;if(typeof o!="string")return t;var a=xd(o);if(!a)return t;a.isRemote=!0;var u=r.get(n,ri);if(u){var c=Array.isArray(u)?u.join(","):u;a.traceState=new Od(typeof c=="string"?c:void 0)}return k.setSpanContext(t,a)},e.prototype.fields=function(){return[ni,ri]},e}(),Id="[object Object]",kd="[object Null]",Md="[object Undefined]",Dd=Function.prototype,Ua=Dd.toString,Ud=Ua.call(Object),jd=$d(Object.getPrototypeOf,Object),ja=Object.prototype,$a=ja.hasOwnProperty,Bt=Symbol?Symbol.toStringTag:void 0,Ba=ja.toString;function $d(e,t){return function(n){return e(t(n))}}function Fa(e){if(!Bd(e)||Fd(e)!==Id)return!1;var t=jd(e);if(t===null)return!0;var n=$a.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Ua.call(n)===Ud}function Bd(e){return e!=null&&typeof e=="object"}function Fd(e){return e==null?e===void 0?Md:kd:Bt&&Bt in Object(e)?Vd(e):Hd(e)}function Vd(e){var t=$a.call(e,Bt),n=e[Bt],r=!1;try{e[Bt]=void 0,r=!0}catch{}var i=Ba.call(e);return r&&(t?e[Bt]=n:delete e[Bt]),i}function Hd(e){return Ba.call(e)}var Gd=20;function zd(){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=Va(n,e.shift(),0,r);return n}function ii(e){return wn(e)?e.slice():e}function Va(e,t,n,r){n===void 0&&(n=0);var i;if(!(n>Gd)){if(n++,An(e)||An(t)||Ga(t))i=ii(t);else if(wn(e)){if(i=e.slice(),wn(t))for(var o=0,a=t.length;o<a;o++)i.push(ii(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]=ii(t[c])}}else if($e(e))if($e(t)){if(!qd(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(An(s))typeof s>"u"?delete i[c]:i[c]=s;else{var l=i[c],p=s;if(Ha(e,c,r)||Ha(t,c,r))delete i[c];else{if($e(l)&&$e(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]=Va(i[c],s,n,r)}}}}else i=t;return i}}function Ha(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 wn(e){return Array.isArray(e)}function Ga(e){return typeof e=="function"}function $e(e){return!An(e)&&!wn(e)&&!Ga(e)&&typeof e=="object"}function An(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function qd(e,t){return!(!Fa(e)||!Fa(t))}var za=function(){function e(){}return e.prototype.emit=function(t){},e}(),Xd=new za,Kd=function(){function e(){}return e.prototype.getLogger=function(t,n,r){return new za},e}(),qa=new Kd,Wd=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):Xd},e}(),Xa=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 Wd(this,t,n,r)},e.prototype.getDelegate=function(){var t;return(t=this._delegate)!==null&&t!==void 0?t:qa},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}(),Yd=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},Ln=Symbol.for("io.opentelemetry.js.api.logs"),Be=Yd;function Jd(e,t,n){return function(r){return r===e?t:n}}var Ka=1,Qd=function(){function e(){this._proxyLoggerProvider=new Xa}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalLoggerProvider=function(t){return Be[Ln]?this.getLoggerProvider():(Be[Ln]=Jd(Ka,t,qa),this._proxyLoggerProvider.setDelegate(t),t)},e.prototype.getLoggerProvider=function(){var t,n;return(n=(t=Be[Ln])===null||t===void 0?void 0:t.call(Be,Ka))!==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 Be[Ln],this._proxyLoggerProvider=new Xa},e}(),Fe=Qd.getInstance();function Zd(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 tv(e){e.forEach(function(t){return t.disable()})}function ev(e){var t,n,r=e.tracerProvider||k.getTracerProvider(),i=e.meterProvider||ce.getMeterProvider(),o=e.loggerProvider||Fe.getLoggerProvider(),a=(n=(t=e.instrumentations)===null||t===void 0?void 0:t.flat())!==null&&n!==void 0?n:[];return Zd(a,r,i,o),function(){tv(a)}}function oi(e){return typeof e=="function"}var Z=console.error.bind(console);function Ve(e,t,n){var r=!!e[t]&&e.propertyIsEnumerable(t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}function He(e){e&&e.logger&&(oi(e.logger)?Z=e.logger:Z("new logger isn't a function, not replacing"))}function Wa(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(!oi(e[t])||!oi(n)){Z("original object and wrapper must be functions");return}var r=e[t],i=n(r,t);return Ve(i,"__original",r),Ve(i,"__unwrap",function(){e[t]===i&&Ve(e,t,r)}),Ve(i,"__wrapped",!0),Ve(e,t,i),i}function nv(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){Wa(r,i,n)})})}function Ya(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 rv(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){Ya(n,r)})})}He.wrap=Wa,He.massWrap=nv,He.unwrap=Ya,He.massUnwrap=rv;var K=He,ai=function(){return ai=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},ai.apply(this,arguments)},iv=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=ce.getMeter(t,n),this._logger=Fe.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=ai({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}(),ov=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)}}(),Ja=function(e){ov(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}(iv);function tt(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}var Rn=performance,av="traceparent",Qa=Me("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function sv(e){return e.setValue(Qa,!0)}function si(e){return e.getValue(Qa)===!0}var uv="=",ui=";",ci=",",li="baggage",cv=180,lv=4096,pv=8192,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(;(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 hv(e){return e.reduce(function(t,n){var r=""+t+(t!==""?ci:"")+n;return r.length>pv?t:r},"")}function dv(e){return e.getAllEntries().map(function(t){var n=fv(t,2),r=n[0],i=n[1],o=encodeURIComponent(r)+"="+encodeURIComponent(i.value);return i.metadata!==void 0&&(o+=ui+i.metadata.toString()),o})}function vv(e){var t=e.split(ui);if(!(t.length<=0)){var n=t.shift();if(n){var r=n.indexOf(uv);if(!(r<=0)){var i=decodeURIComponent(n.substring(0,r).trim()),o=decodeURIComponent(n.substring(r+1).trim()),a;return t.length>0&&(a=Ea(t.join(ui))),{key:i,value:o,metadata:a}}}}}var yv=function(){function e(){}return e.prototype.inject=function(t,n,r){var i=Q.getBaggage(t);if(!(!i||si(t))){var o=dv(i).filter(function(u){return u.length<=lv}).slice(0,cv),a=hv(o);a.length>0&&r.set(n,li,a)}},e.prototype.extract=function(t,n,r){var i=r.get(n,li),o=Array.isArray(i)?i.join(ci):i;if(!o)return t;var a={};if(o.length===0)return t;var u=o.split(ci);return u.forEach(function(c){var s=vv(c);if(s){var l={value:s.value};s.metadata&&(l.metadata=s.metadata),a[s.key]=l}}),Object.entries(a).length===0?t:Q.setBaggage(t,Q.createBaggage(a))},e.prototype.fields=function(){return[li]},e}(),Za=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.")},mv=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 Cn(e){var t,n,r={};if(typeof e!="object"||e==null)return r;try{for(var i=Za(Object.entries(e)),o=i.next();!o.done;o=i.next()){var a=mv(o.value,2),u=a[0],c=a[1];if(!_v(u)){T.warn("Invalid attribute key: "+u);continue}if(!ts(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 _v(e){return typeof e=="string"&&e.length>0}function ts(e){return e==null?!0:Array.isArray(e)?gv(e):es(e)}function gv(e){var t,n,r;try{for(var i=Za(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(a!=null){if(!r){if(es(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 es(e){switch(typeof e){case"number":case"boolean":case"string":return!0}return!1}function Ev(){return function(e){T.error(Tv(e))}}function Tv(e){return typeof e=="string"?e:JSON.stringify(bv(e))}function bv(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 Sv=Ev();function le(e){try{Sv(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 Ov=",",wv=["OTEL_SDK_DISABLED"];function Av(e){return wv.indexOf(e)>-1}var Lv=["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 Rv(e){return Lv.indexOf(e)>-1}var Cv=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];function Nv(e){return Cv.indexOf(e)>-1}var Nn=1/0,xn=128,xv=128,Pv=128,ns={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:Nn,OTEL_ATTRIBUTE_COUNT_LIMIT:xn,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:Nn,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:xn,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:Nn,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:xv,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:Pv,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 Iv(e,t,n){if(typeof n[e]<"u"){var r=String(n[e]);t[e]=r.toLowerCase()==="true"}}function kv(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 Mv(e,t,n,r){r===void 0&&(r=Ov);var i=n[e];typeof i=="string"&&(t[e]=i.split(r).map(function(o){return o.trim()}))}var Dv={ALL:D.ALL,VERBOSE:D.VERBOSE,DEBUG:D.DEBUG,INFO:D.INFO,WARN:D.WARN,ERROR:D.ERROR,NONE:D.NONE};function Uv(e,t,n){var r=n[e];if(typeof r=="string"){var i=Dv[r.toUpperCase()];i!=null&&(t[e]=i)}}function rs(e){var t={};for(var n in ns){var r=n;switch(r){case"OTEL_LOG_LEVEL":Uv(r,t,e);break;default:if(Av(r))Iv(r,t,e);else if(Rv(r))kv(r,t,e);else if(Nv(r))Mv(r,t,e);else{var i=e[r];typeof i<"u"&&i!==null&&(t[r]=String(i))}}}return t}var is=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{};function Ge(){var e=rs(is);return Object.assign({},ns,e)}function jv(){return rs(is)}var pe=performance,$v="exception.type",Bv="exception.message",Fv="exception.stacktrace",Vv="http.response_content_length",Hv="http.response_content_length_uncompressed",pi=$v,fi=Bv,Gv=Fv,zv=Vv,qv=Hv,Xv=9,Kv=6,Wv=Math.pow(10,Kv),Pn=Math.pow(10,Xv);function Rt(e){var t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*Wv);return[n,r]}function hi(){var e=pe.timeOrigin;if(typeof e!="number"){var t=pe;e=t.timing&&t.timing.fetchStart}return e}function os(e){var t=Rt(hi()),n=Rt(typeof e=="number"?e:pe.now());return ss(t,n)}function ze(e){if(di(e))return e;if(typeof e=="number")return e<hi()?os(e):Rt(e);if(e instanceof Date)return Rt(e.getTime());throw TypeError("Invalid input type")}function Yv(e,t){var n=t[0]-e[0],r=t[1]-e[1];return r<0&&(n-=1,r+=Pn),[n,r]}function Ct(e){return e[0]*Pn+e[1]}function di(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}function as(e){return di(e)||typeof e=="number"||e instanceof Date}function ss(e,t){var n=[e[0]+t[0],e[1]+t[1]];return n[1]>=Pn&&(n[1]-=Pn,n[0]+=1),n}var vi;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(vi||(vi={}));var Jv=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.")},Qv=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=Jv(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}(),yi="[_0-9a-z-*/]",Zv="[a-z]"+yi+"{0,255}",ty="[a-z0-9]"+yi+"{0,240}@[a-z]"+yi+"{0,13}",ey=new RegExp("^(?:"+Zv+"|"+ty+")$"),ny=/^[ -~]{0,255}[!-~]$/,ry=/,|=/;function iy(e){return ey.test(e)}function oy(e){return ny.test(e)&&!ry.test(e)}var us=32,ay=512,cs=",",ls="=",sy=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+ls+t.get(r)),n},[]).join(cs)},e.prototype._parse=function(t){t.length>ay||(this._internalState=t.split(cs).reverse().reduce(function(n,r){var i=r.trim(),o=i.indexOf(ls);if(o!==-1){var a=i.slice(0,o),u=i.slice(o+1,r.length);iy(a)&&oy(u)&&n.set(a,u)}return n},new Map),this._internalState.size>us&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,us))))},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}(),mi="traceparent",_i="tracestate",uy="00",cy="(?!ff)[\\da-f]{2}",ly="(?![0]{32})[\\da-f]{32}",py="(?![0]{16})[\\da-f]{16}",fy="[\\da-f]{2}",hy=new RegExp("^\\s?("+cy+")-("+ly+")-("+py+")-("+fy+")(-.*)?\\s?$");function dy(e){var t=hy.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}var vy=function(){function e(){}return e.prototype.inject=function(t,n,r){var i=k.getSpanContext(t);if(!(!i||si(t)||!Ue(i))){var o=uy+"-"+i.traceId+"-"+i.spanId+"-0"+Number(i.traceFlags||ft.NONE).toString(16);r.set(n,mi,o),i.traceState&&r.set(n,_i,i.traceState.serialize())}},e.prototype.extract=function(t,n,r){var i=r.get(n,mi);if(!i)return t;var o=Array.isArray(i)?i[0]:i;if(typeof o!="string")return t;var a=dy(o);if(!a)return t;a.isRemote=!0;var u=r.get(n,_i);if(u){var c=Array.isArray(u)?u.join(","):u;a.traceState=new sy(typeof c=="string"?c:void 0)}return k.setSpanContext(t,a)},e.prototype.fields=function(){return[mi,_i]},e}(),yy="[object Object]",my="[object Null]",_y="[object Undefined]",gy=Function.prototype,ps=gy.toString,Ey=ps.call(Object),Ty=by(Object.getPrototypeOf,Object),fs=Object.prototype,hs=fs.hasOwnProperty,Ft=Symbol?Symbol.toStringTag:void 0,ds=fs.toString;function by(e,t){return function(n){return e(t(n))}}function vs(e){if(!Sy(e)||Oy(e)!==yy)return!1;var t=Ty(e);if(t===null)return!0;var n=hs.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&ps.call(n)===Ey}function Sy(e){return e!=null&&typeof e=="object"}function Oy(e){return e==null?e===void 0?_y:my:Ft&&Ft in Object(e)?wy(e):Ay(e)}function wy(e){var t=hs.call(e,Ft),n=e[Ft],r=!1;try{e[Ft]=void 0,r=!0}catch{}var i=ds.call(e);return r&&(t?e[Ft]=n:delete e[Ft]),i}function Ay(e){return ds.call(e)}var Ly=20;function Ry(){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=ys(n,e.shift(),0,r);return n}function gi(e){return In(e)?e.slice():e}function ys(e,t,n,r){n===void 0&&(n=0);var i;if(!(n>Ly)){if(n++,kn(e)||kn(t)||_s(t))i=gi(t);else if(In(e)){if(i=e.slice(),In(t))for(var o=0,a=t.length;o<a;o++)i.push(gi(t[o]));else if(qe(t))for(var u=Object.keys(t),o=0,a=u.length;o<a;o++){var c=u[o];i[c]=gi(t[c])}}else if(qe(e))if(qe(t)){if(!Cy(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(kn(s))typeof s>"u"?delete i[c]:i[c]=s;else{var l=i[c],p=s;if(ms(e,c,r)||ms(t,c,r))delete i[c];else{if(qe(l)&&qe(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]=ys(i[c],s,n,r)}}}}else i=t;return i}}function ms(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 In(e){return Array.isArray(e)}function _s(e){return typeof e=="function"}function qe(e){return!kn(e)&&!In(e)&&!_s(e)&&typeof e=="object"}function kn(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function Cy(e,t){return!(!vs(e)||!vs(t))}function Ny(e,t){return typeof t=="string"?e===t:!!e.match(t)}var xy=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}(),Py=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},Iy=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))},ky=function(){function e(t,n){this._callback=t,this._that=n,this._isCalled=!1,this._deferred=new xy}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,Iy([this._that],Py(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}(),My="exception",Ei=function(){return Ei=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},Ei.apply(this,arguments)},Dy=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.")},gs=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},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,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:On.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=pe.now(),this._performanceOffset=p-(this._performanceStartTime+hi()),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):ts(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=Dy(Object.entries(t)),o=i.next();!o.done;o=i.next()){var a=gs(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++),as(n)&&(as(r)||(r=n),n=void 0);var i=Cn(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,Uy([],gs(t),!1)),this},e.prototype.setStatus=function(t){return this._isSpanEnded()?this:(this.status=Ei({},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=Yv(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<=pe.now())return os(t+this._performanceOffset);if(typeof t=="number")return Rt(t);if(t instanceof Date)return Rt(t.getTime());if(di(t))return t;if(this._startTimeProvided)return Rt(Date.now());var n=pe.now()-this._performanceStartTime;return ss(this.startTime,Rt(n))},e.prototype.isRecording=function(){return this._ended===!1},e.prototype.recordException=function(t,n){var r={};typeof t=="string"?r[fi]=t:t&&(t.code?r[pi]=t.code.toString():t.name&&(r[pi]=t.name),t.message&&(r[fi]=t.message),t.stack&&(r[Gv]=t.stack)),r[pi]||r[fi]?this.addEvent(My,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}(),fe;(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(fe||(fe={}));var Mn=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:fe.NOT_RECORD}},e.prototype.toString=function(){return"AlwaysOffSampler"},e}(),he=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:fe.RECORD_AND_SAMPLED}},e.prototype.toString=function(){return"AlwaysOnSampler"},e}(),Ti=function(){function e(t){var n,r,i,o;this._root=t.root,this._root||(le(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new he),this._remoteParentSampled=(n=t.remoteParentSampled)!==null&&n!==void 0?n:new he,this._remoteParentNotSampled=(r=t.remoteParentNotSampled)!==null&&r!==void 0?r:new Mn,this._localParentSampled=(i=t.localParentSampled)!==null&&i!==void 0?i:new he,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=k.getSpanContext(t);return!u||!Ue(u)?this._root.shouldSample(t,n,r,i,o,a):u.isRemote?u.traceFlags&ft.SAMPLED?this._remoteParentSampled.shouldSample(t,n,r,i,o,a):this._remoteParentNotSampled.shouldSample(t,n,r,i,o,a):u.traceFlags&ft.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}(),Es=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:Aa(n)&&this._accumulate(n)<this._upperBound?fe.RECORD_AND_SAMPLED:fe.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}(),$y=ht.AlwaysOn,de=1;function Ts(){var e=Ge();return{sampler:bs(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 bs(e){switch(e===void 0&&(e=Ge()),e.OTEL_TRACES_SAMPLER){case ht.AlwaysOn:return new he;case ht.AlwaysOff:return new Mn;case ht.ParentBasedAlwaysOn:return new Ti({root:new he});case ht.ParentBasedAlwaysOff:return new Ti({root:new Mn});case ht.TraceIdRatio:return new Es(Ss(e));case ht.ParentBasedTraceIdRatio:return new Ti({root:new Es(Ss(e))});default:return T.error('OTEL_TRACES_SAMPLER value "'+e.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+$y+'".'),new he}}function Ss(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 "+de+"."),de;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 "+de+"."),de):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 "+de+"."),de):t}function By(e){var t={sampler:bs()},n=Ts(),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 Fy(e){var t,n,r,i,o,a,u,c,s,l,p,f,m=Object.assign({},e.spanLimits),v=jv();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:xn,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:Nn,Object.assign({},e,{spanLimits:m})}var Vy=function(){function e(t,n){this._exporter=t,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var r=Ge();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 ky(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&ft.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);N.with(sv(N.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===vi.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){le(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,le(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}(),Hy=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)}}(),Os=function(e){Hy(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){le(i)})},this._pageHideListener=function(){r.forceFlush().catch(function(i){le(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}(Vy),Gy=8,zy=16,qy=function(){function e(){this.generateTraceId=ws(zy),this.generateSpanId=ws(Gy)}return e}(),Dn=Array(32);function ws(e){return function(){for(var t=0;t<e*2;t++)Dn[t]=Math.floor(Math.random()*16)+48,Dn[t]>=58&&(Dn[t]+=39);return String.fromCharCode.apply(null,Dn.slice(0,e*2))}}var Xy=function(){function e(t,n,r){this._tracerProvider=r;var i=By(n);this._sampler=i.sampler,this._generalLimits=i.generalLimits,this._spanLimits=i.spanLimits,this._idGenerator=n.idGenerator||new qy,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=N.active()),n.root&&(r=k.deleteSpan(r));var u=k.getSpan(r);if(si(r)){T.debug("Instrumentation suppressed, returning Noop Span");var c=k.wrapSpanContext(Oa);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:je.INTERNAL,y=((o=n.links)!==null&&o!==void 0?o:[]).map(function(nt){return{context:nt.context,attributes:Cn(nt.attributes)}}),_=Cn(n.attributes),E=this._sampler.shouldSample(r,p,t,v,_,y);f=(a=E.traceState)!==null&&a!==void 0?a:f;var S=E.decision===Sn.RECORD_AND_SAMPLED?ft.SAMPLED:ft.NONE,x={traceId:p,spanId:l,traceFlags:S,traceState:f};if(E.decision===Sn.NOT_RECORD){T.debug("Recording is off, propagating context in a non-recording span");var c=k.wrapSpanContext(x);return c}var j=Cn(Object.assign(_,E.attributes)),$=new jy(this,r,t,x,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??N.active(),s=this.startSpan(t,o,c),l=k.setSpan(c,s);return N.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}(),Ky="process.runtime.name",Wy="service.name",Yy="telemetry.sdk.name",Jy="telemetry.sdk.language",Qy="telemetry.sdk.version",Zy=Ky,tm=Wy,bi=Yy,Si=Jy,Oi=Qy,em="webjs",nm=em,rm="1.30.1",ve,wi=(ve={},ve[bi]="opentelemetry",ve[Zy]="browser",ve[Si]=nm,ve[Oi]=rm,ve);function im(){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)},om=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())})},am=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}}},sm=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},Xe=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[tm]=im(),t[Si]=wi[Si],t[bi]=wi[bi],t[Oi]=wi[Oi],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 om(this,void 0,void 0,function(){return am(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=sm(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}(),Un=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.")},As=function(){function e(t){this._spanProcessors=t}return e.prototype.forceFlush=function(){var t,n,r=[];try{for(var i=Un(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){le(c||new Error("MultiSpanProcessor: forceFlush failed")),u()})})},e.prototype.onStart=function(t,n){var r,i;try{for(var o=Un(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=Un(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=Un(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}(),um=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}(),cm=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},lm=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))},Vt;(function(e){e[e.resolved=0]="resolved",e[e.timeout=1]="timeout",e[e.error=2]="error",e[e.unresolved=3]="unresolved"})(Vt||(Vt={}));var pm=function(){function e(t){t===void 0&&(t={});var n,r;this._registeredSpanProcessors=[],this._tracers=new Map;var i=Ry({},Ts(),Fy(t));if(this.resource=(n=i.resource)!==null&&n!==void 0?n:Xe.empty(),i.mergeResourceWithDefaults&&(this.resource=Xe.default().merge(this.resource)),this._config=Object.assign({},i,{resource:this.resource}),!((r=t.spanProcessors)===null||r===void 0)&&r.length)this._registeredSpanProcessors=lm([],cm(t.spanProcessors),!1),this.activeSpanProcessor=new As(this._registeredSpanProcessors);else{var o=this._buildExporterFromEnv();if(o!==void 0){var a=new Os(o);this.activeSpanProcessor=a}else this.activeSpanProcessor=new um}}return e.prototype.getTracer=function(t,n,r){var i=t+"@"+(n||"")+":"+(r?.schemaUrl||"");return this._tracers.has(i)||this._tracers.set(i,new Xy({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 As(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&&N.setGlobalContextManager(t.contextManager),t.propagator&&Q.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=Vt.timeout},t);r.forceFlush().then(function(){clearTimeout(a),o!==Vt.timeout&&(o=Vt.resolved,i(o))}).catch(function(u){clearTimeout(a),o=Vt.error,i(u)})})});return new Promise(function(r,i){Promise.all(n).then(function(o){var a=o.filter(function(u){return u!==Vt.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(Ge().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 Qv({propagators:i})},e.prototype._buildExporterFromEnv=function(){var t=Ge().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 vy}],["baggage",function(){return new yv}]]),e._registeredExporters=new Map,e}(),fm=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},hm=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(){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,hm([r],fm(i),!1))}finally{this._currentContext=a}},e}(),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)}}(),vm=function(e){dm(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 Ls),n.contextManager&&n.contextManager.enable(),e.prototype.register.call(this,n)},t}(pm),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 Ai;function ym(){return Ai||(Ai=document.createElement("a")),Ai}function xt(e,t){return t in e}function z(e,t,n,r){var i=void 0,o=void 0;xt(n,t)&&typeof n[t]=="number"&&(i=n[t]);var a=w.FETCH_START;if(xt(n,a)&&typeof n[a]=="number"&&(o=n[a]),i!==void 0&&o!==void 0&&i>=o)return e.addEvent(t,i),e}function ye(e,t,n){n===void 0&&(n=!1),n||(z(e,w.FETCH_START,t),z(e,w.DOMAIN_LOOKUP_START,t),z(e,w.DOMAIN_LOOKUP_END,t),z(e,w.CONNECT_START,t),xt(t,"name")&&t.name.startsWith("https:")&&z(e,w.SECURE_CONNECTION_START,t),z(e,w.CONNECT_END,t),z(e,w.REQUEST_START,t),z(e,w.RESPONSE_START,t),z(e,w.RESPONSE_END,t));var r=t[w.ENCODED_BODY_SIZE];r!==void 0&&e.setAttribute(zv,r);var i=t[w.DECODED_BODY_SIZE];i!==void 0&&r!==i&&e.setAttribute(qv,i)}function mm(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 Rs(){return typeof location<"u"?location.origin:void 0}function Cs(e,t,n,r,i,o){i===void 0&&(i=new WeakSet);var a=_t(e);e=a.toString();var u=gm(e,t,n,r,i,o);if(u.length===0)return{mainRequest:void 0};if(u.length===1)return{mainRequest:u[0]};var c=mm(u);if(a.origin!==Rs()&&c.length>1){var s=c[0],l=_m(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 _m(e,t,n){for(var r=Ct(n),i=Ct(ze(t)),o=e[1],a,u=e.length,c=1;c<u;c++){var s=e[c],l=Ct(ze(s[w.FETCH_START])),p=Ct(ze(s[w.RESPONSE_END])),f=r-p;l>=i&&(!a||f<a)&&(a=f,o=s)}return o}function gm(e,t,n,r,i,o){var a=Ct(t),u=Ct(n),c=r.filter(function(s){var l=Ct(ze(s[w.FETCH_START])),p=Ct(ze(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 _t(e){if(typeof URL=="function")return new URL(e,typeof document<"u"?document.baseURI:typeof location<"u"?location.href:void 0);var t=ym();return t.href=e,t}function Ns(e,t){if(e.nodeType===Node.DOCUMENT_NODE)return"/";var n=Tm(e,t);if(t&&n.indexOf("@id")>0)return n;var r="";return e.parentNode&&(r+=Ns(e.parentNode,!1)),r+=n,r}function Em(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 Tm(e,t){var n=e.nodeType,r=Em(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 xs(e,t){var n=t||[];(typeof n=="string"||n instanceof RegExp)&&(n=[n]);var r=_t(e);return r.origin===Rs()?!0:n.some(function(i){return Ny(e,i)})}var Li=function(){return Li=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},Li.apply(this,arguments)},bm=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=ce.getMeter(t,n),this._logger=Fe.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=Li({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}(),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)}}(),Om=function(e){Sm(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}(bm);function Ps(e,t,n){var r,i;try{i=e()}catch(o){r=o}finally{return t(r,i),i}}var Ke;(function(e){e.DOCUMENT_LOAD="documentLoad",e.DOCUMENT_FETCH="documentFetch",e.RESOURCE_FETCH="resourceFetch"})(Ke||(Ke={}));var wm="0.44.0",Am="@opentelemetry/instrumentation-document-load";const Lm="http.url",Rm="http.user_agent",me=Lm,Cm=Rm;var jn;(function(e){e.FIRST_PAINT="firstPaint",e.FIRST_CONTENTFUL_PAINT="firstContentfulPaint"})(jn||(jn={}));var Nm=function(){var e,t,n={},r=(t=(e=Rn).getEntriesByType)===null||t===void 0?void 0:t.call(e,"navigation")[0];if(r){var i=Object.values(w);i.forEach(function(u){if(xt(r,u)){var c=r[u];typeof c=="number"&&(n[u]=c)}})}else{var o=Rn,a=o.timing;if(a){var i=Object.values(w);i.forEach(function(c){if(xt(a,c)){var s=a[c];typeof s=="number"&&(n[c]=s)}})}}return n},Is={"first-paint":jn.FIRST_PAINT,"first-contentful-paint":jn.FIRST_CONTENTFUL_PAINT},xm=function(e){var t,n,r=(n=(t=Rn).getEntriesByType)===null||n===void 0?void 0:n.call(t,"paint");r&&r.forEach(function(i){var o=i.name,a=i.startTime;xt(Is,o)&&e.addEvent(Is[o],a)})},Pm=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)}}(),Im=function(e){Pm(t,e);function t(n){n===void 0&&(n={});var r=e.call(this,Am,wm,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=Rn).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")===av}),i=Nm(),o=r&&r.content||"";N.with(Q.extract(jt,{traceparent:o}),function(){var a,u=n._startSpan(Ke.DOCUMENT_LOAD,w.FETCH_START,i);u&&(N.with(k.setSpan(N.active(),u),function(){var c=n._startSpan(Ke.DOCUMENT_FETCH,w.FETCH_START,i);c&&(c.setAttribute(me,location.href),N.with(k.setSpan(N.active(),c),function(){var s;n.getConfig().ignoreNetworkEvents||ye(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(me,location.href),u.setAttribute(Cm,navigator.userAgent),n._addResourcesSpans(u),n.getConfig().ignoreNetworkEvents||(z(u,w.FETCH_START,i),z(u,w.UNLOAD_EVENT_START,i),z(u,w.UNLOAD_EVENT_END,i),z(u,w.DOM_INTERACTIVE,i),z(u,w.DOM_CONTENT_LOADED_EVENT_START,i),z(u,w.DOM_CONTENT_LOADED_EVENT_END,i),z(u,w.DOM_COMPLETE,i),z(u,w.LOAD_EVENT_START,i),z(u,w.LOAD_EVENT_END,i)),n.getConfig().ignorePerformancePaintEvents||xm(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&&(xt(i,r)?n.end(i[r]):n.end())},t.prototype._initResourceSpan=function(n,r){var i,o=this._startSpan(Ke.RESOURCE_FETCH,w.FETCH_START,n,r);o&&(o.setAttribute(me,n.name),this.getConfig().ignoreNetworkEvents||ye(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(xt(i,r)&&typeof i[r]=="number"){var a=this.tracer.startSpan(n,{startTime:i[r]},o?k.setSpan(N.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&&Ps(function(){return r(n)},function(o){o&&i._diag.error("addCustomAttributesOnSpan",o)})},t.prototype._addCustomAttributesOnResourceSpan=function(n,r,i){var o=this;i&&Ps(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}(Om),Ri=function(){return Ri=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},Ri.apply(this,arguments)},km=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=ce.getMeter(t,n),this._logger=Fe.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=Ri({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}(),Mm=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)}}(),Dm=function(e){Mm(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}(km);function Um(e,t,n){var r,i;try{i=e()}catch(o){r=o}finally{return t(r,i),i}}function jm(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}var Ci=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},Ni=performance,$m="http.method",Bm="http.url",Fm="http.host",Vm="http.scheme",Hm="http.status_code",Gm="http.user_agent",zm="http.request_content_length_uncompressed",qm=$m,Xm=Bm,Km=Fm,Wm=Vm,Ym=Hm,Jm=Gm,Qm=zm,Zm=9,t_=6,e_=Math.pow(10,t_),ks=Math.pow(10,Zm);function xi(e){var t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*e_);return[n,r]}function n_(){var e=Ni.timeOrigin;if(typeof e!="number"){var t=Ni;e=t.timing&&t.timing.fetchStart}return e}function Ms(e){var t=xi(n_()),n=xi(Ni.now());return r_(t,n)}function r_(e,t){var n=[e[0]+t[0],e[1]+t[1]];return n[1]>=ks&&(n[1]-=ks,n[0]+=1),n}var i_=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 o_(e,t){return typeof t=="string"?e===t:!!e.match(t)}function a_(e,t){var n,r;if(!t)return!1;try{for(var i=i_(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(o_(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 $n;(function(e){e.COMPONENT="component",e.HTTP_ERROR_NAME="http.error_name",e.HTTP_STATUS_TEXT="http.status_text"})($n||($n={}));var s_=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())})},u_=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}}},c_=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.")},l_=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},Ds=T.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-fetch/utils"});function p_(){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=f_(n.body),i=r.body,o=r.length;return n.body=i,o}else return Promise.resolve(h_(n.body))}else{var a=e[0];return a!=null&&a.body?a.clone().text().then(function(u){return Pi(u)}):Promise.resolve()}}function f_(e){if(!e.pipeThrough)return Ds.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 s_(this,void 0,void 0,function(){var u;return u_(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 h_(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 v_(e);if(e instanceof URLSearchParams)return Pi(e.toString());if(typeof e=="string")return Pi(e);Ds.warn("unknown body type")}var d_=new TextEncoder;function Pi(e){return d_.encode(e).byteLength}function v_(e){var t,n,r=0;try{for(var i=c_(e.entries()),o=i.next();!o.done;o=i.next()){var a=l_(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 Us="0.57.2",y_=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,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},__=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))},Ii,g_=300,js=typeof process=="object"&&((Ii=process.release)===null||Ii===void 0?void 0:Ii.name)==="node",E_=function(e){y_(t,e);function t(n){n===void 0&&(n={});var r=e.call(this,"@opentelemetry/instrumentation-fetch",Us,n)||this;return r.component="fetch",r.version=Us,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(N.active(),n));ye(i,r,this.getConfig().ignoreNetworkEvents),i.end(r[w.RESPONSE_END])},t.prototype._addFinalSpanAttributes=function(n,r){var i=_t(r.url);n.setAttribute(Ym,r.status),r.statusText!=null&&n.setAttribute($n.HTTP_STATUS_TEXT,r.statusText),n.setAttribute(Km,i.host),n.setAttribute(Wm,i.protocol.replace(":","")),typeof navigator<"u"&&n.setAttribute(Jm,navigator.userAgent)},t.prototype._addHeaders=function(n,r){if(!xs(r,this.getConfig().propagateTraceHeaderCorsUrls)){var i={};Q.inject(N.active(),i),Object.keys(i).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}if(n instanceof Request)Q.inject(N.active(),n.headers,{set:function(o,a,u){return o.set(a,typeof u=="string"?u:String(u))}});else if(n.headers instanceof Headers)Q.inject(N.active(),n.headers,{set:function(o,a,u){return o.set(a,typeof u=="string"?u:String(u))}});else if(n.headers instanceof Map)Q.inject(N.active(),n.headers,{set:function(o,a,u){return o.set(a,typeof u=="string"?u:String(u))}});else{var i={};Q.inject(N.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={}),a_(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:je.CLIENT,attributes:(i={},i[$n.COMPONENT]=this.moduleName,i[qm]=o,i[Xm]=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=Cs(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)),ye(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=xi(Date.now()),u=Ms();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)},g_)},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=_t(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&&p_.apply(void 0,__([],m_(o),!1)).then(function(_){_&&l.setAttribute(Qm,_)}).catch(function(_){i._diag.warn("getFetchBodyLength",_)});function f(_,E){i._applyAttributesAfterFetch(_,s,E),i._endSpan(_,p,{status:E.status||0,statusText:E.message,url:c})}function m(_,E){i._applyAttributesAfterFetch(_,s,E),E.status>=200&&E.status<400?i._endSpan(_,p,E):i._endSpan(_,p,{status:E.status,statusText:E.statusText,url:c})}function v(_,E,S){try{var x=S.clone(),j=S.clone(),$=x.body;if($){var nt=$.getReader(),X=function(){nt.read().then(function(U){var Tt=U.done;Tt?m(_,j):X()},function(U){f(_,U)})};X()}else m(_,S)}finally{E(S)}}function y(_,E,S){try{f(_,S)}finally{E(S)}}return new Promise(function(_,E){return N.with(k.setSpan(N.active(),l),function(){return i._addHeaders(s,c),i._tasksCount++,r.apply(u,s instanceof Request?[s]:[c,s]).then(v.bind(u,l,_),y.bind(u,l,E))})})}}},t.prototype._applyAttributesAfterFetch=function(n,r,i){var o=this,a=this.getConfig().applyCustomAttributesOnSpan;a&&Um(function(){return a(n,r,i)},function(u){u&&o._diag.error("applyCustomAttributesOnSpan",u)})},t.prototype._prepareSpanData=function(n){var r=Ms(),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(js){this._diag.warn("this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()");return}jm(fetch)&&(this._unwrap(Ci,"fetch"),this._diag.debug("removing previous patch for constructor")),this._wrap(Ci,"fetch",this._patchConstructor())},t.prototype.disable=function(){js||(this._unwrap(Ci,"fetch"),this._usedResources=new WeakSet)},t}(Dm),ki=function(){return ki=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},ki.apply(this,arguments)},T_=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=ce.getMeter(t,n),this._logger=Fe.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=ki({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}(),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)}}(),S_=function(e){b_(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}(T_);function O_(e,t,n){var r,i;try{i=e()}catch(o){r=o}finally{return t(r,i),i}}function $s(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}var We=performance,w_="http.method",A_="http.url",L_="http.host",R_="http.scheme",C_="http.status_code",N_="http.user_agent",x_="http.request_content_length_uncompressed",P_=w_,I_=A_,k_=L_,M_=R_,D_=C_,U_=N_,j_=x_,$_=9,B_=6,F_=Math.pow(10,B_),Bs=Math.pow(10,$_);function Fs(e){var t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*F_);return[n,r]}function V_(){var e=We.timeOrigin;if(typeof e!="number"){var t=We;e=t.timing&&t.timing.fetchStart}return e}function Vs(e){var t=Fs(V_()),n=Fs(We.now());return H_(t,n)}function H_(e,t){var n=[e[0]+t[0],e[1]+t[1]];return n[1]>=Bs&&(n[1]-=Bs,n[0]+=1),n}var G_=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 z_(e,t){return typeof t=="string"?e===t:!!e.match(t)}function q_(e,t){var n,r;if(!t)return!1;try{for(var i=G_(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(z_(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 gt;(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"})(gt||(gt={}));var 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.")},K_=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},W_=T.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-xml-http-request/utils"});function Y_(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 Q_(e);if(e instanceof URLSearchParams)return Hs(e.toString());if(typeof e=="string")return Hs(e);W_.warn("unknown body type")}var J_=new TextEncoder;function Hs(e){return J_.encode(e).byteLength}function Q_(e){var t,n,r=0;try{for(var i=X_(e.entries()),o=i.next();!o.done;o=i.next()){var a=K_(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 Gs="0.57.2",Mi;(function(e){e.HTTP_STATUS_TEXT="http.status_text"})(Mi||(Mi={}));var Z_=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=300,eg=function(e){Z_(t,e);function t(n){n===void 0&&(n={});var r=e.call(this,"@opentelemetry/instrumentation-xml-http-request",Gs,n)||this;return r.component="xml-http-request",r.version=Gs,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=_t(r).href;if(!xs(i,this.getConfig().propagateTraceHeaderCorsUrls)){var o={};Q.inject(N.active(),o),Object.keys(o).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}var a={};Q.inject(N.active(),a),Object.keys(a).forEach(function(u){n.setRequestHeader(u,String(a[u]))})},t.prototype._addChildSpan=function(n,r){var i=this;N.with(k.setSpan(N.active(),n),function(){var o=i.tracer.startSpan("CORS Preflight",{startTime:r[w.FETCH_START]});ye(o,r,i.getConfig().ignoreNetworkEvents),o.end(r[w.RESPONSE_END])})},t.prototype._addFinalSpanAttributes=function(n,r,i){if(typeof i=="string"){var o=_t(i);r.status!==void 0&&n.setAttribute(D_,r.status),r.statusText!==void 0&&n.setAttribute(Mi.HTTP_STATUS_TEXT,r.statusText),n.setAttribute(k_,o.host),n.setAttribute(M_,o.protocol.replace(":","")),n.setAttribute(U_,navigator.userAgent)}},t.prototype._applyAttributesAfterXHR=function(n,r){var i=this,o=this.getConfig().applyCustomAttributesOnSpan;typeof o=="function"&&O_(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=_t(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&&(We.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=We.getEntriesByType("resource"));var c=Cs(_t(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)),ye(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(q_(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:je.CLIENT,attributes:(o={},o[P_]=i,o[I_]=_t(r).toString(),o)});return u.addEvent(gt.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,_=p.spanUrl,E=p.sendStartTime;y&&(n._findResourceAndAddNetworkEvents(p,y,_,E,f),y.addEvent(l,m),n._addFinalSpanAttributes(y,p,_),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=Vs(),v=Date.now();setTimeout(function(){r(l,f,m,v)},tg)}}function o(){i(gt.EVENT_ERROR,this)}function a(){i(gt.EVENT_ABORT,this)}function u(){i(gt.EVENT_TIMEOUT,this)}function c(){this.status<299?i(gt.EVENT_LOAD,this):i(gt.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,_=v.spanUrl;if(y&&_){if(n.getConfig().measureRequestSize&&f!=null&&f[0]){var E=f[0],S=Y_(E);S!==void 0&&y.setAttribute(j_,S)}N.with(k.setSpan(N.active(),y),function(){n._tasksCount++,v.sendStartTime=Vs(),y.addEvent(gt.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,_),n._addResourceObserver(p,_)})}return l.apply(this,f)}}},t.prototype.enable=function(){this._diag.debug("applying patch to",this.moduleName,this.version),$s(XMLHttpRequest.prototype.open)&&(this._unwrap(XMLHttpRequest.prototype,"open"),this._diag.debug("removing previous patch from method open")),$s(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}(S_);const Di=(e,t,n)=>{var r,i;const o=I({},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=>{[...ng,...e].includes(a?.toLowerCase())&&(o[a]="[REDACTED]")}),o)},ng=["authorization","cookie","proxy-authorization","set-cookie","token"],rg=["https://www.googleapis.com/identitytoolkit","https://securetoken.googleapis.com"],ig=["awsaccesskeyid","signature","sig","x-goog-signature"],zs=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")}},qs=e=>{try{const t=zs(e);(t.username||t.password)&&(t.username="REDACTED",t.password="REDACTED");const n=t.searchParams;if(ig.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}},og=new RegExp("sdk\\/evalx\\/[^/]+\\/contexts\\/(?<context>[^/?]*)\\??.*?"),ag=new RegExp("\\/eval\\/[^/]+\\/(?<context>[^/?]*)\\??.*?");function sg(e){return!!(e.includes("/sdk/evalx")&&e.match(og)||e.includes("/eval/")&&e.match(ag))}const ug=e=>["events.ld.catamorphic.com","events.launchdarkly.com"].some(t=>e.toLocaleLowerCase().includes(t)),cg=e=>sg(e),lg=(e,t)=>t.some(n=>e.toLocaleLowerCase().includes(n)),pg=(e,t,n)=>!lg(e,t)&&!cg(e)&&!ug(e),fg=(e,t,n)=>{var r;if(n.some(a=>e.toLowerCase().includes(a)))return!1;let i=[];t===!0?(i=["localhost",/^\//],(r=window?.location)!=null&&r.host&&i.push(window.location.host)):t instanceof Array&&(i=t);let o=!1;return i.forEach(a=>{e.match(a)&&(o=!0)}),o},Xs=64*1024,hg={"application/json":64*1024*1024,"text/plain":64*1024*1024},Ui=(e,t,n,r)=>{var i,o,a;let u=Xs;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=hg[c])!=null?a:Xs}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},dg=(e,t,n)=>ut(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=Ui(r,n,t,e.headers)}else r=""}catch(i){r=`Unable to clone response: ${i}`}return r});var Ks=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}(),vg=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){vg(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 yg(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 mg(e){if(e!=null)return function(){return e}}function _g(e,t,n){var r,i,o,a,u,c;return{timeoutMillis:yg((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 gg(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}var Eg=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())})},Tg=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}}},bg=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 Eg(this,void 0,void 0,function(){return Tg(this,function(t){switch(t.label){case 0:return[4,Promise.all(this._sendingPromises)];case 1:return t.sent(),[2]}})})},e}();function Sg(e){return new bg(e.concurrencyLimit)}function Og(e){return Object.prototype.hasOwnProperty.call(e,"partialSuccess")}function wg(){return{handleResponse:function(e){e==null||!Og(e)||e.partialSuccess==null||Object.keys(e.partialSuccess).length===0||T.warn("Received Partial Success response:",JSON.stringify(e.partialSuccess))}}}var Ag=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())})},Lg=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}}},Rg=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 Ws("Export failed with retryable status")}):n({code:B.FAILED,error:new Ws("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 Ag(this,void 0,void 0,function(){return Lg(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 Cg(e,t){return new Rg(e.transport,e.serializer,wg(),e.promiseHandler,t.timeout)}function Ys(e,t,n){return Cg({transport:n,serializer:t,promiseHandler:Sg(e)},{timeout:e.timeoutMillis})}function Js(e){return e>=48&&e<=57?e-48:e>=97&&e<=102?e-87:e-55}function ji(e){for(var t=new Uint8Array(e.length/2),n=0,r=0;r<e.length;r+=2){var i=Js(e.charCodeAt(r)),o=Js(e.charCodeAt(r+1));t[n++]=i<<4|o}return t}var Ng=9,xg=Math.pow(10,Ng);function Pg(e){return e[0]*xg+e[1]}function Qs(e){var t=BigInt(1e9);return BigInt(e[0])*t+BigInt(e[1])}function Ig(e){var t=Number(BigInt.asUintN(32,e)),n=Number(BigInt.asUintN(32,e>>BigInt(32)));return{low:t,high:n}}function Zs(e){var t=Qs(e);return Ig(t)}function kg(e){var t=Qs(e);return t.toString()}var Mg=typeof BigInt<"u"?kg:Pg;function tu(e){return e}function eu(e){if(e!==void 0)return ji(e)}var Dg={encodeHrTime:Zs,encodeSpanContext:ji,encodeOptionalSpanContext:eu};function nu(e){var t,n;if(e===void 0)return Dg;var r=(t=e.useLongBits)!==null&&t!==void 0?t:!0,i=(n=e.useHex)!==null&&n!==void 0?n:!1;return{encodeHrTime:r?Zs:Mg,encodeSpanContext:i?tu:ji,encodeOptionalSpanContext:i?tu:eu}}var Ug=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 ru(e){return{attributes:Ht(e.attributes),droppedAttributesCount:0}}function iu(e){return{name:e.name,version:e.version}}function Ht(e){return Object.keys(e).map(function(t){return ou(t,e[t])})}function ou(e,t){return{key:e,value:au(t)}}function au(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(au)}}:t==="object"&&e!=null?{kvlistValue:{values:Object.entries(e).map(function(n){var r=Ug(n,2),i=r[0],o=r[1];return ou(i,o)})}}:{}}var lt;(function(e){e[e.DELTA=0]="DELTA",e[e.CUMULATIVE=1]="CUMULATIVE"})(lt||(lt={}));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 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)}}(),su=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())})},uu=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=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))},Fg=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 Vg(e){return e!=null}function cu(e){var t=Object.keys(e);return t.length===0?"":(t=t.sort(),JSON.stringify(t.map(function(n){return[n,e[n]]})))}function Hg(e){var t,n;return e.name+":"+((t=e.version)!==null&&t!==void 0?t:"")+":"+((n=e.schemaUrl)!==null&&n!==void 0?n:"")}var lu=function(e){jg(t,e);function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return t}(Error);function Ye(e,t){var n,r=new Promise(function(i,o){n=setTimeout(function(){o(new lu("Operation timed out."))},t)});return Promise.race([e,r]).then(function(i){return clearTimeout(n),i},function(i){throw clearTimeout(n),i})}function Gg(e){return su(this,void 0,void 0,function(){var t=this;return uu(this,function(n){return[2,Promise.all(e.map(function(r){return su(t,void 0,void 0,function(){var i,o;return uu(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 zg(e){return e.status==="rejected"}function pu(e,t){var n=[];return e.forEach(function(r){n.push.apply(n,Bg([],$g(t(r)),!1))}),n}function qg(e,t){var n,r;if(e.size!==t.size)return!1;try{for(var i=Fg(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 Xg(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 Kg(e,t){return e.toLowerCase()===t.toLowerCase()}var Gt;(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"})(Gt||(Gt={}));var Wg=function(){function e(){this.kind=Gt.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 Pt(e,t,n){var r,i,o,a;return Zg(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:Lt.DOUBLE,advice:(a=n?.advice)!==null&&a!==void 0?a:{}}}function Yg(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 Jg(e,t){return Kg(e.name,t.name)&&e.unit===t.unit&&e.type===t.type&&e.valueType===t.valueType}var Qg=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function Zg(e){return e.match(Qg)!=null}var tE=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 eE(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 $i=function(){function e(t,n,r,i){r===void 0&&(r=!0),i===void 0&&(i=eE(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=Xg(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}(),fu=function(){function e(t,n){this._boundaries=t,this._recordMinMax=n,this.kind=Gt.HISTOGRAM}return e.prototype.createAccumulation=function(t){return new $i(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 $i(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 $i(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=tE(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}(),Bi=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},Fi=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))},hu=function(){function e(t,n,r,i){t===void 0&&(t=new nE),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}(),nE=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,Fi([r,this._counts.length-n],Bi(this._counts.slice(n)),!1)),i.splice.apply(i,Fi([0,n],Bi(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(Fi([],Bi(this._counts),!1))},e}(),rE=52,iE=2146435072,oE=1048575,Vi=1023,du=-Vi+1,vu=Vi,Hi=Math.pow(2,-1022);function yu(e){var t=new DataView(new ArrayBuffer(8));t.setFloat64(0,e);var n=t.getUint32(0),r=(n&iE)>>20;return r-Vi}function mu(e){var t=new DataView(new ArrayBuffer(8));t.setFloat64(0,e);var n=t.getUint32(0),r=t.getUint32(4),i=(n&oE)*Math.pow(2,32);return i+r}function Gi(e,t){return e===0||e===Number.POSITIVE_INFINITY||e===Number.NEGATIVE_INFINITY||Number.isNaN(e)?e:e*Math.pow(2,t)}function aE(e){return e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,e++,e}var sE=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)}}(),Je=function(e){sE(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Error),uE=function(){function e(t){this._shift=-t}return e.prototype.mapToIndex=function(t){if(t<Hi)return this._minNormalLowerBoundaryIndex();var n=yu(t),r=this._rightShift(mu(t)-1,rE);return n+r>>this._shift},e.prototype.lowerBoundary=function(t){var n=this._minNormalLowerBoundaryIndex();if(t<n)throw new Je("underflow: "+t+" is < minimum lower boundary: "+n);var r=this._maxNormalLowerBoundaryIndex();if(t>r)throw new Je("overflow: "+t+" is > maximum lower boundary: "+r);return Gi(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=du>>this._shift;return this._shift<2&&t--,t},e.prototype._maxNormalLowerBoundaryIndex=function(){return vu>>this._shift},e.prototype._rightShift=function(t,n){return Math.floor(t*Math.pow(2,-n))},e}(),cE=function(){function e(t){this._scale=t,this._scaleFactor=Gi(Math.LOG2E,t),this._inverseFactor=Gi(Math.LN2,-t)}return e.prototype.mapToIndex=function(t){if(t<=Hi)return this._minNormalLowerBoundaryIndex()-1;if(mu(t)===0){var n=yu(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 Je("overflow: "+t+" is > maximum lower boundary: "+n)}var r=this._minNormalLowerBoundaryIndex();if(t<=r){if(t===r)return Hi;if(t===r-1)return Math.exp((t+(1<<this._scale))/this._scaleFactor)/2;throw new Je("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 du<<this._scale},e.prototype._maxNormalLowerBoundaryIndex=function(){return(vu+1<<this._scale)-1},e}(),_u=-10,gu=20,lE=Array.from({length:31},function(e,t){return t>10?new cE(t-10):new uE(t-10)});function Eu(e){if(e>gu||e<_u)throw new Je("expected scale >= "+_u+" && <= "+gu+", got: "+e);return lE[e+10]}var 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},Bn=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}(),fE=20,hE=160,zi=2,dE=function(){function e(t,n,r,i,o,a,u,c,s,l,p){t===void 0&&(t=t),n===void 0&&(n=hE),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 hu),l===void 0&&(l=new hu),p===void 0&&(p=Eu(fE)),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<zi&&(T.warn("Exponential Histogram Max Size set to "+this._maxSize+", changing to the minimum size of: "+zi),this._maxSize=zi)}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=aE(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=Eu(n)}},e.prototype._minScale=function(t){var n=Math.min(this.scale,t.scale),r=Bn.combine(this._highLowAtScale(this.positive,this.scale,n),this._highLowAtScale(t.positive,t.scale,n)),i=Bn.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 Bn(0,-1);var i=n-r;return new Bn(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}(),vE=function(){function e(t,n){this._maxSize=t,this._recordMinMax=n,this.kind=Gt.EXPONENTIAL_HISTOGRAM}return e.prototype.createAccumulation=function(t){return new dE(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=pE(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}(),yE=Me("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function mE(e){return e.setValue(yE,!0)}function _E(){return function(e){T.error(gE(e))}}function gE(e){return typeof e=="string"?e:JSON.stringify(EE(e))}function EE(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 TE=_E();function Tu(e){try{TE(e)}catch{}}var bE=6,SE=Math.pow(10,bE);function qi(e){var t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*SE);return[n,r]}function Fn(e){return e[0]*1e6+e[1]/1e3}var Xi;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(Xi||(Xi={}));function OE(e,t){return new Promise(function(n){N.with(mE(N.active()),function(){e.export(t,function(r){n(r)})})})}var wE={_export:OE},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},Ki=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}(),LE=function(){function e(){this.kind=Gt.LAST_VALUE}return e.prototype.createAccumulation=function(t){return new Ki(t)},e.prototype.merge=function(t,n){var r=Fn(n.sampleTime)>=Fn(t.sampleTime)?n:t;return new Ki(t.startTime,r.toPointValue(),r.sampleTime)},e.prototype.diff=function(t,n){var r=Fn(n.sampleTime)>=Fn(t.sampleTime)?n:t;return new Ki(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=AE(o,2),u=a[0],c=a[1];return{attributes:u,startTime:c.startTime,endTime:i,value:c.toPointValue()}})}},e}(),RE=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},Qe=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}(),bu=function(){function e(t){this.monotonic=t,this.kind=Gt.SUM}return e.prototype.createAccumulation=function(t){return new Qe(t,this.monotonic)},e.prototype.merge=function(t,n){var r=t.toPointValue(),i=n.toPointValue();return n.reset?new Qe(n.startTime,this.monotonic,i,n.reset):new Qe(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 Qe(n.startTime,this.monotonic,i,!0):new Qe(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=RE(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)}}(),Et=function(){function e(){}return e.Drop=function(){return Su},e.Sum=function(){return Ou},e.LastValue=function(){return wu},e.Histogram=function(){return Au},e.ExponentialHistogram=function(){return DE},e.Default=function(){return UE},e}(),CE=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 Wg,t}(Et),NE=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 bu(!0),t.NON_MONOTONIC_INSTANCE=new bu(!1),t}(Et),xE=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 LE,t}(Et),PE=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 fu([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0),t}(Et),IE=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 fu(this._boundaries,this._recordMinMax)},t}(Et),kE=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 vE(this._maxSize,this._recordMinMax)},t}(Et),ME=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 Ou;case A.GAUGE:case A.OBSERVABLE_GAUGE:return wu;case A.HISTOGRAM:return n.advice.explicitBucketBoundaries?new IE(n.advice.explicitBucketBoundaries):Au}return T.warn("Unable to recognize instrument type: "+n.type),Su},t.prototype.createAggregator=function(n){return this._resolve(n).createAggregator(n)},t}(Et),Su=new CE,Ou=new NE,wu=new xE,Au=new PE,DE=new kE,UE=new ME,jE=function(e){return Et.Default()},$E=function(e){return lt.CUMULATIVE},Wi=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())})},Yi=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}}},Lu=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},BE=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))},FE=function(){function e(t){var n,r,i;this._shutdown=!1,this._aggregationSelector=(n=t?.aggregationSelector)!==null&&n!==void 0?n:jE,this._aggregationTemporalitySelector=(r=t?.aggregationTemporalitySelector)!==null&&r!==void 0?r:$E,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 Wi(this,void 0,void 0,function(){var n,r,i,o,a,u;return Yi(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(BE([this._sdkMetricProducer.collect({timeoutMillis:t?.timeoutMillis})],Lu(this._metricProducers.map(function(s){return s.collect({timeoutMillis:t?.timeoutMillis})})),!1))];case 1:return n=Lu.apply(void 0,[c.sent()]),r=n[0],i=n.slice(1),o=r.errors.concat(pu(i,function(s){return s.errors})),a=r.resourceMetrics.resource,u=r.resourceMetrics.scopeMetrics.concat(pu(i,function(s){return s.resourceMetrics.scopeMetrics})),[2,{resourceMetrics:{resource:a,scopeMetrics:u},errors:o}]}})})},e.prototype.shutdown=function(t){return Wi(this,void 0,void 0,function(){return Yi(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,Ye(this.onShutdown(),t.timeoutMillis)];case 3:n.sent(),n.label=4;case 4:return this._shutdown=!0,[2]}})})},e.prototype.forceFlush=function(t){return Wi(this,void 0,void 0,function(){return Yi(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,Ye(this.onForceFlush(),t.timeoutMillis)];case 3:return n.sent(),[2]}})})},e}(),VE=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}}},HE=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},GE=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))},zE=function(e){VE(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,Ye(this._doRun(),this._exportTimeout)];case 1:return r.sent(),[3,3];case 2:return n=r.sent(),n instanceof lu?(T.error("Export took longer than %s milliseconds and timed out.",this._exportTimeout),[2]):(Tu(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,GE(["PeriodicExportingMetricReader: metrics collection errors"],HE(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),Tu(u),[3,5];case 5:return o.scopeMetrics.length===0?[2]:[4,wE._export(this._exporter,o)];case 6:if(c=l.sent(),c.code!==Xi.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}(FE),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}(),qt=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=N.active()),typeof t!="number"){T.warn("non-number value provided to metric "+this._descriptor.name+": "+t);return}this._descriptor.valueType===Lt.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}(),XE=function(e){qt(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),KE=function(e){qt(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),WE=function(e){qt(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),YE=function(e){qt(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),zn=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}(),JE=function(e){qt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(zn),QE=function(e){qt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(zn),ZE=function(e){qt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(zn);function Ji(e){return e instanceof zn}var tT=function(){function e(t){this._meterSharedState=t}return e.prototype.createGauge=function(t,n){var r=Pt(t,A.GAUGE,n),i=this._meterSharedState.registerMetricStorage(r);return new WE(i,r)},e.prototype.createHistogram=function(t,n){var r=Pt(t,A.HISTOGRAM,n),i=this._meterSharedState.registerMetricStorage(r);return new YE(i,r)},e.prototype.createCounter=function(t,n){var r=Pt(t,A.COUNTER,n),i=this._meterSharedState.registerMetricStorage(r);return new KE(i,r)},e.prototype.createUpDownCounter=function(t,n){var r=Pt(t,A.UP_DOWN_COUNTER,n),i=this._meterSharedState.registerMetricStorage(r);return new XE(i,r)},e.prototype.createObservableGauge=function(t,n){var r=Pt(t,A.OBSERVABLE_GAUGE,n),i=this._meterSharedState.registerAsyncMetricStorage(r);return new QE(r,i,this._meterSharedState.observableRegistry)},e.prototype.createObservableCounter=function(t,n){var r=Pt(t,A.OBSERVABLE_COUNTER,n),i=this._meterSharedState.registerAsyncMetricStorage(r);return new JE(r,i,this._meterSharedState.observableRegistry)},e.prototype.createObservableUpDownCounter=function(t,n){var r=Pt(t,A.OBSERVABLE_UP_DOWN_COUNTER,n),i=this._meterSharedState.registerAsyncMetricStorage(r);return new ZE(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}(),Ru=function(){function e(t){this._instrumentDescriptor=t}return e.prototype.getInstrumentDescriptor=function(){return this._instrumentDescriptor},e.prototype.updateDescription=function(t){this._instrumentDescriptor=Pt(this._instrumentDescriptor.name,this._instrumentDescriptor.type,{description:t,valueType:this._instrumentDescriptor.valueType,unit:this._instrumentDescriptor.unit,advice:this._instrumentDescriptor.advice})},e}(),eT=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)}}(),Cu=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}}},nT=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 Cu(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 Cu(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){eT(t,e);function t(){return e.call(this,cu)||this}return t}(nT),rT=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},Nu=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=cu(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=rT(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}(),Qi=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.")},xu=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},Pu=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===lt.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=iT(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=Qi(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=Qi(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=xu(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=Qi(t.keys()),u=a.next();!u.done;u=a.next()){var c=xu(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 iT(e){return Array.from(e.entries())}var oT=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)}}(),aT=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},sT=function(e){oT(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 Nu(r,u._aggregationCardinalityLimit),u._temporalMetricStorage=new Pu(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=aT(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}(Ru);function Iu(e,t){var n="";return e.unit!==t.unit&&(n+=" - Unit '"+e.unit+"' does not match '"+t.unit+`'
297
- `),e.type!==t.type&&(n+=" - Type '"+e.type+"' does not match '"+t.type+`'
298
- `),e.valueType!==t.valueType&&(n+=" - Value Type '"+e.valueType+"' does not match '"+t.valueType+`'
299
- `),e.description!==t.description&&(n+=" - Description '"+e.description+"' does not match '"+t.description+`'
300
- `),n}function uT(e,t){return" - use valueType '"+e.valueType+"' on instrument creation or use an instrument name other than '"+t.name+"'"}function cT(e,t){return" - use unit '"+e.unit+"' on instrument creation or use an instrument name other than '"+t.name+"'"}function lT(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 pT(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
- - 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 ku(e,t){return e.valueType!==t.valueType?uT(e,t):e.unit!==t.unit?cT(e,t):e.type!==t.type?lT(e,t):e.description!==t.description?pT(e,t):""}var Zi=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.")},fT=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=Zi(this._sharedRegistry.values()),c=u.next();!c.done;c=u.next()){var s=c.value;a=a.concat(s)}}catch(m){n={error:m}}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=Zi(l.values()),f=p.next();!f.done;f=p.next()){var s=f.value;a=a.concat(s)}}catch(m){i={error:m}}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=Zi(n),u=a.next();!u.done;u=a.next()){var c=u.value,s=c.getInstrumentDescriptor();Jg(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.
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)}}})})(da);var pf=da.exports;const ma=pn(pf);function Tn(t){try{return ma.parse(t)}catch(e){try{return ma.parse(new Error)}catch(n){return console.warn("Highlight Warning: failed to parse error",{originalError:e,secondaryError:n}),[]}}}function ff(t,e){const n=e.logger;let r;r=window[n];const i=[];if(e.level.includes("error")&&window){const a=u=>{const{message:c,error:s}=u;let l=[];s&&(l=Tn(s));const p=[Tr(c,e.stringifyOptions)];t({type:"Error",trace:l,time:Date.now(),value:p})};window.addEventListener("error",a),i.push(()=>{window&&window.removeEventListener("error",a)})}for(const a of e.level)i.push(o(r,a));return()=>{i.forEach(a=>a())};function o(a,u){return a[u]?rp(a,u,c=>(...s)=>{c.apply(this,s);try{t(hf(u,e,...s))}catch(l){c("highlight logger error:",l,...s)}}):()=>{}}}function hf(t,e,...n){const r=Tn(new Error),i=e.serializeConsoleAttributes?n.map(o=>typeof o=="object"?Tr(o,e.stringifyOptions):o):n.filter(o=>typeof o!="object").map(o=>`${o}`);return{type:t,trace:r,value:i,attributes:Tr(n.filter(o=>typeof o=="object").reduce((o,a)=>x(x({},o),a),{}),e.stringifyOptions),time:Date.now()}}const df={start:0,end:3},vf={start:4,end:5},Dr={start:6,end:7},Ur={start:8,end:8},yf={start:9,end:9},mf={start:10,end:15};function _f(){if(crypto&&crypto.getRandomValues){const e=new Uint8Array(16);return crypto.getRandomValues(e),[...e.values()]}const t=[];for(let e=0;e<16;e+=1)t.push(Math.floor(Math.random()*256));return t}function ut(t,e){let n="";for(let r=e.start;r<=e.end;r+=1)n+=t[r].toString(16).padStart(2,"0");return n}function gf(t){return t[Ur.start]=(t[Ur.start]|128)&191,t[Dr.start]=t[Dr.start]&15|64,`${ut(t,df)}-${ut(t,vf)}-${ut(t,Dr)}-${ut(t,Ur)}${ut(t,yf)}-${ut(t,mf)}`}function Ef(){const t=_f();return gf(t)}function _a(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():Ef()}function jr(t,e,n,r){var i,o,a,u;let c=r??e,s=Tn(c),l={};e instanceof Error&&(e=e.message,e.cause&&(l={"exception.cause":e.cause}));const p=bf(s);t({error:c,event:Lt(e),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?Lt(l):void 0,id:_a()})}const Tf=(t,{enablePromisePatch:e})=>{if(typeof window>"u")return()=>{};const n=window.onerror=(a,u,c,s,l)=>{jr(t,a,u,l)},r=window.onunhandledrejection=a=>{if(a.reason){const u=a.promise;u.getStack?jr(t,a.reason,a.type,u.getStack()):jr(t,a.reason,a.type)}},i=window.Promise,o=class extends i{constructor(a){super(a),R(this,"promiseCreationError"),this.promiseCreationError=new Error}getStack(){return this.promiseCreationError}static shouldPatch(){const a=typeof window.Zone>"u";return e&&a}};return o.shouldPatch()&&(window.Promise=o),()=>{window.Promise=i,window.onunhandledrejection=r,window.onerror=n}},bf=t=>{var e,n;if(t.length===0)return t;const r=t[0];return(e=r.fileName)!=null&&e.includes("highlight.run")||(n=r.fileName)!=null&&n.includes("highlight.io")||r.functionName==="new highlightPromise"?t.slice(1):t},Sf=['["\\"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}','["{}"]','"{}"','[""]','""','["\\"\\""]','""'],Of=["websocket error",'\\"ResizeObserver loop'];var wf=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},De="1.9.0",ga=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function Af(t){var e=new Set([t]),n=new Set,r=t.match(ga);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===t};function o(u){return n.add(u),!1}function a(u){return e.add(u),!0}return function(u){if(e.has(u))return!0;if(n.has(u))return!1;var c=u.match(ga);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 Lf=Af(De),Rf=De.split(".")[0],Nt=Symbol.for("opentelemetry.js.api."+Rf),xt=wf;function Pt(t,e,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[t]){var a=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+t);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 "+t+" does not match previously registered API v"+De);return n.error(a.stack||a.message),!1}return o[t]=e,n.debug("@opentelemetry/api: Registered a global for "+t+" v"+De+"."),!0}function Ue(t){var e,n,r=(e=xt[Nt])===null||e===void 0?void 0:e.version;if(!(!r||!Lf(r)))return(n=xt[Nt])===null||n===void 0?void 0:n[t]}function It(t,e){e.debug("@opentelemetry/api: Unregistering a global for "+t+" v"+De+".");var n=xt[Nt];n&&delete n[t]}var Cf=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),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},Nf=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},xf=function(){function t(e){this._namespace=e.namespace||"DiagComponentLogger"}return t.prototype.debug=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return kt("debug",this._namespace,e)},t.prototype.error=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return kt("error",this._namespace,e)},t.prototype.info=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return kt("info",this._namespace,e)},t.prototype.warn=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return kt("warn",this._namespace,e)},t.prototype.verbose=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return kt("verbose",this._namespace,e)},t}();function kt(t,e,n){var r=Ue("diag");if(r)return n.unshift(e),r[t].apply(r,Nf([],Cf(n),!1))}var D;(function(t){t[t.NONE=0]="NONE",t[t.ERROR=30]="ERROR",t[t.WARN=50]="WARN",t[t.INFO=60]="INFO",t[t.DEBUG=70]="DEBUG",t[t.VERBOSE=80]="VERBOSE",t[t.ALL=9999]="ALL"})(D||(D={}));function Pf(t,e){t<D.NONE?t=D.NONE:t>D.ALL&&(t=D.ALL),e=e||{};function n(r,i){var o=e[r];return typeof o=="function"&&t>=i?o.bind(e):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 If=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),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(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},Mf="diag",pe=function(){function t(){function e(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,kf([],If(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=Pf((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(Mf,n)},n.createComponentLogger=function(i){return new xf(i)},n.verbose=e("verbose"),n.debug=e("debug"),n.info=e("info"),n.warn=e("warn"),n.error=e("error")}return t.instance=function(){return this._instance||(this._instance=new t),this._instance},t}(),Df=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >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},Uf=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},jf=function(){function t(e){this._entries=e?new Map(e):new Map}return t.prototype.getEntry=function(e){var n=this._entries.get(e);if(n)return Object.assign({},n)},t.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(e){var n=Df(e,2),r=n[0],i=n[1];return[r,i]})},t.prototype.setEntry=function(e,n){var r=new t(this._entries);return r._entries.set(e,n),r},t.prototype.removeEntry=function(e){var n=new t(this._entries);return n._entries.delete(e),n},t.prototype.removeEntries=function(){for(var e,n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=new t(this._entries);try{for(var a=Uf(r),u=a.next();!u.done;u=a.next()){var c=u.value;o._entries.delete(c)}}catch(s){e={error:s}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return o},t.prototype.clear=function(){return new t},t}(),$f=Symbol("BaggageEntryMetadata"),Bf=pe.instance();function Ff(t){return t===void 0&&(t={}),new jf(new Map(Object.entries(t)))}function Ea(t){return typeof t!="string"&&(Bf.error("Cannot create baggage metadata from unknown type: "+typeof t),t=""),{__TYPE__:$f,toString:function(){return t}}}function Mt(t){return Symbol.for(t)}var Vf=function(){function t(e){var n=this;n._currentContext=e?new Map(e):new Map,n.getValue=function(r){return n._currentContext.get(r)},n.setValue=function(r,i){var o=new t(n._currentContext);return o._currentContext.set(r,i),o},n.deleteValue=function(r){var i=new t(n._currentContext);return i._currentContext.delete(r),i}}return t}(),je=new Vf,$e=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Hf=function(){function t(){}return t.prototype.createGauge=function(e,n){return Qf},t.prototype.createHistogram=function(e,n){return Zf},t.prototype.createCounter=function(e,n){return Jf},t.prototype.createUpDownCounter=function(e,n){return eh},t.prototype.createObservableGauge=function(e,n){return nh},t.prototype.createObservableCounter=function(e,n){return th},t.prototype.createObservableUpDownCounter=function(e,n){return rh},t.prototype.addBatchObservableCallback=function(e,n){},t.prototype.removeBatchObservableCallback=function(e){},t}(),bn=function(){function t(){}return t}(),Gf=function(t){$e(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(n,r){},e}(bn),zf=function(t){$e(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(n,r){},e}(bn),qf=function(t){$e(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(n,r){},e}(bn),Xf=function(t){$e(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(n,r){},e}(bn),$r=function(){function t(){}return t.prototype.addCallback=function(e){},t.prototype.removeCallback=function(e){},t}(),Kf=function(t){$e(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}($r),Wf=function(t){$e(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}($r),Yf=function(t){$e(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}($r),Ta=new Hf,Jf=new Gf,Qf=new qf,Zf=new Xf,eh=new zf,th=new Kf,nh=new Wf,rh=new Yf;function ih(){return Ta}var Le;(function(t){t[t.INT=0]="INT",t[t.DOUBLE=1]="DOUBLE"})(Le||(Le={}));var oh={get:function(t,e){if(t!=null)return t[e]},keys:function(t){return t==null?[]:Object.keys(t)}},ah={set:function(t,e,n){t!=null&&(t[e]=n)}},sh=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),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},uh=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},ch=function(){function t(){}return t.prototype.active=function(){return je},t.prototype.with=function(e,n,r){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];return n.call.apply(n,uh([r],sh(i),!1))},t.prototype.bind=function(e,n){return n},t.prototype.enable=function(){return this},t.prototype.disable=function(){return this},t}(),lh=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),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},ph=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},Br="context",fh=new ch,Sn=function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalContextManager=function(e){return Pt(Br,e,pe.instance())},t.prototype.active=function(){return this._getContextManager().active()},t.prototype.with=function(e,n,r){for(var i,o=[],a=3;a<arguments.length;a++)o[a-3]=arguments[a];return(i=this._getContextManager()).with.apply(i,ph([e,n,r],lh(o),!1))},t.prototype.bind=function(e,n){return this._getContextManager().bind(e,n)},t.prototype._getContextManager=function(){return Ue(Br)||fh},t.prototype.disable=function(){this._getContextManager().disable(),It(Br,pe.instance())},t}(),fe;(function(t){t[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"})(fe||(fe={}));var ba="0000000000000000",Sa="00000000000000000000000000000000",Oa={traceId:Sa,spanId:ba,traceFlags:fe.NONE},Dt=function(){function t(e){e===void 0&&(e=Oa),this._spanContext=e}return t.prototype.spanContext=function(){return this._spanContext},t.prototype.setAttribute=function(e,n){return this},t.prototype.setAttributes=function(e){return this},t.prototype.addEvent=function(e,n){return this},t.prototype.addLink=function(e){return this},t.prototype.addLinks=function(e){return this},t.prototype.setStatus=function(e){return this},t.prototype.updateName=function(e){return this},t.prototype.end=function(e){},t.prototype.isRecording=function(){return!1},t.prototype.recordException=function(e,n){},t}(),Fr=Mt("OpenTelemetry Context Key SPAN");function Vr(t){return t.getValue(Fr)||void 0}function hh(){return Vr(Sn.getInstance().active())}function Hr(t,e){return t.setValue(Fr,e)}function dh(t){return t.deleteValue(Fr)}function vh(t,e){return Hr(t,new Dt(e))}function wa(t){var e;return(e=Vr(t))===null||e===void 0?void 0:e.spanContext()}var yh=/^([0-9a-f]{32})$/i,mh=/^[0-9a-f]{16}$/i;function Aa(t){return yh.test(t)&&t!==Sa}function _h(t){return mh.test(t)&&t!==ba}function Ut(t){return Aa(t.traceId)&&_h(t.spanId)}function gh(t){return new Dt(t)}var Gr=Sn.getInstance(),La=function(){function t(){}return t.prototype.startSpan=function(e,n,r){r===void 0&&(r=Gr.active());var i=!!(n!=null&&n.root);if(i)return new Dt;var o=r&&wa(r);return Eh(o)&&Ut(o)?new Dt(o):new Dt},t.prototype.startActiveSpan=function(e,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??Gr.active(),s=this.startSpan(e,o,c),l=Hr(c,s);return Gr.with(l,u,void 0,s)}},t}();function Eh(t){return typeof t=="object"&&typeof t.spanId=="string"&&typeof t.traceId=="string"&&typeof t.traceFlags=="number"}var Th=new La,bh=function(){function t(e,n,r,i){this._provider=e,this.name=n,this.version=r,this.options=i}return t.prototype.startSpan=function(e,n,r){return this._getTracer().startSpan(e,n,r)},t.prototype.startActiveSpan=function(e,n,r,i){var o=this._getTracer();return Reflect.apply(o.startActiveSpan,o,arguments)},t.prototype._getTracer=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):Th},t}(),Sh=function(){function t(){}return t.prototype.getTracer=function(e,n,r){return new La},t}(),Oh=new Sh,Ra=function(){function t(){}return t.prototype.getTracer=function(e,n,r){var i;return(i=this.getDelegateTracer(e,n,r))!==null&&i!==void 0?i:new bh(this,e,n,r)},t.prototype.getDelegate=function(){var e;return(e=this._delegate)!==null&&e!==void 0?e:Oh},t.prototype.setDelegate=function(e){this._delegate=e},t.prototype.getDelegateTracer=function(e,n,r){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getTracer(e,n,r)},t}(),On;(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(On||(On={}));var jt;(function(t){t[t.INTERNAL=0]="INTERNAL",t[t.SERVER=1]="SERVER",t[t.CLIENT=2]="CLIENT",t[t.PRODUCER=3]="PRODUCER",t[t.CONSUMER=4]="CONSUMER"})(jt||(jt={}));var wn;(function(t){t[t.UNSET=0]="UNSET",t[t.OK=1]="OK",t[t.ERROR=2]="ERROR"})(wn||(wn={}));var N=Sn.getInstance(),T=pe.instance(),wh=function(){function t(){}return t.prototype.getMeter=function(e,n,r){return Ta},t}(),Ah=new wh,zr="metrics",Lh=function(){function t(){}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalMeterProvider=function(e){return Pt(zr,e,pe.instance())},t.prototype.getMeterProvider=function(){return Ue(zr)||Ah},t.prototype.getMeter=function(e,n,r){return this.getMeterProvider().getMeter(e,n,r)},t.prototype.disable=function(){It(zr,pe.instance())},t}(),ct=Lh.getInstance(),Rh=function(){function t(){}return t.prototype.inject=function(e,n){},t.prototype.extract=function(e,n){return e},t.prototype.fields=function(){return[]},t}(),qr=Mt("OpenTelemetry Baggage Key");function Ca(t){return t.getValue(qr)||void 0}function Ch(){return Ca(Sn.getInstance().active())}function Nh(t,e){return t.setValue(qr,e)}function xh(t){return t.deleteValue(qr)}var Xr="propagation",Ph=new Rh,Ih=function(){function t(){this.createBaggage=Ff,this.getBaggage=Ca,this.getActiveBaggage=Ch,this.setBaggage=Nh,this.deleteBaggage=xh}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalPropagator=function(e){return Pt(Xr,e,pe.instance())},t.prototype.inject=function(e,n,r){return r===void 0&&(r=ah),this._getGlobalPropagator().inject(e,n,r)},t.prototype.extract=function(e,n,r){return r===void 0&&(r=oh),this._getGlobalPropagator().extract(e,n,r)},t.prototype.fields=function(){return this._getGlobalPropagator().fields()},t.prototype.disable=function(){It(Xr,pe.instance())},t.prototype._getGlobalPropagator=function(){return Ue(Xr)||Ph},t}(),Z=Ih.getInstance(),Kr="trace",kh=function(){function t(){this._proxyTracerProvider=new Ra,this.wrapSpanContext=gh,this.isSpanContextValid=Ut,this.deleteSpan=dh,this.getSpan=Vr,this.getActiveSpan=hh,this.getSpanContext=wa,this.setSpan=Hr,this.setSpanContext=vh}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalTracerProvider=function(e){var n=Pt(Kr,this._proxyTracerProvider,pe.instance());return n&&this._proxyTracerProvider.setDelegate(e),n},t.prototype.getTracerProvider=function(){return Ue(Kr)||this._proxyTracerProvider},t.prototype.getTracer=function(e,n){return this.getTracerProvider().getTracer(e,n)},t.prototype.disable=function(){It(Kr,pe.instance()),this._proxyTracerProvider=new Ra},t}(),k=kh.getInstance(),Mh=Mt("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Na(t){return t.getValue(Mh)===!0}var Dh="=",Wr=";",Yr=",",Jr="baggage",Uh=180,jh=4096,$h=8192,Bh=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >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 Fh(t){return t.reduce(function(e,n){var r=""+e+(e!==""?Yr:"")+n;return r.length>$h?e:r},"")}function Vh(t){return t.getAllEntries().map(function(e){var n=Bh(e,2),r=n[0],i=n[1],o=encodeURIComponent(r)+"="+encodeURIComponent(i.value);return i.metadata!==void 0&&(o+=Wr+i.metadata.toString()),o})}function Hh(t){var e=t.split(Wr);if(!(e.length<=0)){var n=e.shift();if(n){var r=n.indexOf(Dh);if(!(r<=0)){var i=decodeURIComponent(n.substring(0,r).trim()),o=decodeURIComponent(n.substring(r+1).trim()),a;return e.length>0&&(a=Ea(e.join(Wr))),{key:i,value:o,metadata:a}}}}}var Gh=function(){function t(){}return t.prototype.inject=function(e,n,r){var i=Z.getBaggage(e);if(!(!i||Na(e))){var o=Vh(i).filter(function(u){return u.length<=jh}).slice(0,Uh),a=Fh(o);a.length>0&&r.set(n,Jr,a)}},t.prototype.extract=function(e,n,r){var i=r.get(n,Jr),o=Array.isArray(i)?i.join(Yr):i;if(!o)return e;var a={};if(o.length===0)return e;var u=o.split(Yr);return u.forEach(function(c){var s=Hh(c);if(s){var l={value:s.value};s.metadata&&(l.metadata=s.metadata),a[s.key]=l}}),Object.entries(a).length===0?e:Z.setBaggage(e,Z.createBaggage(a))},t.prototype.fields=function(){return[Jr]},t}(),Qr;(function(t){t.AlwaysOff="always_off",t.AlwaysOn="always_on",t.ParentBasedAlwaysOff="parentbased_always_off",t.ParentBasedAlwaysOn="parentbased_always_on",t.ParentBasedTraceIdRatio="parentbased_traceidratio",t.TraceIdRatio="traceidratio"})(Qr||(Qr={}));var zh=",",qh=["OTEL_SDK_DISABLED"];function Xh(t){return qh.indexOf(t)>-1}var Kh=["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 Wh(t){return Kh.indexOf(t)>-1}var Yh=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];function Jh(t){return Yh.indexOf(t)>-1}var Zr=1/0,ei=128,Qh=128,Zh=128,xa={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:Zr,OTEL_ATTRIBUTE_COUNT_LIMIT:ei,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:Zr,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:ei,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:Zr,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:ei,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:Qh,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:Zh,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:Qr.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 ed(t,e,n){if(typeof n[t]<"u"){var r=String(n[t]);e[t]=r.toLowerCase()==="true"}}function td(t,e,n,r,i){if(r===void 0&&(r=-1/0),i===void 0&&(i=1/0),typeof n[t]<"u"){var o=Number(n[t]);isNaN(o)||(o<r?e[t]=r:o>i?e[t]=i:e[t]=o)}}function nd(t,e,n,r){r===void 0&&(r=zh);var i=n[t];typeof i=="string"&&(e[t]=i.split(r).map(function(o){return o.trim()}))}var rd={ALL:D.ALL,VERBOSE:D.VERBOSE,DEBUG:D.DEBUG,INFO:D.INFO,WARN:D.WARN,ERROR:D.ERROR,NONE:D.NONE};function id(t,e,n){var r=n[t];if(typeof r=="string"){var i=rd[r.toUpperCase()];i!=null&&(e[t]=i)}}function od(t){var e={};for(var n in xa){var r=n;switch(r){case"OTEL_LOG_LEVEL":id(r,e,t);break;default:if(Xh(r))ed(r,e,t);else if(Wh(r))td(r,e,t);else if(Jh(r))nd(r,e,t);else{var i=t[r];typeof i<"u"&&i!==null&&(e[r]=String(i))}}}return e}var ad=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{};function sd(){var t=od(ad);return Object.assign({},xa,t)}var ti=performance,ud=9,cd=6,ld=Math.pow(10,cd),Pa=Math.pow(10,ud);function Ia(t){var e=t/1e3,n=Math.trunc(e),r=Math.round(t%1e3*ld);return[n,r]}function pd(){var t=ti.timeOrigin;if(typeof t!="number"){var e=ti;t=e.timing&&e.timing.fetchStart}return t}function fd(t){var e=Ia(pd()),n=Ia(ti.now());return hd(e,n)}function hd(t,e){var n=[t[0]+e[0],t[1]+e[1]];return n[1]>=Pa&&(n[1]-=Pa,n[0]+=1),n}var B;(function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})(B||(B={}));var dd=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},vd=function(){function t(e){e===void 0&&(e={});var n;this._propagators=(n=e.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 t.prototype.inject=function(e,n,r){var i,o;try{for(var a=dd(this._propagators),u=a.next();!u.done;u=a.next()){var c=u.value;try{c.inject(e,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}}},t.prototype.extract=function(e,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},e)},t.prototype.fields=function(){return this._fields.slice()},t}(),ni="[_0-9a-z-*/]",yd="[a-z]"+ni+"{0,255}",md="[a-z0-9]"+ni+"{0,240}@[a-z]"+ni+"{0,13}",_d=new RegExp("^(?:"+yd+"|"+md+")$"),gd=/^[ -~]{0,255}[!-~]$/,Ed=/,|=/;function Td(t){return _d.test(t)}function bd(t){return gd.test(t)&&!Ed.test(t)}var ka=32,Sd=512,Ma=",",Da="=",Od=function(){function t(e){this._internalState=new Map,e&&this._parse(e)}return t.prototype.set=function(e,n){var r=this._clone();return r._internalState.has(e)&&r._internalState.delete(e),r._internalState.set(e,n),r},t.prototype.unset=function(e){var n=this._clone();return n._internalState.delete(e),n},t.prototype.get=function(e){return this._internalState.get(e)},t.prototype.serialize=function(){var e=this;return this._keys().reduce(function(n,r){return n.push(r+Da+e.get(r)),n},[]).join(Ma)},t.prototype._parse=function(e){e.length>Sd||(this._internalState=e.split(Ma).reverse().reduce(function(n,r){var i=r.trim(),o=i.indexOf(Da);if(o!==-1){var a=i.slice(0,o),u=i.slice(o+1,r.length);Td(a)&&bd(u)&&n.set(a,u)}return n},new Map),this._internalState.size>ka&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,ka))))},t.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},t.prototype._clone=function(){var e=new t;return e._internalState=new Map(this._internalState),e},t}(),ri="traceparent",ii="tracestate",wd="00",Ad="(?!ff)[\\da-f]{2}",Ld="(?![0]{32})[\\da-f]{32}",Rd="(?![0]{16})[\\da-f]{16}",Cd="[\\da-f]{2}",Nd=new RegExp("^\\s?("+Ad+")-("+Ld+")-("+Rd+")-("+Cd+")(-.*)?\\s?$");function xd(t){var e=Nd.exec(t);return!e||e[1]==="00"&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}}var Pd=function(){function t(){}return t.prototype.inject=function(e,n,r){var i=k.getSpanContext(e);if(!(!i||Na(e)||!Ut(i))){var o=wd+"-"+i.traceId+"-"+i.spanId+"-0"+Number(i.traceFlags||fe.NONE).toString(16);r.set(n,ri,o),i.traceState&&r.set(n,ii,i.traceState.serialize())}},t.prototype.extract=function(e,n,r){var i=r.get(n,ri);if(!i)return e;var o=Array.isArray(i)?i[0]:i;if(typeof o!="string")return e;var a=xd(o);if(!a)return e;a.isRemote=!0;var u=r.get(n,ii);if(u){var c=Array.isArray(u)?u.join(","):u;a.traceState=new Od(typeof c=="string"?c:void 0)}return k.setSpanContext(e,a)},t.prototype.fields=function(){return[ri,ii]},t}(),Id="[object Object]",kd="[object Null]",Md="[object Undefined]",Dd=Function.prototype,Ua=Dd.toString,Ud=Ua.call(Object),jd=$d(Object.getPrototypeOf,Object),ja=Object.prototype,$a=ja.hasOwnProperty,Be=Symbol?Symbol.toStringTag:void 0,Ba=ja.toString;function $d(t,e){return function(n){return t(e(n))}}function Fa(t){if(!Bd(t)||Fd(t)!==Id)return!1;var e=jd(t);if(e===null)return!0;var n=$a.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&Ua.call(n)===Ud}function Bd(t){return t!=null&&typeof t=="object"}function Fd(t){return t==null?t===void 0?Md:kd:Be&&Be in Object(t)?Vd(t):Hd(t)}function Vd(t){var e=$a.call(t,Be),n=t[Be],r=!1;try{t[Be]=void 0,r=!0}catch{}var i=Ba.call(t);return r&&(e?t[Be]=n:delete t[Be]),i}function Hd(t){return Ba.call(t)}var Gd=20;function zd(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=t.shift(),r=new WeakMap;t.length>0;)n=Va(n,t.shift(),0,r);return n}function oi(t){return An(t)?t.slice():t}function Va(t,e,n,r){n===void 0&&(n=0);var i;if(!(n>Gd)){if(n++,Ln(t)||Ln(e)||Ga(e))i=oi(e);else if(An(t)){if(i=t.slice(),An(e))for(var o=0,a=e.length;o<a;o++)i.push(oi(e[o]));else if($t(e))for(var u=Object.keys(e),o=0,a=u.length;o<a;o++){var c=u[o];i[c]=oi(e[c])}}else if($t(t))if($t(e)){if(!qd(t,e))return e;i=Object.assign({},t);for(var u=Object.keys(e),o=0,a=u.length;o<a;o++){var c=u[o],s=e[c];if(Ln(s))typeof s>"u"?delete i[c]:i[c]=s;else{var l=i[c],p=s;if(Ha(t,c,r)||Ha(e,c,r))delete i[c];else{if($t(l)&&$t(p)){var f=r.get(l)||[],m=r.get(p)||[];f.push({obj:t,key:c}),m.push({obj:e,key:c}),r.set(l,f),r.set(p,m)}i[c]=Va(i[c],s,n,r)}}}}else i=e;return i}}function Ha(t,e,n){for(var r=n.get(t[e])||[],i=0,o=r.length;i<o;i++){var a=r[i];if(a.key===e&&a.obj===t)return!0}return!1}function An(t){return Array.isArray(t)}function Ga(t){return typeof t=="function"}function $t(t){return!Ln(t)&&!An(t)&&!Ga(t)&&typeof t=="object"}function Ln(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t>"u"||t instanceof Date||t instanceof RegExp||t===null}function qd(t,e){return!(!Fa(t)||!Fa(e))}var za=function(){function t(){}return t.prototype.emit=function(e){},t}(),Xd=new za,Kd=function(){function t(){}return t.prototype.getLogger=function(e,n,r){return new za},t}(),qa=new Kd,Wd=function(){function t(e,n,r,i){this._provider=e,this.name=n,this.version=r,this.options=i}return t.prototype.emit=function(e){this._getLogger().emit(e)},t.prototype._getLogger=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateLogger(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):Xd},t}(),Xa=function(){function t(){}return t.prototype.getLogger=function(e,n,r){var i;return(i=this.getDelegateLogger(e,n,r))!==null&&i!==void 0?i:new Wd(this,e,n,r)},t.prototype.getDelegate=function(){var e;return(e=this._delegate)!==null&&e!==void 0?e:qa},t.prototype.setDelegate=function(e){this._delegate=e},t.prototype.getDelegateLogger=function(e,n,r){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getLogger(e,n,r)},t}(),Yd=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},Rn=Symbol.for("io.opentelemetry.js.api.logs"),Bt=Yd;function Jd(t,e,n){return function(r){return r===t?e:n}}var Ka=1,Qd=function(){function t(){this._proxyLoggerProvider=new Xa}return t.getInstance=function(){return this._instance||(this._instance=new t),this._instance},t.prototype.setGlobalLoggerProvider=function(e){return Bt[Rn]?this.getLoggerProvider():(Bt[Rn]=Jd(Ka,e,qa),this._proxyLoggerProvider.setDelegate(e),e)},t.prototype.getLoggerProvider=function(){var e,n;return(n=(e=Bt[Rn])===null||e===void 0?void 0:e.call(Bt,Ka))!==null&&n!==void 0?n:this._proxyLoggerProvider},t.prototype.getLogger=function(e,n,r){return this.getLoggerProvider().getLogger(e,n,r)},t.prototype.disable=function(){delete Bt[Rn],this._proxyLoggerProvider=new Xa},t}(),Ft=Qd.getInstance();function Zd(t,e,n,r){for(var i=0,o=t.length;i<o;i++){var a=t[i];e&&a.setTracerProvider(e),n&&a.setMeterProvider(n),r&&a.setLoggerProvider&&a.setLoggerProvider(r),a.getConfig().enabled||a.enable()}}function ev(t){t.forEach(function(e){return e.disable()})}function tv(t){var e,n,r=t.tracerProvider||k.getTracerProvider(),i=t.meterProvider||ct.getMeterProvider(),o=t.loggerProvider||Ft.getLoggerProvider(),a=(n=(e=t.instrumentations)===null||e===void 0?void 0:e.flat())!==null&&n!==void 0?n:[];return Zd(a,r,i,o),function(){ev(a)}}function ai(t){return typeof t=="function"}var ee=console.error.bind(console);function Vt(t,e,n){var r=!!t[e]&&t.propertyIsEnumerable(e);Object.defineProperty(t,e,{configurable:!0,enumerable:r,writable:!0,value:n})}function Ht(t){t&&t.logger&&(ai(t.logger)?ee=t.logger:ee("new logger isn't a function, not replacing"))}function Wa(t,e,n){if(!t||!t[e]){ee("no original function "+e+" to wrap");return}if(!n){ee("no wrapper function"),ee(new Error().stack);return}if(!ai(t[e])||!ai(n)){ee("original object and wrapper must be functions");return}var r=t[e],i=n(r,e);return Vt(i,"__original",r),Vt(i,"__unwrap",function(){t[e]===i&&Vt(t,e,r)}),Vt(i,"__wrapped",!0),Vt(t,e,i),i}function nv(t,e,n){if(t)Array.isArray(t)||(t=[t]);else{ee("must provide one or more modules to patch"),ee(new Error().stack);return}if(!(e&&Array.isArray(e))){ee("must provide one or more functions to wrap on modules");return}t.forEach(function(r){e.forEach(function(i){Wa(r,i,n)})})}function Ya(t,e){if(!t||!t[e]){ee("no function to unwrap."),ee(new Error().stack);return}if(!t[e].__unwrap)ee("no original to unwrap to -- has "+e+" already been unwrapped?");else return t[e].__unwrap()}function rv(t,e){if(t)Array.isArray(t)||(t=[t]);else{ee("must provide one or more modules to patch"),ee(new Error().stack);return}if(!(e&&Array.isArray(e))){ee("must provide one or more functions to unwrap on modules");return}t.forEach(function(n){e.forEach(function(r){Ya(n,r)})})}Ht.wrap=Wa,Ht.massWrap=nv,Ht.unwrap=Ya,Ht.massUnwrap=rv;var K=Ht,si=function(){return si=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},si.apply(this,arguments)},iv=function(){function t(e,n,r){this.instrumentationName=e,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:e}),this._tracer=k.getTracer(e,n),this._meter=ct.getMeter(e,n),this._logger=Ft.getLogger(e,n),this._updateMetricInstruments()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(t.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var e,n=(e=this.init())!==null&&e!==void 0?e:[];return Array.isArray(n)?n:[n]},t.prototype._updateMetricInstruments=function(){},t.prototype.getConfig=function(){return this._config},t.prototype.setConfig=function(e){this._config=si({enabled:!0},e)},t.prototype.setTracerProvider=function(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),t.prototype._runSpanCustomizationHook=function(e,n,r,i){if(e)try{e(r,i)}catch(o){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:n},o)}},t}(),ov=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ja=function(t){ov(e,t);function e(n,r,i){var o=t.call(this,n,r,i)||this;return o._config.enabled&&o.enable(),o}return e}(iv);function te(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var Cn=performance,av="traceparent",Qa=Mt("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function sv(t){return t.setValue(Qa,!0)}function ui(t){return t.getValue(Qa)===!0}var uv="=",ci=";",li=",",pi="baggage",cv=180,lv=4096,pv=8192,fv=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >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 hv(t){return t.reduce(function(e,n){var r=""+e+(e!==""?li:"")+n;return r.length>pv?e:r},"")}function dv(t){return t.getAllEntries().map(function(e){var n=fv(e,2),r=n[0],i=n[1],o=encodeURIComponent(r)+"="+encodeURIComponent(i.value);return i.metadata!==void 0&&(o+=ci+i.metadata.toString()),o})}function vv(t){var e=t.split(ci);if(!(e.length<=0)){var n=e.shift();if(n){var r=n.indexOf(uv);if(!(r<=0)){var i=decodeURIComponent(n.substring(0,r).trim()),o=decodeURIComponent(n.substring(r+1).trim()),a;return e.length>0&&(a=Ea(e.join(ci))),{key:i,value:o,metadata:a}}}}}var yv=function(){function t(){}return t.prototype.inject=function(e,n,r){var i=Z.getBaggage(e);if(!(!i||ui(e))){var o=dv(i).filter(function(u){return u.length<=lv}).slice(0,cv),a=hv(o);a.length>0&&r.set(n,pi,a)}},t.prototype.extract=function(e,n,r){var i=r.get(n,pi),o=Array.isArray(i)?i.join(li):i;if(!o)return e;var a={};if(o.length===0)return e;var u=o.split(li);return u.forEach(function(c){var s=vv(c);if(s){var l={value:s.value};s.metadata&&(l.metadata=s.metadata),a[s.key]=l}}),Object.entries(a).length===0?e:Z.setBaggage(e,Z.createBaggage(a))},t.prototype.fields=function(){return[pi]},t}(),Za=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},mv=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >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 Nn(t){var e,n,r={};if(typeof t!="object"||t==null)return r;try{for(var i=Za(Object.entries(t)),o=i.next();!o.done;o=i.next()){var a=mv(o.value,2),u=a[0],c=a[1];if(!_v(u)){T.warn("Invalid attribute key: "+u);continue}if(!es(c)){T.warn("Invalid attribute value set for key: "+u);continue}Array.isArray(c)?r[u]=c.slice():r[u]=c}}catch(s){e={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}function _v(t){return typeof t=="string"&&t.length>0}function es(t){return t==null?!0:Array.isArray(t)?gv(t):ts(t)}function gv(t){var e,n,r;try{for(var i=Za(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(a!=null){if(!r){if(ts(a)){r=typeof a;continue}return!1}if(typeof a!==r)return!1}}}catch(u){e={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return!0}function ts(t){switch(typeof t){case"number":case"boolean":case"string":return!0}return!1}function Ev(){return function(t){T.error(Tv(t))}}function Tv(t){return typeof t=="string"?t:JSON.stringify(bv(t))}function bv(t){for(var e={},n=t;n!==null;)Object.getOwnPropertyNames(n).forEach(function(r){if(!e[r]){var i=n[r];i&&(e[r]=String(i))}}),n=Object.getPrototypeOf(n);return e}var Sv=Ev();function lt(t){try{Sv(t)}catch{}}var he;(function(t){t.AlwaysOff="always_off",t.AlwaysOn="always_on",t.ParentBasedAlwaysOff="parentbased_always_off",t.ParentBasedAlwaysOn="parentbased_always_on",t.ParentBasedTraceIdRatio="parentbased_traceidratio",t.TraceIdRatio="traceidratio"})(he||(he={}));var Ov=",",wv=["OTEL_SDK_DISABLED"];function Av(t){return wv.indexOf(t)>-1}var Lv=["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 Rv(t){return Lv.indexOf(t)>-1}var Cv=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];function Nv(t){return Cv.indexOf(t)>-1}var xn=1/0,Pn=128,xv=128,Pv=128,ns={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:xn,OTEL_ATTRIBUTE_COUNT_LIMIT:Pn,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:xn,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:Pn,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:xn,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:Pn,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:xv,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:Pv,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 Iv(t,e,n){if(typeof n[t]<"u"){var r=String(n[t]);e[t]=r.toLowerCase()==="true"}}function kv(t,e,n,r,i){if(r===void 0&&(r=-1/0),i===void 0&&(i=1/0),typeof n[t]<"u"){var o=Number(n[t]);isNaN(o)||(o<r?e[t]=r:o>i?e[t]=i:e[t]=o)}}function Mv(t,e,n,r){r===void 0&&(r=Ov);var i=n[t];typeof i=="string"&&(e[t]=i.split(r).map(function(o){return o.trim()}))}var Dv={ALL:D.ALL,VERBOSE:D.VERBOSE,DEBUG:D.DEBUG,INFO:D.INFO,WARN:D.WARN,ERROR:D.ERROR,NONE:D.NONE};function Uv(t,e,n){var r=n[t];if(typeof r=="string"){var i=Dv[r.toUpperCase()];i!=null&&(e[t]=i)}}function rs(t){var e={};for(var n in ns){var r=n;switch(r){case"OTEL_LOG_LEVEL":Uv(r,e,t);break;default:if(Av(r))Iv(r,e,t);else if(Rv(r))kv(r,e,t);else if(Nv(r))Mv(r,e,t);else{var i=t[r];typeof i<"u"&&i!==null&&(e[r]=String(i))}}}return e}var is=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{};function Gt(){var t=rs(is);return Object.assign({},ns,t)}function jv(){return rs(is)}var pt=performance,$v="exception.type",Bv="exception.message",Fv="exception.stacktrace",Vv="http.response_content_length",Hv="http.response_content_length_uncompressed",fi=$v,hi=Bv,Gv=Fv,zv=Vv,qv=Hv,Xv=9,Kv=6,Wv=Math.pow(10,Kv),In=Math.pow(10,Xv);function Re(t){var e=t/1e3,n=Math.trunc(e),r=Math.round(t%1e3*Wv);return[n,r]}function di(){var t=pt.timeOrigin;if(typeof t!="number"){var e=pt;t=e.timing&&e.timing.fetchStart}return t}function os(t){var e=Re(di()),n=Re(typeof t=="number"?t:pt.now());return ss(e,n)}function zt(t){if(vi(t))return t;if(typeof t=="number")return t<di()?os(t):Re(t);if(t instanceof Date)return Re(t.getTime());throw TypeError("Invalid input type")}function Yv(t,e){var n=e[0]-t[0],r=e[1]-t[1];return r<0&&(n-=1,r+=In),[n,r]}function Ce(t){return t[0]*In+t[1]}function vi(t){return Array.isArray(t)&&t.length===2&&typeof t[0]=="number"&&typeof t[1]=="number"}function as(t){return vi(t)||typeof t=="number"||t instanceof Date}function ss(t,e){var n=[t[0]+e[0],t[1]+e[1]];return n[1]>=In&&(n[1]-=In,n[0]+=1),n}var yi;(function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})(yi||(yi={}));var Jv=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Qv=function(){function t(e){e===void 0&&(e={});var n;this._propagators=(n=e.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 t.prototype.inject=function(e,n,r){var i,o;try{for(var a=Jv(this._propagators),u=a.next();!u.done;u=a.next()){var c=u.value;try{c.inject(e,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}}},t.prototype.extract=function(e,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},e)},t.prototype.fields=function(){return this._fields.slice()},t}(),mi="[_0-9a-z-*/]",Zv="[a-z]"+mi+"{0,255}",ey="[a-z0-9]"+mi+"{0,240}@[a-z]"+mi+"{0,13}",ty=new RegExp("^(?:"+Zv+"|"+ey+")$"),ny=/^[ -~]{0,255}[!-~]$/,ry=/,|=/;function iy(t){return ty.test(t)}function oy(t){return ny.test(t)&&!ry.test(t)}var us=32,ay=512,cs=",",ls="=",sy=function(){function t(e){this._internalState=new Map,e&&this._parse(e)}return t.prototype.set=function(e,n){var r=this._clone();return r._internalState.has(e)&&r._internalState.delete(e),r._internalState.set(e,n),r},t.prototype.unset=function(e){var n=this._clone();return n._internalState.delete(e),n},t.prototype.get=function(e){return this._internalState.get(e)},t.prototype.serialize=function(){var e=this;return this._keys().reduce(function(n,r){return n.push(r+ls+e.get(r)),n},[]).join(cs)},t.prototype._parse=function(e){e.length>ay||(this._internalState=e.split(cs).reverse().reduce(function(n,r){var i=r.trim(),o=i.indexOf(ls);if(o!==-1){var a=i.slice(0,o),u=i.slice(o+1,r.length);iy(a)&&oy(u)&&n.set(a,u)}return n},new Map),this._internalState.size>us&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,us))))},t.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},t.prototype._clone=function(){var e=new t;return e._internalState=new Map(this._internalState),e},t}(),_i="traceparent",gi="tracestate",uy="00",cy="(?!ff)[\\da-f]{2}",ly="(?![0]{32})[\\da-f]{32}",py="(?![0]{16})[\\da-f]{16}",fy="[\\da-f]{2}",hy=new RegExp("^\\s?("+cy+")-("+ly+")-("+py+")-("+fy+")(-.*)?\\s?$");function dy(t){var e=hy.exec(t);return!e||e[1]==="00"&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}}var vy=function(){function t(){}return t.prototype.inject=function(e,n,r){var i=k.getSpanContext(e);if(!(!i||ui(e)||!Ut(i))){var o=uy+"-"+i.traceId+"-"+i.spanId+"-0"+Number(i.traceFlags||fe.NONE).toString(16);r.set(n,_i,o),i.traceState&&r.set(n,gi,i.traceState.serialize())}},t.prototype.extract=function(e,n,r){var i=r.get(n,_i);if(!i)return e;var o=Array.isArray(i)?i[0]:i;if(typeof o!="string")return e;var a=dy(o);if(!a)return e;a.isRemote=!0;var u=r.get(n,gi);if(u){var c=Array.isArray(u)?u.join(","):u;a.traceState=new sy(typeof c=="string"?c:void 0)}return k.setSpanContext(e,a)},t.prototype.fields=function(){return[_i,gi]},t}(),yy="[object Object]",my="[object Null]",_y="[object Undefined]",gy=Function.prototype,ps=gy.toString,Ey=ps.call(Object),Ty=by(Object.getPrototypeOf,Object),fs=Object.prototype,hs=fs.hasOwnProperty,Fe=Symbol?Symbol.toStringTag:void 0,ds=fs.toString;function by(t,e){return function(n){return t(e(n))}}function vs(t){if(!Sy(t)||Oy(t)!==yy)return!1;var e=Ty(t);if(e===null)return!0;var n=hs.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&ps.call(n)===Ey}function Sy(t){return t!=null&&typeof t=="object"}function Oy(t){return t==null?t===void 0?_y:my:Fe&&Fe in Object(t)?wy(t):Ay(t)}function wy(t){var e=hs.call(t,Fe),n=t[Fe],r=!1;try{t[Fe]=void 0,r=!0}catch{}var i=ds.call(t);return r&&(e?t[Fe]=n:delete t[Fe]),i}function Ay(t){return ds.call(t)}var Ly=20;function Ry(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=t.shift(),r=new WeakMap;t.length>0;)n=ys(n,t.shift(),0,r);return n}function Ei(t){return kn(t)?t.slice():t}function ys(t,e,n,r){n===void 0&&(n=0);var i;if(!(n>Ly)){if(n++,Mn(t)||Mn(e)||_s(e))i=Ei(e);else if(kn(t)){if(i=t.slice(),kn(e))for(var o=0,a=e.length;o<a;o++)i.push(Ei(e[o]));else if(qt(e))for(var u=Object.keys(e),o=0,a=u.length;o<a;o++){var c=u[o];i[c]=Ei(e[c])}}else if(qt(t))if(qt(e)){if(!Cy(t,e))return e;i=Object.assign({},t);for(var u=Object.keys(e),o=0,a=u.length;o<a;o++){var c=u[o],s=e[c];if(Mn(s))typeof s>"u"?delete i[c]:i[c]=s;else{var l=i[c],p=s;if(ms(t,c,r)||ms(e,c,r))delete i[c];else{if(qt(l)&&qt(p)){var f=r.get(l)||[],m=r.get(p)||[];f.push({obj:t,key:c}),m.push({obj:e,key:c}),r.set(l,f),r.set(p,m)}i[c]=ys(i[c],s,n,r)}}}}else i=e;return i}}function ms(t,e,n){for(var r=n.get(t[e])||[],i=0,o=r.length;i<o;i++){var a=r[i];if(a.key===e&&a.obj===t)return!0}return!1}function kn(t){return Array.isArray(t)}function _s(t){return typeof t=="function"}function qt(t){return!Mn(t)&&!kn(t)&&!_s(t)&&typeof t=="object"}function Mn(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t>"u"||t instanceof Date||t instanceof RegExp||t===null}function Cy(t,e){return!(!vs(t)||!vs(e))}function Ny(t,e){return typeof e=="string"?t===e:!!t.match(e)}var xy=function(){function t(){var e=this;this._promise=new Promise(function(n,r){e._resolve=n,e._reject=r})}return Object.defineProperty(t.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),t.prototype.resolve=function(e){this._resolve(e)},t.prototype.reject=function(e){this._reject(e)},t}(),Py=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),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},Iy=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},ky=function(){function t(e,n){this._callback=e,this._that=n,this._isCalled=!1,this._deferred=new xy}return Object.defineProperty(t.prototype,"isCalled",{get:function(){return this._isCalled},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"promise",{get:function(){return this._deferred.promise},enumerable:!1,configurable:!0}),t.prototype.call=function(){for(var e,n=this,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(!this._isCalled){this._isCalled=!0;try{Promise.resolve((e=this._callback).call.apply(e,Iy([this._that],Py(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},t}(),My="exception",Ti=function(){return Ti=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Ti.apply(this,arguments)},Dy=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},gs=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >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},Uy=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},jy=function(){function t(e,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:wn.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+di()),this._startTimeProvided=c!=null,this.startTime=this._getTime(c??p),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this._spanLimits=e.getSpanLimits(),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,l!=null&&this.setAttributes(l),this._spanProcessor=e.getActiveSpanProcessor(),this._spanProcessor.onStart(this,n)}return t.prototype.spanContext=function(){return this._spanContext},t.prototype.setAttribute=function(e,n){return n==null||this._isSpanEnded()?this:e.length===0?(T.warn("Invalid attribute key: "+e),this):es(n)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(n),this):(T.warn("Invalid attribute value set for key: "+e),this)},t.prototype.setAttributes=function(e){var n,r;try{for(var i=Dy(Object.entries(e)),o=i.next();!o.done;o=i.next()){var a=gs(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},t.prototype.addEvent=function(e,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++),as(n)&&(as(r)||(r=n),n=void 0);var i=Nn(n);return this.events.push({name:e,attributes:i,time:this._getTime(r),droppedAttributesCount:0}),this},t.prototype.addLink=function(e){return this.links.push(e),this},t.prototype.addLinks=function(e){var n;return(n=this.links).push.apply(n,Uy([],gs(e),!1)),this},t.prototype.setStatus=function(e){return this._isSpanEnded()?this:(this.status=Ti({},e),this.status.message!=null&&typeof e.message!="string"&&(T.warn("Dropping invalid status.message of type '"+typeof e.message+"', expected 'string'"),delete this.status.message),this)},t.prototype.updateName=function(e){return this._isSpanEnded()?this:(this.name=e,this)},t.prototype.end=function(e){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(e),this._duration=Yv(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)},t.prototype._getTime=function(e){if(typeof e=="number"&&e<=pt.now())return os(e+this._performanceOffset);if(typeof e=="number")return Re(e);if(e instanceof Date)return Re(e.getTime());if(vi(e))return e;if(this._startTimeProvided)return Re(Date.now());var n=pt.now()-this._performanceStartTime;return ss(this.startTime,Re(n))},t.prototype.isRecording=function(){return this._ended===!1},t.prototype.recordException=function(e,n){var r={};typeof e=="string"?r[hi]=e:e&&(e.code?r[fi]=e.code.toString():e.name&&(r[fi]=e.name),e.message&&(r[hi]=e.message),e.stack&&(r[Gv]=e.stack)),r[fi]||r[hi]?this.addEvent(My,r,n):T.warn("Failed to record an exception "+e)},Object.defineProperty(t.prototype,"duration",{get:function(){return this._duration},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ended",{get:function(){return this._ended},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedAttributesCount",{get:function(){return this._droppedAttributesCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedEventsCount",{get:function(){return this._droppedEventsCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedLinksCount",{get:function(){return this._droppedLinksCount},enumerable:!1,configurable:!0}),t.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},t.prototype._truncateToLimitUtil=function(e,n){return e.length<=n?e:e.substring(0,n)},t.prototype._truncateToSize=function(e){var n=this,r=this._attributeValueLengthLimit;return r<=0?(T.warn("Attribute value limit must be positive, got "+r),e):typeof e=="string"?this._truncateToLimitUtil(e,r):Array.isArray(e)?e.map(function(i){return typeof i=="string"?n._truncateToLimitUtil(i,r):i}):e},t}(),ft;(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(ft||(ft={}));var Dn=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:ft.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t}(),ht=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:ft.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t}(),bi=function(){function t(e){var n,r,i,o;this._root=e.root,this._root||(lt(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new ht),this._remoteParentSampled=(n=e.remoteParentSampled)!==null&&n!==void 0?n:new ht,this._remoteParentNotSampled=(r=e.remoteParentNotSampled)!==null&&r!==void 0?r:new Dn,this._localParentSampled=(i=e.localParentSampled)!==null&&i!==void 0?i:new ht,this._localParentNotSampled=(o=e.localParentNotSampled)!==null&&o!==void 0?o:new Dn}return t.prototype.shouldSample=function(e,n,r,i,o,a){var u=k.getSpanContext(e);return!u||!Ut(u)?this._root.shouldSample(e,n,r,i,o,a):u.isRemote?u.traceFlags&fe.SAMPLED?this._remoteParentSampled.shouldSample(e,n,r,i,o,a):this._remoteParentNotSampled.shouldSample(e,n,r,i,o,a):u.traceFlags&fe.SAMPLED?this._localParentSampled.shouldSample(e,n,r,i,o,a):this._localParentNotSampled.shouldSample(e,n,r,i,o,a)},t.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()+"}"},t}(),Es=function(){function t(e){e===void 0&&(e=0),this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}return t.prototype.shouldSample=function(e,n){return{decision:Aa(n)&&this._accumulate(n)<this._upperBound?ft.RECORD_AND_SAMPLED:ft.NOT_RECORD}},t.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},t.prototype._normalize=function(e){return typeof e!="number"||isNaN(e)?0:e>=1?1:e<=0?0:e},t.prototype._accumulate=function(e){for(var n=0,r=0;r<e.length/8;r++){var i=r*8,o=parseInt(e.slice(i,i+8),16);n=(n^o)>>>0}return n},t}(),$y=he.AlwaysOn,dt=1;function Ts(){var t=Gt();return{sampler:bs(t),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:t.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:t.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:t.OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:t.OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT},mergeResourceWithDefaults:!0}}function bs(t){switch(t===void 0&&(t=Gt()),t.OTEL_TRACES_SAMPLER){case he.AlwaysOn:return new ht;case he.AlwaysOff:return new Dn;case he.ParentBasedAlwaysOn:return new bi({root:new ht});case he.ParentBasedAlwaysOff:return new bi({root:new Dn});case he.TraceIdRatio:return new Es(Ss(t));case he.ParentBasedTraceIdRatio:return new bi({root:new Es(Ss(t))});default:return T.error('OTEL_TRACES_SAMPLER value "'+t.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+$y+'".'),new ht}}function Ss(t){if(t.OTEL_TRACES_SAMPLER_ARG===void 0||t.OTEL_TRACES_SAMPLER_ARG==="")return T.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+dt+"."),dt;var e=Number(t.OTEL_TRACES_SAMPLER_ARG);return isNaN(e)?(T.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+dt+"."),dt):e<0||e>1?(T.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+dt+"."),dt):e}function By(t){var e={sampler:bs()},n=Ts(),r=Object.assign({},n,e,t);return r.generalLimits=Object.assign({},n.generalLimits,t.generalLimits||{}),r.spanLimits=Object.assign({},n.spanLimits,t.spanLimits||{}),r}function Fy(t){var e,n,r,i,o,a,u,c,s,l,p,f,m=Object.assign({},t.spanLimits),v=jv();return m.attributeCountLimit=(a=(o=(i=(n=(e=t.spanLimits)===null||e===void 0?void 0:e.attributeCountLimit)!==null&&n!==void 0?n:(r=t.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:Pn,m.attributeValueLengthLimit=(f=(p=(l=(c=(u=t.spanLimits)===null||u===void 0?void 0:u.attributeValueLengthLimit)!==null&&c!==void 0?c:(s=t.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:xn,Object.assign({},t,{spanLimits:m})}var Vy=function(){function t(e,n){this._exporter=e,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 ky(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 t.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},t.prototype.onStart=function(e,n){},t.prototype.onEnd=function(e){this._shutdownOnce.isCalled||(e.spanContext().traceFlags&fe.SAMPLED)!==0&&this._addToBuffer(e)},t.prototype.shutdown=function(){return this._shutdownOnce.call()},t.prototype._shutdown=function(){var e=this;return Promise.resolve().then(function(){return e.onShutdown()}).then(function(){return e._flushAll()}).then(function(){return e._exporter.shutdown()})},t.prototype._addToBuffer=function(e){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(e),this._maybeStartTimer()},t.prototype._flushAll=function(){var e=this;return new Promise(function(n,r){for(var i=[],o=Math.ceil(e._finishedSpans.length/e._maxExportBatchSize),a=0,u=o;a<u;a++)i.push(e._flushOneBatch());Promise.all(i).then(function(){n()}).catch(r)})},t.prototype._flushOneBatch=function(){var e=this;return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise(function(n,r){var i=setTimeout(function(){r(new Error("Timeout"))},e._exportTimeoutMillis);N.with(sv(N.active()),function(){var o;e._finishedSpans.length<=e._maxExportBatchSize?(o=e._finishedSpans,e._finishedSpans=[]):o=e._finishedSpans.splice(0,e._maxExportBatchSize);for(var a=function(){return e._exporter.export(o,function(p){var f;clearTimeout(i),p.code===yi.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)})})})},t.prototype._maybeStartTimer=function(){var e=this;if(!this._isExporting){var n=function(){e._isExporting=!0,e._flushOneBatch().finally(function(){e._isExporting=!1,e._finishedSpans.length>0&&(e._clearTimer(),e._maybeStartTimer())}).catch(function(r){e._isExporting=!1,lt(r)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return n();this._timer===void 0&&(this._timer=setTimeout(function(){return n()},this._scheduledDelayMillis))}},t.prototype._clearTimer=function(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)},t}(),Hy=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Os=function(t){Hy(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.onInit(r),i}return e.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))},e.prototype.onShutdown=function(){typeof document<"u"&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))},e}(Vy),Gy=8,zy=16,qy=function(){function t(){this.generateTraceId=ws(zy),this.generateSpanId=ws(Gy)}return t}(),Un=Array(32);function ws(t){return function(){for(var e=0;e<t*2;e++)Un[e]=Math.floor(Math.random()*16)+48,Un[e]>=58&&(Un[e]+=39);return String.fromCharCode.apply(null,Un.slice(0,t*2))}}var Xy=function(){function t(e,n,r){this._tracerProvider=r;var i=By(n);this._sampler=i.sampler,this._generalLimits=i.generalLimits,this._spanLimits=i.spanLimits,this._idGenerator=n.idGenerator||new qy,this.resource=r.resource,this.instrumentationLibrary=e}return t.prototype.startSpan=function(e,n,r){var i,o,a;n===void 0&&(n={}),r===void 0&&(r=N.active()),n.root&&(r=k.deleteSpan(r));var u=k.getSpan(r);if(ui(r)){T.debug("Instrumentation suppressed, returning Noop Span");var c=k.wrapSpanContext(Oa);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:Nn(ne.attributes)}}),_=Nn(n.attributes),E=this._sampler.shouldSample(r,p,e,v,_,y);f=(a=E.traceState)!==null&&a!==void 0?a:f;var S=E.decision===On.RECORD_AND_SAMPLED?fe.SAMPLED:fe.NONE,P={traceId:p,spanId:l,traceFlags:S,traceState:f};if(E.decision===On.NOT_RECORD){T.debug("Recording is off, propagating context in a non-recording span");var c=k.wrapSpanContext(P);return c}var j=Nn(Object.assign(_,E.attributes)),$=new jy(this,r,e,P,v,m,y,n.startTime,void 0,j);return $},t.prototype.startActiveSpan=function(e,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??N.active(),s=this.startSpan(e,o,c),l=k.setSpan(c,s);return N.with(l,u,void 0,s)}},t.prototype.getGeneralLimits=function(){return this._generalLimits},t.prototype.getSpanLimits=function(){return this._spanLimits},t.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},t}(),Ky="process.runtime.name",Wy="service.name",Yy="telemetry.sdk.name",Jy="telemetry.sdk.language",Qy="telemetry.sdk.version",Zy=Ky,em=Wy,Si=Yy,Oi=Jy,wi=Qy,tm="webjs",nm=tm,rm="1.30.1",vt,Ai=(vt={},vt[Si]="opentelemetry",vt[Zy]="browser",vt[Oi]=nm,vt[wi]=rm,vt);function im(){return"unknown_service"}var Ne=function(){return Ne=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Ne.apply(this,arguments)},om=function(t,e,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(t,[])).next())})},am=function(t,e){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=e.call(t,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}}},sm=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >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 t(e,n){var r=this,i;this._attributes=e,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 t.empty=function(){return t.EMPTY},t.default=function(){var e;return new t((e={},e[em]=im(),e[Oi]=Ai[Oi],e[Si]=Ai[Si],e[wi]=Ai[wi],e))},Object.defineProperty(t.prototype,"attributes",{get:function(){var e;return this.asyncAttributesPending&&T.error("Accessing resource attributes before async attributes settled"),(e=this._attributes)!==null&&e!==void 0?e:{}},enumerable:!1,configurable:!0}),t.prototype.waitForAsyncAttributes=function(){return om(this,void 0,void 0,function(){return am(this,function(e){switch(e.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}})})},t.prototype.merge=function(e){var n=this,r;if(!e)return this;var i=Ne(Ne({},this._syncAttributes),(r=e._syncAttributes)!==null&&r!==void 0?r:e.attributes);if(!this._asyncAttributesPromise&&!e._asyncAttributesPromise)return new t(i);var o=Promise.all([this._asyncAttributesPromise,e._asyncAttributesPromise]).then(function(a){var u,c=sm(a,2),s=c[0],l=c[1];return Ne(Ne(Ne(Ne({},n._syncAttributes),s),(u=e._syncAttributes)!==null&&u!==void 0?u:e.attributes),l)});return new t(i,o)},t.EMPTY=new t({}),t}(),jn=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},As=function(){function t(e){this._spanProcessors=e}return t.prototype.forceFlush=function(){var e,n,r=[];try{for(var i=jn(this._spanProcessors),o=i.next();!o.done;o=i.next()){var a=o.value;r.push(a.forceFlush())}}catch(u){e={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return new Promise(function(u){Promise.all(r).then(function(){u()}).catch(function(c){lt(c||new Error("MultiSpanProcessor: forceFlush failed")),u()})})},t.prototype.onStart=function(e,n){var r,i;try{for(var o=jn(this._spanProcessors),a=o.next();!a.done;a=o.next()){var u=a.value;u.onStart(e,n)}}catch(c){r={error:c}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}},t.prototype.onEnd=function(e){var n,r;try{for(var i=jn(this._spanProcessors),o=i.next();!o.done;o=i.next()){var a=o.value;a.onEnd(e)}}catch(u){n={error:u}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},t.prototype.shutdown=function(){var e,n,r=[];try{for(var i=jn(this._spanProcessors),o=i.next();!o.done;o=i.next()){var a=o.value;r.push(a.shutdown())}}catch(u){e={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return new Promise(function(u,c){Promise.all(r).then(function(){u()},c)})},t}(),um=function(){function t(){}return t.prototype.onStart=function(e,n){},t.prototype.onEnd=function(e){},t.prototype.shutdown=function(){return Promise.resolve()},t.prototype.forceFlush=function(){return Promise.resolve()},t}(),cm=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),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},lm=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},Ve;(function(t){t[t.resolved=0]="resolved",t[t.timeout=1]="timeout",t[t.error=2]="error",t[t.unresolved=3]="unresolved"})(Ve||(Ve={}));var pm=function(){function t(e){e===void 0&&(e={});var n,r;this._registeredSpanProcessors=[],this._tracers=new Map;var i=Ry({},Ts(),Fy(e));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=e.spanProcessors)===null||r===void 0)&&r.length)this._registeredSpanProcessors=lm([],cm(e.spanProcessors),!1),this.activeSpanProcessor=new As(this._registeredSpanProcessors);else{var o=this._buildExporterFromEnv();if(o!==void 0){var a=new Os(o);this.activeSpanProcessor=a}else this.activeSpanProcessor=new um}}return t.prototype.getTracer=function(e,n,r){var i=e+"@"+(n||"")+":"+(r?.schemaUrl||"");return this._tracers.has(i)||this._tracers.set(i,new Xy({name:e,version:n,schemaUrl:r?.schemaUrl},this._config,this)),this._tracers.get(i)},t.prototype.addSpanProcessor=function(e){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(e),this.activeSpanProcessor=new As(this._registeredSpanProcessors)},t.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},t.prototype.register=function(e){e===void 0&&(e={}),k.setGlobalTracerProvider(this),e.propagator===void 0&&(e.propagator=this._buildPropagatorFromEnv()),e.contextManager&&N.setGlobalContextManager(e.contextManager),e.propagator&&Z.setGlobalPropagator(e.propagator)},t.prototype.forceFlush=function(){var e=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 "+e+" ms")),o=Ve.timeout},e);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])})})},t.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},t.prototype._getPropagator=function(e){var n;return(n=this.constructor._registeredPropagators.get(e))===null||n===void 0?void 0:n()},t.prototype._getSpanExporter=function(e){var n;return(n=this.constructor._registeredExporters.get(e))===null||n===void 0?void 0:n()},t.prototype._buildPropagatorFromEnv=function(){var e=this,n=Array.from(new Set(Gt().OTEL_PROPAGATORS)),r=n.map(function(o){var a=e._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 Qv({propagators:i})},t.prototype._buildExporterFromEnv=function(){var e=Gt().OTEL_TRACES_EXPORTER;if(!(e==="none"||e==="")){var n=this._getSpanExporter(e);return n||T.error('Exporter "'+e+'" requested through environment variable is unavailable.'),n}},t._registeredPropagators=new Map([["tracecontext",function(){return new vy}],["baggage",function(){return new yv}]]),t._registeredExporters=new Map,t}(),fm=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),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},hm=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},Ls=function(){function t(){this._enabled=!1,this._currentContext=je}return t.prototype._bindFunction=function(e,n){e===void 0&&(e=je);var r=this,i=function(){for(var o=this,a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];return r.with(e,function(){return n.apply(o,a)})};return Object.defineProperty(i,"length",{enumerable:!1,configurable:!0,writable:!1,value:n.length}),i},t.prototype.active=function(){return this._currentContext},t.prototype.bind=function(e,n){return e===void 0&&(e=this.active()),typeof n=="function"?this._bindFunction(e,n):n},t.prototype.disable=function(){return this._currentContext=je,this._enabled=!1,this},t.prototype.enable=function(){return this._enabled?this:(this._enabled=!0,this._currentContext=je,this)},t.prototype.with=function(e,n,r){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];var a=this._currentContext;this._currentContext=e||je;try{return n.call.apply(n,hm([r],fm(i),!1))}finally{this._currentContext=a}},t}(),dm=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),vm=function(t){dm(e,t);function e(n){n===void 0&&(n={});var r=t.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 e.prototype.register=function(n){n===void 0&&(n={}),n.contextManager===void 0&&(n.contextManager=new Ls),n.contextManager&&n.contextManager.enable(),t.prototype.register.call(this,n)},e}(pm),w;(function(t){t.CONNECT_END="connectEnd",t.CONNECT_START="connectStart",t.DECODED_BODY_SIZE="decodedBodySize",t.DOM_COMPLETE="domComplete",t.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",t.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",t.DOM_INTERACTIVE="domInteractive",t.DOMAIN_LOOKUP_END="domainLookupEnd",t.DOMAIN_LOOKUP_START="domainLookupStart",t.ENCODED_BODY_SIZE="encodedBodySize",t.FETCH_START="fetchStart",t.LOAD_EVENT_END="loadEventEnd",t.LOAD_EVENT_START="loadEventStart",t.NAVIGATION_START="navigationStart",t.REDIRECT_END="redirectEnd",t.REDIRECT_START="redirectStart",t.REQUEST_START="requestStart",t.RESPONSE_END="responseEnd",t.RESPONSE_START="responseStart",t.SECURE_CONNECTION_START="secureConnectionStart",t.UNLOAD_EVENT_END="unloadEventEnd",t.UNLOAD_EVENT_START="unloadEventStart"})(w||(w={}));var Li;function ym(){return Li||(Li=document.createElement("a")),Li}function xe(t,e){return e in t}function z(t,e,n,r){var i=void 0,o=void 0;xe(n,e)&&typeof n[e]=="number"&&(i=n[e]);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 t.addEvent(e,i),t}function yt(t,e,n){n===void 0&&(n=!1),n||(z(t,w.FETCH_START,e),z(t,w.DOMAIN_LOOKUP_START,e),z(t,w.DOMAIN_LOOKUP_END,e),z(t,w.CONNECT_START,e),xe(e,"name")&&e.name.startsWith("https:")&&z(t,w.SECURE_CONNECTION_START,e),z(t,w.CONNECT_END,e),z(t,w.REQUEST_START,e),z(t,w.RESPONSE_START,e),z(t,w.RESPONSE_END,e));var r=e[w.ENCODED_BODY_SIZE];r!==void 0&&t.setAttribute(zv,r);var i=e[w.DECODED_BODY_SIZE];i!==void 0&&r!==i&&t.setAttribute(qv,i)}function mm(t){return t.slice().sort(function(e,n){var r=e[w.FETCH_START],i=n[w.FETCH_START];return r>i?1:r<i?-1:0})}function Rs(){return typeof location<"u"?location.origin:void 0}function Cs(t,e,n,r,i,o){i===void 0&&(i=new WeakSet);var a=_e(t);t=a.toString();var u=gm(t,e,n,r,i,o);if(u.length===0)return{mainRequest:void 0};if(u.length===1)return{mainRequest:u[0]};var c=mm(u);if(a.origin!==Rs()&&c.length>1){var s=c[0],l=_m(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 _m(t,e,n){for(var r=Ce(n),i=Ce(zt(e)),o=t[1],a,u=t.length,c=1;c<u;c++){var s=t[c],l=Ce(zt(s[w.FETCH_START])),p=Ce(zt(s[w.RESPONSE_END])),f=r-p;l>=i&&(!a||f<a)&&(a=f,o=s)}return o}function gm(t,e,n,r,i,o){var a=Ce(e),u=Ce(n),c=r.filter(function(s){var l=Ce(zt(s[w.FETCH_START])),p=Ce(zt(s[w.RESPONSE_END]));return s.initiatorType.toLowerCase()===(o||"xmlhttprequest")&&s.name===t&&l>=a&&p<=u});return c.length>0&&(c=c.filter(function(s){return!i.has(s)})),c}function _e(t){if(typeof URL=="function")return new URL(t,typeof document<"u"?document.baseURI:typeof location<"u"?location.href:void 0);var e=ym();return e.href=t,e}function Ns(t,e){if(t.nodeType===Node.DOCUMENT_NODE)return"/";var n=Tm(t,e);if(e&&n.indexOf("@id")>0)return n;var r="";return t.parentNode&&(r+=Ns(t.parentNode,!1)),r+=n,r}function Em(t){if(!t.parentNode)return 0;var e=[t.nodeType];t.nodeType===Node.CDATA_SECTION_NODE&&e.push(Node.TEXT_NODE);var n=Array.from(t.parentNode.childNodes);return n=n.filter(function(r){var i=r.localName;return e.indexOf(r.nodeType)>=0&&i===t.localName}),n.length>=1?n.indexOf(t)+1:0}function Tm(t,e){var n=t.nodeType,r=Em(t),i="";if(n===Node.ELEMENT_NODE){var o=t.getAttribute("id");if(e&&o)return'//*[@id="'+o+'"]';i=t.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 xs(t,e){var n=e||[];(typeof n=="string"||n instanceof RegExp)&&(n=[n]);var r=_e(t);return r.origin===Rs()?!0:n.some(function(i){return Ny(t,i)})}var Ri=function(){return Ri=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Ri.apply(this,arguments)},bm=function(){function t(e,n,r){this.instrumentationName=e,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:e}),this._tracer=k.getTracer(e,n),this._meter=ct.getMeter(e,n),this._logger=Ft.getLogger(e,n),this._updateMetricInstruments()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(t.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var e,n=(e=this.init())!==null&&e!==void 0?e:[];return Array.isArray(n)?n:[n]},t.prototype._updateMetricInstruments=function(){},t.prototype.getConfig=function(){return this._config},t.prototype.setConfig=function(e){this._config=Ri({enabled:!0},e)},t.prototype.setTracerProvider=function(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),t.prototype._runSpanCustomizationHook=function(e,n,r,i){if(e)try{e(r,i)}catch(o){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:n},o)}},t}(),Sm=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Om=function(t){Sm(e,t);function e(n,r,i){var o=t.call(this,n,r,i)||this;return o._config.enabled&&o.enable(),o}return e}(bm);function Ps(t,e,n){var r,i;try{i=t()}catch(o){r=o}finally{return e(r,i),i}}var Kt;(function(t){t.DOCUMENT_LOAD="documentLoad",t.DOCUMENT_FETCH="documentFetch",t.RESOURCE_FETCH="resourceFetch"})(Kt||(Kt={}));var wm="0.44.0",Am="@opentelemetry/instrumentation-document-load";const Lm="http.url",Rm="http.user_agent",mt=Lm,Cm=Rm;var $n;(function(t){t.FIRST_PAINT="firstPaint",t.FIRST_CONTENTFUL_PAINT="firstContentfulPaint"})($n||($n={}));var Nm=function(){var t,e,n={},r=(e=(t=Cn).getEntriesByType)===null||e===void 0?void 0:e.call(t,"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=Cn,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},Is={"first-paint":$n.FIRST_PAINT,"first-contentful-paint":$n.FIRST_CONTENTFUL_PAINT},xm=function(t){var e,n,r=(n=(e=Cn).getEntriesByType)===null||n===void 0?void 0:n.call(e,"paint");r&&r.forEach(function(i){var o=i.name,a=i.startTime;xe(Is,o)&&t.addEvent(Is[o],a)})},Pm=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Im=function(t){Pm(e,t);function e(n){n===void 0&&(n={});var r=t.call(this,Am,wm,n)||this;return r.component="document-load",r.version="1",r.moduleName=r.component,r}return e.prototype.init=function(){},e.prototype._onDocumentLoaded=function(){var n=this;window.setTimeout(function(){n._collectPerformance()})},e.prototype._addResourcesSpans=function(n){var r=this,i,o,a=(o=(i=Cn).getEntriesByType)===null||o===void 0?void 0:o.call(i,"resource");a&&a.forEach(function(u){r._initResourceSpan(u,n)})},e.prototype._collectPerformance=function(){var n=this,r=Array.from(document.getElementsByTagName("meta")).find(function(a){return a.getAttribute("name")===av}),i=Nm(),o=r&&r.content||"";N.with(Z.extract(je,{traceparent:o}),function(){var a,u=n._startSpan(Kt.DOCUMENT_LOAD,w.FETCH_START,i);u&&(N.with(k.setSpan(N.active(),u),function(){var c=n._startSpan(Kt.DOCUMENT_FETCH,w.FETCH_START,i);c&&(c.setAttribute(mt,location.href),N.with(k.setSpan(N.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(Cm,navigator.userAgent),n._addResourcesSpans(u),n.getConfig().ignoreNetworkEvents||(z(u,w.FETCH_START,i),z(u,w.UNLOAD_EVENT_START,i),z(u,w.UNLOAD_EVENT_END,i),z(u,w.DOM_INTERACTIVE,i),z(u,w.DOM_CONTENT_LOADED_EVENT_START,i),z(u,w.DOM_CONTENT_LOADED_EVENT_END,i),z(u,w.DOM_COMPLETE,i),z(u,w.LOAD_EVENT_START,i),z(u,w.LOAD_EVENT_END,i)),n.getConfig().ignorePerformancePaintEvents||xm(u),n._addCustomAttributesOnSpan(u,(a=n.getConfig().applyCustomAttributesOnSpan)===null||a===void 0?void 0:a.documentLoad),n._endSpan(u,w.LOAD_EVENT_END,i))})},e.prototype._endSpan=function(n,r,i){n&&(xe(i,r)?n.end(i[r]):n.end())},e.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))},e.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(N.active(),o):void 0);return a}},e.prototype._waitForPageLoad=function(){window.document.readyState==="complete"?this._onDocumentLoaded():(this._onDocumentLoaded=this._onDocumentLoaded.bind(this),window.addEventListener("load",this._onDocumentLoaded))},e.prototype._addCustomAttributesOnSpan=function(n,r){var i=this;r&&Ps(function(){return r(n)},function(o){o&&i._diag.error("addCustomAttributesOnSpan",o)})},e.prototype._addCustomAttributesOnResourceSpan=function(n,r,i){var o=this;i&&Ps(function(){return i(n,r)},function(a){a&&o._diag.error("addCustomAttributesOnResourceSpan",a)})},e.prototype.enable=function(){window.removeEventListener("load",this._onDocumentLoaded),this._waitForPageLoad()},e.prototype.disable=function(){window.removeEventListener("load",this._onDocumentLoaded)},e}(Om),Ci=function(){return Ci=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Ci.apply(this,arguments)},km=function(){function t(e,n,r){this.instrumentationName=e,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:e}),this._tracer=k.getTracer(e,n),this._meter=ct.getMeter(e,n),this._logger=Ft.getLogger(e,n),this._updateMetricInstruments()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(t.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var e,n=(e=this.init())!==null&&e!==void 0?e:[];return Array.isArray(n)?n:[n]},t.prototype._updateMetricInstruments=function(){},t.prototype.getConfig=function(){return this._config},t.prototype.setConfig=function(e){this._config=Ci({enabled:!0},e)},t.prototype.setTracerProvider=function(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),t.prototype._runSpanCustomizationHook=function(e,n,r,i){if(e)try{e(r,i)}catch(o){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:n},o)}},t}(),Mm=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Dm=function(t){Mm(e,t);function e(n,r,i){var o=t.call(this,n,r,i)||this;return o._config.enabled&&o.enable(),o}return e}(km);function Um(t,e,n){var r,i;try{i=t()}catch(o){r=o}finally{return e(r,i),i}}function jm(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var Ni=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},xi=performance,$m="http.method",Bm="http.url",Fm="http.host",Vm="http.scheme",Hm="http.status_code",Gm="http.user_agent",zm="http.request_content_length_uncompressed",qm=$m,Xm=Bm,Km=Fm,Wm=Vm,Ym=Hm,Jm=Gm,Qm=zm,Zm=9,e_=6,t_=Math.pow(10,e_),ks=Math.pow(10,Zm);function Pi(t){var e=t/1e3,n=Math.trunc(e),r=Math.round(t%1e3*t_);return[n,r]}function n_(){var t=xi.timeOrigin;if(typeof t!="number"){var e=xi;t=e.timing&&e.timing.fetchStart}return t}function Ms(t){var e=Pi(n_()),n=Pi(xi.now());return r_(e,n)}function r_(t,e){var n=[t[0]+e[0],t[1]+e[1]];return n[1]>=ks&&(n[1]-=ks,n[0]+=1),n}var i_=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function o_(t,e){return typeof e=="string"?t===e:!!t.match(e)}function a_(t,e){var n,r;if(!e)return!1;try{for(var i=i_(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(o_(t,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 Bn;(function(t){t.COMPONENT="component",t.HTTP_ERROR_NAME="http.error_name",t.HTTP_STATUS_TEXT="http.status_text"})(Bn||(Bn={}));var s_=function(t,e,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(t,[])).next())})},u_=function(t,e){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=e.call(t,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}}},c_=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},l_=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >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},Ds=T.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-fetch/utils"});function p_(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(t[0]instanceof URL||typeof t[0]=="string"){var n=t[1];if(!(n!=null&&n.body))return Promise.resolve();if(n.body instanceof ReadableStream){var r=f_(n.body),i=r.body,o=r.length;return n.body=i,o}else return Promise.resolve(h_(n.body))}else{var a=t[0];return a!=null&&a.body?a.clone().text().then(function(u){return Ii(u)}):Promise.resolve()}}function f_(t){if(!t.pipeThrough)return Ds.warn("Platform has ReadableStream but not pipeThrough!"),{body:t,length:Promise.resolve(void 0)};var e=0,n,r=new Promise(function(o){n=o}),i=new TransformStream({start:function(){},transform:function(o,a){return s_(this,void 0,void 0,function(){var u;return u_(this,function(c){switch(c.label){case 0:return[4,o];case 1:return u=c.sent(),e+=u.byteLength,a.enqueue(o),[2]}})})},flush:function(){n(e)}});return{body:t.pipeThrough(i),length:r}}function h_(t){if(typeof Document<"u"&&t instanceof Document)return new XMLSerializer().serializeToString(document).length;if(t instanceof Blob)return t.size;if(t.byteLength!==void 0)return t.byteLength;if(t instanceof FormData)return v_(t);if(t instanceof URLSearchParams)return Ii(t.toString());if(typeof t=="string")return Ii(t);Ds.warn("unknown body type")}var d_=new TextEncoder;function Ii(t){return d_.encode(t).byteLength}function v_(t){var e,n,r=0;try{for(var i=c_(t.entries()),o=i.next();!o.done;o=i.next()){var a=l_(o.value,2),u=a[0],c=a[1];r+=u.length,c instanceof Blob?r+=c.size:r+=c.length}}catch(s){e={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}var Us="0.57.2",y_=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),m_=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),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},__=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},ki,g_=300,js=typeof process=="object"&&((ki=process.release)===null||ki===void 0?void 0:ki.name)==="node",E_=function(t){y_(e,t);function e(n){n===void 0&&(n={});var r=t.call(this,"@opentelemetry/instrumentation-fetch",Us,n)||this;return r.component="fetch",r.version=Us,r.moduleName=r.component,r._usedResources=new WeakSet,r._tasksCount=0,r}return e.prototype.init=function(){},e.prototype._addChildSpan=function(n,r){var i=this.tracer.startSpan("CORS Preflight",{startTime:r[w.FETCH_START]},k.setSpan(N.active(),n));yt(i,r,this.getConfig().ignoreNetworkEvents),i.end(r[w.RESPONSE_END])},e.prototype._addFinalSpanAttributes=function(n,r){var i=_e(r.url);n.setAttribute(Ym,r.status),r.statusText!=null&&n.setAttribute(Bn.HTTP_STATUS_TEXT,r.statusText),n.setAttribute(Km,i.host),n.setAttribute(Wm,i.protocol.replace(":","")),typeof navigator<"u"&&n.setAttribute(Jm,navigator.userAgent)},e.prototype._addHeaders=function(n,r){if(!xs(r,this.getConfig().propagateTraceHeaderCorsUrls)){var i={};Z.inject(N.active(),i),Object.keys(i).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}if(n instanceof Request)Z.inject(N.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(N.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(N.active(),n.headers,{set:function(o,a,u){return o.set(a,typeof u=="string"?u:String(u))}});else{var i={};Z.inject(N.active(),i),n.headers=Object.assign({},i,n.headers||{})}},e.prototype._clearResources=function(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(performance.clearResourceTimings(),this._usedResources=new WeakSet)},e.prototype._createSpan=function(n,r){var i;if(r===void 0&&(r={}),a_(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[Bn.COMPONENT]=this.moduleName,i[qm]=o,i[Xm]=n,i)})},e.prototype._findResourceAndAddNetworkEvents=function(n,r,i){var o=r.entries;if(!o.length){if(!performance.getEntriesByType)return;o=performance.getEntriesByType("resource")}var a=Cs(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)}},e.prototype._markResourceAsUsed=function(n){this._usedResources.add(n)},e.prototype._endSpan=function(n,r,i){var o=this,a=Pi(Date.now()),u=Ms();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)},g_)},e.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=_e(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&&p_.apply(void 0,__([],m_(o),!1)).then(function(_){_&&l.setAttribute(Qm,_)}).catch(function(_){i._diag.warn("getFetchBodyLength",_)});function f(_,E){i._applyAttributesAfterFetch(_,s,E),i._endSpan(_,p,{status:E.status||0,statusText:E.message,url:c})}function m(_,E){i._applyAttributesAfterFetch(_,s,E),E.status>=200&&E.status<400?i._endSpan(_,p,E):i._endSpan(_,p,{status:E.status,statusText:E.statusText,url:c})}function v(_,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(_,j):X()},function(U){f(_,U)})};X()}else m(_,S)}finally{E(S)}}function y(_,E,S){try{f(_,S)}finally{E(S)}}return new Promise(function(_,E){return N.with(k.setSpan(N.active(),l),function(){return i._addHeaders(s,c),i._tasksCount++,r.apply(u,s instanceof Request?[s]:[c,s]).then(v.bind(u,l,_),y.bind(u,l,E))})})}}},e.prototype._applyAttributesAfterFetch=function(n,r,i){var o=this,a=this.getConfig().applyCustomAttributesOnSpan;a&&Um(function(){return a(n,r,i)},function(u){u&&o._diag.error("applyCustomAttributesOnSpan",u)})},e.prototype._prepareSpanData=function(n){var r=Ms(),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}},e.prototype.enable=function(){if(js){this._diag.warn("this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()");return}jm(fetch)&&(this._unwrap(Ni,"fetch"),this._diag.debug("removing previous patch for constructor")),this._wrap(Ni,"fetch",this._patchConstructor())},e.prototype.disable=function(){js||(this._unwrap(Ni,"fetch"),this._usedResources=new WeakSet)},e}(Dm),Mi=function(){return Mi=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Mi.apply(this,arguments)},T_=function(){function t(e,n,r){this.instrumentationName=e,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:e}),this._tracer=k.getTracer(e,n),this._meter=ct.getMeter(e,n),this._logger=Ft.getLogger(e,n),this._updateMetricInstruments()}return Object.defineProperty(t.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),t.prototype.setMeterProvider=function(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(t.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),t.prototype.setLoggerProvider=function(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)},t.prototype.getModuleDefinitions=function(){var e,n=(e=this.init())!==null&&e!==void 0?e:[];return Array.isArray(n)?n:[n]},t.prototype._updateMetricInstruments=function(){},t.prototype.getConfig=function(){return this._config},t.prototype.setConfig=function(e){this._config=Mi({enabled:!0},e)},t.prototype.setTracerProvider=function(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(t.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),t.prototype._runSpanCustomizationHook=function(e,n,r,i){if(e)try{e(r,i)}catch(o){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:n},o)}},t}(),b_=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),S_=function(t){b_(e,t);function e(n,r,i){var o=t.call(this,n,r,i)||this;return o._config.enabled&&o.enable(),o}return e}(T_);function O_(t,e,n){var r,i;try{i=t()}catch(o){r=o}finally{return e(r,i),i}}function $s(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}var Wt=performance,w_="http.method",A_="http.url",L_="http.host",R_="http.scheme",C_="http.status_code",N_="http.user_agent",x_="http.request_content_length_uncompressed",P_=w_,I_=A_,k_=L_,M_=R_,D_=C_,U_=N_,j_=x_,$_=9,B_=6,F_=Math.pow(10,B_),Bs=Math.pow(10,$_);function Fs(t){var e=t/1e3,n=Math.trunc(e),r=Math.round(t%1e3*F_);return[n,r]}function V_(){var t=Wt.timeOrigin;if(typeof t!="number"){var e=Wt;t=e.timing&&e.timing.fetchStart}return t}function Vs(t){var e=Fs(V_()),n=Fs(Wt.now());return H_(e,n)}function H_(t,e){var n=[t[0]+e[0],t[1]+e[1]];return n[1]>=Bs&&(n[1]-=Bs,n[0]+=1),n}var G_=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function z_(t,e){return typeof e=="string"?t===e:!!t.match(e)}function q_(t,e){var n,r;if(!e)return!1;try{for(var i=G_(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(z_(t,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 ge;(function(t){t.METHOD_OPEN="open",t.METHOD_SEND="send",t.EVENT_ABORT="abort",t.EVENT_ERROR="error",t.EVENT_LOAD="loaded",t.EVENT_TIMEOUT="timeout"})(ge||(ge={}));var X_=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},K_=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >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},W_=T.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-xml-http-request/utils"});function Y_(t){if(typeof Document<"u"&&t instanceof Document)return new XMLSerializer().serializeToString(document).length;if(t instanceof Blob)return t.size;if(t.byteLength!==void 0)return t.byteLength;if(t instanceof FormData)return Q_(t);if(t instanceof URLSearchParams)return Hs(t.toString());if(typeof t=="string")return Hs(t);W_.warn("unknown body type")}var J_=new TextEncoder;function Hs(t){return J_.encode(t).byteLength}function Q_(t){var e,n,r=0;try{for(var i=X_(t.entries()),o=i.next();!o.done;o=i.next()){var a=K_(o.value,2),u=a[0],c=a[1];r+=u.length,c instanceof Blob?r+=c.size:r+=c.length}}catch(s){e={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}var Gs="0.57.2",Di;(function(t){t.HTTP_STATUS_TEXT="http.status_text"})(Di||(Di={}));var Z_=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),eg=300,tg=function(t){Z_(e,t);function e(n){n===void 0&&(n={});var r=t.call(this,"@opentelemetry/instrumentation-xml-http-request",Gs,n)||this;return r.component="xml-http-request",r.version=Gs,r.moduleName=r.component,r._tasksCount=0,r._xhrMem=new WeakMap,r._usedResources=new WeakSet,r}return e.prototype.init=function(){},e.prototype._addHeaders=function(n,r){var i=_e(r).href;if(!xs(i,this.getConfig().propagateTraceHeaderCorsUrls)){var o={};Z.inject(N.active(),o),Object.keys(o).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}var a={};Z.inject(N.active(),a),Object.keys(a).forEach(function(u){n.setRequestHeader(u,String(a[u]))})},e.prototype._addChildSpan=function(n,r){var i=this;N.with(k.setSpan(N.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])})},e.prototype._addFinalSpanAttributes=function(n,r,i){if(typeof i=="string"){var o=_e(i);r.status!==void 0&&n.setAttribute(D_,r.status),r.statusText!==void 0&&n.setAttribute(Di.HTTP_STATUS_TEXT,r.statusText),n.setAttribute(k_,o.host),n.setAttribute(M_,o.protocol.replace(":","")),n.setAttribute(U_,navigator.userAgent)}},e.prototype._applyAttributesAfterXHR=function(n,r){var i=this,o=this.getConfig().applyCustomAttributesOnSpan;typeof o=="function"&&O_(function(){return o(n,r)},function(a){a&&i._diag.error("applyCustomAttributesOnSpan",a)})},e.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=_e(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"]}))},e.prototype._clearResources=function(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(Wt.clearResourceTimings(),this._xhrMem=new WeakMap,this._usedResources=new WeakSet)},e.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=Cs(_e(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)}}},e.prototype._cleanPreviousSpanInformation=function(n){var r=this._xhrMem.get(n);if(r){var i=r.callbackToRemoveEvents;i&&i(),this._xhrMem.delete(n)}},e.prototype._createSpan=function(n,r,i){var o;if(q_(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[P_]=i,o[I_]=_e(r).toString(),o)});return u.addEvent(ge.METHOD_OPEN),this._cleanPreviousSpanInformation(n),this._xhrMem.set(n,{span:u,spanUrl:r}),u},e.prototype._markResourceAsUsed=function(n){this._usedResources.add(n)},e.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)}}},e.prototype._patchSend=function(){var n=this;function r(l,p,f,m){var v=p.callbackToRemoveEvents;typeof v=="function"&&v();var y=p.span,_=p.spanUrl,E=p.sendStartTime;y&&(n._findResourceAndAddNetworkEvents(p,y,_,E,f),y.addEvent(l,m),n._addFinalSpanAttributes(y,p,_),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=Vs(),v=Date.now();setTimeout(function(){r(l,f,m,v)},eg)}}function o(){i(ge.EVENT_ERROR,this)}function a(){i(ge.EVENT_ABORT,this)}function u(){i(ge.EVENT_TIMEOUT,this)}function c(){this.status<299?i(ge.EVENT_LOAD,this):i(ge.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,_=v.spanUrl;if(y&&_){if(n.getConfig().measureRequestSize&&f!=null&&f[0]){var E=f[0],S=Y_(E);S!==void 0&&y.setAttribute(j_,S)}N.with(k.setSpan(N.active(),y),function(){n._tasksCount++,v.sendStartTime=Vs(),y.addEvent(ge.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,_),n._addResourceObserver(p,_)})}return l.apply(this,f)}}},e.prototype.enable=function(){this._diag.debug("applying patch to",this.moduleName,this.version),$s(XMLHttpRequest.prototype.open)&&(this._unwrap(XMLHttpRequest.prototype,"open"),this._diag.debug("removing previous patch from method open")),$s(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())},e.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},e}(S_);const Ui=(t,e,n)=>{var r,i;const o=x({},e);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=>{[...ng,...t].includes(a?.toLowerCase())&&(o[a]="[REDACTED]")}),o)},ng=["authorization","cookie","proxy-authorization","set-cookie","token"],rg=["https://www.googleapis.com/identitytoolkit","https://securetoken.googleapis.com"],ig=["awsaccesskeyid","signature","sig","x-goog-signature"],zs=t=>{var e,n;try{return new URL(t)}catch{return new URL(t,(n=(e=globalThis.location)==null?void 0:e.origin)!=null?n:"http://example.com")}},qs=t=>{try{const e=zs(t);(e.username||e.password)&&(e.username="REDACTED",e.password="REDACTED");const n=e.searchParams;if(ig.forEach(r=>{for(const i of Array.from(n.keys()))i.toLowerCase()===r&&n.set(i,"REDACTED")}),!t.includes("://")&&!t.startsWith("//"))return e.pathname+e.search+e.hash;if(t.startsWith("//")){let r="//";return(e.username||e.password)&&(r+=e.username+":"+e.password+"@"),r+=e.host+e.pathname+e.search+e.hash,r}return e.toString()}catch{return t}},og=new RegExp("sdk\\/evalx\\/[^/]+\\/contexts\\/(?<context>[^/?]*)\\??.*?"),ag=new RegExp("\\/eval\\/[^/]+\\/(?<context>[^/?]*)\\??.*?");function sg(t){return!!(t.includes("/sdk/evalx")&&t.match(og)||t.includes("/eval/")&&t.match(ag))}const ug=t=>["events.ld.catamorphic.com","events.launchdarkly.com"].some(e=>t.toLocaleLowerCase().includes(e)),cg=t=>sg(t),lg=(t,e)=>e.some(n=>t.toLocaleLowerCase().includes(n)),pg=(t,e,n)=>!lg(t,e)&&!cg(t)&&!ug(t),fg=(t,e,n)=>{var r;if(n.some(a=>t.toLowerCase().includes(a)))return!1;let i=[];e===!0?(i=["localhost",/^\//],(r=window?.location)!=null&&r.host&&i.push(window.location.host)):e instanceof Array&&(i=e);let o=!1;return i.forEach(a=>{t.match(a)&&(o=!0)}),o},Xs=64*1024,hg={"application/json":64*1024*1024,"text/plain":64*1024*1024},ji=(t,e,n,r)=>{var i,o,a;let u=Xs;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=hg[c])!=null?a:Xs}if(t){if(e)try{const c=JSON.parse(t);Array.isArray(c)?c.forEach(s=>{Object.keys(s).forEach(l=>{e.includes(l.toLocaleLowerCase())&&(s[l]="[REDACTED]")})}):Object.keys(c).forEach(s=>{e.includes(s.toLocaleLowerCase())&&(c[s]="[REDACTED]")}),t=JSON.stringify(c)}catch{}if(n)try{const c=JSON.parse(t);Object.keys(c).forEach(s=>{n.includes(s.toLocaleLowerCase())||(c[s]="[REDACTED]")}),t=JSON.stringify(c)}catch{}}try{t=t.slice(0,u)}catch{}return t},dg=(t,e,n)=>ce(void 0,null,function*(){let r;try{const i=t.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=ji(r,n,e,t.headers)}else r=""}catch(i){r=`Unable to clone response: ${i}`}return r});var Ks=function(){function t(e){this._delegate=e}return t.prototype.export=function(e,n){this._delegate.export(e,n)},t.prototype.forceFlush=function(){return this._delegate.forceFlush()},t.prototype.shutdown=function(){return this._delegate.shutdown()},t}(),vg=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ws=function(t){vg(e,t);function e(n,r,i){var o=t.call(this,n)||this;return o.name="OTLPExporterError",o.data=i,o.code=r,o}return e}(Error);function yg(t){if(!Number.isNaN(t)&&Number.isFinite(t)&&t>0)return t;throw new Error("Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '"+t+"')")}function mg(t){if(t!=null)return function(){return t}}function _g(t,e,n){var r,i,o,a,u,c;return{timeoutMillis:yg((i=(r=t.timeoutMillis)!==null&&r!==void 0?r:e.timeoutMillis)!==null&&i!==void 0?i:n.timeoutMillis),concurrencyLimit:(a=(o=t.concurrencyLimit)!==null&&o!==void 0?o:e.concurrencyLimit)!==null&&a!==void 0?a:n.concurrencyLimit,compression:(c=(u=t.compression)!==null&&u!==void 0?u:e.compression)!==null&&c!==void 0?c:n.compression}}function gg(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}var Eg=function(t,e,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(t,[])).next())})},Tg=function(t,e){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=e.call(t,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}}},bg=function(){function t(e){this._sendingPromises=[],this._concurrencyLimit=e}return t.prototype.pushPromise=function(e){var n=this;if(this.hasReachedLimit())throw new Error("Concurrency Limit reached");this._sendingPromises.push(e);var r=function(){var i=n._sendingPromises.indexOf(e);n._sendingPromises.splice(i,1)};e.then(r,r)},t.prototype.hasReachedLimit=function(){return this._sendingPromises.length>=this._concurrencyLimit},t.prototype.awaitAll=function(){return Eg(this,void 0,void 0,function(){return Tg(this,function(e){switch(e.label){case 0:return[4,Promise.all(this._sendingPromises)];case 1:return e.sent(),[2]}})})},t}();function Sg(t){return new bg(t.concurrencyLimit)}function Og(t){return Object.prototype.hasOwnProperty.call(t,"partialSuccess")}function wg(){return{handleResponse:function(t){t==null||!Og(t)||t.partialSuccess==null||Object.keys(t.partialSuccess).length===0||T.warn("Received Partial Success response:",JSON.stringify(t.partialSuccess))}}}var Ag=function(t,e,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(t,[])).next())})},Lg=function(t,e){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=e.call(t,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}}},Rg=function(){function t(e,n,r,i,o){this._transport=e,this._serializer=n,this._responseHandler=r,this._promiseQueue=i,this._timeout=o,this._diagLogger=T.createComponentLogger({namespace:"OTLPExportDelegate"})}return t.prototype.export=function(e,n){var r=this;if(this._diagLogger.debug("items to be sent",e),this._promiseQueue.hasReachedLimit()){n({code:B.FAILED,error:new Error("Concurrent export limit reached")});return}var i=this._serializer.serializeRequest(e);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 Ws("Export failed with retryable status")}):n({code:B.FAILED,error:new Ws("Export failed with unknown error")})},function(o){return n({code:B.FAILED,error:o})}))},t.prototype.forceFlush=function(){return this._promiseQueue.awaitAll()},t.prototype.shutdown=function(){return Ag(this,void 0,void 0,function(){return Lg(this,function(e){switch(e.label){case 0:return this._diagLogger.debug("shutdown started"),[4,this.forceFlush()];case 1:return e.sent(),this._transport.shutdown(),[2]}})})},t}();function Cg(t,e){return new Rg(t.transport,t.serializer,wg(),t.promiseHandler,e.timeout)}function Ys(t,e,n){return Cg({transport:n,serializer:e,promiseHandler:Sg(t)},{timeout:t.timeoutMillis})}function Js(t){return t>=48&&t<=57?t-48:t>=97&&t<=102?t-87:t-55}function $i(t){for(var e=new Uint8Array(t.length/2),n=0,r=0;r<t.length;r+=2){var i=Js(t.charCodeAt(r)),o=Js(t.charCodeAt(r+1));e[n++]=i<<4|o}return e}var Ng=9,xg=Math.pow(10,Ng);function Pg(t){return t[0]*xg+t[1]}function Qs(t){var e=BigInt(1e9);return BigInt(t[0])*e+BigInt(t[1])}function Ig(t){var e=Number(BigInt.asUintN(32,t)),n=Number(BigInt.asUintN(32,t>>BigInt(32)));return{low:e,high:n}}function Zs(t){var e=Qs(t);return Ig(e)}function kg(t){var e=Qs(t);return e.toString()}var Mg=typeof BigInt<"u"?kg:Pg;function eu(t){return t}function tu(t){if(t!==void 0)return $i(t)}var Dg={encodeHrTime:Zs,encodeSpanContext:$i,encodeOptionalSpanContext:tu};function nu(t){var e,n;if(t===void 0)return Dg;var r=(e=t.useLongBits)!==null&&e!==void 0?e:!0,i=(n=t.useHex)!==null&&n!==void 0?n:!1;return{encodeHrTime:r?Zs:Mg,encodeSpanContext:i?eu:$i,encodeOptionalSpanContext:i?eu:tu}}var Ug=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >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 ru(t){return{attributes:He(t.attributes),droppedAttributesCount:0}}function iu(t){return{name:t.name,version:t.version}}function He(t){return Object.keys(t).map(function(e){return ou(e,t[e])})}function ou(t,e){return{key:t,value:au(e)}}function au(t){var e=typeof t;return e==="string"?{stringValue:t}:e==="number"?Number.isInteger(t)?{intValue:t}:{doubleValue:t}:e==="boolean"?{boolValue:t}:t instanceof Uint8Array?{bytesValue:t}:Array.isArray(t)?{arrayValue:{values:t.map(au)}}:e==="object"&&t!=null?{kvlistValue:{values:Object.entries(t).map(function(n){var r=Ug(n,2),i=r[0],o=r[1];return ou(i,o)})}}:{}}var le;(function(t){t[t.DELTA=0]="DELTA",t[t.CUMULATIVE=1]="CUMULATIVE"})(le||(le={}));var de;(function(t){t[t.HISTOGRAM=0]="HISTOGRAM",t[t.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",t[t.GAUGE=2]="GAUGE",t[t.SUM=3]="SUM"})(de||(de={}));var jg=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),su=function(t,e,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(t,[])).next())})},uu=function(t,e){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=e.call(t,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=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),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(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},Fg=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function Vg(t){return t!=null}function cu(t){var e=Object.keys(t);return e.length===0?"":(e=e.sort(),JSON.stringify(e.map(function(n){return[n,t[n]]})))}function Hg(t){var e,n;return t.name+":"+((e=t.version)!==null&&e!==void 0?e:"")+":"+((n=t.schemaUrl)!==null&&n!==void 0?n:"")}var lu=function(t){jg(e,t);function e(n){var r=t.call(this,n)||this;return Object.setPrototypeOf(r,e.prototype),r}return e}(Error);function Yt(t,e){var n,r=new Promise(function(i,o){n=setTimeout(function(){o(new lu("Operation timed out."))},e)});return Promise.race([t,r]).then(function(i){return clearTimeout(n),i},function(i){throw clearTimeout(n),i})}function Gg(t){return su(this,void 0,void 0,function(){var e=this;return uu(this,function(n){return[2,Promise.all(t.map(function(r){return su(e,void 0,void 0,function(){var i,o;return uu(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 zg(t){return t.status==="rejected"}function pu(t,e){var n=[];return t.forEach(function(r){n.push.apply(n,Bg([],$g(e(r)),!1))}),n}function qg(t,e){var n,r;if(t.size!==e.size)return!1;try{for(var i=Fg(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(!e.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 Xg(t,e){for(var n=0,r=t.length-1,i=t.length;r>=n;){var o=n+Math.trunc((r-n)/2);t[o]<e?n=o+1:(i=o,r=o-1)}return i}function Kg(t,e){return t.toLowerCase()===e.toLowerCase()}var Ge;(function(t){t[t.DROP=0]="DROP",t[t.SUM=1]="SUM",t[t.LAST_VALUE=2]="LAST_VALUE",t[t.HISTOGRAM=3]="HISTOGRAM",t[t.EXPONENTIAL_HISTOGRAM=4]="EXPONENTIAL_HISTOGRAM"})(Ge||(Ge={}));var Wg=function(){function t(){this.kind=Ge.DROP}return t.prototype.createAccumulation=function(){},t.prototype.merge=function(e,n){},t.prototype.diff=function(e,n){},t.prototype.toMetricData=function(e,n,r,i){},t}(),A;(function(t){t.COUNTER="COUNTER",t.GAUGE="GAUGE",t.HISTOGRAM="HISTOGRAM",t.UP_DOWN_COUNTER="UP_DOWN_COUNTER",t.OBSERVABLE_COUNTER="OBSERVABLE_COUNTER",t.OBSERVABLE_GAUGE="OBSERVABLE_GAUGE",t.OBSERVABLE_UP_DOWN_COUNTER="OBSERVABLE_UP_DOWN_COUNTER"})(A||(A={}));function Pe(t,e,n){var r,i,o,a;return Zg(t)||T.warn('Invalid metric name: "'+t+'". The metric name should be a ASCII string with a length no greater than 255 characters.'),{name:t,type:e,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 Yg(t,e){var n,r;return{name:(n=t.name)!==null&&n!==void 0?n:e.name,description:(r=t.description)!==null&&r!==void 0?r:e.description,type:e.type,unit:e.unit,valueType:e.valueType,advice:e.advice}}function Jg(t,e){return Kg(t.name,e.name)&&t.unit===e.unit&&t.type===e.type&&t.valueType===e.valueType}var Qg=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function Zg(t){return t.match(Qg)!=null}var eE=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >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 tE(t){var e=t.map(function(){return 0});return e.push(0),{buckets:{boundaries:t,counts:e},sum:0,count:0,hasMinMax:!1,min:1/0,max:-1/0}}var Bi=function(){function t(e,n,r,i){r===void 0&&(r=!0),i===void 0&&(i=tE(n)),this.startTime=e,this._boundaries=n,this._recordMinMax=r,this._current=i}return t.prototype.record=function(e){if(!Number.isNaN(e)){this._current.count+=1,this._current.sum+=e,this._recordMinMax&&(this._current.min=Math.min(e,this._current.min),this._current.max=Math.max(e,this._current.max),this._current.hasMinMax=!0);var n=Xg(this._boundaries,e);this._current.buckets.counts[n]+=1}},t.prototype.setStartTime=function(e){this.startTime=e},t.prototype.toPointValue=function(){return this._current},t}(),fu=function(){function t(e,n){this._boundaries=e,this._recordMinMax=n,this.kind=Ge.HISTOGRAM}return t.prototype.createAccumulation=function(e){return new Bi(e,this._boundaries,this._recordMinMax)},t.prototype.merge=function(e,n){for(var r=e.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 Bi(e.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})},t.prototype.diff=function(e,n){for(var r=e.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 Bi(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})},t.prototype.toMetricData=function(e,n,r,i){return{descriptor:e,aggregationTemporality:n,dataPointType:de.HISTOGRAM,dataPoints:r.map(function(o){var a=eE(o,2),u=a[0],c=a[1],s=c.toPointValue(),l=e.type===A.GAUGE||e.type===A.UP_DOWN_COUNTER||e.type===A.OBSERVABLE_GAUGE||e.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}}})}},t}(),Fi=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),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},Vi=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},hu=function(){function t(e,n,r,i){e===void 0&&(e=new nE),n===void 0&&(n=0),r===void 0&&(r=0),i===void 0&&(i=0),this.backing=e,this.indexBase=n,this.indexStart=r,this.indexEnd=i}return Object.defineProperty(t.prototype,"offset",{get:function(){return this.indexStart},enumerable:!1,configurable:!0}),Object.defineProperty(t.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}),t.prototype.counts=function(){var e=this;return Array.from({length:this.length},function(n,r){return e.at(r)})},t.prototype.at=function(e){var n=this.indexBase-this.indexStart;return e<n&&(e+=this.backing.length),e-=n,this.backing.countAt(e)},t.prototype.incrementBucket=function(e,n){this.backing.increment(e,n)},t.prototype.decrementBucket=function(e,n){this.backing.decrement(e,n)},t.prototype.trim=function(){for(var e=0;e<this.length;e++)if(this.at(e)!==0){this.indexStart+=e;break}else if(e===this.length-1){this.indexStart=this.indexEnd=this.indexBase=0;return}for(var e=this.length-1;e>=0;e--)if(this.at(e)!==0){this.indexEnd-=this.length-e-1;break}this._rotate()},t.prototype.downscale=function(e){this._rotate();for(var n=1+this.indexEnd-this.indexStart,r=1<<e,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>>=e,this.indexEnd>>=e,this.indexBase=this.indexStart},t.prototype.clone=function(){return new t(this.backing.clone(),this.indexBase,this.indexStart,this.indexEnd)},t.prototype._rotate=function(){var e=this.indexBase-this.indexStart;e!==0&&(e>0?(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,e),this.backing.reverse(e,this.backing.length)):(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,this.backing.length+e)),this.indexBase=this.indexStart)},t.prototype._relocateBucket=function(e,n){e!==n&&this.incrementBucket(e,this.backing.emptyBucket(n))},t}(),nE=function(){function t(e){e===void 0&&(e=[0]),this._counts=e}return Object.defineProperty(t.prototype,"length",{get:function(){return this._counts.length},enumerable:!1,configurable:!0}),t.prototype.countAt=function(e){return this._counts[e]},t.prototype.growTo=function(e,n,r){var i=new Array(e).fill(0);i.splice.apply(i,Vi([r,this._counts.length-n],Fi(this._counts.slice(n)),!1)),i.splice.apply(i,Vi([0,n],Fi(this._counts.slice(0,n)),!1)),this._counts=i},t.prototype.reverse=function(e,n){for(var r=Math.floor((e+n)/2)-e,i=0;i<r;i++){var o=this._counts[e+i];this._counts[e+i]=this._counts[n-i-1],this._counts[n-i-1]=o}},t.prototype.emptyBucket=function(e){var n=this._counts[e];return this._counts[e]=0,n},t.prototype.increment=function(e,n){this._counts[e]+=n},t.prototype.decrement=function(e,n){this._counts[e]>=n?this._counts[e]-=n:this._counts[e]=0},t.prototype.clone=function(){return new t(Vi([],Fi(this._counts),!1))},t}(),rE=52,iE=2146435072,oE=1048575,Hi=1023,du=-Hi+1,vu=Hi,Gi=Math.pow(2,-1022);function yu(t){var e=new DataView(new ArrayBuffer(8));e.setFloat64(0,t);var n=e.getUint32(0),r=(n&iE)>>20;return r-Hi}function mu(t){var e=new DataView(new ArrayBuffer(8));e.setFloat64(0,t);var n=e.getUint32(0),r=e.getUint32(4),i=(n&oE)*Math.pow(2,32);return i+r}function zi(t,e){return t===0||t===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY||Number.isNaN(t)?t:t*Math.pow(2,e)}function aE(t){return t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,t++,t}var sE=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Jt=function(t){sE(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Error),uE=function(){function t(e){this._shift=-e}return t.prototype.mapToIndex=function(e){if(e<Gi)return this._minNormalLowerBoundaryIndex();var n=yu(e),r=this._rightShift(mu(e)-1,rE);return n+r>>this._shift},t.prototype.lowerBoundary=function(e){var n=this._minNormalLowerBoundaryIndex();if(e<n)throw new Jt("underflow: "+e+" is < minimum lower boundary: "+n);var r=this._maxNormalLowerBoundaryIndex();if(e>r)throw new Jt("overflow: "+e+" is > maximum lower boundary: "+r);return zi(1,e<<this._shift)},Object.defineProperty(t.prototype,"scale",{get:function(){return this._shift===0?0:-this._shift},enumerable:!1,configurable:!0}),t.prototype._minNormalLowerBoundaryIndex=function(){var e=du>>this._shift;return this._shift<2&&e--,e},t.prototype._maxNormalLowerBoundaryIndex=function(){return vu>>this._shift},t.prototype._rightShift=function(e,n){return Math.floor(e*Math.pow(2,-n))},t}(),cE=function(){function t(e){this._scale=e,this._scaleFactor=zi(Math.LOG2E,e),this._inverseFactor=zi(Math.LN2,-e)}return t.prototype.mapToIndex=function(e){if(e<=Gi)return this._minNormalLowerBoundaryIndex()-1;if(mu(e)===0){var n=yu(e);return(n<<this._scale)-1}var r=Math.floor(Math.log(e)*this._scaleFactor),i=this._maxNormalLowerBoundaryIndex();return r>=i?i:r},t.prototype.lowerBoundary=function(e){var n=this._maxNormalLowerBoundaryIndex();if(e>=n){if(e===n)return 2*Math.exp((e-(1<<this._scale))/this._scaleFactor);throw new Jt("overflow: "+e+" is > maximum lower boundary: "+n)}var r=this._minNormalLowerBoundaryIndex();if(e<=r){if(e===r)return Gi;if(e===r-1)return Math.exp((e+(1<<this._scale))/this._scaleFactor)/2;throw new Jt("overflow: "+e+" is < minimum lower boundary: "+r)}return Math.exp(e*this._inverseFactor)},Object.defineProperty(t.prototype,"scale",{get:function(){return this._scale},enumerable:!1,configurable:!0}),t.prototype._minNormalLowerBoundaryIndex=function(){return du<<this._scale},t.prototype._maxNormalLowerBoundaryIndex=function(){return(vu+1<<this._scale)-1},t}(),_u=-10,gu=20,lE=Array.from({length:31},function(t,e){return e>10?new cE(e-10):new uE(e-10)});function Eu(t){if(t>gu||t<_u)throw new Jt("expected scale >= "+_u+" && <= "+gu+", got: "+t);return lE[t+10]}var pE=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >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 t(e,n){this.low=e,this.high=n}return t.combine=function(e,n){return new t(Math.min(e.low,n.low),Math.max(e.high,n.high))},t}(),fE=20,hE=160,qi=2,dE=function(){function t(e,n,r,i,o,a,u,c,s,l,p){e===void 0&&(e=e),n===void 0&&(n=hE),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 hu),l===void 0&&(l=new hu),p===void 0&&(p=Eu(fE)),this.startTime=e,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<qi&&(T.warn("Exponential Histogram Max Size set to "+this._maxSize+", changing to the minimum size of: "+qi),this._maxSize=qi)}return t.prototype.record=function(e){this.updateByIncrement(e,1)},t.prototype.setStartTime=function(e){this.startTime=e},t.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(t.prototype,"sum",{get:function(){return this._sum},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"min",{get:function(){return this._min},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"max",{get:function(){return this._max},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zeroCount",{get:function(){return this._zeroCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scale",{get:function(){return this._count===this._zeroCount?0:this._mapping.scale},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"positive",{get:function(){return this._positive},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"negative",{get:function(){return this._negative},enumerable:!1,configurable:!0}),t.prototype.updateByIncrement=function(e,n){if(!Number.isNaN(e)){if(e>this._max&&(this._max=e),e<this._min&&(this._min=e),this._count+=n,e===0){this._zeroCount+=n;return}this._sum+=e*n,e>0?this._updateBuckets(this._positive,e,n):this._updateBuckets(this._negative,-e,n)}},t.prototype.merge=function(e){this._count===0?(this._min=e.min,this._max=e.max):e.count!==0&&(e.min<this.min&&(this._min=e.min),e.max>this.max&&(this._max=e.max)),this.startTime=e.startTime,this._sum+=e.sum,this._count+=e.count,this._zeroCount+=e.zeroCount;var n=this._minScale(e);this._downscale(this.scale-n),this._mergeBuckets(this.positive,e,e.positive,n),this._mergeBuckets(this.negative,e,e.negative,n)},t.prototype.diff=function(e){this._min=1/0,this._max=-1/0,this._sum-=e.sum,this._count-=e.count,this._zeroCount-=e.zeroCount;var n=this._minScale(e);this._downscale(this.scale-n),this._diffBuckets(this.positive,e,e.positive,n),this._diffBuckets(this.negative,e,e.negative,n)},t.prototype.clone=function(){return new t(this.startTime,this._maxSize,this._recordMinMax,this._sum,this._count,this._zeroCount,this._min,this._max,this.positive.clone(),this.negative.clone(),this._mapping)},t.prototype._updateBuckets=function(e,n,r){var i=this._mapping.mapToIndex(n),o=!1,a=0,u=0;if(e.length===0?(e.indexStart=i,e.indexEnd=e.indexStart,e.indexBase=e.indexStart):i<e.indexStart&&e.indexEnd-i>=this._maxSize?(o=!0,u=i,a=e.indexEnd):i>e.indexEnd&&i-e.indexStart>=this._maxSize&&(o=!0,u=e.indexStart,a=i),o){var c=this._changeScale(a,u);this._downscale(c),i=this._mapping.mapToIndex(n)}this._incrementIndexBy(e,i,r)},t.prototype._incrementIndexBy=function(e,n,r){if(r!==0){if(e.length===0&&(e.indexStart=e.indexEnd=e.indexBase=n),n<e.indexStart){var i=e.indexEnd-n;i>=e.backing.length&&this._grow(e,i+1),e.indexStart=n}else if(n>e.indexEnd){var i=n-e.indexStart;i>=e.backing.length&&this._grow(e,i+1),e.indexEnd=n}var o=n-e.indexBase;o<0&&(o+=e.backing.length),e.incrementBucket(o,r)}},t.prototype._grow=function(e,n){var r=e.backing.length,i=e.indexBase-e.indexStart,o=r-i,a=aE(n);a>this._maxSize&&(a=this._maxSize);var u=a-i;e.backing.growTo(a,o,u)},t.prototype._changeScale=function(e,n){for(var r=0;e-n>=this._maxSize;)e>>=1,n>>=1,r++;return r},t.prototype._downscale=function(e){if(e!==0){if(e<0)throw new Error("impossible change of scale: "+this.scale);var n=this._mapping.scale-e;this._positive.downscale(e),this._negative.downscale(e),this._mapping=Eu(n)}},t.prototype._minScale=function(e){var n=Math.min(this.scale,e.scale),r=Fn.combine(this._highLowAtScale(this.positive,this.scale,n),this._highLowAtScale(e.positive,e.scale,n)),i=Fn.combine(this._highLowAtScale(this.negative,this.scale,n),this._highLowAtScale(e.negative,e.scale,n));return Math.min(n-this._changeScale(r.high,r.low),n-this._changeScale(i.high,i.low))},t.prototype._highLowAtScale=function(e,n,r){if(e.length===0)return new Fn(0,-1);var i=n-r;return new Fn(e.indexStart>>i,e.indexEnd>>i)},t.prototype._mergeBuckets=function(e,n,r,i){for(var o=r.offset,a=n.scale-i,u=0;u<r.length;u++)this._incrementIndexBy(e,o+u>>a,r.at(u))},t.prototype._diffBuckets=function(e,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-e.indexBase;s<0&&(s+=e.backing.length),e.decrementBucket(s,r.at(u))}e.trim()},t}(),vE=function(){function t(e,n){this._maxSize=e,this._recordMinMax=n,this.kind=Ge.EXPONENTIAL_HISTOGRAM}return t.prototype.createAccumulation=function(e){return new dE(e,this._maxSize,this._recordMinMax)},t.prototype.merge=function(e,n){var r=n.clone();return r.merge(e),r},t.prototype.diff=function(e,n){var r=n.clone();return r.diff(e),r},t.prototype.toMetricData=function(e,n,r,i){return{descriptor:e,aggregationTemporality:n,dataPointType:de.EXPONENTIAL_HISTOGRAM,dataPoints:r.map(function(o){var a=pE(o,2),u=a[0],c=a[1],s=c.toPointValue(),l=e.type===A.GAUGE||e.type===A.UP_DOWN_COUNTER||e.type===A.OBSERVABLE_GAUGE||e.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}}})}},t}(),yE=Mt("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function mE(t){return t.setValue(yE,!0)}function _E(){return function(t){T.error(gE(t))}}function gE(t){return typeof t=="string"?t:JSON.stringify(EE(t))}function EE(t){for(var e={},n=t;n!==null;)Object.getOwnPropertyNames(n).forEach(function(r){if(!e[r]){var i=n[r];i&&(e[r]=String(i))}}),n=Object.getPrototypeOf(n);return e}var TE=_E();function Tu(t){try{TE(t)}catch{}}var bE=6,SE=Math.pow(10,bE);function Xi(t){var e=t/1e3,n=Math.trunc(e),r=Math.round(t%1e3*SE);return[n,r]}function Vn(t){return t[0]*1e6+t[1]/1e3}var Ki;(function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})(Ki||(Ki={}));function OE(t,e){return new Promise(function(n){N.with(mE(N.active()),function(){t.export(e,function(r){n(r)})})})}var wE={_export:OE},AE=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >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},Wi=function(){function t(e,n,r){n===void 0&&(n=0),r===void 0&&(r=[0,0]),this.startTime=e,this._current=n,this.sampleTime=r}return t.prototype.record=function(e){this._current=e,this.sampleTime=Xi(Date.now())},t.prototype.setStartTime=function(e){this.startTime=e},t.prototype.toPointValue=function(){return this._current},t}(),LE=function(){function t(){this.kind=Ge.LAST_VALUE}return t.prototype.createAccumulation=function(e){return new Wi(e)},t.prototype.merge=function(e,n){var r=Vn(n.sampleTime)>=Vn(e.sampleTime)?n:e;return new Wi(e.startTime,r.toPointValue(),r.sampleTime)},t.prototype.diff=function(e,n){var r=Vn(n.sampleTime)>=Vn(e.sampleTime)?n:e;return new Wi(n.startTime,r.toPointValue(),r.sampleTime)},t.prototype.toMetricData=function(e,n,r,i){return{descriptor:e,aggregationTemporality:n,dataPointType:de.GAUGE,dataPoints:r.map(function(o){var a=AE(o,2),u=a[0],c=a[1];return{attributes:u,startTime:c.startTime,endTime:i,value:c.toPointValue()}})}},t}(),RE=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >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 t(e,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1),this.startTime=e,this.monotonic=n,this._current=r,this.reset=i}return t.prototype.record=function(e){this.monotonic&&e<0||(this._current+=e)},t.prototype.setStartTime=function(e){this.startTime=e},t.prototype.toPointValue=function(){return this._current},t}(),bu=function(){function t(e){this.monotonic=e,this.kind=Ge.SUM}return t.prototype.createAccumulation=function(e){return new Qt(e,this.monotonic)},t.prototype.merge=function(e,n){var r=e.toPointValue(),i=n.toPointValue();return n.reset?new Qt(n.startTime,this.monotonic,i,n.reset):new Qt(e.startTime,this.monotonic,r+i)},t.prototype.diff=function(e,n){var r=e.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)},t.prototype.toMetricData=function(e,n,r,i){return{descriptor:e,aggregationTemporality:n,dataPointType:de.SUM,dataPoints:r.map(function(o){var a=RE(o,2),u=a[0],c=a[1];return{attributes:u,startTime:c.startTime,endTime:i,value:c.toPointValue()}}),isMonotonic:this.monotonic}},t}(),ze=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ee=function(){function t(){}return t.Drop=function(){return Su},t.Sum=function(){return Ou},t.LastValue=function(){return wu},t.Histogram=function(){return Au},t.ExponentialHistogram=function(){return DE},t.Default=function(){return UE},t}(),CE=function(t){ze(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createAggregator=function(n){return e.DEFAULT_INSTANCE},e.DEFAULT_INSTANCE=new Wg,e}(Ee),NE=function(t){ze(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createAggregator=function(n){switch(n.type){case A.COUNTER:case A.OBSERVABLE_COUNTER:case A.HISTOGRAM:return e.MONOTONIC_INSTANCE;default:return e.NON_MONOTONIC_INSTANCE}},e.MONOTONIC_INSTANCE=new bu(!0),e.NON_MONOTONIC_INSTANCE=new bu(!1),e}(Ee),xE=function(t){ze(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createAggregator=function(n){return e.DEFAULT_INSTANCE},e.DEFAULT_INSTANCE=new LE,e}(Ee),PE=function(t){ze(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.createAggregator=function(n){return e.DEFAULT_INSTANCE},e.DEFAULT_INSTANCE=new fu([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0),e}(Ee),IE=function(t){ze(e,t);function e(n,r){r===void 0&&(r=!0);var i=t.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 e.prototype.createAggregator=function(n){return new fu(this._boundaries,this._recordMinMax)},e}(Ee),kE=function(t){ze(e,t);function e(n,r){n===void 0&&(n=160),r===void 0&&(r=!0);var i=t.call(this)||this;return i._maxSize=n,i._recordMinMax=r,i}return e.prototype.createAggregator=function(n){return new vE(this._maxSize,this._recordMinMax)},e}(Ee),ME=function(t){ze(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.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 Ou;case A.GAUGE:case A.OBSERVABLE_GAUGE:return wu;case A.HISTOGRAM:return n.advice.explicitBucketBoundaries?new IE(n.advice.explicitBucketBoundaries):Au}return T.warn("Unable to recognize instrument type: "+n.type),Su},e.prototype.createAggregator=function(n){return this._resolve(n).createAggregator(n)},e}(Ee),Su=new CE,Ou=new NE,wu=new xE,Au=new PE,DE=new kE,UE=new ME,jE=function(t){return Ee.Default()},$E=function(t){return le.CUMULATIVE},Yi=function(t,e,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(t,[])).next())})},Ji=function(t,e){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=e.call(t,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}}},Lu=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >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},BE=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},FE=function(){function t(e){var n,r,i;this._shutdown=!1,this._aggregationSelector=(n=e?.aggregationSelector)!==null&&n!==void 0?n:jE,this._aggregationTemporalitySelector=(r=e?.aggregationTemporalitySelector)!==null&&r!==void 0?r:$E,this._metricProducers=(i=e?.metricProducers)!==null&&i!==void 0?i:[],this._cardinalitySelector=e?.cardinalitySelector}return t.prototype.setMetricProducer=function(e){if(this._sdkMetricProducer)throw new Error("MetricReader can not be bound to a MeterProvider again.");this._sdkMetricProducer=e,this.onInitialized()},t.prototype.selectAggregation=function(e){return this._aggregationSelector(e)},t.prototype.selectAggregationTemporality=function(e){return this._aggregationTemporalitySelector(e)},t.prototype.selectCardinalityLimit=function(e){return this._cardinalitySelector?this._cardinalitySelector(e):2e3},t.prototype.onInitialized=function(){},t.prototype.collect=function(e){return Yi(this,void 0,void 0,function(){var n,r,i,o,a,u;return Ji(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(BE([this._sdkMetricProducer.collect({timeoutMillis:e?.timeoutMillis})],Lu(this._metricProducers.map(function(s){return s.collect({timeoutMillis:e?.timeoutMillis})})),!1))];case 1:return n=Lu.apply(void 0,[c.sent()]),r=n[0],i=n.slice(1),o=r.errors.concat(pu(i,function(s){return s.errors})),a=r.resourceMetrics.resource,u=r.resourceMetrics.scopeMetrics.concat(pu(i,function(s){return s.resourceMetrics.scopeMetrics})),[2,{resourceMetrics:{resource:a,scopeMetrics:u},errors:o}]}})})},t.prototype.shutdown=function(e){return Yi(this,void 0,void 0,function(){return Ji(this,function(n){switch(n.label){case 0:return this._shutdown?(T.error("Cannot call shutdown twice."),[2]):e?.timeoutMillis!=null?[3,2]:[4,this.onShutdown()];case 1:return n.sent(),[3,4];case 2:return[4,Yt(this.onShutdown(),e.timeoutMillis)];case 3:n.sent(),n.label=4;case 4:return this._shutdown=!0,[2]}})})},t.prototype.forceFlush=function(e){return Yi(this,void 0,void 0,function(){return Ji(this,function(n){switch(n.label){case 0:return this._shutdown?(T.warn("Cannot forceFlush on already shutdown MetricReader."),[2]):e?.timeoutMillis!=null?[3,2]:[4,this.onForceFlush()];case 1:return n.sent(),[2];case 2:return[4,Yt(this.onForceFlush(),e.timeoutMillis)];case 3:return n.sent(),[2]}})})},t}(),VE=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Hn=function(t,e,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(t,[])).next())})},Gn=function(t,e){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=e.call(t,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}}},HE=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),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},GE=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},zE=function(t){VE(e,t);function e(n){var r,i,o,a,u=t.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 e.prototype._runOnce=function(){return Hn(this,void 0,void 0,function(){var n;return Gn(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 lu?(T.error("Export took longer than %s milliseconds and timed out.",this._exportTimeout),[2]):(Tu(n),[3,3]);case 3:return[2]}})})},e.prototype._doRun=function(){var n,r;return Hn(this,void 0,void 0,function(){var i,o,a,u,c,s;return Gn(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,GE(["PeriodicExportingMetricReader: metrics collection errors"],HE(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),Tu(u),[3,5];case 5:return o.scopeMetrics.length===0?[2]:[4,wE._export(this._exporter,o)];case 6:if(c=l.sent(),c.code!==Ki.SUCCESS)throw new Error("PeriodicExportingMetricReader: metrics export failed (error "+c.error+")");return[2]}})})},e.prototype.onInitialized=function(){var n=this;this._interval=setInterval(function(){n._runOnce()},this._exportInterval)},e.prototype.onForceFlush=function(){return Hn(this,void 0,void 0,function(){return Gn(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]}})})},e.prototype.onShutdown=function(){return Hn(this,void 0,void 0,function(){return Gn(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]}})})},e}(FE),qE=function(){function t(){this._registeredViews=[]}return t.prototype.addView=function(e){this._registeredViews.push(e)},t.prototype.findViews=function(e,n){var r=this,i=this._registeredViews.filter(function(o){return r._matchInstrument(o.instrumentSelector,e)&&r._matchMeter(o.meterSelector,n)});return i},t.prototype._matchInstrument=function(e,n){return(e.getType()===void 0||n.type===e.getType())&&e.getNameFilter().match(n.name)&&e.getUnitFilter().match(n.unit)},t.prototype._matchMeter=function(e,n){return e.getNameFilter().match(n.name)&&(n.version===void 0||e.getVersionFilter().match(n.version))&&(n.schemaUrl===void 0||e.getSchemaUrlFilter().match(n.schemaUrl))},t}(),qe=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),zn=function(){function t(e,n){this._writableMetricStorage=e,this._descriptor=n}return t.prototype._record=function(e,n,r){if(n===void 0&&(n={}),r===void 0&&(r=N.active()),typeof e!="number"){T.warn("non-number value provided to metric "+this._descriptor.name+": "+e);return}this._descriptor.valueType===Le.INT&&!Number.isInteger(e)&&(T.warn("INT value type cannot accept a floating-point value for "+this._descriptor.name+", ignoring the fractional digits."),e=Math.trunc(e),!Number.isInteger(e))||this._writableMetricStorage.record(e,n,r,Xi(Date.now()))},t}(),XE=function(t){qe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(n,r,i){this._record(n,r,i)},e}(zn),KE=function(t){qe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.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)},e}(zn),WE=function(t){qe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.record=function(n,r,i){this._record(n,r,i)},e}(zn),YE=function(t){qe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.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)},e}(zn),qn=function(){function t(e,n,r){this._observableRegistry=r,this._descriptor=e,this._metricStorages=n}return t.prototype.addCallback=function(e){this._observableRegistry.addCallback(e,this)},t.prototype.removeCallback=function(e){this._observableRegistry.removeCallback(e,this)},t}(),JE=function(t){qe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(qn),QE=function(t){qe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(qn),ZE=function(t){qe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(qn);function Qi(t){return t instanceof qn}var eT=function(){function t(e){this._meterSharedState=e}return t.prototype.createGauge=function(e,n){var r=Pe(e,A.GAUGE,n),i=this._meterSharedState.registerMetricStorage(r);return new WE(i,r)},t.prototype.createHistogram=function(e,n){var r=Pe(e,A.HISTOGRAM,n),i=this._meterSharedState.registerMetricStorage(r);return new YE(i,r)},t.prototype.createCounter=function(e,n){var r=Pe(e,A.COUNTER,n),i=this._meterSharedState.registerMetricStorage(r);return new KE(i,r)},t.prototype.createUpDownCounter=function(e,n){var r=Pe(e,A.UP_DOWN_COUNTER,n),i=this._meterSharedState.registerMetricStorage(r);return new XE(i,r)},t.prototype.createObservableGauge=function(e,n){var r=Pe(e,A.OBSERVABLE_GAUGE,n),i=this._meterSharedState.registerAsyncMetricStorage(r);return new QE(r,i,this._meterSharedState.observableRegistry)},t.prototype.createObservableCounter=function(e,n){var r=Pe(e,A.OBSERVABLE_COUNTER,n),i=this._meterSharedState.registerAsyncMetricStorage(r);return new JE(r,i,this._meterSharedState.observableRegistry)},t.prototype.createObservableUpDownCounter=function(e,n){var r=Pe(e,A.OBSERVABLE_UP_DOWN_COUNTER,n),i=this._meterSharedState.registerAsyncMetricStorage(r);return new ZE(r,i,this._meterSharedState.observableRegistry)},t.prototype.addBatchObservableCallback=function(e,n){this._meterSharedState.observableRegistry.addBatchCallback(e,n)},t.prototype.removeBatchObservableCallback=function(e,n){this._meterSharedState.observableRegistry.removeBatchCallback(e,n)},t}(),Ru=function(){function t(e){this._instrumentDescriptor=e}return t.prototype.getInstrumentDescriptor=function(){return this._instrumentDescriptor},t.prototype.updateDescription=function(e){this._instrumentDescriptor=Pe(this._instrumentDescriptor.name,this._instrumentDescriptor.type,{description:e,valueType:this._instrumentDescriptor.valueType,unit:this._instrumentDescriptor.unit,advice:this._instrumentDescriptor.advice})},t}(),tT=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Cu=function(t,e){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=e.call(t,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}}},nT=function(){function t(e){this._hash=e,this._valueMap=new Map,this._keyMap=new Map}return t.prototype.get=function(e,n){return n!=null||(n=this._hash(e)),this._valueMap.get(n)},t.prototype.getOrDefault=function(e,n){var r=this._hash(e);if(this._valueMap.has(r))return this._valueMap.get(r);var i=n();return this._keyMap.has(r)||this._keyMap.set(r,e),this._valueMap.set(r,i),i},t.prototype.set=function(e,n,r){r!=null||(r=this._hash(e)),this._keyMap.has(r)||this._keyMap.set(r,e),this._valueMap.set(r,n)},t.prototype.has=function(e,n){return n!=null||(n=this._hash(e)),this._valueMap.has(n)},t.prototype.keys=function(){var e,n;return Cu(this,function(r){switch(r.label){case 0:e=this._keyMap.entries(),n=e.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=e.next(),[3,1];case 3:return[2]}})},t.prototype.entries=function(){var e,n;return Cu(this,function(r){switch(r.label){case 0:e=this._valueMap.entries(),n=e.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=e.next(),[3,1];case 3:return[2]}})},Object.defineProperty(t.prototype,"size",{get:function(){return this._valueMap.size},enumerable:!1,configurable:!0}),t}(),Xe=function(t){tT(e,t);function e(){return t.call(this,cu)||this}return e}(nT),rT=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >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},Nu=function(){function t(e,n){this._aggregator=e,this._activeCollectionStorage=new Xe,this._cumulativeMemoStorage=new Xe,this._overflowAttributes={"otel.metric.overflow":!0},this._cardinalityLimit=(n??2e3)-1,this._overflowHashCode=cu(this._overflowAttributes)}return t.prototype.record=function(e,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(e);return}a=this._aggregator.createAccumulation(i),this._activeCollectionStorage.set(n,a)}a?.record(e)},t.prototype.batchCumulate=function(e,n){var r=this;Array.from(e.entries()).forEach(function(i){var o=rT(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)})},t.prototype.collect=function(){var e=this._activeCollectionStorage;return this._activeCollectionStorage=new Xe,e},t}(),Zi=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},xu=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >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},Pu=function(){function t(e,n){var r=this;this._aggregator=e,this._unreportedAccumulations=new Map,this._reportHistory=new Map,n.forEach(function(i){r._unreportedAccumulations.set(i,[])})}return t.prototype.buildMetrics=function(e,n,r,i){this._stashAccumulations(r);var o=this._getMergedUnreportedAccumulations(e),a=o,u;if(this._reportHistory.has(e)){var c=this._reportHistory.get(e),s=c.collectionTime;u=c.aggregationTemporality,u===le.CUMULATIVE?a=t.merge(c.accumulations,o,this._aggregator):a=t.calibrateStartTime(c.accumulations,o,s)}else u=e.selectAggregationTemporality(n.type);this._reportHistory.set(e,{accumulations:a,collectionTime:i,aggregationTemporality:u});var l=iT(a);if(l.length!==0)return this._aggregator.toMetricData(n,u,l,i)},t.prototype._stashAccumulations=function(e){var n,r,i=this._unreportedAccumulations.keys();try{for(var o=Zi(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(e)}}catch(s){n={error:s}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},t.prototype._getMergedUnreportedAccumulations=function(e){var n,r,i=new Xe,o=this._unreportedAccumulations.get(e);if(this._unreportedAccumulations.set(e,[]),o===void 0)return i;try{for(var a=Zi(o),u=a.next();!u.done;u=a.next()){var c=u.value;i=t.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},t.merge=function(e,n,r){for(var i=e,o=n.entries(),a=o.next();a.done!==!0;){var u=xu(a.value,3),c=u[0],s=u[1],l=u[2];if(e.has(c,l)){var p=e.get(c,l),f=r.merge(p,s);i.set(c,f,l)}else i.set(c,s,l);a=o.next()}return i},t.calibrateStartTime=function(e,n,r){var i,o;try{for(var a=Zi(e.keys()),u=a.next();!u.done;u=a.next()){var c=xu(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},t}();function iT(t){return Array.from(t.entries())}var oT=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),aT=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >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},sT=function(t){oT(e,t);function e(n,r,i,o,a){var u=t.call(this,n)||this;return u._attributesProcessor=i,u._aggregationCardinalityLimit=a,u._deltaMetricStorage=new Nu(r,u._aggregationCardinalityLimit),u._temporalMetricStorage=new Pu(r,o),u}return e.prototype.record=function(n,r){var i=this,o=new Xe;Array.from(n.entries()).forEach(function(a){var u=aT(a,2),c=u[0],s=u[1];o.set(i._attributesProcessor.process(c),s)}),this._deltaMetricStorage.batchCumulate(o,r)},e.prototype.collect=function(n,r){var i=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(n,this._instrumentDescriptor,i,r)},e}(Ru);function Iu(t,e){var n="";return t.unit!==e.unit&&(n+=" - Unit '"+t.unit+"' does not match '"+e.unit+`'
297
+ `),t.type!==e.type&&(n+=" - Type '"+t.type+"' does not match '"+e.type+`'
298
+ `),t.valueType!==e.valueType&&(n+=" - Value Type '"+t.valueType+"' does not match '"+e.valueType+`'
299
+ `),t.description!==e.description&&(n+=" - Description '"+t.description+"' does not match '"+e.description+`'
300
+ `),n}function uT(t,e){return" - use valueType '"+t.valueType+"' on instrument creation or use an instrument name other than '"+e.name+"'"}function cT(t,e){return" - use unit '"+t.unit+"' on instrument creation or use an instrument name other than '"+e.name+"'"}function lT(t,e){var n={name:e.name,type:e.type,unit:e.unit},r=JSON.stringify(n);return" - create a new view with a name other than '"+t.name+"' and InstrumentSelector '"+r+"'"}function pT(t,e){var n={name:e.name,type:e.type,unit:e.unit},r=JSON.stringify(n);return" - create a new view with a name other than '"+t.name+"' and InstrumentSelector '"+r+`'
301
+ - OR - create a new view with the name `+t.name+" and description '"+t.description+"' and InstrumentSelector "+r+`
302
+ - OR - create a new view with the name `+e.name+" and description '"+t.description+"' and InstrumentSelector "+r}function ku(t,e){return t.valueType!==e.valueType?uT(t,e):t.unit!==e.unit?cT(t,e):t.type!==e.type?lT(t,e):t.description!==e.description?pT(t,e):""}var eo=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},fT=function(){function t(){this._sharedRegistry=new Map,this._perCollectorRegistry=new Map}return t.create=function(){return new t},t.prototype.getStorages=function(e){var n,r,i,o,a=[];try{for(var u=eo(this._sharedRegistry.values()),c=u.next();!c.done;c=u.next()){var s=c.value;a=a.concat(s)}}catch(m){n={error:m}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}var l=this._perCollectorRegistry.get(e);if(l!=null)try{for(var p=eo(l.values()),f=p.next();!f.done;f=p.next()){var s=f.value;a=a.concat(s)}}catch(m){i={error:m}}finally{try{f&&!f.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}return a},t.prototype.register=function(e){this._registerStorage(e,this._sharedRegistry)},t.prototype.registerForCollector=function(e,n){var r=this._perCollectorRegistry.get(e);r==null&&(r=new Map,this._perCollectorRegistry.set(e,r)),this._registerStorage(n,r)},t.prototype.findOrUpdateCompatibleStorage=function(e){var n=this._sharedRegistry.get(e.name);return n===void 0?null:this._findOrUpdateCompatibleStorage(e,n)},t.prototype.findOrUpdateCompatibleCollectorStorage=function(e,n){var r=this._perCollectorRegistry.get(e);if(r===void 0)return null;var i=r.get(n.name);return i===void 0?null:this._findOrUpdateCompatibleStorage(n,i)},t.prototype._registerStorage=function(e,n){var r=e.getInstrumentDescriptor(),i=n.get(r.name);if(i===void 0){n.set(r.name,[e]);return}i.push(e)},t.prototype._findOrUpdateCompatibleStorage=function(e,n){var r,i,o=null;try{for(var a=eo(n),u=a.next();!u.done;u=a.next()){var c=u.value,s=c.getInstrumentDescriptor();Jg(s,e)?(s.description!==e.description&&(e.description.length>s.description.length&&c.updateDescription(e.description),T.warn("A view or instrument with the name ",e.name,` has already been registered, but has a different description and is incompatible with another registered view.
303
303
  `,`Details:
304
- `,Iu(s,t),`The longer description will be used.
305
- To resolve the conflict:`,ku(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.
304
+ `,Iu(s,e),`The longer description will be used.
305
+ To resolve the conflict:`,ku(s,e))),o=c):T.warn("A view or instrument with the name ",e.name,` has already been registered and is incompatible with another registered view.
306
306
  `,`Details:
307
- `,Iu(s,t),`To resolve the conflict:
308
- `,ku(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}(),hT=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}(),dT=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===Lt.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}(),vT=function(){function e(){this._buffer=new Map}return e.prototype.observe=function(t,n,r){if(r===void 0&&(r={}),!!Ji(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===Lt.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}(),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())})},eo=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}}},Mu=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},Du=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))},yT=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(Ji));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(Ji)),i=this._findBatchCallback(t,r);i<0||this._batchCallbacks.splice(i,1)},e.prototype.observe=function(t,n){return to(this,void 0,void 0,function(){var r,i,o,a;return eo(this,function(u){switch(u.label){case 0:return r=this._observeCallbacks(t,n),i=this._observeBatchCallbacks(t,n),[4,Gg(Du(Du([],Mu(r),!1),Mu(i),!1))];case 1:return o=u.sent(),a=o.filter(zg).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 to(r,void 0,void 0,function(){var u,c;return eo(this,function(s){switch(s.label){case 0:return u=new dT(a._descriptor.name,a._descriptor.valueType),c=Promise.resolve(o(u)),n!=null&&(c=Ye(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 to(r,void 0,void 0,function(){var u,c;return eo(this,function(s){switch(s.label){case 0:return u=new vT,c=Promise.resolve(o(u)),n!=null&&(c=Ye(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&&qg(r.instruments,n)})},e}(),mT=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)}}(),_T=function(e){mT(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 Nu(r,u._aggregationCardinalityLimit),u._temporalMetricStorage=new Pu(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}(Ru),Uu=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)}}(),no=function(){function e(){}return e.Noop=function(){return ET},e}(),gT=function(e){Uu(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.process=function(n,r){return n},t}(no);(function(e){Uu(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})(no);var ET=new gT,TT=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())})},bT=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}}},ST=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},OT=function(){function e(t,n){this._meterProviderSharedState=t,this._instrumentationScope=n,this.metricStorageRegistry=new fT,this.observableRegistry=new yT,this.meter=new tT(this)}return e.prototype.registerMetricStorage=function(t){var n=this._registerMetricStorage(t,_T);return n.length===1?n[0]:new hT(n)},e.prototype.registerAsyncMetricStorage=function(t){var n=this._registerMetricStorage(t,sT);return n},e.prototype.collect=function(t,n,r){return TT(this,void 0,void 0,function(){var i,o,a;return bT(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(Vg),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=Yg(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=ST(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,no.Noop(),[l],v);return r.metricStorageRegistry.registerForCollector(l,y),y});o=o.concat(u)}return o},e}(),wT=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.")},AT=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=Hg(t),r=this.meterSharedStates.get(n);return r==null&&(r=new OT(this,t),this.meterSharedStates.set(n,r)),r},e.prototype.selectAggregations=function(t){var n,r,i=[];try{for(var o=wT(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}(),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())})},Xn=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}}},LT=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},RT=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))},CT=function(){function e(t,n){this._sharedState=t,this._metricReader=n}return e.prototype.collect=function(t){return qn(this,void 0,void 0,function(){var n,r,i,o,a=this;return Xn(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 qn(a,void 0,void 0,function(){var s;return Xn(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,RT([],LT(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 qn(this,void 0,void 0,function(){return Xn(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 qn(this,void 0,void 0,function(){return Xn(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}(),ju=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())})},$u=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}}},Bu=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 NT(e,t){var n=t??Xe.empty();return e?Xe.default().merge(n):n}var xT=function(){function e(t){var n,r,i,o,a;if(this._shutdown=!1,this._sharedState=new AT(NT((a=t?.mergeResourceWithDefaults)!==null&&a!==void 0?a:!0,t?.resource)),t?.views!=null&&t.views.length>0)try{for(var u=Bu(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=Bu(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"),ih()):this._sharedState.getMeterSharedState({name:t,version:n,schemaUrl:r.schemaUrl}).meter},e.prototype.addMetricReader=function(t){var n=new CT(this._sharedState,t);t.setMetricProducer(n),this._sharedState.metricCollectors.push(n)},e.prototype.shutdown=function(t){return ju(this,void 0,void 0,function(){return $u(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 ju(this,void 0,void 0,function(){return $u(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 PT(e,t){var n=nu(t);return{resource:ru(e.resource),schemaUrl:void 0,scopeMetrics:IT(e.scopeMetrics,n)}}function IT(e,t){return Array.from(e.map(function(n){return{scope:iu(n.scope),metrics:n.metrics.map(function(r){return kT(r,t)}),schemaUrl:n.scope.schemaUrl}}))}function kT(e,t){var n={name:e.descriptor.name,description:e.descriptor.description,unit:e.descriptor.unit},r=jT(e.aggregationTemporality);switch(e.dataPointType){case dt.SUM:n.sum={aggregationTemporality:r,isMonotonic:e.isMonotonic,dataPoints:Fu(e,t)};break;case dt.GAUGE:n.gauge={dataPoints:Fu(e,t)};break;case dt.HISTOGRAM:n.histogram={aggregationTemporality:r,dataPoints:DT(e,t)};break;case dt.EXPONENTIAL_HISTOGRAM:n.exponentialHistogram={aggregationTemporality:r,dataPoints:UT(e,t)};break}return n}function MT(e,t,n){var r={attributes:Ht(e.attributes),startTimeUnixNano:n.encodeHrTime(e.startTime),timeUnixNano:n.encodeHrTime(e.endTime)};switch(t){case Lt.INT:r.asInt=e.value;break;case Lt.DOUBLE:r.asDouble=e.value;break}return r}function Fu(e,t){return e.dataPoints.map(function(n){return MT(n,e.descriptor.valueType,t)})}function DT(e,t){return e.dataPoints.map(function(n){var r=n.value;return{attributes:Ht(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 UT(e,t){return e.dataPoints.map(function(n){var r=n.value;return{attributes:Ht(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 jT(e){switch(e){case lt.DELTA:return 1;case lt.CUMULATIVE:return 2}}function $T(e,t){return{resourceMetrics:e.map(function(n){return PT(n,t)})}}var BT=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.")},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};function VT(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:Ht(e.attributes),droppedAttributesCount:e.droppedAttributesCount,events:e.events.map(function(o){return GT(o,t)}),droppedEventsCount:e.droppedEventsCount,status:{code:i.code,message:i.message},links:e.links.map(function(o){return HT(o,t)}),droppedLinksCount:e.droppedLinksCount}}function HT(e,t){var n;return{attributes:e.attributes?Ht(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 GT(e,t){return{attributes:e.attributes?Ht(e.attributes):[],name:e.name,timeUnixNano:t.encodeHrTime(e.time),droppedAttributesCount:e.droppedAttributesCount||0}}function zT(e,t){var n=nu(t);return{resourceSpans:XT(e,n)}}function qT(e){var t,n,r=new Map;try{for(var i=BT(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 XT(e,t){for(var n=qT(e),r=[],i=n.entries(),o=i.next();!o.done;){for(var a=FT(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 VT(y,t)});s.push({scope:iu(f[0].instrumentationLibrary),spans:m,schemaUrl:f[0].instrumentationLibrary.schemaUrl})}p=l.next()}var v={resource:ru(u),scopeSpans:s,schemaUrl:void 0};r.push(v),o=i.next()}return r}var Vu={serializeRequest:function(e){var t=$T([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))}},Hu={serializeRequest:function(e){var t=zT(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))}},KT=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())})},WT=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}}},YT=5,JT=1e3,QT=5e3,ZT=1.5,Gu=.2;function tb(){return Math.random()*(2*Gu)-Gu}var eb=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 KT(this,void 0,void 0,function(){var i,o,a,u,c,s,l;return WT(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=YT,u=JT,p.label=2;case 2:return o.status==="retryable"&&a>0?(a--,c=Math.max(Math.min(u,QT)+tb(),0),u=u*ZT,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 zu(e){return new eb(e.transport)}function nb(e){var t=[429,502,503,504];return t.includes(e)}function rb(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 ib=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},ob=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=ib(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&&nb(o.status)?i({status:"retryable",retryInMillis:rb(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 ab(e){return new ob(e)}var sb=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 ub(e){return new sb(e)}function cb(e,t){return Ys(e,t,zu({transport:ab(e)}))}function lb(e,t){return Ys(e,t,zu({transport:ub({url:e.url,blobType:e.headers()["Content-Type"]})}))}var pb=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 fb(e){return function(){var t,n={};return Object.entries((t=e?.())!==null&&t!==void 0?t:{}).forEach(function(r){var i=pb(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 Kt=function(){return Kt=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},Kt.apply(this,arguments)};function hb(e,t,n){var r=Kt({},n()),i={};return function(){return t!=null&&Object.assign(i,t()),e!=null&&Object.assign(i,e()),Object.assign(i,r)}}function db(e){if(e!=null)try{return new URL(e),e}catch{throw new Error("Configuration: Could not parse user-provided export URL: '"+e+"'")}}function vb(e,t,n){var r,i,o,a;return Kt(Kt({},_g(e,t,n)),{headers:hb(fb(e.headers),t.headers,n.headers),url:(i=(r=db(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 yb(e,t){return Kt(Kt({},gg()),{headers:function(){return e},url:"http://localhost:4318/"+t,agentOptions:{keepAlive:!0}})}function mb(e,t,n){return vb({url:e.url,timeoutMillis:e.timeoutMillis,headers:mg(e.headers),concurrencyLimit:e.concurrencyLimit},{},yb(n,t))}function qu(e,t,n,r){var i=!!e.headers||typeof navigator.sendBeacon!="function",o=mb(e,n,r);return i?cb(o,t):lb(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)}}(),gb=function(e){_b(t,e);function t(n){return n===void 0&&(n={}),e.call(this,qu(n,Hu,"v1/traces",{"Content-Type":"application/json"}))||this}return t}(Ks),Kn;(function(e){e[e.DELTA=0]="DELTA",e[e.CUMULATIVE=1]="CUMULATIVE",e[e.LOWMEMORY=2]="LOWMEMORY"})(Kn||(Kn={}));var Eb=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)}}(),ro=function(){return lt.CUMULATIVE},Xu=function(e){switch(e){case A.COUNTER:case A.OBSERVABLE_COUNTER:case A.GAUGE:case A.HISTOGRAM:case A.OBSERVABLE_GAUGE:return lt.DELTA;case A.UP_DOWN_COUNTER:case A.OBSERVABLE_UP_DOWN_COUNTER:return lt.CUMULATIVE}},Ku=function(e){switch(e){case A.COUNTER:case A.HISTOGRAM:return lt.DELTA;case A.GAUGE:case A.UP_DOWN_COUNTER:case A.OBSERVABLE_UP_DOWN_COUNTER:case A.OBSERVABLE_COUNTER:case A.OBSERVABLE_GAUGE:return lt.CUMULATIVE}};function Tb(){var e=sd(),t=e.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE.trim().toLowerCase();return t==="cumulative"?ro:t==="delta"?Xu:t==="lowmemory"?Ku:(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."),ro)}function bb(e){return e!=null?e===Kn.DELTA?Xu:e===Kn.LOWMEMORY?Ku:ro:Tb()}function Sb(e){return e!=null&&e.aggregationPreference?e.aggregationPreference:function(t){return Et.Default()}}var Ob=function(e){Eb(t,e);function t(n,r){var i=e.call(this,n)||this;return i._aggregationSelector=Sb(r),i._aggregationTemporalitySelector=bb(r?.temporalityPreference),i}return t.prototype.selectAggregation=function(n){return this._aggregationSelector(n)},t.prototype.selectAggregationTemporality=function(n){return this._aggregationTemporalitySelector(n)},t}(Ks),wb=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)}}(),Ab=function(e){wb(t,e);function t(n){return e.call(this,qu(n??{},Vu,"v1/metrics",{"Content-Type":"application/json"}),n)||this}return t}(Ob);function Lb(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:zd(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 Rb(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]=Lb(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 Cb=(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}},Wu=(e,t,n,r)=>{const i=o=>{if(Cb(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 Nb extends gb{constructor(t,n){var r;super(et(I({},t),{headers:{}})),R(this,"url"),R(this,"unloading",!1),this.sampler=n,this.url=(r=t?.url)!=null?r:""}setUnloading(t){this.unloading=t}export(t,n){const r=Rb(t,this.sampler);if(r.length===0)return;if(this.unloading){const a=Hu.serializeRequest(r);if(!a||!this.url)return n({code:B.FAILED,error:new Error("keepalive export failed: serializer returned empty or url missing")});Wu(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>Cr)return n({code:B.FAILED,error:a.error});new Promise(u=>setTimeout(u,Nr+xr*Math.pow(2,i))).then(()=>{super.export(r,o)})};super.export(r,o)}}class xb extends Ab{constructor(t){var n;super(et(I({},t),{headers:{}})),R(this,"url"),R(this,"unloading",!1),this.url=(n=t?.url)!=null?n:""}setUnloading(t){this.unloading=t}export(t,n){if(this.unloading){const o=Vu.serializeRequest(t);if(!o||!this.url)return n({code:B.FAILED,error:new Error("keepalive export failed: serializer returned empty or url missing")});Wu(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>Cr)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,Nr+xr*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 Pb="OT_ZONE_CONTEXT",Ib="Navigation:";function kb(){return!1}const io=class te extends Ja{constructor(t={}){var n,r;super(te.moduleName,te.version,t),R(this,"_spansData",new WeakMap),R(this,"_zonePatched"),R(this,"_wrappedListeners",new WeakMap),R(this,"_eventsSpanMap",new WeakMap),R(this,"_eventNames"),R(this,"_shouldPreventSpanCreation"),R(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:kb}init(){}_checkForTimeout(t,n){const r=this._spansData.get(n);r&&(t.source==="setTimeout"?r.hrTimeLastTimeout=fd():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=Ns(o,!0);try{const c=this.tracer.startSpan(a,{attributes:{[wt]: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(N.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(Pb);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),N.with(k.setSpan(N.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(){tt(history.replaceState)&&this._unwrap(history,"replaceState"),tt(history.pushState)&&this._unwrap(history,"pushState"),tt(history.back)&&this._unwrap(history,"back"),tt(history.forward)&&this._unwrap(history,"forward"),tt(history.go)&&this._unwrap(history,"go")}_updateInteractionName(t){const n=k.getSpan(N.active());n&&typeof n.updateName=="function"&&n.updateName(`${Ib} ${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 N.with(k.setSpan(N.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",te.moduleName,te.version,"zone:",!!t),t?(tt(t.prototype.runTask)&&(this._unwrap(t.prototype,"runTask"),this._diag.debug("removing previous patch from method runTask")),tt(t.prototype.scheduleTask)&&(this._unwrap(t.prototype,"scheduleTask"),this._diag.debug("removing previous patch from method scheduleTask")),tt(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=>{tt(n.addEventListener)&&(this._unwrap(n,"addEventListener"),this._diag.debug("removing previous patch from method addEventListener")),tt(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",te.moduleName,te.version,"zone:",!!t),t&&this._zonePatched?(tt(t.prototype.runTask)&&this._unwrap(t.prototype,"runTask"),tt(t.prototype.scheduleTask)&&this._unwrap(t.prototype,"scheduleTask"),tt(t.prototype.cancelTask)&&this._unwrap(t.prototype,"cancelTask")):this._getPatchableEventTargets().forEach(n=>{tt(n.addEventListener)&&this._unwrap(n,"addEventListener"),tt(n.removeEventListener)&&this._unwrap(n,"removeEventListener")}),this._unpatchHistoryApi()}_getZoneWithPrototype(){return window.Zone}};R(io,"version","0.1.1"),R(io,"moduleName","user-interaction");let Mb=io;const oo=class go extends Ja{constructor(t={}){super(go.moduleName,go.version,t),R(this,"_getLDContextKeyAttributes"),R(this,"_unlisten"),R(this,"_lastUrl",""),this._getLDContextKeyAttributes=t.getLDContextKeyAttributes}init(){}enable(){this._lastUrl=window.location.href,this._unlisten=zp(t=>{var n;const r=this._lastUrl;if(this._lastUrl=t,r!==t)try{const i=this.tracer.startSpan(Bp,{attributes:{[wt]: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}};R(oo,"version","0.1.0"),R(oo,"moduleName","location-change");let Db=oo,q={},_e,Wn;const Wt="highlight.record",Ub="highlight.session_id",ao=new Map,Yu=e=>`${e.spanContext().traceId}:${e.spanContext().spanId}`,Ju="launchdarkly.js.log",jb="launchdarkly.exception.id",Qu="launchdarkly.sampling.ratio",Zu="log.severity",tc="log.message",$b=(e,t)=>{var n,r,i,o,a,u,c,s,l,p;if(q.tracerProvider||q.meterProvider){console.warn("OTEL already initialized. Skipping...");return}_e=e;const f=e.backendUrl||void 0||"https://pub.highlight.io",m=[...(r=(n=e.networkRecordingOptions)==null?void 0:n.urlBlocklist)!=null?r:[],...rg],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}},_=new Nb(y,t),E=new Yn(_,{maxExportBatchSize:1024,maxQueueSize:2048,exportTimeoutMillis:y.timeoutMillis,scheduledDelayMillis:5e3}),S=new Xe({[up]:(o=e.serviceName)!=null?o:"highlight-browser",[cp]:e.serviceVersion,"deployment.environment.name":v,"highlight.project_id":e.projectId,[hp]:navigator.userAgent,"browser.language":navigator.language,"telemetry.distro.name":"@highlight-run/observability","telemetry.distro.version":Kp});q.tracerProvider=new vm({resource:S,mergeResourceWithDefaults:!0,spanProcessors:[E]}),k.setGlobalTracerProvider(q.tracerProvider);const x=new xb(et(I({},y),{url:e.otlpEndpoint+"/v1/metrics"})),j=new zE({exporter:x,exportIntervalMillis:y.timeoutMillis,exportTimeoutMillis:y.timeoutMillis});q.meterProvider=new xT({resource:S,readers:[j]}),ce.setGlobalMeterProvider(q.meterProvider);let $=[];if(((a=e.instrumentations)==null?void 0:a["@opentelemetry/instrumentation-document-load"])!==!1&&$.push(new Im({applyCustomAttributesOnSpan:{documentLoad:ic,documentFetch:ic,resourceFetch:Wb}})),((u=e.instrumentations)==null?void 0:u["@opentelemetry/instrumentation-user-interaction"])!==!1&&$.push(new Mb({productAnalyticsEvents:e.productAnalyticsEvents,getLDContextKeyAttributes:e.getLDContextKeyAttributes})),((c=e.productAnalyticsEvents)==null?void 0:c.pageViews)!==!1&&$.push(new Db({getLDContextKeyAttributes:e.getLDContextKeyAttributes})),(s=e.networkRecordingOptions)!=null&&s.enabled){if(((l=e.instrumentations)==null?void 0:l["@opentelemetry/instrumentation-fetch"])!==!1){const X=new E_({propagateTraceHeaderCorsUrls:ac(e.tracingOrigins),applyCustomAttributesOnSpan:(U,Tt,yt)=>{var W,Jt;if(!U.attributes)return;const bt=U;if(bt.attributes[Wt]!==!1){if(rc(U,Tt.body,Tt.headers,e.networkRecordingOptions),!(yt instanceof Response)){U.setAttributes({"http.response.error":yt.message,[Xo]:yt.status});return}if(!((W=e.networkRecordingOptions)!=null&&W.requestResponseSanitizer&&(uo(U,e.networkRecordingOptions.requestResponseSanitizer),bt.attributes[Wt]===!1))&&(Jt=e.networkRecordingOptions)!=null&&Jt.recordHeadersAndBody){const h=ut(void 0,null,function*(){var g,L,H,V,M,Qt;const Zt=yield dg(yt,(g=e.networkRecordingOptions)==null?void 0:g.bodyKeysToRecord,(L=e.networkRecordingOptions)==null?void 0:L.networkBodyKeysToRedact),nn=Object.fromEntries(yt.headers.entries()),wS=Di((V=(H=e.networkRecordingOptions)==null?void 0:H.networkHeadersToRedact)!=null?V:[],nn,(M=e.networkRecordingOptions)==null?void 0:M.headerKeysToRecord),AS=so(wS,"http.response.header");Object.assign(U.attributes,I({"http.response.body":Zt},AS)),(Qt=e.networkRecordingOptions)!=null&&Qt.requestResponseSanitizer&&uo(U,e.networkRecordingOptions.requestResponseSanitizer)});ao.set(Yu(U),h)}}}});$.push(X)}((p=e.instrumentations)==null?void 0:p["@opentelemetry/instrumentation-xml-http-request"])!==!1&&$.push(new eg({propagateTraceHeaderCorsUrls:ac(e.tracingOrigins),applyCustomAttributesOnSpan:(X,U)=>{var Tt,yt,W,Jt;const bt=U;if(!(!X.attributes||X.attributes[Wt]===!1)){if(rc(X,bt._body,bt._requestHeaders,e.networkRecordingOptions),(Tt=e.networkRecordingOptions)!=null&&Tt.recordHeadersAndBody){let h="";(U.responseType===""||U.responseType==="text")&&(h=Ui(U.responseText,(yt=e.networkRecordingOptions)==null?void 0:yt.networkBodyKeysToRedact,(W=e.networkRecordingOptions)==null?void 0:W.bodyKeysToRecord,void 0));const g=Gb(U.getAllResponseHeaders());Xb(X,g,h,e.networkRecordingOptions)}(Jt=e.networkRecordingOptions)!=null&&Jt.requestResponseSanitizer&&uo(X,e.networkRecordingOptions.requestResponseSanitizer)}}}))}ev({instrumentations:$});const nt=new Ls;return nt.enable(),q.tracerProvider.register({contextManager:nt,propagator:new vd({propagators:[new Gh,new Fb({backendUrl:f,otlpEndpoint:e.otlpEndpoint,tracingOrigins:e.tracingOrigins,urlBlocklist:m})]})}),Wn=Bb(_,x,E,()=>q),q},Bb=(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 Os{constructor(){super(...arguments),R(this,"_pendingSpans",new Set),R(this,"_skipPendingOnFlush",!1)}setSkipPendingOnFlush(t){this._skipPendingOnFlush=t}onStart(t,n){t.setAttribute(Ub,At()),super.onStart(t,n)}onEnd(t){if(t.attributes[Wt]===!1)return;const n=Yu(t),r=ao.get(n);if(r){const i=r.catch(o=>{console.warn("[CustomBatchSpanProcessor] Failed to capture response body attributes",o)}).finally(()=>{ao.delete(n),this._pendingSpans.delete(i),t.attributes[Wt]!==!1&&super.onEnd(t)});this._pendingSpans.add(i);return}super.onEnd(t)}shutdown(){return ut(this,null,function*(){return this._skipPendingOnFlush||(yield Promise.allSettled(this._pendingSpans)),ha(Yn.prototype,this,"shutdown").call(this)})}forceFlush(){return ut(this,null,function*(){return this._skipPendingOnFlush||(yield Promise.allSettled(this._pendingSpans)),ha(Yn.prototype,this,"forceFlush").call(this)})}}class Fb extends Pd{constructor(t){super(),R(this,"highlightEndpoints"),R(this,"tracingOrigins"),R(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=sc(o);typeof a=="string"&&(Kb(a,this.highlightEndpoints,this.tracingOrigins,this.urlBlocklist)||o.setAttribute(Wt,!1),!fg(a,(i=this.tracingOrigins)!=null?i:[],this.urlBlocklist))||super.inject(t,n,r)}}const ec="highlight-browser",Vb=ec,nc=()=>{var e;return(e=q.tracerProvider)==null?void 0:e.getTracer(ec)},Jn=()=>{var e;return(e=q.meterProvider)==null?void 0:e.getMeter(Vb)},Hb=()=>ut(void 0,null,function*(){Wn&&(Wn(),Wn=void 0),yield Promise.allSettled([ut(void 0,null,function*(){q.tracerProvider?(yield q.tracerProvider.shutdown(),q.tracerProvider=void 0):console.warn("OTEL shutdown called without initialized tracerProvider.")}),ut(void 0,null,function*(){q.meterProvider?(yield q.meterProvider.shutdown(),q.meterProvider=void 0):console.warn("OTEL shutdown called without initialized meterProvider.")})])}),rc=(e,t,n,r)=>{var i;if(!e.attributes)return;const o=sc(e),a=qs(o),u=zs(a),c=typeof t=="string"?t:String(t);try{const l=t?JSON.parse(c):void 0;l!=null&&l.operationName&&e.setAttribute("graphql.operation.name",l.operationName)}catch{}e.setAttributes({"highlight.type":"http.request",[me]:a,[wt]:a,[Ko]:u.pathname,[fp]:u.search});const s=Array.from(u.searchParams.entries());if(s.length>0&&e.setAttribute("url.query_params",JSON.stringify(Object.fromEntries(s))),r!=null&&r.recordHeadersAndBody){const l=Ui(t,r.networkBodyKeysToRedact,r.bodyKeysToRecord,n);e.setAttribute("http.request.body",l);const p=Di((i=r.networkHeadersToRedact)!=null?i:[],n,r.headerKeysToRecord),f=so(p,"http.request.header");e.setAttributes(f)}},Gb=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},so=(e,t)=>{const n={};return Object.entries(e).forEach(([r,i])=>{const o=r.toLowerCase().replace(/_/g,"-"),a=`${t}.${o}`,u=qb(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},zb=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"]),qb=(e,t)=>zb.has(e)?t.split(",").map(n=>n.trim()).filter(n=>n.length>0):[t],Xb=(e,t,n,r)=>{var i;e.setAttribute("http.response.body",n);const o=Di((i=r.networkHeadersToRedact)!=null?i:[],t,r.headerKeysToRecord),a=so(o,"http.response.header");e.setAttributes(a)},uo=(e,t)=>{var n,r,i,o,a,u,c,s,l,p;const f=e.attributes,m={},v={};for(const[x,j]of Object.entries(f))x.startsWith("http.request.header.")&&(m[x.slice(20)]=String(j)),x.startsWith("http.response.header.")&&(v[x.slice(21)]=String(j));let y={request:{sessionSecureID:"",id:"",url:(r=(n=f[wt])!=null?n:f[me])!=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[Xo])!=null?a:0),headers:v,body:(u=f["http.response.body"])!=null?u:""},urlBlocked:!1},_=!0;try{y.request.body=JSON.parse(y.request.body)}catch{_=!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,{[Wt]:!1});return}_&&(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:""})},Kb=(e,t,n,r)=>r!=null&&r.some(i=>e.toLowerCase().includes(i))?!1:pg(e,t),ic=e=>{var t,n,r;if(!e.events)return;const i=e.events,o={unload:it("unloadEventStart","unloadEventEnd",i),dom_interactive:it("fetchStart","domInteractive",i),dom_content_loaded:it("domContentLoadedEventStart","domContentLoadedEventEnd",i),dom_complete:it("fetchStart","domComplete",i),load_event:it("loadEventStart","loadEventEnd",i),document_load:it("fetchStart","loadEventEnd",i),first_paint:it("fetchStart","firstPaint",i),first_contentful_paint:it("fetchStart","firstContentfulPaint",i),domain_lookup:it("domainLookupStart","domainLookupEnd",i),connect:it("connectStart","connectEnd",i),request:it("requestStart","requestEnd",i),response:it("responseStart","responseEnd",i)},a=(n=(t=_e?.getIntegrations)==null?void 0:t.call(_e))!=null?n:[];if(o.document_load!==void 0)for(const u of a)u.recordGauge((r=_e?.sessionSecureId)!=null?r:"",{name:Fp,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`,oc(c)))})};function it(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 Wb=(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`,oc(i))})},oc=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`},ac=e=>e===!0?[/localhost/,/^\//,new RegExp(window.location.host)]:Array.isArray(e)?e.map(t=>typeof t=="string"?new RegExp(t):t):/^$/,sc=e=>e.attributes[wt]?e.attributes[wt]:e.attributes[me],Yb=30,Jb=()=>new Promise(e=>requestAnimationFrame(t=>requestAnimationFrame(n=>e(n-t)))),Qb=()=>ut(void 0,null,function*(){const e=[];for(let t=0;t<Yb;t++)e.push(yield Jb());return e.reduce((t,n)=>t+n,0)/e.length}),Zb=(e,t)=>{let n={},r=16.666666666666668;Qb().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?Wp(n.event.target):""};return window.addEventListener("click",i,!0),window.addEventListener("keydown",i,!0),()=>{window.removeEventListener("keydown",i,!0),window.removeEventListener("click",i,!0)}},tS=typeof window<"u",uc=tS&&"performance"in window&&"memory"in performance?performance:{memory:{}},eS=(e,t)=>{let n=0,r=0;const i=()=>{const s=(new Date().getTime()-t)/1e3,l=uc.memory.jsHeapSizeLimit||0,p=uc.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 It,Ze,cc,Qn,co,lc=-1,Yt=function(e){addEventListener("pageshow",function(t){t.persisted&&(lc=t.timeStamp,e(t))},!0)},lo=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},Zn=function(){var e=lo();return e&&e.activationStart||0},ot=function(e,t){var n=lo(),r="navigate";return lc>=0?r="back-forward-cache":n&&(document.prerendering||Zn()>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}},ge=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{}},at=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))}},po=function(e){requestAnimationFrame(function(){return requestAnimationFrame(function(){return e()})})},tr=function(e){var t=function(n){n.type!=="pagehide"&&document.visibilityState!=="hidden"||e(n)};addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0)},fo=function(e){var t=!1;return function(n){t||(e(n),t=!0)}},Ee=-1,pc=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},er=function(e){document.visibilityState==="hidden"&&Ee>-1&&(Ee=e.type==="visibilitychange"?e.timeStamp:0,nS())},fc=function(){addEventListener("visibilitychange",er,!0),addEventListener("prerenderingchange",er,!0)},nS=function(){removeEventListener("visibilitychange",er,!0),removeEventListener("prerenderingchange",er,!0)},ho=function(){return Ee<0&&(Ee=pc(),fc(),Yt(function(){setTimeout(function(){Ee=pc(),fc()},0)})),{get firstHiddenTime(){return Ee}}},tn=function(e){document.prerendering?addEventListener("prerenderingchange",function(){return e()},!0):e()},hc=[1800,3e3],dc=function(e,t){t=t||{},tn(function(){var n,r=ho(),i=ot("FCP"),o=ge("paint",function(a){a.forEach(function(u){u.name==="first-contentful-paint"&&(o.disconnect(),u.startTime<r.firstHiddenTime&&(i.value=Math.max(u.startTime-Zn(),0),i.entries.push(u),n(!0)))})});o&&(n=at(e,i,hc,t.reportAllChanges),Yt(function(a){i=ot("FCP"),n=at(e,i,hc,t.reportAllChanges),po(function(){i.value=performance.now()-a.timeStamp,n(!0)})}))})},vc=[.1,.25],rS=function(e,t){t=t||{},dc(fo(function(){var n,r=ot("CLS",0),i=0,o=[],a=function(c){c.forEach(function(s){if(!s.hadRecentInput){var l=o[0],p=o[o.length-1];i&&s.startTime-p.startTime<1e3&&s.startTime-l.startTime<5e3?(i+=s.value,o.push(s)):(i=s.value,o=[s])}}),i>r.value&&(r.value=i,r.entries=o,n())},u=ge("layout-shift",a);u&&(n=at(e,r,vc,t.reportAllChanges),tr(function(){a(u.takeRecords()),n(!0)}),Yt(function(){i=0,r=ot("CLS",0),n=at(e,r,vc,t.reportAllChanges),po(function(){return n()})}),setTimeout(n,0))}))},en={passive:!0,capture:!0},iS=new Date,yc=function(e,t){It||(It=t,Ze=e,cc=new Date,_c(removeEventListener),mc())},mc=function(){if(Ze>=0&&Ze<cc-iS){var e={entryType:"first-input",name:It.type,target:It.target,cancelable:It.cancelable,startTime:It.timeStamp,processingStart:It.timeStamp+Ze};Qn.forEach(function(t){t(e)}),Qn=[]}},oS=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(){yc(n,r),a()},o=function(){a()},a=function(){removeEventListener("pointerup",i,en),removeEventListener("pointercancel",o,en)};addEventListener("pointerup",i,en),addEventListener("pointercancel",o,en)}(t,e):yc(t,e)}},_c=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach(function(t){return e(t,oS,en)})},gc=[100,300],aS=function(e,t){t=t||{},tn(function(){var n,r=ho(),i=ot("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=ge("first-input",a);n=at(e,i,gc,t.reportAllChanges),u&&tr(fo(function(){a(u.takeRecords()),u.disconnect()})),u&&Yt(function(){var c;i=ot("FID"),n=at(e,i,gc,t.reportAllChanges),Qn=[],Ze=-1,It=null,_c(addEventListener),c=o,Qn.push(c),mc()})})},Ec=0,vo=1/0,nr=0,sS=function(e){e.forEach(function(t){t.interactionId&&(vo=Math.min(vo,t.interactionId),nr=Math.max(nr,t.interactionId),Ec=nr?(nr-vo)/7+1:0)})},Tc=function(){return co?Ec:performance.interactionCount||0},uS=function(){"interactionCount"in performance||co||(co=ge("event",sS,{type:"event",buffered:!0,durationThreshold:0}))},bc=[200,500],Sc=0,Oc=function(){return Tc()-Sc},vt=[],yo={},wc=function(e){var t=vt[vt.length-1],n=yo[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]};yo[r.id]=r,vt.push(r)}vt.sort(function(i,o){return o.latency-i.latency}),vt.splice(10).forEach(function(i){delete yo[i.id]})}},cS=function(e,t){t=t||{},tn(function(){var n;uS();var r,i=ot("INP"),o=function(u){u.forEach(function(l){l.interactionId&&wc(l),l.entryType==="first-input"&&!vt.some(function(p){return p.entries.some(function(f){return l.duration===f.duration&&l.startTime===f.startTime})})&&wc(l)});var c,s=(c=Math.min(vt.length-1,Math.floor(Oc()/50)),vt[c]);s&&s.latency!==i.value&&(i.value=s.latency,i.entries=s.entries,r())},a=ge("event",o,{durationThreshold:(n=t.durationThreshold)!==null&&n!==void 0?n:40});r=at(e,i,bc,t.reportAllChanges),a&&("interactionId"in PerformanceEventTiming.prototype&&a.observe({type:"first-input",buffered:!0}),tr(function(){o(a.takeRecords()),i.value<0&&Oc()>0&&(i.value=0,i.entries=[]),r(!0)}),Yt(function(){vt=[],Sc=Tc(),i=ot("INP"),r=at(e,i,bc,t.reportAllChanges)}))})},Ac=[2500,4e3],mo={},lS=function(e,t){t=t||{},tn(function(){var n,r=ho(),i=ot("LCP"),o=function(c){var s=c[c.length-1];s&&s.startTime<r.firstHiddenTime&&(i.value=Math.max(s.startTime-Zn(),0),i.entries=[s],n())},a=ge("largest-contentful-paint",o);if(a){n=at(e,i,Ac,t.reportAllChanges);var u=fo(function(){mo[i.id]||(o(a.takeRecords()),a.disconnect(),mo[i.id]=!0,n(!0))});["keydown","click"].forEach(function(c){addEventListener(c,function(){return setTimeout(u,0)},!0)}),tr(u),Yt(function(c){i=ot("LCP"),n=at(e,i,Ac,t.reportAllChanges),po(function(){i.value=performance.now()-c.timeStamp,mo[i.id]=!0,n(!0)})})}})},Lc=[800,1800],pS=function e(t){document.prerendering?tn(function(){return e(t)}):document.readyState!=="complete"?addEventListener("load",function(){return e(t)},!0):setTimeout(t,0)},fS=function(e,t){t=t||{};var n=ot("TTFB"),r=at(e,n,Lc,t.reportAllChanges);pS(function(){var i=lo();if(i){var o=i.responseStart;if(o<=0||o>performance.now())return;n.value=Math.max(o-Zn(),0),n.entries=[i],r(!0),Yt(function(){n=ot("TTFB",0),(r=at(e,n,Lc,t.reportAllChanges))(!0)})}})};const hS=e=>(rS(e),dc(e),aS(e),lS(e),fS(e),cS(e),()=>{}),Te=typeof navigator<"u"&&"connection"in navigator?navigator.connection:{},dS=(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)}},vS=()=>{if(!("performance"in window&&"memory"in performance))return{getDeviceDetails:void 0,getCurrentDeviceDetails:void 0};const e=window.performance;return{getDeviceDetails:()=>({deviceMemory:yS(navigator.deviceMemory||0)}),getCurrentDeviceDetails:()=>{const t=_o(e.memory.jsHeapSizeLimit),n=_o(e.memory.totalJSHeapSize),r=_o(e.memory.usedJSHeapSize);return{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}},_o=e=>e/Math.pow(1e3,2),yS=e=>1024*e;function mS(e){return"regexValue"in e}function _S(e){return"matchValue"in e}function gS(e){const t=Math.trunc(e);return t===1?!0:t===0?!1:Math.floor(Math.random()*t)===0}class ES{constructor(t=gS){R(this,"regexCache",new Map),R(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===Ju?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(_S(t))return t.matchValue===n;if(mS(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[Zu];if(!this.matchesValue(t.severityText,r))return!1}if(t.message){const r=n[tc];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:{[Qu]: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:{[Qu]:r.samplingRatio}}}return{sample:!0}}}const Rc=()=>{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},TS="exception",bS=function(e,t,n){if(!e)return;const r=I({},n);typeof t=="string"?r[Tr]=t:t&&(t.code?r[br]=t.code.toString():t.name&&(r[br]=t.name),t.message&&(r[Tr]=t.message),t.stack&&(r[ap]=t.stack)),r[br]||r[Tr]?e.addEvent(TS,r):Ot("otel","recordException","warn",`Failed to record an exception ${t}`)};class SS{constructor(t){R(this,"organizationID"),R(this,"_options"),R(this,"_integrations",[]),R(this,"_gauges",new Map),R(this,"_counters",new Map),R(this,"_histograms",new Map),R(this,"_up_down_counters",new Map),R(this,"sampler",new ES),R(this,"_started",!1),R(this,"_ldContextKeys"),R(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])=>[`${Up}.${n}`,r])))}getLDContextKeyAttributes(){return this._ldContextKeys}start(){return ut(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,$b({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 _=new kl((y=this._options.backendUrl)!=null?y:"https://pub.observability.app.launchdarkly.com",{headers:{}});this.graphqlSDK=np(_,wp()),yield this.configureSampling(),this.setupListeners()})}stop(){return ut(this,null,function*(){this._started&&(this._started=!1,yield Hb())})}configureSampling(){return ut(this,null,function*(){try{const t=yield this.graphqlSDK.GetSamplingConfig({organization_verbose_id:`${this.organizationID}`});this.sampler.setConfig(t.sampling)}catch(t){St("sampling","warn",`LaunchDarkly Observability: Failed to configure sampling: ${t}`)}})}_recordLog(t,n,r,i){this.startSpan(Ju,o=>{const a=typeof t=="string"?t:Le(t),u=i?Le(i.map(c=>c.toString())):void 0;if(o?.addEvent("log",I({[Zu]:n,[tc]:a,"code.stacktrace":u},r)),this._options.reportConsoleErrors&&n==="error"){o?.recordException(new Error(a)),o?.setStatus({code:On.ERROR,message:a});const c=new Error(a);i&&(c.stack=u),this.recordError(c)}})}_recordErrorMessage(t,n){try{t.payload&&(n=I(I({},JSON.parse(t.payload)),n||{}))}catch{}this.startSpan("highlight.exception",o=>{var a;bS(o,(a=t.error)!=null?a:new Error(t.event),{[jb]:t.id}),o?.setAttributes(I({event:t.event,type:t.type,url:t.url,source:t.source,lineNumber:t.lineNumber,columnNumber:t.columnNumber},n))});const r=t,i=uf(r,["payload"]);for(const o of this._integrations)o.error(At(),et(I({},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=et(I({},r),{"exception.cause":JSON.stringify(t.cause)}));let l=n?n+":"+t.message:t.message;o==="React.ErrorBoundary"&&(l="ErrorBoundary: "+l);const p=En(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:_a()};this._recordErrorMessage(f,r)}recordCount(t){var n;let r=this._counters.get(t.name);if(!r){if(r=(n=Jn())==null?void 0:n.createCounter(t.name),!r)return;this._counters.set(t.name,r)}r.add(t.value,et(I({},t.attributes),{"highlight.session_id":At()}))}recordGauge(t){var n,r,i,o;let a=this._gauges.get(t.name);if(!a){if(a=(n=Jn())==null?void 0:n.createGauge(t.name),!a)return;this._gauges.set(t.name,a)}a.record(t.value,et(I({},t.attributes),{"highlight.session_id":At()}));const u={name:t.name,value:t.value,category:(r=t.attributes)==null?void 0:r.category,group:(o=(i=t.attributes)==null?void 0:i.group)==null?void 0:o.toString(),tags:t.attributes?Object.entries(t.attributes).map(([c,s])=>{var l;return{name:c??"",value:(l=s?.toString())!=null?l:""}}):[]};for(const c of this._integrations)c.recordGauge(At(),u)}recordIncr(t){this.recordCount(et(I({},t),{value:1}))}recordHistogram(t){var n;let r=this._histograms.get(t.name);if(!r){if(r=(n=Jn())==null?void 0:n.createHistogram(t.name),!r)return;this._histograms.set(t.name,r)}r.record(t.value,et(I({},t.attributes),{"highlight.session_id":At()}))}recordUpDownCounter(t){var n;let r=this._up_down_counters.get(t.name);if(!r){if(r=(n=Jn())==null?void 0:n.createUpDownCounter(t.name),!r)return;this._up_down_counters.set(t.name,r)}r.add(t.value,et(I({},t.attributes),{"highlight.session_id":At()}))}startSpan(t,n,r,i){const o=nc();if(!o){const u=Rc();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=nc();if(!o){const a=Rc();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 Gp(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:ct.Device,group:window.location.href}}),this.recordGauge({name:Mt.ViewportWidth,value:n,attributes:{category:ct.Device,group:window.location.href}}),this.recordGauge({name:Mt.ScreenHeight,value:r,attributes:{category:ct.Device,group:window.location.href}}),this.recordGauge({name:Mt.ScreenWidth,value:i,attributes:{category:ct.Device,group:window.location.href}}),this.recordGauge({name:Mt.ViewportArea,value:t*n,attributes:{category:ct.Device,group:window.location.href}})}setupListeners(){var t;this._options.disableConsoleRecording||ff(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:[...cf],logger:"console",stringifyOptions:{depthOfLimit:10,numOfKeysLimit:100,stringLengthLimit:1e3}}),this._options.enablePerformanceRecording!==!1&&(eS(r=>{Object.entries(r).filter(([i])=>i!=="relativeTimestamp").forEach(([i,o])=>o&&this.recordGauge({name:i,value:o,attributes:{category:ct.Performance,group:window.location.href}}))},0),Zb(r=>{this.recordGauge({name:"Jank",value:r.jankAmount,attributes:{category:ct.WebVital,group:r.querySelector}})},0)),Tf(r=>{var i;if(Sf.includes(r.event)||Of.some(u=>r.event.includes(u)))return;const o=new Error(r.event);o.stack=Le(r.stackTrace.map(u=>u.toString()));let a={};try{r.payload&&(a=JSON.parse(r.payload))}catch{}this._recordErrorMessage(et(I({},r),{error:(i=r.error)!=null?i:o}),a)},{enablePromisePatch:!!this._options.enablePromisePatch}),hS(r=>{const{name:i,value:o}=r,{hostname:a,pathname:u,href:c}=window.location;this.recordGauge({name:i,value:o,attributes:{group:window.location.pathname,category:ct.WebVital,[wt]:qs(c),[Ko]:u,[sp]:a}})}),Yp(r=>{this.submitViewportMetrics(r)}),dS(r=>{const i={category:ct.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])=>{op(a)&&this.recordGauge({name:o,value:a,attributes:i})})},new Date().getTime());const{getDeviceDetails:n}=vS();n&&this.recordGauge({name:Mt.DeviceMemory,value:n().deviceMemory,attributes:{category:ct.Device,group:window.location.href}})}recordLog(t,n,r){return this._recordLog(t,n,r)}}class OS extends tf{constructor(t){super(t),R(this,"observe"),R(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 SS(et(I({},n),{projectId:t,sessionSecureId:this.sessionSecureID})),n!=null&&n.manualStart||this.observe.start(),rt.LDObserve.load(this.observe)}catch(r){St("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=I(I({[lp]:t.sdk.name,[pp]:t.sdk.version,[Lp]:t.clientSideId,[Pp]:"LaunchDarkly"},(n=t.application)!=null&&n.id?{[kp]:t.application.id}:{}),(r=t.application)!=null&&r.version?{[Mp]: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,_,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 x=sa(u.context);if((v=this.observe)==null||v.setLDContextKeyAttributes(x),s.status==="completed"){const j=et(I({},x),{key:(E=(_=(y=this.options)==null?void 0:y.contextFriendlyName)==null?void 0:_.call(y,u.context))!=null?E:Pr(u.context),timeout:u.timeout,canonicalKey:Pr(u.context),[Vp]:s.status});(S=this.observe)==null||S.recordLog("LD.identify","info",I(I({},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=I({[Rp]:u.flagKey,[xp]:JSON.stringify(s.value)},s.variationIndex?{[Ip]:s.variationIndex}:{});if(s.reason)for(const E in ra){const S=E,x=s.reason[S];x&&(y[ra[S]]=x)}u.context&&(y[Cp]=JSON.stringify(sa(u.context)),y[Np]=Pr(u.context));const _=I(I({},a),y);return(v=this.observe)==null||v.startSpan(Ap,E=>{E&&E.addEvent(J,_)}),c},afterTrack:u=>{var c,s,l,p,f,m,v,y,_;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=I(et(I(I({[wt]: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:{});(_=this.observe)==null||_.startSpan($p,S=>{S&&S.setAttributes(E)})}}]}}rt.default=OS,Object.defineProperties(rt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
307
+ `,Iu(s,e),`To resolve the conflict:
308
+ `,ku(s,e))}}catch(l){r={error:l}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return o},t}(),hT=function(){function t(e){this._backingStorages=e}return t.prototype.record=function(e,n,r,i){this._backingStorages.forEach(function(o){o.record(e,n,r,i)})},t}(),dT=function(){function t(e,n){this._instrumentName=e,this._valueType=n,this._buffer=new Xe}return t.prototype.observe=function(e,n){if(n===void 0&&(n={}),typeof e!="number"){T.warn("non-number value provided to metric "+this._instrumentName+": "+e);return}this._valueType===Le.INT&&!Number.isInteger(e)&&(T.warn("INT value type cannot accept a floating-point value for "+this._instrumentName+", ignoring the fractional digits."),e=Math.trunc(e),!Number.isInteger(e))||this._buffer.set(n,e)},t}(),vT=function(){function t(){this._buffer=new Map}return t.prototype.observe=function(e,n,r){if(r===void 0&&(r={}),!!Qi(e)){var i=this._buffer.get(e);if(i==null&&(i=new Xe,this._buffer.set(e,i)),typeof n!="number"){T.warn("non-number value provided to metric "+e._descriptor.name+": "+n);return}e._descriptor.valueType===Le.INT&&!Number.isInteger(n)&&(T.warn("INT value type cannot accept a floating-point value for "+e._descriptor.name+", ignoring the fractional digits."),n=Math.trunc(n),!Number.isInteger(n))||i.set(r,n)}},t}(),to=function(t,e,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(t,[])).next())})},no=function(t,e){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=e.call(t,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}}},Mu=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),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},Du=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},yT=function(){function t(){this._callbacks=[],this._batchCallbacks=[]}return t.prototype.addCallback=function(e,n){var r=this._findCallback(e,n);r>=0||this._callbacks.push({callback:e,instrument:n})},t.prototype.removeCallback=function(e,n){var r=this._findCallback(e,n);r<0||this._callbacks.splice(r,1)},t.prototype.addBatchCallback=function(e,n){var r=new Set(n.filter(Qi));if(r.size===0){T.error("BatchObservableCallback is not associated with valid instruments",n);return}var i=this._findBatchCallback(e,r);i>=0||this._batchCallbacks.push({callback:e,instruments:r})},t.prototype.removeBatchCallback=function(e,n){var r=new Set(n.filter(Qi)),i=this._findBatchCallback(e,r);i<0||this._batchCallbacks.splice(i,1)},t.prototype.observe=function(e,n){return to(this,void 0,void 0,function(){var r,i,o,a;return no(this,function(u){switch(u.label){case 0:return r=this._observeCallbacks(e,n),i=this._observeBatchCallbacks(e,n),[4,Gg(Du(Du([],Mu(r),!1),Mu(i),!1))];case 1:return o=u.sent(),a=o.filter(zg).map(function(c){return c.reason}),[2,a]}})})},t.prototype._observeCallbacks=function(e,n){var r=this;return this._callbacks.map(function(i){var o=i.callback,a=i.instrument;return to(r,void 0,void 0,function(){var u,c;return no(this,function(s){switch(s.label){case 0:return u=new dT(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,e)}),[2]}})})})},t.prototype._observeBatchCallbacks=function(e,n){var r=this;return this._batchCallbacks.map(function(i){var o=i.callback,a=i.instruments;return to(r,void 0,void 0,function(){var u,c;return no(this,function(s){switch(s.label){case 0:return u=new vT,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,e)})}),[2]}})})})},t.prototype._findCallback=function(e,n){return this._callbacks.findIndex(function(r){return r.callback===e&&r.instrument===n})},t.prototype._findBatchCallback=function(e,n){return this._batchCallbacks.findIndex(function(r){return r.callback===e&&qg(r.instruments,n)})},t}(),mT=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),_T=function(t){mT(e,t);function e(n,r,i,o,a){var u=t.call(this,n)||this;return u._attributesProcessor=i,u._aggregationCardinalityLimit=a,u._deltaMetricStorage=new Nu(r,u._aggregationCardinalityLimit),u._temporalMetricStorage=new Pu(r,o),u}return e.prototype.record=function(n,r,i,o){r=this._attributesProcessor.process(r,i),this._deltaMetricStorage.record(n,r,i,o)},e.prototype.collect=function(n,r){var i=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(n,this._instrumentDescriptor,i,r)},e}(Ru),Uu=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),ro=function(){function t(){}return t.Noop=function(){return ET},t}(),gT=function(t){Uu(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.process=function(n,r){return n},e}(ro);(function(t){Uu(e,t);function e(n){var r=t.call(this)||this;return r._allowedAttributeNames=n,r}return e.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},e})(ro);var ET=new gT,TT=function(t,e,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(t,[])).next())})},bT=function(t,e){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=e.call(t,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}}},ST=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >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},OT=function(){function t(e,n){this._meterProviderSharedState=e,this._instrumentationScope=n,this.metricStorageRegistry=new fT,this.observableRegistry=new yT,this.meter=new eT(this)}return t.prototype.registerMetricStorage=function(e){var n=this._registerMetricStorage(e,_T);return n.length===1?n[0]:new hT(n)},t.prototype.registerAsyncMetricStorage=function(e){var n=this._registerMetricStorage(e,sT);return n},t.prototype.collect=function(e,n,r){return TT(this,void 0,void 0,function(){var i,o,a;return bT(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(e),o.length===0?[2,null]:(a=o.map(function(c){return c.collect(e,n)}).filter(Vg),a.length===0?[2,{errors:i}]:[2,{scopeMetrics:{scope:this._instrumentationScope,metrics:a},errors:i}])}})})},t.prototype._registerMetricStorage=function(e,n){var r=this,i=this._meterProviderSharedState.viewRegistry.findViews(e,this._instrumentationScope),o=i.map(function(c){var s=Yg(c,e),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(e.type),u=a.map(function(c){var s=ST(c,2),l=s[0],p=s[1],f=r.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(l,e);if(f!=null)return f;var m=p.createAggregator(e),v=l.selectCardinalityLimit(e.type),y=new n(e,m,ro.Noop(),[l],v);return r.metricStorageRegistry.registerForCollector(l,y),y});o=o.concat(u)}return o},t}(),wT=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},AT=function(){function t(e){this.resource=e,this.viewRegistry=new qE,this.metricCollectors=[],this.meterSharedStates=new Map}return t.prototype.getMeterSharedState=function(e){var n=Hg(e),r=this.meterSharedStates.get(n);return r==null&&(r=new OT(this,e),this.meterSharedStates.set(n,r)),r},t.prototype.selectAggregations=function(e){var n,r,i=[];try{for(var o=wT(this.metricCollectors),a=o.next();!a.done;a=o.next()){var u=a.value;i.push([u,u.selectAggregation(e)])}}catch(c){n={error:c}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},t}(),Xn=function(t,e,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(t,[])).next())})},Kn=function(t,e){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=e.call(t,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}}},LT=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),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},RT=function(t,e,n){if(arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},CT=function(){function t(e,n){this._sharedState=e,this._metricReader=n}return t.prototype.collect=function(e){return Xn(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=Xi(Date.now()),r=[],i=[],o=Array.from(this._sharedState.meterSharedStates.values()).map(function(c){return Xn(a,void 0,void 0,function(){var s;return Kn(this,function(l){switch(l.label){case 0:return[4,c.collect(this,n,e)];case 1:return s=l.sent(),s?.scopeMetrics!=null&&r.push(s.scopeMetrics),s?.errors!=null&&i.push.apply(i,RT([],LT(s.errors),!1)),[2]}})})}),[4,Promise.all(o)];case 1:return u.sent(),[2,{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:r},errors:i}]}})})},t.prototype.forceFlush=function(e){return Xn(this,void 0,void 0,function(){return Kn(this,function(n){switch(n.label){case 0:return[4,this._metricReader.forceFlush(e)];case 1:return n.sent(),[2]}})})},t.prototype.shutdown=function(e){return Xn(this,void 0,void 0,function(){return Kn(this,function(n){switch(n.label){case 0:return[4,this._metricReader.shutdown(e)];case 1:return n.sent(),[2]}})})},t.prototype.selectAggregationTemporality=function(e){return this._metricReader.selectAggregationTemporality(e)},t.prototype.selectAggregation=function(e){return this._metricReader.selectAggregation(e)},t.prototype.selectCardinalityLimit=function(e){var n,r,i;return(i=(r=(n=this._metricReader).selectCardinalityLimit)===null||r===void 0?void 0:r.call(n,e))!==null&&i!==void 0?i:2e3},t}(),ju=function(t,e,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(t,[])).next())})},$u=function(t,e){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=e.call(t,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}}},Bu=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function NT(t,e){var n=e??Xt.empty();return t?Xt.default().merge(n):n}var xT=function(){function t(e){var n,r,i,o,a;if(this._shutdown=!1,this._sharedState=new AT(NT((a=e?.mergeResourceWithDefaults)!==null&&a!==void 0?a:!0,e?.resource)),e?.views!=null&&e.views.length>0)try{for(var u=Bu(e.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(e?.readers!=null&&e.readers.length>0)try{for(var l=Bu(e.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 t.prototype.getMeter=function(e,n,r){return n===void 0&&(n=""),r===void 0&&(r={}),this._shutdown?(T.warn("A shutdown MeterProvider cannot provide a Meter"),ih()):this._sharedState.getMeterSharedState({name:e,version:n,schemaUrl:r.schemaUrl}).meter},t.prototype.addMetricReader=function(e){var n=new CT(this._sharedState,e);e.setMetricProducer(n),this._sharedState.metricCollectors.push(n)},t.prototype.shutdown=function(e){return ju(this,void 0,void 0,function(){return $u(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(e)}))]);case 1:return n.sent(),[2]}})})},t.prototype.forceFlush=function(e){return ju(this,void 0,void 0,function(){return $u(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(e)}))];case 1:return n.sent(),[2]}})})},t}();function PT(t,e){var n=nu(e);return{resource:ru(t.resource),schemaUrl:void 0,scopeMetrics:IT(t.scopeMetrics,n)}}function IT(t,e){return Array.from(t.map(function(n){return{scope:iu(n.scope),metrics:n.metrics.map(function(r){return kT(r,e)}),schemaUrl:n.scope.schemaUrl}}))}function kT(t,e){var n={name:t.descriptor.name,description:t.descriptor.description,unit:t.descriptor.unit},r=jT(t.aggregationTemporality);switch(t.dataPointType){case de.SUM:n.sum={aggregationTemporality:r,isMonotonic:t.isMonotonic,dataPoints:Fu(t,e)};break;case de.GAUGE:n.gauge={dataPoints:Fu(t,e)};break;case de.HISTOGRAM:n.histogram={aggregationTemporality:r,dataPoints:DT(t,e)};break;case de.EXPONENTIAL_HISTOGRAM:n.exponentialHistogram={aggregationTemporality:r,dataPoints:UT(t,e)};break}return n}function MT(t,e,n){var r={attributes:He(t.attributes),startTimeUnixNano:n.encodeHrTime(t.startTime),timeUnixNano:n.encodeHrTime(t.endTime)};switch(e){case Le.INT:r.asInt=t.value;break;case Le.DOUBLE:r.asDouble=t.value;break}return r}function Fu(t,e){return t.dataPoints.map(function(n){return MT(n,t.descriptor.valueType,e)})}function DT(t,e){return t.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:e.encodeHrTime(n.startTime),timeUnixNano:e.encodeHrTime(n.endTime)}})}function UT(t,e){return t.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:e.encodeHrTime(n.startTime),timeUnixNano:e.encodeHrTime(n.endTime)}})}function jT(t){switch(t){case le.DELTA:return 1;case le.CUMULATIVE:return 2}}function $T(t,e){return{resourceMetrics:t.map(function(n){return PT(n,e)})}}var BT=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},FT=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >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 VT(t,e){var n,r=t.spanContext(),i=t.status;return{traceId:e.encodeSpanContext(r.traceId),spanId:e.encodeSpanContext(r.spanId),parentSpanId:e.encodeOptionalSpanContext(t.parentSpanId),traceState:(n=r.traceState)===null||n===void 0?void 0:n.serialize(),name:t.name,kind:t.kind==null?0:t.kind+1,startTimeUnixNano:e.encodeHrTime(t.startTime),endTimeUnixNano:e.encodeHrTime(t.endTime),attributes:He(t.attributes),droppedAttributesCount:t.droppedAttributesCount,events:t.events.map(function(o){return GT(o,e)}),droppedEventsCount:t.droppedEventsCount,status:{code:i.code,message:i.message},links:t.links.map(function(o){return HT(o,e)}),droppedLinksCount:t.droppedLinksCount}}function HT(t,e){var n;return{attributes:t.attributes?He(t.attributes):[],spanId:e.encodeSpanContext(t.context.spanId),traceId:e.encodeSpanContext(t.context.traceId),traceState:(n=t.context.traceState)===null||n===void 0?void 0:n.serialize(),droppedAttributesCount:t.droppedAttributesCount||0}}function GT(t,e){return{attributes:t.attributes?He(t.attributes):[],name:t.name,timeUnixNano:e.encodeHrTime(t.time),droppedAttributesCount:t.droppedAttributesCount||0}}function zT(t,e){var n=nu(e);return{resourceSpans:XT(t,n)}}function qT(t){var e,n,r=new Map;try{for(var i=BT(t),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){e={error:l}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}function XT(t,e){for(var n=qT(t),r=[],i=n.entries(),o=i.next();!o.done;){for(var a=FT(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 VT(y,e)});s.push({scope:iu(f[0].instrumentationLibrary),spans:m,schemaUrl:f[0].instrumentationLibrary.schemaUrl})}p=l.next()}var v={resource:ru(u),scopeSpans:s,schemaUrl:void 0};r.push(v),o=i.next()}return r}var Vu={serializeRequest:function(t){var e=$T([t],{useLongBits:!1}),n=new TextEncoder;return n.encode(JSON.stringify(e))},deserializeResponse:function(t){var e=new TextDecoder;return JSON.parse(e.decode(t))}},Hu={serializeRequest:function(t){var e=zT(t,{useHex:!0,useLongBits:!1}),n=new TextEncoder;return n.encode(JSON.stringify(e))},deserializeResponse:function(t){var e=new TextDecoder;return JSON.parse(e.decode(t))}},KT=function(t,e,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(t,[])).next())})},WT=function(t,e){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=e.call(t,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}}},YT=5,JT=1e3,QT=5e3,ZT=1.5,Gu=.2;function eb(){return Math.random()*(2*Gu)-Gu}var tb=function(){function t(e){this._transport=e}return t.prototype.retry=function(e,n,r){var i=this;return new Promise(function(o,a){setTimeout(function(){i._transport.send(e,n).then(o,a)},r)})},t.prototype.send=function(e,n){var r;return KT(this,void 0,void 0,function(){var i,o,a,u,c,s,l;return WT(this,function(p){switch(p.label){case 0:return i=Date.now()+n,[4,this._transport.send(e,n)];case 1:o=p.sent(),a=YT,u=JT,p.label=2;case 2:return o.status==="retryable"&&a>0?(a--,c=Math.max(Math.min(u,QT)+eb(),0),u=u*ZT,s=(r=o.retryInMillis)!==null&&r!==void 0?r:c,l=i-Date.now(),s>l?[2,o]:[4,this.retry(e,l,s)]):[3,4];case 3:return o=p.sent(),[3,2];case 4:return[2,o]}})})},t.prototype.shutdown=function(){return this._transport.shutdown()},t}();function zu(t){return new tb(t.transport)}function nb(t){var e=[429,502,503,504];return e.includes(t)}function rb(t){if(t!=null){var e=Number.parseInt(t,10);if(Number.isInteger(e))return e>0?e*1e3:-1;var n=new Date(t).getTime()-Date.now();return n>=0?n:0}}var ib=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >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},ob=function(){function t(e){this._parameters=e}return t.prototype.send=function(e,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=ib(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&&nb(o.status)?i({status:"retryable",retryInMillis:rb(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(e)})},t.prototype.shutdown=function(){},t}();function ab(t){return new ob(t)}var sb=function(){function t(e){this._params=e}return t.prototype.send=function(e){var n=this;return new Promise(function(r){navigator.sendBeacon(n._params.url,new Blob([e],{type:n._params.blobType}))?(T.debug("SendBeacon success"),r({status:"success"})):r({status:"failure",error:new Error("SendBeacon failed")})})},t.prototype.shutdown=function(){},t}();function ub(t){return new sb(t)}function cb(t,e){return Ys(t,e,zu({transport:ab(t)}))}function lb(t,e){return Ys(t,e,zu({transport:ub({url:t.url,blobType:t.headers()["Content-Type"]})}))}var pb=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >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 fb(t){return function(){var e,n={};return Object.entries((e=t?.())!==null&&e!==void 0?e:{}).forEach(function(r){var i=pb(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(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Ke.apply(this,arguments)};function hb(t,e,n){var r=Ke({},n()),i={};return function(){return e!=null&&Object.assign(i,e()),t!=null&&Object.assign(i,t()),Object.assign(i,r)}}function db(t){if(t!=null)try{return new URL(t),t}catch{throw new Error("Configuration: Could not parse user-provided export URL: '"+t+"'")}}function vb(t,e,n){var r,i,o,a;return Ke(Ke({},_g(t,e,n)),{headers:hb(fb(t.headers),e.headers,n.headers),url:(i=(r=db(t.url))!==null&&r!==void 0?r:e.url)!==null&&i!==void 0?i:n.url,agentOptions:(a=(o=t.agentOptions)!==null&&o!==void 0?o:e.agentOptions)!==null&&a!==void 0?a:n.agentOptions})}function yb(t,e){return Ke(Ke({},gg()),{headers:function(){return t},url:"http://localhost:4318/"+e,agentOptions:{keepAlive:!0}})}function mb(t,e,n){return vb({url:t.url,timeoutMillis:t.timeoutMillis,headers:mg(t.headers),concurrencyLimit:t.concurrencyLimit},{},yb(n,e))}function qu(t,e,n,r){var i=!!t.headers||typeof navigator.sendBeacon!="function",o=mb(t,n,r);return i?cb(o,e):lb(o,e)}var _b=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),gb=function(t){_b(e,t);function e(n){return n===void 0&&(n={}),t.call(this,qu(n,Hu,"v1/traces",{"Content-Type":"application/json"}))||this}return e}(Ks),Wn;(function(t){t[t.DELTA=0]="DELTA",t[t.CUMULATIVE=1]="CUMULATIVE",t[t.LOWMEMORY=2]="LOWMEMORY"})(Wn||(Wn={}));var Eb=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),io=function(){return le.CUMULATIVE},Xu=function(t){switch(t){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}},Ku=function(t){switch(t){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 Tb(){var t=sd(),e=t.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE.trim().toLowerCase();return e==="cumulative"?io:e==="delta"?Xu:e==="lowmemory"?Ku:(T.warn("OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE is set to '"+t.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE+"', but only 'cumulative' and 'delta' are allowed. Using default ('cumulative') instead."),io)}function bb(t){return t!=null?t===Wn.DELTA?Xu:t===Wn.LOWMEMORY?Ku:io:Tb()}function Sb(t){return t!=null&&t.aggregationPreference?t.aggregationPreference:function(e){return Ee.Default()}}var Ob=function(t){Eb(e,t);function e(n,r){var i=t.call(this,n)||this;return i._aggregationSelector=Sb(r),i._aggregationTemporalitySelector=bb(r?.temporalityPreference),i}return e.prototype.selectAggregation=function(n){return this._aggregationSelector(n)},e.prototype.selectAggregationTemporality=function(n){return this._aggregationTemporalitySelector(n)},e}(Ks),wb=function(){var t=function(e,n){return t=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])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ab=function(t){wb(e,t);function e(n){return t.call(this,qu(n??{},Vu,"v1/metrics",{"Content-Type":"application/json"}),n)||this}return e}(Ob);function Lb(t,e){const n=t.spanContext();return{name:t.name,kind:t.kind,spanContext:()=>n,parentSpanId:t.parentSpanId,startTime:t.startTime,endTime:t.endTime,status:t.status,attributes:zd(t.attributes,e),links:t.links,events:t.events,duration:t.duration,ended:t.ended,resource:t.resource,instrumentationLibrary:t.instrumentationLibrary,droppedAttributesCount:t.droppedAttributesCount,droppedEventsCount:t.droppedEventsCount,droppedLinksCount:t.droppedLinksCount}}function Rb(t,e){if(!e.isSamplingEnabled())return t;const n=[],r={},i={};for(const o of t){o.parentSpanId&&(i[o.parentSpanId]=i[o.parentSpanId]||[],i[o.parentSpanId].push(o.spanContext().spanId));const a=e.shouldSample(o);a.sample?a.attributes?r[o.spanContext().spanId]=Lb(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 Cb=(t,e,n)=>{if(typeof navigator>"u"||!navigator.sendBeacon)return!1;try{const r=new Blob([e],{type:n});return navigator.sendBeacon(t,r)}catch{return!1}},Wu=(t,e,n,r)=>{const i=o=>{if(Cb(t,e,n))return r({code:B.SUCCESS});r({code:B.FAILED,error:o})};try{const o=new Blob([e],{type:n});fetch(t,{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 Nb extends gb{constructor(e,n){var r;super(Q(x({},e),{headers:{}})),R(this,"url"),R(this,"unloading",!1),this.sampler=n,this.url=(r=e?.url)!=null?r:""}setUnloading(e){this.unloading=e}export(e,n){const r=Rb(e,this.sampler);if(r.length===0)return;if(this.unloading){const a=Hu.serializeRequest(r);if(!a||!this.url)return n({code:B.FAILED,error:new Error("keepalive export failed: serializer returned empty or url missing")});Wu(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>Nr)return n({code:B.FAILED,error:a.error});new Promise(u=>setTimeout(u,xr+Pr*Math.pow(2,i))).then(()=>{super.export(r,o)})};super.export(r,o)}}class xb extends Ab{constructor(e){var n;super(Q(x({},e),{headers:{}})),R(this,"url"),R(this,"unloading",!1),this.url=(n=e?.url)!=null?n:""}setUnloading(e){this.unloading=e}export(e,n){if(this.unloading){const o=Vu.serializeRequest(e);if(!o||!this.url)return n({code:B.FAILED,error:new Error("keepalive export failed: serializer returned empty or url missing")});Wu(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>Nr)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,xr+Pr*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(e,i)})};super.export(e,i)}}const Pb="OT_ZONE_CONTEXT",Ib="Navigation:";function kb(){return!1}const oo=class et extends Ja{constructor(e={}){var n,r;super(et.moduleName,et.version,e),R(this,"_spansData",new WeakMap),R(this,"_zonePatched"),R(this,"_wrappedListeners",new WeakMap),R(this,"_eventsSpanMap",new WeakMap),R(this,"_eventNames"),R(this,"_shouldPreventSpanCreation"),R(this,"_getLDContextKeyAttributes"),this._getLDContextKeyAttributes=e.getLDContextKeyAttributes,this._eventNames=new Set((n=e?.eventNames)!=null?n:[]),((r=e.productAnalyticsEvents)==null?void 0:r.clicks)!==!1&&this._eventNames.add("click"),this._shouldPreventSpanCreation=typeof e?.shouldPreventSpanCreation=="function"?e.shouldPreventSpanCreation:kb}init(){}_checkForTimeout(e,n){const r=this._spansData.get(n);r&&(e.source==="setTimeout"?r.hrTimeLastTimeout=fd():e.source!=="Promise.then"&&e.source!=="setTimeout"&&(r.hrTimeLastTimeout=void 0))}_allowEventName(e){return this._eventNames.has(e)}_createSpan(e,n){var r,i;const o=e?.target,a=e?.type;if(!(o instanceof HTMLElement)||!o.getAttribute||o.hasAttribute("disabled")||!this._allowEventName(a))return;const u=Ns(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(N.active(),n):void 0);e instanceof MouseEvent&&(c.setAttribute("event.x",e.clientX),c.setAttribute("event.y",e.clientY),c.setAttribute("event.relativeX",e.clientX/window.innerWidth),c.setAttribute("event.relativeY",e.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(e){const n=this._spansData.get(e);n&&(n.taskCount--,n.taskCount===0&&this._tryToEndSpan(e,n.hrTimeLastTimeout))}_getCurrentSpan(e){const n=e.get(Pb);return n&&k.getSpan(n)}_incrementTask(e){const n=this._spansData.get(e);n&&n.taskCount++}addPatchedListener(e,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(e)?!1:(a.set(e,i),!0)}removePatchedListener(e,n,r){const i=this._wrappedListeners.get(r);if(!i)return;const o=i.get(n);if(!o)return;const a=o.get(e);return a&&(o.delete(e),o.size===0&&(i.delete(n),i.size===0&&this._wrappedListeners.delete(r))),a}_invokeListener(e,n,r){return typeof e=="function"?e.apply(n,r):e.handleEvent(r[0])}_patchAddEventListener(){const e=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 e._invokeListener(o,this,s);if(Date.now()-((l=n.get(f.type))!=null?l:0)<1e3/60)return e._invokeListener(o,this,s);n.set(f.type,Date.now()),f&&(p=e._eventsSpanMap.get(f)),u&&e.removePatchedListener(this,i,o);const m=e._createSpan(f,p);return m?(f&&e._eventsSpanMap.set(f,m),N.with(k.setSpan(N.active(),m),()=>{const v=e._invokeListener(o,this,s);return m.end(),v})):e._invokeListener(o,this,s)};if(e.addPatchedListener(this,i,o,c))return r.call(this,i,c,a)}}_patchRemoveEventListener(){const e=this;return n=>function(r,i,o){const a=e.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 e=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&&e._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(e){const n=k.getSpan(N.active());n&&typeof n.updateName=="function"&&n.updateName(`${Ib} ${e}`)}_patchZoneCancelTask(){const e=this;return n=>function(r){const i=Zone.current,o=e._getCurrentSpan(i);return o&&e._shouldCountTask(r,i)&&e._decrementTask(o),n.call(this,r)}}_patchZoneScheduleTask(){const e=this;return n=>function(r){const i=Zone.current,o=e._getCurrentSpan(i);return o&&e._shouldCountTask(r,i)&&(e._incrementTask(o),e._checkForTimeout(r,o)),n.call(this,r)}}_patchZoneRunTask(){const e=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=e._createSpan(a),c)return e._incrementTask(c),s.run(()=>{try{return N.with(k.setSpan(N.active(),c),()=>{const l=Zone.current;return r._zone=l,n.call(l,r,i,o)})}finally{e._decrementTask(c)}})}else c=e._getCurrentSpan(s);try{return n.call(s,r,i,o)}finally{c&&e._shouldCountTask(r,s)&&e._decrementTask(c)}}}_shouldCountTask(e,n){if(e._zone&&(n=e._zone),!n||!e.data||e.data.isPeriodic)return!1;const r=this._getCurrentSpan(n);return!r||!this._spansData.get(r)?!1:e.type==="macroTask"||e.type==="microTask"}_tryToEndSpan(e,n){e&&this._spansData.get(e)&&(e.end(n),this._spansData.delete(e))}enable(){const e=this._getZoneWithPrototype();this._diag.debug("applying patch to",et.moduleName,et.version,"zone:",!!e),e?(te(e.prototype.runTask)&&(this._unwrap(e.prototype,"runTask"),this._diag.debug("removing previous patch from method runTask")),te(e.prototype.scheduleTask)&&(this._unwrap(e.prototype,"scheduleTask"),this._diag.debug("removing previous patch from method scheduleTask")),te(e.prototype.cancelTask)&&(this._unwrap(e.prototype,"cancelTask"),this._diag.debug("removing previous patch from method cancelTask")),this._zonePatched=!0,this._wrap(e.prototype,"runTask",this._patchZoneRunTask()),this._wrap(e.prototype,"scheduleTask",this._patchZoneScheduleTask()),this._wrap(e.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 e=this._getZoneWithPrototype();this._diag.debug("removing patch from",et.moduleName,et.version,"zone:",!!e),e&&this._zonePatched?(te(e.prototype.runTask)&&this._unwrap(e.prototype,"runTask"),te(e.prototype.scheduleTask)&&this._unwrap(e.prototype,"scheduleTask"),te(e.prototype.cancelTask)&&this._unwrap(e.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}};R(oo,"version","0.1.1"),R(oo,"moduleName","user-interaction");let Mb=oo;const ao=class Eo extends Ja{constructor(e={}){super(Eo.moduleName,Eo.version,e),R(this,"_getLDContextKeyAttributes"),R(this,"_unlisten"),R(this,"_lastUrl",""),this._getLDContextKeyAttributes=e.getLDContextKeyAttributes}init(){}enable(){this._lastUrl=window.location.href,this._unlisten=zp(e=>{var n;const r=this._lastUrl;if(this._lastUrl=e,r!==e)try{const i=this.tracer.startSpan(Bp,{attributes:{[we]:e,"page_view.previous_url":r,"page_view.url":e}}),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 e;(e=this._unlisten)==null||e.call(this),this._unlisten=void 0}};R(ao,"version","0.1.0"),R(ao,"moduleName","location-change");let Db=ao,q={},_t,Yn;const We="highlight.record",Ub="highlight.session_id",so=new Map,Yu=t=>`${t.spanContext().traceId}:${t.spanContext().spanId}`,Ju="launchdarkly.js.log",jb="launchdarkly.exception.id",Qu="launchdarkly.sampling.ratio",Zu="log.severity",ec="log.message",$b=(t,e)=>{var n,r,i,o,a,u,c,s,l,p;if(q.tracerProvider||q.meterProvider){console.warn("OTEL already initialized. Skipping...");return}_t=t;const f=t.backendUrl||void 0||"https://pub.highlight.io",m=[...(r=(n=t.networkRecordingOptions)==null?void 0:n.urlBlocklist)!=null?r:[],...rg],v=(i=t.environment)!=null?i:"production",y={url:t.otlpEndpoint+"/v1/traces",concurrencyLimit:10,timeoutMillis:3e4,compression:"gzip",keepAlive:!0,httpAgentOptions:{timeout:6e4,keepAlive:!0}},_=new Nb(y,e),E=new Jn(_,{maxExportBatchSize:1024,maxQueueSize:2048,exportTimeoutMillis:y.timeoutMillis,scheduledDelayMillis:5e3}),S=new Xt({[up]:(o=t.serviceName)!=null?o:"highlight-browser",[cp]:t.serviceVersion,"deployment.environment.name":v,"highlight.project_id":t.projectId,[hp]:navigator.userAgent,"browser.language":navigator.language,"telemetry.distro.name":"@highlight-run/observability","telemetry.distro.version":Kp});q.tracerProvider=new vm({resource:S,mergeResourceWithDefaults:!0,spanProcessors:[E]}),k.setGlobalTracerProvider(q.tracerProvider);const P=new xb(Q(x({},y),{url:t.otlpEndpoint+"/v1/metrics"})),j=new zE({exporter:P,exportIntervalMillis:y.timeoutMillis,exportTimeoutMillis:y.timeoutMillis});q.meterProvider=new xT({resource:S,readers:[j]}),ct.setGlobalMeterProvider(q.meterProvider);let $=[];if(((a=t.instrumentations)==null?void 0:a["@opentelemetry/instrumentation-document-load"])!==!1&&$.push(new Im({applyCustomAttributesOnSpan:{documentLoad:ic,documentFetch:ic,resourceFetch:Wb}})),((u=t.instrumentations)==null?void 0:u["@opentelemetry/instrumentation-user-interaction"])!==!1&&$.push(new Mb({productAnalyticsEvents:t.productAnalyticsEvents,getLDContextKeyAttributes:t.getLDContextKeyAttributes})),((c=t.productAnalyticsEvents)==null?void 0:c.pageViews)!==!1&&$.push(new Db({getLDContextKeyAttributes:t.getLDContextKeyAttributes})),(s=t.networkRecordingOptions)!=null&&s.enabled){if(((l=t.instrumentations)==null?void 0:l["@opentelemetry/instrumentation-fetch"])!==!1){const X=new E_({propagateTraceHeaderCorsUrls:ac(t.tracingOrigins),applyCustomAttributesOnSpan:(U,Te,ye)=>{var W,Je;if(!U.attributes)return;const be=U;if(be.attributes[We]!==!1){if(rc(U,Te.body,Te.headers,t.networkRecordingOptions),!(ye instanceof Response)){U.setAttributes({"http.response.error":ye.message,[Ko]:ye.status});return}if(!((W=t.networkRecordingOptions)!=null&&W.requestResponseSanitizer&&(co(U,t.networkRecordingOptions.requestResponseSanitizer),be.attributes[We]===!1))&&(Je=t.networkRecordingOptions)!=null&&Je.recordHeadersAndBody){const h=ce(void 0,null,function*(){var g,L,H,V,M,Qe;const Ze=yield dg(ye,(g=t.networkRecordingOptions)==null?void 0:g.bodyKeysToRecord,(L=t.networkRecordingOptions)==null?void 0:L.networkBodyKeysToRedact),nn=Object.fromEntries(ye.headers.entries()),PS=Ui((V=(H=t.networkRecordingOptions)==null?void 0:H.networkHeadersToRedact)!=null?V:[],nn,(M=t.networkRecordingOptions)==null?void 0:M.headerKeysToRecord),IS=uo(PS,"http.response.header");Object.assign(U.attributes,x({"http.response.body":Ze},IS)),(Qe=t.networkRecordingOptions)!=null&&Qe.requestResponseSanitizer&&co(U,t.networkRecordingOptions.requestResponseSanitizer)});so.set(Yu(U),h)}}}});$.push(X)}((p=t.instrumentations)==null?void 0:p["@opentelemetry/instrumentation-xml-http-request"])!==!1&&$.push(new tg({propagateTraceHeaderCorsUrls:ac(t.tracingOrigins),applyCustomAttributesOnSpan:(X,U)=>{var Te,ye,W,Je;const be=U;if(!(!X.attributes||X.attributes[We]===!1)){if(rc(X,be._body,be._requestHeaders,t.networkRecordingOptions),(Te=t.networkRecordingOptions)!=null&&Te.recordHeadersAndBody){let h="";(U.responseType===""||U.responseType==="text")&&(h=ji(U.responseText,(ye=t.networkRecordingOptions)==null?void 0:ye.networkBodyKeysToRedact,(W=t.networkRecordingOptions)==null?void 0:W.bodyKeysToRecord,void 0));const g=Gb(U.getAllResponseHeaders());Xb(X,g,h,t.networkRecordingOptions)}(Je=t.networkRecordingOptions)!=null&&Je.requestResponseSanitizer&&co(X,t.networkRecordingOptions.requestResponseSanitizer)}}}))}tv({instrumentations:$});const ne=new Ls;return ne.enable(),q.tracerProvider.register({contextManager:ne,propagator:new vd({propagators:[new Gh,new Fb({backendUrl:f,otlpEndpoint:t.otlpEndpoint,tracingOrigins:t.tracingOrigins,urlBlocklist:m})]})}),Yn=Bb(_,P,E,()=>q),q},Bb=(t,e,n,r)=>{if(typeof document>"u"||typeof window>"u")return()=>{};const i=()=>{var u,c;t.setUnloading(!0),e.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"&&(t.setUnloading(!1),e.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 Jn extends Os{constructor(){super(...arguments),R(this,"_pendingSpans",new Set),R(this,"_skipPendingOnFlush",!1)}setSkipPendingOnFlush(e){this._skipPendingOnFlush=e}onStart(e,n){e.setAttribute(Ub,Ae()),super.onStart(e,n)}onEnd(e){if(e.attributes[We]===!1)return;const n=Yu(e),r=so.get(n);if(r){const i=r.catch(o=>{console.warn("[CustomBatchSpanProcessor] Failed to capture response body attributes",o)}).finally(()=>{so.delete(n),this._pendingSpans.delete(i),e.attributes[We]!==!1&&super.onEnd(e)});this._pendingSpans.add(i);return}super.onEnd(e)}shutdown(){return ce(this,null,function*(){return this._skipPendingOnFlush||(yield Promise.allSettled(this._pendingSpans)),ha(Jn.prototype,this,"shutdown").call(this)})}forceFlush(){return ce(this,null,function*(){return this._skipPendingOnFlush||(yield Promise.allSettled(this._pendingSpans)),ha(Jn.prototype,this,"forceFlush").call(this)})}}class Fb extends Pd{constructor(e){super(),R(this,"highlightEndpoints"),R(this,"tracingOrigins"),R(this,"urlBlocklist"),this.highlightEndpoints=[e.backendUrl,`${e.otlpEndpoint}/v1/traces`,`${e.otlpEndpoint}/v1/logs`,`${e.otlpEndpoint}/v1/metrics`],this.tracingOrigins=e.tracingOrigins,this.urlBlocklist=e.urlBlocklist}inject(e,n,r){var i;const o=k.getSpan(e);if(!o||!o.attributes)return;const a=sc(o);typeof a=="string"&&(Kb(a,this.highlightEndpoints,this.tracingOrigins,this.urlBlocklist)||o.setAttribute(We,!1),!fg(a,(i=this.tracingOrigins)!=null?i:[],this.urlBlocklist))||super.inject(e,n,r)}}const tc="highlight-browser",Vb=tc,nc=()=>{var t;return(t=q.tracerProvider)==null?void 0:t.getTracer(tc)},Qn=()=>{var t;return(t=q.meterProvider)==null?void 0:t.getMeter(Vb)},Hb=()=>ce(void 0,null,function*(){Yn&&(Yn(),Yn=void 0),yield Promise.allSettled([ce(void 0,null,function*(){q.tracerProvider?(yield q.tracerProvider.shutdown(),q.tracerProvider=void 0):console.warn("OTEL shutdown called without initialized tracerProvider.")}),ce(void 0,null,function*(){q.meterProvider?(yield q.meterProvider.shutdown(),q.meterProvider=void 0):console.warn("OTEL shutdown called without initialized meterProvider.")})])}),rc=(t,e,n,r)=>{var i;if(!t.attributes)return;const o=sc(t),a=qs(o),u=zs(a),c=typeof e=="string"?e:String(e);try{const l=e?JSON.parse(c):void 0;l!=null&&l.operationName&&t.setAttribute("graphql.operation.name",l.operationName)}catch{}t.setAttributes({"highlight.type":"http.request",[mt]:a,[we]:a,[yn]:u.pathname,[fp]:u.search});const s=Array.from(u.searchParams.entries());if(s.length>0&&t.setAttribute("url.query_params",JSON.stringify(Object.fromEntries(s))),r!=null&&r.recordHeadersAndBody){const l=ji(e,r.networkBodyKeysToRedact,r.bodyKeysToRecord,n);t.setAttribute("http.request.body",l);const p=Ui((i=r.networkHeadersToRedact)!=null?i:[],n,r.headerKeysToRecord),f=uo(p,"http.request.header");t.setAttributes(f)}},Gb=t=>{const e={};return t&&t.trim().split(/[\r\n]+/).forEach(n=>{const r=n.split(": "),i=r.shift();i&&(e[i]=r.join(": "))}),e},uo=(t,e)=>{const n={};return Object.entries(t).forEach(([r,i])=>{const o=r.toLowerCase().replace(/_/g,"-"),a=`${e}.${o}`,u=qb(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},zb=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"]),qb=(t,e)=>zb.has(t)?e.split(",").map(n=>n.trim()).filter(n=>n.length>0):[e],Xb=(t,e,n,r)=>{var i;t.setAttribute("http.response.body",n);const o=Ui((i=r.networkHeadersToRedact)!=null?i:[],e,r.headerKeysToRecord),a=uo(o,"http.response.header");t.setAttributes(a)},co=(t,e)=>{var n,r,i,o,a,u,c,s,l,p;const f=t.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[Ko])!=null?a:0),headers:v,body:(u=f["http.response.body"])!=null?u:""},urlBlocked:!1},_=!0;try{y.request.body=JSON.parse(y.request.body)}catch{_=!1}let E=!0;try{y.response.body=JSON.parse(y.response.body)}catch{E=!1}let S;try{S=e(y)}catch{return}if(!S){Object.assign(t.attributes,{[We]:!1});return}_&&(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(t.attributes,{"http.request.body":(l=S.request.body)!=null?l:"","http.response.body":(p=S.response.body)!=null?p:""})},Kb=(t,e,n,r)=>r!=null&&r.some(i=>t.toLowerCase().includes(i))?!1:pg(t,e),ic=t=>{var e,n,r;if(!t.events)return;const i=t.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=(e=_t?.getIntegrations)==null?void 0:e.call(_t))!=null?n:[];if(o.document_load!==void 0)for(const u of a)u.recordGauge((r=_t?.sessionSecureId)!=null?r:"",{name:Fp,value:o.document_load/1e6});Object.entries(o).forEach(([u,c])=>{c!==void 0&&(t.setAttribute(`timings.${u}.ns`,c),t.setAttribute(`timings.${u}.readable`,oc(c)))})};function oe(t,e,n){const r=n.find(a=>a.name===t),i=n.find(a=>a.name===e);if(!r||!i)return;const o=r.time[0]*1e9+r.time[1];return i.time[0]*1e9+i.time[1]-o}const Wb=(t,e)=>{const n={domain_lookup:(e.domainLookupEnd-e.domainLookupStart)*1e9,connect:(e.connectEnd-e.connectStart)*1e9,request:(e.responseEnd-e.requestStart)*1e9,response:(e.responseEnd-e.responseStart)*1e9};Object.entries(n).forEach(([r,i])=>{t.setAttribute(`timings.${r}.ns`,i),t.setAttribute(`timings.${r}.readable`,oc(i))})},oc=t=>{if(t>=36e11){const e=t/36e11;return`${Number(e.toFixed(1))}h`}else if(t>=6e10){const e=t/6e10;return`${Number(e.toFixed(1))}m`}else if(t>=1e9){const e=t/1e9;return`${Number(e.toFixed(1))}s`}else if(t>=1e6){const e=t/1e6;return`${Number(e.toFixed(1))}ms`}else if(t>=1e3){const e=t/1e3;return`${Number(e.toFixed(1))}µs`}else return`${Number(t.toFixed(1))}ns`},ac=t=>t===!0?[/localhost/,/^\//,new RegExp(window.location.host)]:Array.isArray(t)?t.map(e=>typeof e=="string"?new RegExp(e):e):/^$/,sc=t=>t.attributes[we]?t.attributes[we]:t.attributes[mt],Yb=30,Jb=()=>new Promise(t=>requestAnimationFrame(e=>requestAnimationFrame(n=>t(n-e)))),Qb=()=>ce(void 0,null,function*(){const t=[];for(let e=0;e<Yb;e++)t.push(yield Jb());return t.reduce((e,n)=>e+n,0)/t.length}),Zb=(t,e)=>{let n={},r=16.666666666666668;Qb().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()-e)/1e3;t({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?Wp(n.event.target):""};return window.addEventListener("click",i,!0),window.addEventListener("keydown",i,!0),()=>{window.removeEventListener("keydown",i,!0),window.removeEventListener("click",i,!0)}},eS=typeof window<"u",uc=eS&&"performance"in window&&"memory"in performance?performance:{memory:{}},tS=(t,e)=>{let n=0,r=0;const i=()=>{const s=(new Date().getTime()-e)/1e3,l=uc.memory.jsHeapSizeLimit||0,p=uc.memory.usedJSHeapSize||0;t({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,cc,Zn,lo,lc=-1,Ye=function(t){addEventListener("pageshow",function(e){e.persisted&&(lc=e.timeStamp,t(e))},!0)},po=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},er=function(){var t=po();return t&&t.activationStart||0},ae=function(t,e){var n=po(),r="navigate";return lc>=0?r="back-forward-cache":n&&(document.prerendering||er()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:t,value:e===void 0?-1:e,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},gt=function(t,e,n){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var r=new PerformanceObserver(function(i){Promise.resolve().then(function(){e(i.getEntries())})});return r.observe(Object.assign({type:t,buffered:!0},n||{})),r}}catch{}},se=function(t,e,n,r){var i,o;return function(a){e.value>=0&&(a||r)&&((o=e.value-(i||0))||i===void 0)&&(i=e.value,e.delta=o,e.rating=function(u,c){return u>c[1]?"poor":u>c[0]?"needs-improvement":"good"}(e.value,n),t(e))}},fo=function(t){requestAnimationFrame(function(){return requestAnimationFrame(function(){return t()})})},tr=function(t){var e=function(n){n.type!=="pagehide"&&document.visibilityState!=="hidden"||t(n)};addEventListener("visibilitychange",e,!0),addEventListener("pagehide",e,!0)},ho=function(t){var e=!1;return function(n){e||(t(n),e=!0)}},Et=-1,pc=function(){return document.visibilityState!=="hidden"||document.prerendering?1/0:0},nr=function(t){document.visibilityState==="hidden"&&Et>-1&&(Et=t.type==="visibilitychange"?t.timeStamp:0,nS())},fc=function(){addEventListener("visibilitychange",nr,!0),addEventListener("prerenderingchange",nr,!0)},nS=function(){removeEventListener("visibilitychange",nr,!0),removeEventListener("prerenderingchange",nr,!0)},vo=function(){return Et<0&&(Et=pc(),fc(),Ye(function(){setTimeout(function(){Et=pc(),fc()},0)})),{get firstHiddenTime(){return Et}}},en=function(t){document.prerendering?addEventListener("prerenderingchange",function(){return t()},!0):t()},hc=[1800,3e3],dc=function(t,e){e=e||{},en(function(){var n,r=vo(),i=ae("FCP"),o=gt("paint",function(a){a.forEach(function(u){u.name==="first-contentful-paint"&&(o.disconnect(),u.startTime<r.firstHiddenTime&&(i.value=Math.max(u.startTime-er(),0),i.entries.push(u),n(!0)))})});o&&(n=se(t,i,hc,e.reportAllChanges),Ye(function(a){i=ae("FCP"),n=se(t,i,hc,e.reportAllChanges),fo(function(){i.value=performance.now()-a.timeStamp,n(!0)})}))})},vc=[.1,.25],rS=function(t,e){e=e||{},dc(ho(function(){var n,r=ae("CLS",0),i=0,o=[],a=function(c){c.forEach(function(s){if(!s.hadRecentInput){var l=o[0],p=o[o.length-1];i&&s.startTime-p.startTime<1e3&&s.startTime-l.startTime<5e3?(i+=s.value,o.push(s)):(i=s.value,o=[s])}}),i>r.value&&(r.value=i,r.entries=o,n())},u=gt("layout-shift",a);u&&(n=se(t,r,vc,e.reportAllChanges),tr(function(){a(u.takeRecords()),n(!0)}),Ye(function(){i=0,r=ae("CLS",0),n=se(t,r,vc,e.reportAllChanges),fo(function(){return n()})}),setTimeout(n,0))}))},tn={passive:!0,capture:!0},iS=new Date,yc=function(t,e){Ie||(Ie=e,Zt=t,cc=new Date,_c(removeEventListener),mc())},mc=function(){if(Zt>=0&&Zt<cc-iS){var t={entryType:"first-input",name:Ie.type,target:Ie.target,cancelable:Ie.cancelable,startTime:Ie.timeStamp,processingStart:Ie.timeStamp+Zt};Zn.forEach(function(e){e(t)}),Zn=[]}},oS=function(t){if(t.cancelable){var e=(t.timeStamp>1e12?new Date:performance.now())-t.timeStamp;t.type=="pointerdown"?function(n,r){var i=function(){yc(n,r),a()},o=function(){a()},a=function(){removeEventListener("pointerup",i,tn),removeEventListener("pointercancel",o,tn)};addEventListener("pointerup",i,tn),addEventListener("pointercancel",o,tn)}(e,t):yc(e,t)}},_c=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach(function(e){return t(e,oS,tn)})},gc=[100,300],aS=function(t,e){e=e||{},en(function(){var n,r=vo(),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=gt("first-input",a);n=se(t,i,gc,e.reportAllChanges),u&&tr(ho(function(){a(u.takeRecords()),u.disconnect()})),u&&Ye(function(){var c;i=ae("FID"),n=se(t,i,gc,e.reportAllChanges),Zn=[],Zt=-1,Ie=null,_c(addEventListener),c=o,Zn.push(c),mc()})})},Ec=0,yo=1/0,rr=0,sS=function(t){t.forEach(function(e){e.interactionId&&(yo=Math.min(yo,e.interactionId),rr=Math.max(rr,e.interactionId),Ec=rr?(rr-yo)/7+1:0)})},Tc=function(){return lo?Ec:performance.interactionCount||0},uS=function(){"interactionCount"in performance||lo||(lo=gt("event",sS,{type:"event",buffered:!0,durationThreshold:0}))},bc=[200,500],Sc=0,Oc=function(){return Tc()-Sc},ve=[],mo={},wc=function(t){var e=ve[ve.length-1],n=mo[t.interactionId];if(n||ve.length<10||t.duration>e.latency){if(n)n.entries.push(t),n.latency=Math.max(n.latency,t.duration);else{var r={id:t.interactionId,latency:t.duration,entries:[t]};mo[r.id]=r,ve.push(r)}ve.sort(function(i,o){return o.latency-i.latency}),ve.splice(10).forEach(function(i){delete mo[i.id]})}},cS=function(t,e){e=e||{},en(function(){var n;uS();var r,i=ae("INP"),o=function(u){u.forEach(function(l){l.interactionId&&wc(l),l.entryType==="first-input"&&!ve.some(function(p){return p.entries.some(function(f){return l.duration===f.duration&&l.startTime===f.startTime})})&&wc(l)});var c,s=(c=Math.min(ve.length-1,Math.floor(Oc()/50)),ve[c]);s&&s.latency!==i.value&&(i.value=s.latency,i.entries=s.entries,r())},a=gt("event",o,{durationThreshold:(n=e.durationThreshold)!==null&&n!==void 0?n:40});r=se(t,i,bc,e.reportAllChanges),a&&("interactionId"in PerformanceEventTiming.prototype&&a.observe({type:"first-input",buffered:!0}),tr(function(){o(a.takeRecords()),i.value<0&&Oc()>0&&(i.value=0,i.entries=[]),r(!0)}),Ye(function(){ve=[],Sc=Tc(),i=ae("INP"),r=se(t,i,bc,e.reportAllChanges)}))})},Ac=[2500,4e3],_o={},lS=function(t,e){e=e||{},en(function(){var n,r=vo(),i=ae("LCP"),o=function(c){var s=c[c.length-1];s&&s.startTime<r.firstHiddenTime&&(i.value=Math.max(s.startTime-er(),0),i.entries=[s],n())},a=gt("largest-contentful-paint",o);if(a){n=se(t,i,Ac,e.reportAllChanges);var u=ho(function(){_o[i.id]||(o(a.takeRecords()),a.disconnect(),_o[i.id]=!0,n(!0))});["keydown","click"].forEach(function(c){addEventListener(c,function(){return setTimeout(u,0)},!0)}),tr(u),Ye(function(c){i=ae("LCP"),n=se(t,i,Ac,e.reportAllChanges),fo(function(){i.value=performance.now()-c.timeStamp,_o[i.id]=!0,n(!0)})})}})},Lc=[800,1800],pS=function t(e){document.prerendering?en(function(){return t(e)}):document.readyState!=="complete"?addEventListener("load",function(){return t(e)},!0):setTimeout(e,0)},fS=function(t,e){e=e||{};var n=ae("TTFB"),r=se(t,n,Lc,e.reportAllChanges);pS(function(){var i=po();if(i){var o=i.responseStart;if(o<=0||o>performance.now())return;n.value=Math.max(o-er(),0),n.entries=[i],r(!0),Ye(function(){n=ae("TTFB",0),(r=se(t,n,Lc,e.reportAllChanges))(!0)})}})};const hS=t=>(rS(t),dc(t),aS(t),lS(t),fS(t),cS(t),()=>{}),Tt=typeof navigator<"u"&&"connection"in navigator?navigator.connection:{},dS=(t,e)=>{const n=()=>{const i=(new Date().getTime()-e)/1e3;t({relativeTimestamp:i,downlink:Tt.downlink,downlinkMax:Tt.downlinkMax,effectiveType:Tt.effectiveType,rtt:Tt.rtt,saveData:Tt.saveData,type:Tt.type})};n();let r;return r=setInterval(()=>{n()},1e3),()=>{clearInterval(r)}},vS=()=>{if(!("performance"in window&&"memory"in performance))return{getDeviceDetails:void 0,getCurrentDeviceDetails:void 0};const t=window.performance;return{getDeviceDetails:()=>({deviceMemory:yS(navigator.deviceMemory||0)}),getCurrentDeviceDetails:()=>{const e=go(t.memory.jsHeapSizeLimit),n=go(t.memory.totalJSHeapSize),r=go(t.memory.usedJSHeapSize);return{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}}}},go=t=>t/Math.pow(1e3,2),yS=t=>1024*t;function mS(t){return"regexValue"in t}function _S(t){return"matchValue"in t}function gS(t){const e=Math.trunc(t);return e===1?!0:e===0?!1:Math.floor(Math.random()*e)===0}class ES{constructor(e=gS){R(this,"regexCache",new Map),R(this,"config"),this.sampler=e}setConfig(e){this.config=e}isSamplingEnabled(){var e,n,r,i;return!!((n=(e=this.config)==null?void 0:e.logs)!=null&&n.length||(i=(r=this.config)==null?void 0:r.spans)!=null&&i.length)}shouldSample(e){var n,r;return e.name===Ju?this.sampleLog((n=this.config)==null?void 0:n.logs,e):this.sampleSpan((r=this.config)==null?void 0:r.spans,e)}matchesValue(e,n){if(!e)return!1;if(_S(e))return e.matchValue===n;if(mS(e)){const r=e.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(e,n){if(e)for(const r of e){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(e,n){return!(e.name&&!this.matchesValue(e.name,n.name)||e.attributes&&(!n.attributes||!this.matchesAttributes(e.attributes,n.attributes)))}matchesEvents(e,n){if(e)for(const r of e){let i=!1;for(const o of n)if(this.matchEvent(r,o)){i=!0;break}if(!i)return!1}return!0}matchesSpanConfig(e,n){return!(e.name&&!this.matchesValue(e.name,n.name)||!this.matchesAttributes(e.attributes,n.attributes)||!this.matchesEvents(e.events,n.events))}matchesLogConfig(e,n){if(e.severityText){const r=n[Zu];if(!this.matchesValue(e.severityText,r))return!1}if(e.message){const r=n[ec];if(!this.matchesValue(e.message,r))return!1}return!!this.matchesAttributes(e.attributes,n)}sampleSpan(e,n){if(e){for(const r of e)if(this.matchesSpanConfig(r,n))return{sample:this.sampler(r.samplingRatio),attributes:{[Qu]:r.samplingRatio}}}return{sample:!0}}sampleLog(e,n){if(e){for(const r of e)if(this.matchesLogConfig(r,n.attributes))return{sample:this.sampler(r.samplingRatio),attributes:{[Qu]:r.samplingRatio}}}return{sample:!0}}}const Rc=()=>{const t={end:()=>{},spanContext:()=>({traceId:"",spanId:"",traceFlags:0}),setAttribute:(e,n)=>t,setAttributes:e=>t,addEvent:(e,n,r)=>t,addLinks:e=>t,setStatus:e=>t,recordException:()=>{},addLink:()=>t,updateName:()=>t,isRecording:()=>!1};return t},TS=()=>{if(typeof window>"u"||typeof PerformanceObserver>"u")return!1;const t=PerformanceObserver.supportedEntryTypes;return Array.isArray(t)&&t.includes("longtask")},bS=t=>{if(!TS())return()=>{};let e;try{e=new PerformanceObserver(n=>{var r;for(const i of n.getEntries()){const o=(r=i.attribution)==null?void 0:r[0];t({duration:i.duration,name:i.name,startTime:i.startTime,containerType:o?.containerType,containerSrc:o?.containerSrc,containerId:o?.containerId,containerName:o?.containerName})}}),e.observe({type:"longtask",buffered:!0})}catch{return()=>{}}return()=>{try{e.disconnect()}catch{}}},SS=new Set(["string","number","boolean"]),OS=()=>typeof window<"u"&&typeof window.ReportingObserver<"u",wS=t=>{const e={};if(!t||typeof t!="object")return e;for(const[n,r]of Object.entries(t))if(r!=null)if(SS.has(typeof r))e[`report.body.${n}`]=r;else try{e[`report.body.${n}`]=JSON.stringify(r)}catch{}return e},AS=t=>{var e;const n=(e=t.body)!=null?e:{},r=n.message||n.reason||n.id||t.type;return typeof r=="string"?r:t.type},LS=(t,e)=>{if(!OS())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=x({"report.type":s,"report.url":c.url},wS(l)),f=AS({type:s,body:l});t(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{}}},RS="exception",CS=function(t,e,n){if(!t)return;const r=x({},n);typeof e=="string"?r[br]=e:e&&(e.code?r[Sr]=e.code.toString():e.name&&(r[Sr]=e.name),e.message&&(r[br]=e.message),e.stack&&(r[ap]=e.stack)),r[Sr]||r[br]?t.addEvent(RS,r):Oe("otel","recordException","warn",`Failed to record an exception ${e}`)};class NS{constructor(e){R(this,"organizationID"),R(this,"_options"),R(this,"_integrations",[]),R(this,"_gauges",new Map),R(this,"_counters",new Map),R(this,"_histograms",new Map),R(this,"_up_down_counters",new Map),R(this,"sampler",new ES),R(this,"_started",!1),R(this,"_ldContextKeys"),R(this,"graphqlSDK"),this._options=e,this.organizationID=e.projectId}_productAnalyticsEvents(){var e;const n=(e=this._options)==null?void 0:e.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(e){e&&(this._ldContextKeys=Object.fromEntries(Object.entries(e).map(([n,r])=>[`${Up}.${n}`,r])))}getLDContextKeyAttributes(){return this._ldContextKeys}start(){return ce(this,null,function*(){var e,n,r,i,o,a,u,c,s,l,p,f,m,v,y;if(this._started)return;this._started=!0,$b({backendUrl:(n=(e=this._options)==null?void 0:e.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 _=new kl((y=this._options.backendUrl)!=null?y:"https://pub.observability.app.launchdarkly.com",{headers:{}});this.graphqlSDK=np(_,wp()),yield this.configureSampling(),this.setupListeners()})}stop(){return ce(this,null,function*(){this._started&&(this._started=!1,yield Hb())})}configureSampling(){return ce(this,null,function*(){try{const e=yield this.graphqlSDK.GetSamplingConfig({organization_verbose_id:`${this.organizationID}`});this.sampler.setConfig(e.sampling)}catch(e){Se("sampling","warn",`LaunchDarkly Observability: Failed to configure sampling: ${e}`)}})}_recordLog(e,n,r,i){this.startSpan(Ju,o=>{const a=typeof e=="string"?e:Lt(e),u=i?Lt(i.map(c=>c.toString())):void 0;if(o?.addEvent("log",x({[Zu]:n,[ec]:a,"code.stacktrace":u},r)),this._options.reportConsoleErrors&&n==="error"){o?.recordException(new Error(a)),o?.setStatus({code:wn.ERROR,message:a});const c=new Error(a);i&&(c.stack=u),this.recordError(c)}})}_recordErrorMessage(e,n){try{e.payload&&(n=x(x({},JSON.parse(e.payload)),n||{}))}catch{}this.startSpan("highlight.exception",o=>{var a;CS(o,(a=e.error)!=null?a:new Error(e.event),{[jb]:e.id}),o?.setAttributes(x({event:e.event,type:e.type,url:e.url,source:e.source,lineNumber:e.lineNumber,columnNumber:e.columnNumber},n))});const r=e,i=uf(r,["payload"]);for(const o of this._integrations)o.error(Ae(),Q(x({},i),{payload:JSON.stringify(n)}))}recordError(e,n,r,i,o){var a,u,c,s;e=e||new Error("Unknown error"),e instanceof Error&&e.cause&&(r=Q(x({},r),{"exception.cause":JSON.stringify(e.cause)}));let l=n?n+":"+e.message:e.message;o==="React.ErrorBoundary"&&(l="ErrorBoundary: "+l);const p=Tn(e),f={error:e,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:_a()};this._recordErrorMessage(f,r)}recordCount(e){var n;let r=this._counters.get(e.name);if(!r){if(r=(n=Qn())==null?void 0:n.createCounter(e.name),!r)return;this._counters.set(e.name,r)}r.add(e.value,Q(x({},e.attributes),{"highlight.session_id":Ae()}))}recordGauge(e){var n,r,i,o;let a=this._gauges.get(e.name);if(!a){if(a=(n=Qn())==null?void 0:n.createGauge(e.name),!a)return;this._gauges.set(e.name,a)}a.record(e.value,Q(x({},e.attributes),{"highlight.session_id":Ae()}));const u={name:e.name,value:e.value,category:(r=e.attributes)==null?void 0:r.category,group:(o=(i=e.attributes)==null?void 0:i.group)==null?void 0:o.toString(),tags:e.attributes?Object.entries(e.attributes).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(e){this.recordCount(Q(x({},e),{value:1}))}recordHistogram(e){var n;let r=this._histograms.get(e.name);if(!r){if(r=(n=Qn())==null?void 0:n.createHistogram(e.name),!r)return;this._histograms.set(e.name,r)}r.record(e.value,Q(x({},e.attributes),{"highlight.session_id":Ae()}))}recordUpDownCounter(e){var n;let r=this._up_down_counters.get(e.name);if(!r){if(r=(n=Qn())==null?void 0:n.createUpDownCounter(e.name),!r)return;this._up_down_counters.set(e.name,r)}r.add(e.value,Q(x({},e.attributes),{"highlight.session_id":Ae()}))}startSpan(e,n,r,i){const o=nc();if(!o){const u=Rc();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(e,u=>a(u,n)):i===void 0?o.startActiveSpan(e,n,u=>a(u,r)):o.startActiveSpan(e,n,r,u=>a(u,i))}startManualSpan(e,n,r,i){const o=nc();if(!o){const a=Rc();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(e,n):i===void 0?o.startActiveSpan(e,n,r):o.startActiveSpan(e,n,r,i)}register(e,n){this._integrations.push(new Gp(e,n))}getHooks(e){return this._integrations.flatMap(n=>{var r,i;return(i=(r=n.getHooks)==null?void 0:r.call(n,e))!=null?i:[]})}submitViewportMetrics({height:e,width:n,availHeight:r,availWidth:i}){this.recordGauge({name:Me.ViewportHeight,value:e,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:e*n,attributes:{category:ie.Device,group:window.location.href}})}setupListeners(){var e;this._options.disableConsoleRecording||ff(r=>{var i;this._recordLog((i=r.value)==null?void 0:i.join(" "),r.type,r.attributes?JSON.parse(r.attributes):{},r.trace)},{level:(e=this._options.consoleMethodsToRecord)!=null?e:[...cf],logger:"console",stringifyOptions:{depthOfLimit:10,numOfKeysLimit:100,stringLengthLimit:1e3}}),this._options.enablePerformanceRecording!==!1&&(tS(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),Zb(r=>{this.recordGauge({name:"Jank",value:r.jankAmount,attributes:{category:ie.WebVital,group:r.querySelector}})},0)),Tf(r=>{var i;if(Sf.includes(r.event)||Of.some(u=>r.event.includes(u)))return;const o=new Error(r.event);o.stack=Lt(r.stackTrace.map(u=>u.toString()));let a={};try{r.payload&&(a=JSON.parse(r.payload))}catch{}this._recordErrorMessage(Q(x({},r),{error:(i=r.error)!=null?i:o}),a)},{enablePromisePatch:!!this._options.enablePromisePatch}),hS(r=>{const{name:i,value:o}=r,{hostname:a,pathname:u,href:c}=window.location;this.recordGauge({name:i,value:o,attributes:{group:window.location.pathname,category:ie.WebVital,[we]:qs(c),[yn]:u,[sp]:a}})}),Yp(r=>{this.submitViewportMetrics(r)}),dS(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])=>{op(a)&&this.recordGauge({name:o,value:a,attributes:i})})},new Date().getTime());const{getDeviceDetails:n}=vS();n&&this.recordGauge({name:Me.DeviceMemory,value:n().deviceMemory,attributes:{category:ie.Device,group:window.location.href}}),this._options.enableLongtaskRecording!==!1&&bS(r=>{const i={category:ie.Performance,name:r.name,[yn]: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&&LS(r=>{var i;const o=Q(x({},r.attributes),{[yn]: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(e,n,r){return this._recordLog(e,n,r)}}class xS extends ef{constructor(e){super(e),R(this,"observe"),R(this,"options"),this.options=e}initialize(e,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(!e){console.warn("@launchdarkly/observability is not initializing because the SDK credential is undefined.");return}this.configureSession(e,n),this.observe=new NS(Q(x({},n),{projectId:e,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(e,n){var r;(r=this.observe)==null||r.register(e,n)}getHooks(e){var n,r,i,o;const a=x(x({[lp]:e.sdk.name,[pp]:e.sdk.version,[Lp]:e.clientSideId,[Pp]:"LaunchDarkly"},(n=e.application)!=null&&n.id?{[kp]:e.application.id}:{}),(r=e.application)!=null&&r.version?{[Mp]:e.application.version}:{});return this.initialize((o=(i=e.sdkKey)!=null?i:e.mobileKey)!=null?o:e.clientSideId,this.options),[{getMetadata:()=>({name:"@launchdarkly/observability/hooks"}),afterIdentify:(u,c,s)=>{var l,p,f,m,v,y,_,E,S;for(const j of(f=(p=(l=this.observe)==null?void 0:l.getHooks)==null?void 0:p.call(l,e))!=null?f:[])(m=j.afterIdentify)==null||m.call(j,u,c,s);const P=sa(u.context);if((v=this.observe)==null||v.setLDContextKeyAttributes(P),s.status==="completed"){const j=Q(x({},P),{key:(E=(_=(y=this.options)==null?void 0:y.contextFriendlyName)==null?void 0:_.call(y,u.context))!=null?E:Ir(u.context),timeout:u.timeout,canonicalKey:Ir(u.context),[Vp]:s.status});(S=this.observe)==null||S.recordLog("LD.identify","info",x(x({},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,e))!=null?f:[])(m=E.afterEvaluation)==null||m.call(E,u,c,s);const y=x({[Rp]:u.flagKey,[xp]:JSON.stringify(s.value)},s.variationIndex?{[Ip]:s.variationIndex}:{});if(s.reason)for(const E in ra){const S=E,P=s.reason[S];P&&(y[ra[S]]=P)}u.context&&(y[Cp]=JSON.stringify(sa(u.context)),y[Np]=Ir(u.context));const _=x(x({},a),y);return(v=this.observe)==null||v.startSpan(Ap,E=>{E&&E.addEvent(J,_)}),c},afterTrack:u=>{var c,s,l,p,f,m,v,y,_;for(const S of(l=(s=(c=this.observe)==null?void 0:c.getHooks)==null?void 0:s.call(c,e))!=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=x(Q(x(x({[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:{});(_=this.observe)==null||_.startSpan($p,S=>{S&&S.setAttributes(E)})}}]}}re.default=xS,Object.defineProperties(re,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
309
309
  //# sourceMappingURL=index.umd.js.map