@vercel/otel 1.14.0 → 1.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/edge/index.js +7 -7
- package/dist/edge/index.js.map +4 -4
- package/dist/node/index.js +6 -6
- package/dist/node/index.js.map +4 -4
- package/dist/types/semantic-resource-attributes.d.ts +8 -0
- package/dist/types/types.d.ts +10 -0
- package/dist/types/util/attributes.d.ts +8 -1
- package/package.json +1 -1
package/dist/edge/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
if (globalThis.performance === undefined) {
|
|
2
2
|
globalThis.performance = { timeOrigin: 0, now: () => Date.now() };
|
|
3
3
|
}
|
|
4
|
-
var xu=Object.create;var Dr=Object.defineProperty;var Du=Object.getOwnPropertyDescriptor;var Uu=Object.getOwnPropertyNames;var Bu=Object.getPrototypeOf,Gu=Object.prototype.hasOwnProperty;var fi=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Ur=(e,t)=>()=>(e&&(t=e(e=0)),t);var _=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var ge=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Uu(t))!Gu.call(e,o)&&o!==r&&Dr(e,o,{get:()=>t[o],enumerable:!(n=Du(t,o))||n.enumerable});return e},z=(e,t,r)=>(ge(e,t,"default"),r&&ge(r,t,"default")),v=(e,t,r)=>(r=e!=null?xu(Bu(e)):{},ge(t||!e||!e.__esModule?Dr(r,"default",{value:e,enumerable:!0}):r,e)),w=e=>ge(Dr({},"__esModule",{value:!0}),e);var l={};import*as id from"@opentelemetry/api";var E=Ur(()=>{z(l,id)});var ie=_(ft=>{"use strict";Object.defineProperty(ft,"__esModule",{value:!0});ft.isTracingSuppressed=ft.unsuppressTracing=ft.suppressTracing=void 0;var Vu=(E(),w(l)),Br=(0,Vu.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Hu(e){return e.setValue(Br,!0)}ft.suppressTracing=Hu;function Fu(e){return e.deleteValue(Br)}ft.unsuppressTracing=Fu;function ju(e){return e.getValue(Br)===!0}ft.isTracingSuppressed=ju});var Gr=_(B=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});B.BAGGAGE_MAX_TOTAL_LENGTH=B.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=B.BAGGAGE_MAX_NAME_VALUE_PAIRS=B.BAGGAGE_HEADER=B.BAGGAGE_ITEMS_SEPARATOR=B.BAGGAGE_PROPERTIES_SEPARATOR=B.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;B.BAGGAGE_KEY_PAIR_SEPARATOR="=";B.BAGGAGE_PROPERTIES_SEPARATOR=";";B.BAGGAGE_ITEMS_SEPARATOR=",";B.BAGGAGE_HEADER="baggage";B.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;B.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;B.BAGGAGE_MAX_TOTAL_LENGTH=8192});var Vr=_(nt=>{"use strict";Object.defineProperty(nt,"__esModule",{value:!0});nt.parseKeyPairsIntoRecord=nt.parsePairKeyValue=nt.getKeyPairs=nt.serializeKeyPairs=void 0;var ku=(E(),w(l)),Lt=Gr();function qu(e){return e.reduce((t,r)=>{let n=`${t}${t!==""?Lt.BAGGAGE_ITEMS_SEPARATOR:""}${r}`;return n.length>Lt.BAGGAGE_MAX_TOTAL_LENGTH?t:n},"")}nt.serializeKeyPairs=qu;function Xu(e){return e.getAllEntries().map(([t,r])=>{let n=`${encodeURIComponent(t)}=${encodeURIComponent(r.value)}`;return r.metadata!==void 0&&(n+=Lt.BAGGAGE_PROPERTIES_SEPARATOR+r.metadata.toString()),n})}nt.getKeyPairs=Xu;function pi(e){let t=e.split(Lt.BAGGAGE_PROPERTIES_SEPARATOR);if(t.length<=0)return;let r=t.shift();if(!r)return;let n=r.indexOf(Lt.BAGGAGE_KEY_PAIR_SEPARATOR);if(n<=0)return;let o=decodeURIComponent(r.substring(0,n).trim()),i=decodeURIComponent(r.substring(n+1).trim()),a;return t.length>0&&(a=(0,ku.baggageEntryMetadataFromString)(t.join(Lt.BAGGAGE_PROPERTIES_SEPARATOR))),{key:o,value:i,metadata:a}}nt.parsePairKeyValue=pi;function Ku(e){return typeof e!="string"||e.length===0?{}:e.split(Lt.BAGGAGE_ITEMS_SEPARATOR).map(t=>pi(t)).filter(t=>t!==void 0&&t.value.length>0).reduce((t,r)=>(t[r.key]=r.value,t),{})}nt.parseKeyPairsIntoRecord=Ku});var di=_(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.W3CBaggagePropagator=void 0;var Hr=(E(),w(l)),Wu=ie(),Pt=Gr(),Fr=Vr(),jr=class{inject(t,r,n){let o=Hr.propagation.getBaggage(t);if(!o||(0,Wu.isTracingSuppressed)(t))return;let i=(0,Fr.getKeyPairs)(o).filter(u=>u.length<=Pt.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,Pt.BAGGAGE_MAX_NAME_VALUE_PAIRS),a=(0,Fr.serializeKeyPairs)(i);a.length>0&&n.set(r,Pt.BAGGAGE_HEADER,a)}extract(t,r,n){let o=n.get(r,Pt.BAGGAGE_HEADER),i=Array.isArray(o)?o.join(Pt.BAGGAGE_ITEMS_SEPARATOR):o;if(!i)return t;let a={};return i.length===0||(i.split(Pt.BAGGAGE_ITEMS_SEPARATOR).forEach(c=>{let s=(0,Fr.parsePairKeyValue)(c);if(s){let f={value:s.value};s.metadata&&(f.metadata=s.metadata),a[s.key]=f}}),Object.entries(a).length===0)?t:Hr.propagation.setBaggage(t,Hr.propagation.createBaggage(a))}fields(){return[Pt.BAGGAGE_HEADER]}};ye.W3CBaggagePropagator=jr});var _i=_(ve=>{"use strict";Object.defineProperty(ve,"__esModule",{value:!0});ve.AnchoredClock=void 0;var kr=class{constructor(t,r){this._monotonicClock=r,this._epochMillis=t.now(),this._performanceMillis=r.now()}now(){let t=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+t}};ve.AnchoredClock=kr});var Si=_(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.isAttributeValue=pt.isAttributeKey=pt.sanitizeAttributes=void 0;var hi=(E(),w(l));function Yu(e){let t={};if(typeof e!="object"||e==null)return t;for(let[r,n]of Object.entries(e)){if(!Ei(r)){hi.diag.warn(`Invalid attribute key: ${r}`);continue}if(!mi(n)){hi.diag.warn(`Invalid attribute value set for key: ${r}`);continue}Array.isArray(n)?t[r]=n.slice():t[r]=n}return t}pt.sanitizeAttributes=Yu;function Ei(e){return typeof e=="string"&&e.length>0}pt.isAttributeKey=Ei;function mi(e){return e==null?!0:Array.isArray(e)?zu(e):Ti(e)}pt.isAttributeValue=mi;function zu(e){let t;for(let r of e)if(r!=null){if(!t){if(Ti(r)){t=typeof r;continue}return!1}if(typeof r!==t)return!1}return!0}function Ti(e){switch(typeof e){case"number":case"boolean":case"string":return!0}return!1}});var qr=_(Ae=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:!0});Ae.loggingErrorHandler=void 0;var $u=(E(),w(l));function Qu(){return e=>{$u.diag.error(Zu(e))}}Ae.loggingErrorHandler=Qu;function Zu(e){return typeof e=="string"?e:JSON.stringify(Ju(e))}function Ju(e){let t={},r=e;for(;r!==null;)Object.getOwnPropertyNames(r).forEach(n=>{if(t[n])return;let o=r[n];o&&(t[n]=String(o))}),r=Object.getPrototypeOf(r);return t}});var Xr=_(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:!0});Vt.globalErrorHandler=Vt.setGlobalErrorHandler=void 0;var tc=qr(),gi=(0,tc.loggingErrorHandler)();function ec(e){gi=e}Vt.setGlobalErrorHandler=ec;function rc(e){try{gi(e)}catch{}}Vt.globalErrorHandler=rc});var Kr=_(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.TracesSamplerValues=void 0;var nc;(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"})(nc=oe.TracesSamplerValues||(oe.TracesSamplerValues={}))});var Oe=_(Re=>{"use strict";Object.defineProperty(Re,"__esModule",{value:!0});Re._globalThis=void 0;Re._globalThis=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});var be=_(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});L.getEnvWithoutDefaults=L.parseEnvironment=L.DEFAULT_ENVIRONMENT=L.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT=L.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT=L.DEFAULT_ATTRIBUTE_COUNT_LIMIT=L.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT=void 0;var dt=(E(),w(l)),ic=Kr(),oc=Oe(),sc=",",ac=["OTEL_SDK_DISABLED"];function uc(e){return ac.indexOf(e)>-1}var cc=["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 lc(e){return cc.indexOf(e)>-1}var fc=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function pc(e){return fc.indexOf(e)>-1}L.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT=1/0;L.DEFAULT_ATTRIBUTE_COUNT_LIMIT=128;L.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT=128;L.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT=128;L.DEFAULT_ENVIRONMENT={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:dt.DiagLogLevel.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:L.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_ATTRIBUTE_COUNT_LIMIT:L.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:L.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:L.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:L.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:L.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:L.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:L.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:ic.TracesSamplerValues.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative"};function dc(e,t,r){if(typeof r[e]>"u")return;let n=String(r[e]);t[e]=n.toLowerCase()==="true"}function _c(e,t,r,n=-1/0,o=1/0){if(typeof r[e]<"u"){let i=Number(r[e]);isNaN(i)||(i<n?t[e]=n:i>o?t[e]=o:t[e]=i)}}function hc(e,t,r,n=sc){let o=r[e];typeof o=="string"&&(t[e]=o.split(n).map(i=>i.trim()))}var Ec={ALL:dt.DiagLogLevel.ALL,VERBOSE:dt.DiagLogLevel.VERBOSE,DEBUG:dt.DiagLogLevel.DEBUG,INFO:dt.DiagLogLevel.INFO,WARN:dt.DiagLogLevel.WARN,ERROR:dt.DiagLogLevel.ERROR,NONE:dt.DiagLogLevel.NONE};function mc(e,t,r){let n=r[e];if(typeof n=="string"){let o=Ec[n.toUpperCase()];o!=null&&(t[e]=o)}}function Wr(e){let t={};for(let r in L.DEFAULT_ENVIRONMENT){let n=r;switch(n){case"OTEL_LOG_LEVEL":mc(n,t,e);break;default:if(uc(n))dc(n,t,e);else if(lc(n))_c(n,t,e);else if(pc(n))hc(n,t,e);else{let o=e[n];typeof o<"u"&&o!==null&&(t[n]=String(o))}}}return t}L.parseEnvironment=Wr;function Tc(){return typeof process<"u"&&process&&process.env?Wr(process.env):Wr(oc._globalThis)}L.getEnvWithoutDefaults=Tc});var vi=_(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.getEnv=void 0;var yi=be(),Sc=Oe();function gc(){let e=(0,yi.parseEnvironment)(Sc._globalThis);return Object.assign({},yi.DEFAULT_ENVIRONMENT,e)}Le.getEnv=gc});var Ai=_(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.hexToBase64=void 0;function yc(e){let t=e.length,r="";for(let n=0;n<t;n+=2){let o=e.substring(n,n+2),i=parseInt(o,16);r+=String.fromCharCode(i)}return btoa(r)}Pe.hexToBase64=yc});var Oi=_(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.RandomIdGenerator=void 0;var vc=8,Ac=16,Yr=class{constructor(){this.generateTraceId=Ri(Ac),this.generateSpanId=Ri(vc)}};Ce.RandomIdGenerator=Yr;var Ie=Array(32);function Ri(e){return function(){for(let r=0;r<e*2;r++)Ie[r]=Math.floor(Math.random()*16)+48,Ie[r]>=58&&(Ie[r]+=39);return String.fromCharCode.apply(null,Ie.slice(0,e*2))}}});var bi=_(Ne=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.otperformance=void 0;Ne.otperformance=performance});var zr=_(we=>{"use strict";Object.defineProperty(we,"__esModule",{value:!0});we.VERSION=void 0;we.VERSION="1.19.0"});var Li=_(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});A.MessageTypeValues=A.RpcGrpcStatusCodeValues=A.MessagingOperationValues=A.MessagingDestinationKindValues=A.HttpFlavorValues=A.NetHostConnectionSubtypeValues=A.NetHostConnectionTypeValues=A.NetTransportValues=A.FaasInvokedProviderValues=A.FaasDocumentOperationValues=A.FaasTriggerValues=A.DbCassandraConsistencyLevelValues=A.DbSystemValues=A.SemanticAttributes=void 0;A.SemanticAttributes={AWS_LAMBDA_INVOKED_ARN:"aws.lambda.invoked_arn",DB_SYSTEM:"db.system",DB_CONNECTION_STRING:"db.connection_string",DB_USER:"db.user",DB_JDBC_DRIVER_CLASSNAME:"db.jdbc.driver_classname",DB_NAME:"db.name",DB_STATEMENT:"db.statement",DB_OPERATION:"db.operation",DB_MSSQL_INSTANCE_NAME:"db.mssql.instance_name",DB_CASSANDRA_KEYSPACE:"db.cassandra.keyspace",DB_CASSANDRA_PAGE_SIZE:"db.cassandra.page_size",DB_CASSANDRA_CONSISTENCY_LEVEL:"db.cassandra.consistency_level",DB_CASSANDRA_TABLE:"db.cassandra.table",DB_CASSANDRA_IDEMPOTENCE:"db.cassandra.idempotence",DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:"db.cassandra.speculative_execution_count",DB_CASSANDRA_COORDINATOR_ID:"db.cassandra.coordinator.id",DB_CASSANDRA_COORDINATOR_DC:"db.cassandra.coordinator.dc",DB_HBASE_NAMESPACE:"db.hbase.namespace",DB_REDIS_DATABASE_INDEX:"db.redis.database_index",DB_MONGODB_COLLECTION:"db.mongodb.collection",DB_SQL_TABLE:"db.sql.table",EXCEPTION_TYPE:"exception.type",EXCEPTION_MESSAGE:"exception.message",EXCEPTION_STACKTRACE:"exception.stacktrace",EXCEPTION_ESCAPED:"exception.escaped",FAAS_TRIGGER:"faas.trigger",FAAS_EXECUTION:"faas.execution",FAAS_DOCUMENT_COLLECTION:"faas.document.collection",FAAS_DOCUMENT_OPERATION:"faas.document.operation",FAAS_DOCUMENT_TIME:"faas.document.time",FAAS_DOCUMENT_NAME:"faas.document.name",FAAS_TIME:"faas.time",FAAS_CRON:"faas.cron",FAAS_COLDSTART:"faas.coldstart",FAAS_INVOKED_NAME:"faas.invoked_name",FAAS_INVOKED_PROVIDER:"faas.invoked_provider",FAAS_INVOKED_REGION:"faas.invoked_region",NET_TRANSPORT:"net.transport",NET_PEER_IP:"net.peer.ip",NET_PEER_PORT:"net.peer.port",NET_PEER_NAME:"net.peer.name",NET_HOST_IP:"net.host.ip",NET_HOST_PORT:"net.host.port",NET_HOST_NAME:"net.host.name",NET_HOST_CONNECTION_TYPE:"net.host.connection.type",NET_HOST_CONNECTION_SUBTYPE:"net.host.connection.subtype",NET_HOST_CARRIER_NAME:"net.host.carrier.name",NET_HOST_CARRIER_MCC:"net.host.carrier.mcc",NET_HOST_CARRIER_MNC:"net.host.carrier.mnc",NET_HOST_CARRIER_ICC:"net.host.carrier.icc",PEER_SERVICE:"peer.service",ENDUSER_ID:"enduser.id",ENDUSER_ROLE:"enduser.role",ENDUSER_SCOPE:"enduser.scope",THREAD_ID:"thread.id",THREAD_NAME:"thread.name",CODE_FUNCTION:"code.function",CODE_NAMESPACE:"code.namespace",CODE_FILEPATH:"code.filepath",CODE_LINENO:"code.lineno",HTTP_METHOD:"http.method",HTTP_URL:"http.url",HTTP_TARGET:"http.target",HTTP_HOST:"http.host",HTTP_SCHEME:"http.scheme",HTTP_STATUS_CODE:"http.status_code",HTTP_FLAVOR:"http.flavor",HTTP_USER_AGENT:"http.user_agent",HTTP_REQUEST_CONTENT_LENGTH:"http.request_content_length",HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:"http.request_content_length_uncompressed",HTTP_RESPONSE_CONTENT_LENGTH:"http.response_content_length",HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:"http.response_content_length_uncompressed",HTTP_SERVER_NAME:"http.server_name",HTTP_ROUTE:"http.route",HTTP_CLIENT_IP:"http.client_ip",AWS_DYNAMODB_TABLE_NAMES:"aws.dynamodb.table_names",AWS_DYNAMODB_CONSUMED_CAPACITY:"aws.dynamodb.consumed_capacity",AWS_DYNAMODB_ITEM_COLLECTION_METRICS:"aws.dynamodb.item_collection_metrics",AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:"aws.dynamodb.provisioned_read_capacity",AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:"aws.dynamodb.provisioned_write_capacity",AWS_DYNAMODB_CONSISTENT_READ:"aws.dynamodb.consistent_read",AWS_DYNAMODB_PROJECTION:"aws.dynamodb.projection",AWS_DYNAMODB_LIMIT:"aws.dynamodb.limit",AWS_DYNAMODB_ATTRIBUTES_TO_GET:"aws.dynamodb.attributes_to_get",AWS_DYNAMODB_INDEX_NAME:"aws.dynamodb.index_name",AWS_DYNAMODB_SELECT:"aws.dynamodb.select",AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:"aws.dynamodb.global_secondary_indexes",AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:"aws.dynamodb.local_secondary_indexes",AWS_DYNAMODB_EXCLUSIVE_START_TABLE:"aws.dynamodb.exclusive_start_table",AWS_DYNAMODB_TABLE_COUNT:"aws.dynamodb.table_count",AWS_DYNAMODB_SCAN_FORWARD:"aws.dynamodb.scan_forward",AWS_DYNAMODB_SEGMENT:"aws.dynamodb.segment",AWS_DYNAMODB_TOTAL_SEGMENTS:"aws.dynamodb.total_segments",AWS_DYNAMODB_COUNT:"aws.dynamodb.count",AWS_DYNAMODB_SCANNED_COUNT:"aws.dynamodb.scanned_count",AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:"aws.dynamodb.attribute_definitions",AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:"aws.dynamodb.global_secondary_index_updates",MESSAGING_SYSTEM:"messaging.system",MESSAGING_DESTINATION:"messaging.destination",MESSAGING_DESTINATION_KIND:"messaging.destination_kind",MESSAGING_TEMP_DESTINATION:"messaging.temp_destination",MESSAGING_PROTOCOL:"messaging.protocol",MESSAGING_PROTOCOL_VERSION:"messaging.protocol_version",MESSAGING_URL:"messaging.url",MESSAGING_MESSAGE_ID:"messaging.message_id",MESSAGING_CONVERSATION_ID:"messaging.conversation_id",MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:"messaging.message_payload_size_bytes",MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:"messaging.message_payload_compressed_size_bytes",MESSAGING_OPERATION:"messaging.operation",MESSAGING_CONSUMER_ID:"messaging.consumer_id",MESSAGING_RABBITMQ_ROUTING_KEY:"messaging.rabbitmq.routing_key",MESSAGING_KAFKA_MESSAGE_KEY:"messaging.kafka.message_key",MESSAGING_KAFKA_CONSUMER_GROUP:"messaging.kafka.consumer_group",MESSAGING_KAFKA_CLIENT_ID:"messaging.kafka.client_id",MESSAGING_KAFKA_PARTITION:"messaging.kafka.partition",MESSAGING_KAFKA_TOMBSTONE:"messaging.kafka.tombstone",RPC_SYSTEM:"rpc.system",RPC_SERVICE:"rpc.service",RPC_METHOD:"rpc.method",RPC_GRPC_STATUS_CODE:"rpc.grpc.status_code",RPC_JSONRPC_VERSION:"rpc.jsonrpc.version",RPC_JSONRPC_REQUEST_ID:"rpc.jsonrpc.request_id",RPC_JSONRPC_ERROR_CODE:"rpc.jsonrpc.error_code",RPC_JSONRPC_ERROR_MESSAGE:"rpc.jsonrpc.error_message",MESSAGE_TYPE:"message.type",MESSAGE_ID:"message.id",MESSAGE_COMPRESSED_SIZE:"message.compressed_size",MESSAGE_UNCOMPRESSED_SIZE:"message.uncompressed_size"};A.DbSystemValues={OTHER_SQL:"other_sql",MSSQL:"mssql",MYSQL:"mysql",ORACLE:"oracle",DB2:"db2",POSTGRESQL:"postgresql",REDSHIFT:"redshift",HIVE:"hive",CLOUDSCAPE:"cloudscape",HSQLDB:"hsqldb",PROGRESS:"progress",MAXDB:"maxdb",HANADB:"hanadb",INGRES:"ingres",FIRSTSQL:"firstsql",EDB:"edb",CACHE:"cache",ADABAS:"adabas",FIREBIRD:"firebird",DERBY:"derby",FILEMAKER:"filemaker",INFORMIX:"informix",INSTANTDB:"instantdb",INTERBASE:"interbase",MARIADB:"mariadb",NETEZZA:"netezza",PERVASIVE:"pervasive",POINTBASE:"pointbase",SQLITE:"sqlite",SYBASE:"sybase",TERADATA:"teradata",VERTICA:"vertica",H2:"h2",COLDFUSION:"coldfusion",CASSANDRA:"cassandra",HBASE:"hbase",MONGODB:"mongodb",REDIS:"redis",COUCHBASE:"couchbase",COUCHDB:"couchdb",COSMOSDB:"cosmosdb",DYNAMODB:"dynamodb",NEO4J:"neo4j",GEODE:"geode",ELASTICSEARCH:"elasticsearch",MEMCACHED:"memcached",COCKROACHDB:"cockroachdb"};A.DbCassandraConsistencyLevelValues={ALL:"all",EACH_QUORUM:"each_quorum",QUORUM:"quorum",LOCAL_QUORUM:"local_quorum",ONE:"one",TWO:"two",THREE:"three",LOCAL_ONE:"local_one",ANY:"any",SERIAL:"serial",LOCAL_SERIAL:"local_serial"};A.FaasTriggerValues={DATASOURCE:"datasource",HTTP:"http",PUBSUB:"pubsub",TIMER:"timer",OTHER:"other"};A.FaasDocumentOperationValues={INSERT:"insert",EDIT:"edit",DELETE:"delete"};A.FaasInvokedProviderValues={ALIBABA_CLOUD:"alibaba_cloud",AWS:"aws",AZURE:"azure",GCP:"gcp"};A.NetTransportValues={IP_TCP:"ip_tcp",IP_UDP:"ip_udp",IP:"ip",UNIX:"unix",PIPE:"pipe",INPROC:"inproc",OTHER:"other"};A.NetHostConnectionTypeValues={WIFI:"wifi",WIRED:"wired",CELL:"cell",UNAVAILABLE:"unavailable",UNKNOWN:"unknown"};A.NetHostConnectionSubtypeValues={GPRS:"gprs",EDGE:"edge",UMTS:"umts",CDMA:"cdma",EVDO_0:"evdo_0",EVDO_A:"evdo_a",CDMA2000_1XRTT:"cdma2000_1xrtt",HSDPA:"hsdpa",HSUPA:"hsupa",HSPA:"hspa",IDEN:"iden",EVDO_B:"evdo_b",LTE:"lte",EHRPD:"ehrpd",HSPAP:"hspap",GSM:"gsm",TD_SCDMA:"td_scdma",IWLAN:"iwlan",NR:"nr",NRNSA:"nrnsa",LTE_CA:"lte_ca"};A.HttpFlavorValues={HTTP_1_0:"1.0",HTTP_1_1:"1.1",HTTP_2_0:"2.0",SPDY:"SPDY",QUIC:"QUIC"};A.MessagingDestinationKindValues={QUEUE:"queue",TOPIC:"topic"};A.MessagingOperationValues={RECEIVE:"receive",PROCESS:"process"};A.RpcGrpcStatusCodeValues={OK:0,CANCELLED:1,UNKNOWN:2,INVALID_ARGUMENT:3,DEADLINE_EXCEEDED:4,NOT_FOUND:5,ALREADY_EXISTS:6,PERMISSION_DENIED:7,RESOURCE_EXHAUSTED:8,FAILED_PRECONDITION:9,ABORTED:10,OUT_OF_RANGE:11,UNIMPLEMENTED:12,INTERNAL:13,UNAVAILABLE:14,DATA_LOSS:15,UNAUTHENTICATED:16};A.MessageTypeValues={SENT:"SENT",RECEIVED:"RECEIVED"}});var Pi=_(It=>{"use strict";var Rc=It&&It.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Oc=It&&It.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Rc(t,e,r)};Object.defineProperty(It,"__esModule",{value:!0});Oc(Li(),It)});var Ii=_(G=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});G.TelemetrySdkLanguageValues=G.OsTypeValues=G.HostArchValues=G.AwsEcsLaunchtypeValues=G.CloudPlatformValues=G.CloudProviderValues=G.SemanticResourceAttributes=void 0;G.SemanticResourceAttributes={CLOUD_PROVIDER:"cloud.provider",CLOUD_ACCOUNT_ID:"cloud.account.id",CLOUD_REGION:"cloud.region",CLOUD_AVAILABILITY_ZONE:"cloud.availability_zone",CLOUD_PLATFORM:"cloud.platform",AWS_ECS_CONTAINER_ARN:"aws.ecs.container.arn",AWS_ECS_CLUSTER_ARN:"aws.ecs.cluster.arn",AWS_ECS_LAUNCHTYPE:"aws.ecs.launchtype",AWS_ECS_TASK_ARN:"aws.ecs.task.arn",AWS_ECS_TASK_FAMILY:"aws.ecs.task.family",AWS_ECS_TASK_REVISION:"aws.ecs.task.revision",AWS_EKS_CLUSTER_ARN:"aws.eks.cluster.arn",AWS_LOG_GROUP_NAMES:"aws.log.group.names",AWS_LOG_GROUP_ARNS:"aws.log.group.arns",AWS_LOG_STREAM_NAMES:"aws.log.stream.names",AWS_LOG_STREAM_ARNS:"aws.log.stream.arns",CONTAINER_NAME:"container.name",CONTAINER_ID:"container.id",CONTAINER_RUNTIME:"container.runtime",CONTAINER_IMAGE_NAME:"container.image.name",CONTAINER_IMAGE_TAG:"container.image.tag",DEPLOYMENT_ENVIRONMENT:"deployment.environment",DEVICE_ID:"device.id",DEVICE_MODEL_IDENTIFIER:"device.model.identifier",DEVICE_MODEL_NAME:"device.model.name",FAAS_NAME:"faas.name",FAAS_ID:"faas.id",FAAS_VERSION:"faas.version",FAAS_INSTANCE:"faas.instance",FAAS_MAX_MEMORY:"faas.max_memory",HOST_ID:"host.id",HOST_NAME:"host.name",HOST_TYPE:"host.type",HOST_ARCH:"host.arch",HOST_IMAGE_NAME:"host.image.name",HOST_IMAGE_ID:"host.image.id",HOST_IMAGE_VERSION:"host.image.version",K8S_CLUSTER_NAME:"k8s.cluster.name",K8S_NODE_NAME:"k8s.node.name",K8S_NODE_UID:"k8s.node.uid",K8S_NAMESPACE_NAME:"k8s.namespace.name",K8S_POD_UID:"k8s.pod.uid",K8S_POD_NAME:"k8s.pod.name",K8S_CONTAINER_NAME:"k8s.container.name",K8S_REPLICASET_UID:"k8s.replicaset.uid",K8S_REPLICASET_NAME:"k8s.replicaset.name",K8S_DEPLOYMENT_UID:"k8s.deployment.uid",K8S_DEPLOYMENT_NAME:"k8s.deployment.name",K8S_STATEFULSET_UID:"k8s.statefulset.uid",K8S_STATEFULSET_NAME:"k8s.statefulset.name",K8S_DAEMONSET_UID:"k8s.daemonset.uid",K8S_DAEMONSET_NAME:"k8s.daemonset.name",K8S_JOB_UID:"k8s.job.uid",K8S_JOB_NAME:"k8s.job.name",K8S_CRONJOB_UID:"k8s.cronjob.uid",K8S_CRONJOB_NAME:"k8s.cronjob.name",OS_TYPE:"os.type",OS_DESCRIPTION:"os.description",OS_NAME:"os.name",OS_VERSION:"os.version",PROCESS_PID:"process.pid",PROCESS_EXECUTABLE_NAME:"process.executable.name",PROCESS_EXECUTABLE_PATH:"process.executable.path",PROCESS_COMMAND:"process.command",PROCESS_COMMAND_LINE:"process.command_line",PROCESS_COMMAND_ARGS:"process.command_args",PROCESS_OWNER:"process.owner",PROCESS_RUNTIME_NAME:"process.runtime.name",PROCESS_RUNTIME_VERSION:"process.runtime.version",PROCESS_RUNTIME_DESCRIPTION:"process.runtime.description",SERVICE_NAME:"service.name",SERVICE_NAMESPACE:"service.namespace",SERVICE_INSTANCE_ID:"service.instance.id",SERVICE_VERSION:"service.version",TELEMETRY_SDK_NAME:"telemetry.sdk.name",TELEMETRY_SDK_LANGUAGE:"telemetry.sdk.language",TELEMETRY_SDK_VERSION:"telemetry.sdk.version",TELEMETRY_AUTO_VERSION:"telemetry.auto.version",WEBENGINE_NAME:"webengine.name",WEBENGINE_VERSION:"webengine.version",WEBENGINE_DESCRIPTION:"webengine.description"};G.CloudProviderValues={ALIBABA_CLOUD:"alibaba_cloud",AWS:"aws",AZURE:"azure",GCP:"gcp"};G.CloudPlatformValues={ALIBABA_CLOUD_ECS:"alibaba_cloud_ecs",ALIBABA_CLOUD_FC:"alibaba_cloud_fc",AWS_EC2:"aws_ec2",AWS_ECS:"aws_ecs",AWS_EKS:"aws_eks",AWS_LAMBDA:"aws_lambda",AWS_ELASTIC_BEANSTALK:"aws_elastic_beanstalk",AZURE_VM:"azure_vm",AZURE_CONTAINER_INSTANCES:"azure_container_instances",AZURE_AKS:"azure_aks",AZURE_FUNCTIONS:"azure_functions",AZURE_APP_SERVICE:"azure_app_service",GCP_COMPUTE_ENGINE:"gcp_compute_engine",GCP_CLOUD_RUN:"gcp_cloud_run",GCP_KUBERNETES_ENGINE:"gcp_kubernetes_engine",GCP_CLOUD_FUNCTIONS:"gcp_cloud_functions",GCP_APP_ENGINE:"gcp_app_engine"};G.AwsEcsLaunchtypeValues={EC2:"ec2",FARGATE:"fargate"};G.HostArchValues={AMD64:"amd64",ARM32:"arm32",ARM64:"arm64",IA64:"ia64",PPC32:"ppc32",PPC64:"ppc64",X86:"x86"};G.OsTypeValues={WINDOWS:"windows",LINUX:"linux",DARWIN:"darwin",FREEBSD:"freebsd",NETBSD:"netbsd",OPENBSD:"openbsd",DRAGONFLYBSD:"dragonflybsd",HPUX:"hpux",AIX:"aix",SOLARIS:"solaris",Z_OS:"z_os"};G.TelemetrySdkLanguageValues={CPP:"cpp",DOTNET:"dotnet",ERLANG:"erlang",GO:"go",JAVA:"java",NODEJS:"nodejs",PHP:"php",PYTHON:"python",RUBY:"ruby",WEBJS:"webjs"}});var Ci=_(Ct=>{"use strict";var bc=Ct&&Ct.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Lc=Ct&&Ct.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&bc(t,e,r)};Object.defineProperty(Ct,"__esModule",{value:!0});Lc(Ii(),Ct)});var se=_(_t=>{"use strict";var Pc=_t&&_t.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Ni=_t&&_t.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Pc(t,e,r)};Object.defineProperty(_t,"__esModule",{value:!0});Ni(Pi(),_t);Ni(Ci(),_t)});var wi=_(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.SDK_INFO=void 0;var Ic=zr(),ae=se();Me.SDK_INFO={[ae.SemanticResourceAttributes.TELEMETRY_SDK_NAME]:"opentelemetry",[ae.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]:"browser",[ae.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]:ae.TelemetrySdkLanguageValues.WEBJS,[ae.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]:Ic.VERSION}});var Mi=_(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.unrefTimer=void 0;function Cc(e){}xe.unrefTimer=Cc});var $r=_(j=>{"use strict";var Nc=j&&j.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Nt=j&&j.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Nc(t,e,r)};Object.defineProperty(j,"__esModule",{value:!0});Nt(vi(),j);Nt(Oe(),j);Nt(Ai(),j);Nt(Oi(),j);Nt(bi(),j);Nt(wi(),j);Nt(Mi(),j)});var Bi=_(O=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0});O.addHrTimes=O.isTimeInput=O.isTimeInputHrTime=O.hrTimeToMicroseconds=O.hrTimeToMilliseconds=O.hrTimeToNanoseconds=O.hrTimeToTimeStamp=O.hrTimeDuration=O.timeInputToHrTime=O.hrTime=O.getTimeOrigin=O.millisToHrTime=void 0;var Qr=$r(),xi=9,wc=6,Mc=Math.pow(10,wc),De=Math.pow(10,xi);function ue(e){let t=e/1e3,r=Math.trunc(t),n=Math.round(e%1e3*Mc);return[r,n]}O.millisToHrTime=ue;function Zr(){let e=Qr.otperformance.timeOrigin;if(typeof e!="number"){let t=Qr.otperformance;e=t.timing&&t.timing.fetchStart}return e}O.getTimeOrigin=Zr;function Di(e){let t=ue(Zr()),r=ue(typeof e=="number"?e:Qr.otperformance.now());return Ui(t,r)}O.hrTime=Di;function xc(e){if(Jr(e))return e;if(typeof e=="number")return e<Zr()?Di(e):ue(e);if(e instanceof Date)return ue(e.getTime());throw TypeError("Invalid input type")}O.timeInputToHrTime=xc;function Dc(e,t){let r=t[0]-e[0],n=t[1]-e[1];return n<0&&(r-=1,n+=De),[r,n]}O.hrTimeDuration=Dc;function Uc(e){let t=xi,r=`${"0".repeat(t)}${e[1]}Z`,n=r.substr(r.length-t-1);return new Date(e[0]*1e3).toISOString().replace("000Z",n)}O.hrTimeToTimeStamp=Uc;function Bc(e){return e[0]*De+e[1]}O.hrTimeToNanoseconds=Bc;function Gc(e){return e[0]*1e3+e[1]/1e6}O.hrTimeToMilliseconds=Gc;function Vc(e){return e[0]*1e6+e[1]/1e3}O.hrTimeToMicroseconds=Vc;function Jr(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}O.isTimeInputHrTime=Jr;function Hc(e){return Jr(e)||typeof e=="number"||e instanceof Date}O.isTimeInput=Hc;function Ui(e,t){let r=[e[0]+t[0],e[1]+t[1]];return r[1]>=De&&(r[1]-=De,r[0]+=1),r}O.addHrTimes=Ui});var Vi=_(Gi=>{"use strict";Object.defineProperty(Gi,"__esModule",{value:!0})});var Hi=_(ce=>{"use strict";Object.defineProperty(ce,"__esModule",{value:!0});ce.ExportResultCode=void 0;var Fc;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(Fc=ce.ExportResultCode||(ce.ExportResultCode={}))});var ji=_(Ue=>{"use strict";Object.defineProperty(Ue,"__esModule",{value:!0});Ue.CompositePropagator=void 0;var Fi=(E(),w(l)),tn=class{constructor(t={}){var r;this._propagators=(r=t.propagators)!==null&&r!==void 0?r:[],this._fields=Array.from(new Set(this._propagators.map(n=>typeof n.fields=="function"?n.fields():[]).reduce((n,o)=>n.concat(o),[])))}inject(t,r,n){for(let o of this._propagators)try{o.inject(t,r,n)}catch(i){Fi.diag.warn(`Failed to inject with ${o.constructor.name}. Err: ${i.message}`)}}extract(t,r,n){return this._propagators.reduce((o,i)=>{try{return i.extract(o,r,n)}catch(a){Fi.diag.warn(`Failed to inject with ${i.constructor.name}. Err: ${a.message}`)}return o},t)}fields(){return this._fields.slice()}};Ue.CompositePropagator=tn});var ki=_(Ht=>{"use strict";Object.defineProperty(Ht,"__esModule",{value:!0});Ht.validateValue=Ht.validateKey=void 0;var en="[_0-9a-z-*/]",jc=`[a-z]${en}{0,255}`,kc=`[a-z0-9]${en}{0,240}@[a-z]${en}{0,13}`,qc=new RegExp(`^(?:${jc}|${kc})$`),Xc=/^[ -~]{0,255}[!-~]$/,Kc=/,|=/;function Wc(e){return qc.test(e)}Ht.validateKey=Wc;function Yc(e){return Xc.test(e)&&!Kc.test(e)}Ht.validateValue=Yc});var nn=_(Be=>{"use strict";Object.defineProperty(Be,"__esModule",{value:!0});Be.TraceState=void 0;var qi=ki(),Xi=32,zc=512,Ki=",",Wi="=",rn=class e{constructor(t){this._internalState=new Map,t&&this._parse(t)}set(t,r){let n=this._clone();return n._internalState.has(t)&&n._internalState.delete(t),n._internalState.set(t,r),n}unset(t){let r=this._clone();return r._internalState.delete(t),r}get(t){return this._internalState.get(t)}serialize(){return this._keys().reduce((t,r)=>(t.push(r+Wi+this.get(r)),t),[]).join(Ki)}_parse(t){t.length>zc||(this._internalState=t.split(Ki).reverse().reduce((r,n)=>{let o=n.trim(),i=o.indexOf(Wi);if(i!==-1){let a=o.slice(0,i),u=o.slice(i+1,n.length);(0,qi.validateKey)(a)&&(0,qi.validateValue)(u)&&r.set(a,u)}return r},new Map),this._internalState.size>Xi&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Xi))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}};Be.TraceState=rn});var zi=_(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.W3CTraceContextPropagator=V.parseTraceParent=V.TRACE_STATE_HEADER=V.TRACE_PARENT_HEADER=void 0;var Ge=(E(),w(l)),$c=ie(),Qc=nn();V.TRACE_PARENT_HEADER="traceparent";V.TRACE_STATE_HEADER="tracestate";var Zc="00",Jc="(?!ff)[\\da-f]{2}",tl="(?![0]{32})[\\da-f]{32}",el="(?![0]{16})[\\da-f]{16}",rl="[\\da-f]{2}",nl=new RegExp(`^\\s?(${Jc})-(${tl})-(${el})-(${rl})(-.*)?\\s?$`);function Yi(e){let t=nl.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}V.parseTraceParent=Yi;var on=class{inject(t,r,n){let o=Ge.trace.getSpanContext(t);if(!o||(0,$c.isTracingSuppressed)(t)||!(0,Ge.isSpanContextValid)(o))return;let i=`${Zc}-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||Ge.TraceFlags.NONE).toString(16)}`;n.set(r,V.TRACE_PARENT_HEADER,i),o.traceState&&n.set(r,V.TRACE_STATE_HEADER,o.traceState.serialize())}extract(t,r,n){let o=n.get(r,V.TRACE_PARENT_HEADER);if(!o)return t;let i=Array.isArray(o)?o[0]:o;if(typeof i!="string")return t;let a=Yi(i);if(!a)return t;a.isRemote=!0;let u=n.get(r,V.TRACE_STATE_HEADER);if(u){let c=Array.isArray(u)?u.join(","):u;a.traceState=new Qc.TraceState(typeof c=="string"?c:void 0)}return Ge.trace.setSpanContext(t,a)}fields(){return[V.TRACE_PARENT_HEADER,V.TRACE_STATE_HEADER]}};V.W3CTraceContextPropagator=on});var Qi=_($i=>{"use strict";Object.defineProperty($i,"__esModule",{value:!0})});var Zi=_($=>{"use strict";Object.defineProperty($,"__esModule",{value:!0});$.getRPCMetadata=$.deleteRPCMetadata=$.setRPCMetadata=$.RPCType=void 0;var il=(E(),w(l)),sn=(0,il.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),ol;(function(e){e.HTTP="http"})(ol=$.RPCType||($.RPCType={}));function sl(e,t){return e.setValue(sn,t)}$.setRPCMetadata=sl;function al(e){return e.deleteValue(sn)}$.deleteRPCMetadata=al;function ul(e){return e.getValue(sn)}$.getRPCMetadata=ul});var un=_(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.AlwaysOffSampler=void 0;var cl=(E(),w(l)),an=class{shouldSample(){return{decision:cl.SamplingDecision.NOT_RECORD}}toString(){return"AlwaysOffSampler"}};Ve.AlwaysOffSampler=an});var ln=_(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.AlwaysOnSampler=void 0;var ll=(E(),w(l)),cn=class{shouldSample(){return{decision:ll.SamplingDecision.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}};He.AlwaysOnSampler=cn});var to=_(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.ParentBasedSampler=void 0;var Fe=(E(),w(l)),fl=Xr(),Ji=un(),fn=ln(),pn=class{constructor(t){var r,n,o,i;this._root=t.root,this._root||((0,fl.globalErrorHandler)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new fn.AlwaysOnSampler),this._remoteParentSampled=(r=t.remoteParentSampled)!==null&&r!==void 0?r:new fn.AlwaysOnSampler,this._remoteParentNotSampled=(n=t.remoteParentNotSampled)!==null&&n!==void 0?n:new Ji.AlwaysOffSampler,this._localParentSampled=(o=t.localParentSampled)!==null&&o!==void 0?o:new fn.AlwaysOnSampler,this._localParentNotSampled=(i=t.localParentNotSampled)!==null&&i!==void 0?i:new Ji.AlwaysOffSampler}shouldSample(t,r,n,o,i,a){let u=Fe.trace.getSpanContext(t);return!u||!(0,Fe.isSpanContextValid)(u)?this._root.shouldSample(t,r,n,o,i,a):u.isRemote?u.traceFlags&Fe.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(t,r,n,o,i,a):this._remoteParentNotSampled.shouldSample(t,r,n,o,i,a):u.traceFlags&Fe.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(t,r,n,o,i,a):this._localParentNotSampled.shouldSample(t,r,n,o,i,a)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}};je.ParentBasedSampler=pn});var eo=_(ke=>{"use strict";Object.defineProperty(ke,"__esModule",{value:!0});ke.TraceIdRatioBasedSampler=void 0;var dn=(E(),w(l)),_n=class{constructor(t=0){this._ratio=t,this._ratio=this._normalize(t),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(t,r){return{decision:(0,dn.isValidTraceId)(r)&&this._accumulate(r)<this._upperBound?dn.SamplingDecision.RECORD_AND_SAMPLED:dn.SamplingDecision.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(t){return typeof t!="number"||isNaN(t)?0:t>=1?1:t<=0?0:t}_accumulate(t){let r=0;for(let n=0;n<t.length/8;n++){let o=n*8,i=parseInt(t.slice(o,o+8),16);r=(r^i)>>>0}return r}};ke.TraceIdRatioBasedSampler=_n});var so=_(qe=>{"use strict";Object.defineProperty(qe,"__esModule",{value:!0});qe.isPlainObject=void 0;var pl="[object Object]",dl="[object Null]",_l="[object Undefined]",hl=Function.prototype,ro=hl.toString,El=ro.call(Object),ml=Tl(Object.getPrototypeOf,Object),no=Object.prototype,io=no.hasOwnProperty,wt=Symbol?Symbol.toStringTag:void 0,oo=no.toString;function Tl(e,t){return function(r){return e(t(r))}}function Sl(e){if(!gl(e)||yl(e)!==pl)return!1;let t=ml(e);if(t===null)return!0;let r=io.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&ro.call(r)===El}qe.isPlainObject=Sl;function gl(e){return e!=null&&typeof e=="object"}function yl(e){return e==null?e===void 0?_l:dl:wt&&wt in Object(e)?vl(e):Al(e)}function vl(e){let t=io.call(e,wt),r=e[wt],n=!1;try{e[wt]=void 0,n=!0}catch{}let o=oo.call(e);return n&&(t?e[wt]=r:delete e[wt]),o}function Al(e){return oo.call(e)}});var fo=_(We=>{"use strict";Object.defineProperty(We,"__esModule",{value:!0});We.merge=void 0;var ao=so(),Rl=20;function Ol(...e){let t=e.shift(),r=new WeakMap;for(;e.length>0;)t=co(t,e.shift(),0,r);return t}We.merge=Ol;function hn(e){return Ke(e)?e.slice():e}function co(e,t,r=0,n){let o;if(!(r>Rl)){if(r++,Xe(e)||Xe(t)||lo(t))o=hn(t);else if(Ke(e)){if(o=e.slice(),Ke(t))for(let i=0,a=t.length;i<a;i++)o.push(hn(t[i]));else if(le(t)){let i=Object.keys(t);for(let a=0,u=i.length;a<u;a++){let c=i[a];o[c]=hn(t[c])}}}else if(le(e))if(le(t)){if(!bl(e,t))return t;o=Object.assign({},e);let i=Object.keys(t);for(let a=0,u=i.length;a<u;a++){let c=i[a],s=t[c];if(Xe(s))typeof s>"u"?delete o[c]:o[c]=s;else{let f=o[c],p=s;if(uo(e,c,n)||uo(t,c,n))delete o[c];else{if(le(f)&&le(p)){let d=n.get(f)||[],m=n.get(p)||[];d.push({obj:e,key:c}),m.push({obj:t,key:c}),n.set(f,d),n.set(p,m)}o[c]=co(o[c],s,r,n)}}}}else o=t;return o}}function uo(e,t,r){let n=r.get(e[t])||[];for(let o=0,i=n.length;o<i;o++){let a=n[o];if(a.key===t&&a.obj===e)return!0}return!1}function Ke(e){return Array.isArray(e)}function lo(e){return typeof e=="function"}function le(e){return!Xe(e)&&!Ke(e)&&!lo(e)&&typeof e=="object"}function Xe(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function bl(e,t){return!(!(0,ao.isPlainObject)(e)||!(0,ao.isPlainObject)(t))}});var po=_(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.callWithTimeout=Ft.TimeoutError=void 0;var Ye=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};Ft.TimeoutError=Ye;function Ll(e,t){let r,n=new Promise(function(i,a){r=setTimeout(function(){a(new Ye("Operation timed out."))},t)});return Promise.race([e,n]).then(o=>(clearTimeout(r),o),o=>{throw clearTimeout(r),o})}Ft.callWithTimeout=Ll});var ho=_(jt=>{"use strict";Object.defineProperty(jt,"__esModule",{value:!0});jt.isUrlIgnored=jt.urlMatches=void 0;function _o(e,t){return typeof t=="string"?e===t:!!e.match(t)}jt.urlMatches=_o;function Pl(e,t){if(!t)return!1;for(let r of t)if(_o(e,r))return!0;return!1}jt.isUrlIgnored=Pl});var Eo=_(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.isWrapped=void 0;function Il(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}ze.isWrapped=Il});var mo=_($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});$e.Deferred=void 0;var En=class{constructor(){this._promise=new Promise((t,r)=>{this._resolve=t,this._reject=r})}get promise(){return this._promise}resolve(t){this._resolve(t)}reject(t){this._reject(t)}};$e.Deferred=En});var To=_(Qe=>{"use strict";Object.defineProperty(Qe,"__esModule",{value:!0});Qe.BindOnceFuture=void 0;var Cl=mo(),mn=class{constructor(t,r){this._callback=t,this._that=r,this._isCalled=!1,this._deferred=new Cl.Deferred}get isCalled(){return this._isCalled}get promise(){return this._deferred.promise}call(...t){if(!this._isCalled){this._isCalled=!0;try{Promise.resolve(this._callback.call(this._that,...t)).then(r=>this._deferred.resolve(r),r=>this._deferred.reject(r))}catch(r){this._deferred.reject(r)}}return this._deferred.promise}};Qe.BindOnceFuture=mn});var go=_(Ze=>{"use strict";Object.defineProperty(Ze,"__esModule",{value:!0});Ze._export=void 0;var So=(E(),w(l)),Nl=ie();function wl(e,t){return new Promise(r=>{So.context.with((0,Nl.suppressTracing)(So.context.active()),()=>{e.export(t,n=>{r(n)})})})}Ze._export=wl});var P=_(S=>{"use strict";var Ml=S&&S.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),R=S&&S.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Ml(t,e,r)};Object.defineProperty(S,"__esModule",{value:!0});S.internal=S.baggageUtils=void 0;R(di(),S);R(_i(),S);R(Si(),S);R(Xr(),S);R(qr(),S);R(Bi(),S);R(Vi(),S);R(Hi(),S);S.baggageUtils=Vr();R($r(),S);R(ji(),S);R(zi(),S);R(Qi(),S);R(Zi(),S);R(un(),S);R(ln(),S);R(to(),S);R(eo(),S);R(ie(),S);R(nn(),S);R(be(),S);R(fo(),S);R(Kr(),S);R(po(),S);R(ho(),S);R(Eo(),S);R(To(),S);R(zr(),S);var xl=go();S.internal={_export:xl._export}});var Fo=_(St=>{"use strict";Object.defineProperty(St,"__esModule",{value:!0});St.disableInstrumentations=St.enableInstrumentations=St.parseInstrumentationOptions=void 0;function Ho(e=[]){let t=[];for(let r=0,n=e.length;r<n;r++){let o=e[r];if(Array.isArray(o)){let i=Ho(o);t=t.concat(i.instrumentations)}else typeof o=="function"?t.push(new o):o.instrumentationName&&t.push(o)}return{instrumentations:t}}St.parseInstrumentationOptions=Ho;function Ql(e,t,r){for(let n=0,o=e.length;n<o;n++){let i=e[n];t&&i.setTracerProvider(t),r&&i.setMeterProvider(r),i.getConfig().enabled||i.enable()}}St.enableInstrumentations=Ql;function Zl(e){e.forEach(t=>t.disable())}St.disableInstrumentations=Zl});var ko=_(ir=>{"use strict";Object.defineProperty(ir,"__esModule",{value:!0});ir.registerInstrumentations=void 0;var jo=(E(),w(l)),Sn=Fo();function Jl(e){let{instrumentations:t}=(0,Sn.parseInstrumentationOptions)(e.instrumentations),r=e.tracerProvider||jo.trace.getTracerProvider(),n=e.meterProvider||jo.metrics.getMeterProvider();return(0,Sn.enableInstrumentations)(t,r,n),()=>{(0,Sn.disableInstrumentations)(t)}}ir.registerInstrumentations=Jl});var pe={};import*as DE from"async_hooks";var Gs=Ur(()=>{z(pe,DE)});var de={};import*as UE from"events";var Vs=Ur(()=>{z(de,UE)});var Hs=_(_r=>{"use strict";Object.defineProperty(_r,"__esModule",{value:!0});_r.AbstractAsyncHooksContextManager=void 0;var If=(Vs(),w(de)),Cf=["addListener","on","once","prependListener","prependOnceListener"],Nn=class{constructor(){this._kOtListeners=Symbol("OtListeners"),this._wrapped=!1}bind(t,r){return r instanceof If.EventEmitter?this._bindEventEmitter(t,r):typeof r=="function"?this._bindFunction(t,r):r}_bindFunction(t,r){let n=this,o=function(...i){return n.with(t,()=>r.apply(this,i))};return Object.defineProperty(o,"length",{enumerable:!1,configurable:!0,writable:!1,value:r.length}),o}_bindEventEmitter(t,r){return this._getPatchMap(r)!==void 0||(this._createPatchMap(r),Cf.forEach(o=>{r[o]!==void 0&&(r[o]=this._patchAddListener(r,r[o],t))}),typeof r.removeListener=="function"&&(r.removeListener=this._patchRemoveListener(r,r.removeListener)),typeof r.off=="function"&&(r.off=this._patchRemoveListener(r,r.off)),typeof r.removeAllListeners=="function"&&(r.removeAllListeners=this._patchRemoveAllListeners(r,r.removeAllListeners))),r}_patchRemoveListener(t,r){let n=this;return function(o,i){var a;let u=(a=n._getPatchMap(t))===null||a===void 0?void 0:a[o];if(u===void 0)return r.call(this,o,i);let c=u.get(i);return r.call(this,o,c||i)}}_patchRemoveAllListeners(t,r){let n=this;return function(o){let i=n._getPatchMap(t);return i!==void 0&&(arguments.length===0?n._createPatchMap(t):i[o]!==void 0&&delete i[o]),r.apply(this,arguments)}}_patchAddListener(t,r,n){let o=this;return function(i,a){if(o._wrapped)return r.call(this,i,a);let u=o._getPatchMap(t);u===void 0&&(u=o._createPatchMap(t));let c=u[i];c===void 0&&(c=new WeakMap,u[i]=c);let s=o.bind(n,a);c.set(a,s),o._wrapped=!0;try{return r.call(this,i,s)}finally{o._wrapped=!1}}}_createPatchMap(t){let r=Object.create(null);return t[this._kOtListeners]=r,r}_getPatchMap(t){return t[this._kOtListeners]}};_r.AbstractAsyncHooksContextManager=Nn});var Fs=_(hr=>{"use strict";Object.defineProperty(hr,"__esModule",{value:!0});hr.AsyncLocalStorageContextManager=void 0;var Nf=(E(),w(l)),wf=(Gs(),w(pe)),Mf=Hs(),wn=class extends Mf.AbstractAsyncHooksContextManager{constructor(){super(),this._asyncLocalStorage=new wf.AsyncLocalStorage}active(){var t;return(t=this._asyncLocalStorage.getStore())!==null&&t!==void 0?t:Nf.ROOT_CONTEXT}with(t,r,n,...o){let i=n==null?r:r.bind(n);return this._asyncLocalStorage.run(t,i,...o)}enable(){return this}disable(){return this._asyncLocalStorage.disable(),this}};hr.AsyncLocalStorageContextManager=wn});var Gn=_(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.toAnyValue=gt.toKeyValue=gt.toAttributes=void 0;function Vf(e){return Object.keys(e).map(t=>Un(t,e[t]))}gt.toAttributes=Vf;function Un(e,t){return{key:e,value:Bn(t)}}gt.toKeyValue=Un;function Bn(e){let 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(Bn)}}:t==="object"&&e!=null?{kvlistValue:{values:Object.entries(e).map(([r,n])=>Un(r,n))}}:{}}gt.toAnyValue=Bn});var ea=_(yt=>{"use strict";Object.defineProperty(yt,"__esModule",{value:!0});yt.toOtlpSpanEvent=yt.toOtlpLink=yt.sdkSpanToOtlpSpan=void 0;var Vn=Gn();function Hf(e,t){var r;let n=e.spanContext(),o=e.status;return{traceId:t.encodeSpanContext(n.traceId),spanId:t.encodeSpanContext(n.spanId),parentSpanId:t.encodeOptionalSpanContext(e.parentSpanId),traceState:(r=n.traceState)===null||r===void 0?void 0:r.serialize(),name:e.name,kind:e.kind==null?0:e.kind+1,startTimeUnixNano:t.encodeHrTime(e.startTime),endTimeUnixNano:t.encodeHrTime(e.endTime),attributes:(0,Vn.toAttributes)(e.attributes),droppedAttributesCount:e.droppedAttributesCount,events:e.events.map(i=>ta(i,t)),droppedEventsCount:e.droppedEventsCount,status:{code:o.code,message:o.message},links:e.links.map(i=>Js(i,t)),droppedLinksCount:e.droppedLinksCount}}yt.sdkSpanToOtlpSpan=Hf;function Js(e,t){var r;return{attributes:e.attributes?(0,Vn.toAttributes)(e.attributes):[],spanId:t.encodeSpanContext(e.context.spanId),traceId:t.encodeSpanContext(e.context.traceId),traceState:(r=e.context.traceState)===null||r===void 0?void 0:r.serialize(),droppedAttributesCount:e.droppedAttributesCount||0}}yt.toOtlpLink=Js;function ta(e,t){return{attributes:e.attributes?(0,Vn.toAttributes)(e.attributes):[],name:e.name,timeUnixNano:t.encodeHrTime(e.time),droppedAttributesCount:e.droppedAttributesCount||0}}yt.toOtlpSpanEvent=ta});var sa=_(W=>{"use strict";Object.defineProperty(W,"__esModule",{value:!0});W.getOtlpEncoder=W.encodeAsString=W.encodeAsLongBits=W.toLongBits=W.hrTimeToNanos=void 0;var Sr=P(),Ff=BigInt(1e9);function Hn(e){return BigInt(e[0])*Ff+BigInt(e[1])}W.hrTimeToNanos=Hn;function na(e){let t=Number(BigInt.asUintN(32,e)),r=Number(BigInt.asUintN(32,e>>BigInt(32)));return{low:t,high:r}}W.toLongBits=na;function Fn(e){let t=Hn(e);return na(t)}W.encodeAsLongBits=Fn;function ia(e){return Hn(e).toString()}W.encodeAsString=ia;var jf=typeof BigInt<"u"?ia:Sr.hrTimeToNanoseconds;function ra(e){return e}function oa(e){if(e!==void 0)return(0,Sr.hexToBase64)(e)}var kf={encodeHrTime:Fn,encodeSpanContext:Sr.hexToBase64,encodeOptionalSpanContext:oa};function qf(e){var t,r;if(e===void 0)return kf;let n=(t=e.useLongBits)!==null&&t!==void 0?t:!0,o=(r=e.useHex)!==null&&r!==void 0?r:!1;return{encodeHrTime:n?Fn:jf,encodeSpanContext:o?ra:Sr.hexToBase64,encodeOptionalSpanContext:o?ra:oa}}W.getOtlpEncoder=qf});var jn=_(gr=>{"use strict";Object.defineProperty(gr,"__esModule",{value:!0});gr.createExportTraceServiceRequest=void 0;var Xf=Gn(),Kf=ea(),Wf=sa();function Yf(e,t){let r=(0,Wf.getOtlpEncoder)(t);return{resourceSpans:$f(e,r)}}gr.createExportTraceServiceRequest=Yf;function zf(e){let t=new Map;for(let r of e){let n=t.get(r.resource);n||(n=new Map,t.set(r.resource,n));let o=`${r.instrumentationLibrary.name}@${r.instrumentationLibrary.version||""}:${r.instrumentationLibrary.schemaUrl||""}`,i=n.get(o);i||(i=[],n.set(o,i)),i.push(r)}return t}function $f(e,t){let r=zf(e),n=[],o=r.entries(),i=o.next();for(;!i.done;){let[a,u]=i.value,c=[],s=u.values(),f=s.next();for(;!f.done;){let d=f.value;if(d.length>0){let{name:m,version:g,schemaUrl:C}=d[0].instrumentationLibrary,M=d.map(T=>(0,Kf.sdkSpanToOtlpSpan)(T,t));c.push({scope:{name:m,version:g},spans:M,schemaUrl:C})}f=s.next()}let p={resource:{attributes:(0,Xf.toAttributes)(a.attributes),droppedAttributesCount:0},scopeSpans:c,schemaUrl:void 0};n.push(p),i=o.next()}return n}});var ca=_(I=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0});I.parseRetryAfterToMills=I.isExportRetryable=I.invalidTimeout=I.configureExporterTimeout=I.appendRootPathToUrlIfNeeded=I.appendResourcePathToUrl=I.parseHeaders=I.DEFAULT_EXPORT_BACKOFF_MULTIPLIER=I.DEFAULT_EXPORT_MAX_BACKOFF=I.DEFAULT_EXPORT_INITIAL_BACKOFF=I.DEFAULT_EXPORT_MAX_ATTEMPTS=void 0;var kn=(E(),w(l)),aa=P(),ua=1e4;I.DEFAULT_EXPORT_MAX_ATTEMPTS=5;I.DEFAULT_EXPORT_INITIAL_BACKOFF=1e3;I.DEFAULT_EXPORT_MAX_BACKOFF=5e3;I.DEFAULT_EXPORT_BACKOFF_MULTIPLIER=1.5;function Qf(e={}){let t={};return Object.entries(e).forEach(([r,n])=>{typeof n<"u"?t[r]=String(n):kn.diag.warn(`Header "${r}" has wrong value and will be ignored`)}),t}I.parseHeaders=Qf;function Zf(e,t){return e.endsWith("/")||(e=e+"/"),e+t}I.appendResourcePathToUrl=Zf;function Jf(e){try{let t=new URL(e);return t.pathname===""&&(t.pathname=t.pathname+"/"),t.toString()}catch{return kn.diag.warn(`Could not parse export URL: '${e}'`),e}}I.appendRootPathToUrlIfNeeded=Jf;function tp(e){return typeof e=="number"?e<=0?qn(e,ua):e:ep()}I.configureExporterTimeout=tp;function ep(){var e;let t=Number((e=(0,aa.getEnv)().OTEL_EXPORTER_OTLP_TRACES_TIMEOUT)!==null&&e!==void 0?e:(0,aa.getEnv)().OTEL_EXPORTER_OTLP_TIMEOUT);return t<=0?qn(t,ua):t}function qn(e,t){return kn.diag.warn("Timeout must be greater than 0",e),t}I.invalidTimeout=qn;function rp(e){return[429,502,503,504].includes(e)}I.isExportRetryable=rp;function np(e){if(e==null)return-1;let t=Number.parseInt(e,10);if(Number.isInteger(t))return t>0?t*1e3:-1;let r=new Date(e).getTime()-Date.now();return r>=0?r:0}I.parseRetryAfterToMills=np});var fa=_(yr=>{"use strict";Object.defineProperty(yr,"__esModule",{value:!0});yr.OTLPExporterBase=void 0;var la=(E(),w(l)),_e=P(),ip=ca(),Xn=class{constructor(t={}){this._sendingPromises=[],this.url=this.getDefaultUrl(t),typeof t.hostname=="string"&&(this.hostname=t.hostname),this.shutdown=this.shutdown.bind(this),this._shutdownOnce=new _e.BindOnceFuture(this._shutdown,this),this._concurrencyLimit=typeof t.concurrencyLimit=="number"?t.concurrencyLimit:30,this.timeoutMillis=(0,ip.configureExporterTimeout)(t.timeoutMillis),this.onInit(t)}export(t,r){if(this._shutdownOnce.isCalled){r({code:_e.ExportResultCode.FAILED,error:new Error("Exporter has been shutdown")});return}if(this._sendingPromises.length>=this._concurrencyLimit){r({code:_e.ExportResultCode.FAILED,error:new Error("Concurrent export limit reached")});return}this._export(t).then(()=>{r({code:_e.ExportResultCode.SUCCESS})}).catch(n=>{r({code:_e.ExportResultCode.FAILED,error:n})})}_export(t){return new Promise((r,n)=>{try{la.diag.debug("items to be sent",t),this.send(t,r,n)}catch(o){n(o)}})}shutdown(){return this._shutdownOnce.call()}forceFlush(){return Promise.all(this._sendingPromises).then(()=>{})}_shutdown(){return la.diag.debug("shutdown started"),this.onShutdown(),this.forceFlush()}};yr.OTLPExporterBase=Xn});var ha=_((fm,_a)=>{"use strict";_a.exports=ap;function ap(e,t){for(var r=new Array(arguments.length-1),n=0,o=2,i=!0;o<arguments.length;)r[n++]=arguments[o++];return new Promise(function(u,c){r[n]=function(f){if(i)if(i=!1,f)c(f);else{for(var p=new Array(arguments.length-1),d=0;d<p.length;)p[d++]=arguments[d];u.apply(null,p)}};try{e.apply(t||null,r)}catch(s){i&&(i=!1,c(s))}})}});var Sa=_(Ta=>{"use strict";var Ar=Ta;Ar.length=function(t){var r=t.length;if(!r)return 0;for(var n=0;--r%4>1&&t.charAt(r)==="=";)++n;return Math.ceil(t.length*3)/4-n};var Zt=new Array(64),ma=new Array(123);for(J=0;J<64;)ma[Zt[J]=J<26?J+65:J<52?J+71:J<62?J-4:J-59|43]=J++;var J;Ar.encode=function(t,r,n){for(var o=null,i=[],a=0,u=0,c;r<n;){var s=t[r++];switch(u){case 0:i[a++]=Zt[s>>2],c=(s&3)<<4,u=1;break;case 1:i[a++]=Zt[c|s>>4],c=(s&15)<<2,u=2;break;case 2:i[a++]=Zt[c|s>>6],i[a++]=Zt[s&63],u=0;break}a>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,i)),a=0)}return u&&(i[a++]=Zt[c],i[a++]=61,u===1&&(i[a++]=61)),o?(a&&o.push(String.fromCharCode.apply(String,i.slice(0,a))),o.join("")):String.fromCharCode.apply(String,i.slice(0,a))};var Ea="invalid encoding";Ar.decode=function(t,r,n){for(var o=n,i=0,a,u=0;u<t.length;){var c=t.charCodeAt(u++);if(c===61&&i>1)break;if((c=ma[c])===void 0)throw Error(Ea);switch(i){case 0:a=c,i=1;break;case 1:r[n++]=a<<2|(c&48)>>4,a=c,i=2;break;case 2:r[n++]=(a&15)<<4|(c&60)>>2,a=c,i=3;break;case 3:r[n++]=(a&3)<<6|c,i=0;break}}if(i===1)throw Error(Ea);return n-o};Ar.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}});var ya=_((dm,ga)=>{"use strict";ga.exports=Rr;function Rr(){this._listeners={}}Rr.prototype.on=function(t,r,n){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:r,ctx:n||this}),this};Rr.prototype.off=function(t,r){if(t===void 0)this._listeners={};else if(r===void 0)this._listeners[t]=[];else for(var n=this._listeners[t],o=0;o<n.length;)n[o].fn===r?n.splice(o,1):++o;return this};Rr.prototype.emit=function(t){var r=this._listeners[t];if(r){for(var n=[],o=1;o<arguments.length;)n.push(arguments[o++]);for(o=0;o<r.length;)r[o].fn.apply(r[o++].ctx,n)}return this}});var Pa=_((_m,La)=>{"use strict";La.exports=va(va);function va(e){return typeof Float32Array<"u"?function(){var t=new Float32Array([-0]),r=new Uint8Array(t.buffer),n=r[3]===128;function o(c,s,f){t[0]=c,s[f]=r[0],s[f+1]=r[1],s[f+2]=r[2],s[f+3]=r[3]}function i(c,s,f){t[0]=c,s[f]=r[3],s[f+1]=r[2],s[f+2]=r[1],s[f+3]=r[0]}e.writeFloatLE=n?o:i,e.writeFloatBE=n?i:o;function a(c,s){return r[0]=c[s],r[1]=c[s+1],r[2]=c[s+2],r[3]=c[s+3],t[0]}function u(c,s){return r[3]=c[s],r[2]=c[s+1],r[1]=c[s+2],r[0]=c[s+3],t[0]}e.readFloatLE=n?a:u,e.readFloatBE=n?u:a}():function(){function t(n,o,i,a){var u=o<0?1:0;if(u&&(o=-o),o===0)n(1/o>0?0:2147483648,i,a);else if(isNaN(o))n(2143289344,i,a);else if(o>34028234663852886e22)n((u<<31|2139095040)>>>0,i,a);else if(o<11754943508222875e-54)n((u<<31|Math.round(o/1401298464324817e-60))>>>0,i,a);else{var c=Math.floor(Math.log(o)/Math.LN2),s=Math.round(o*Math.pow(2,-c)*8388608)&8388607;n((u<<31|c+127<<23|s)>>>0,i,a)}}e.writeFloatLE=t.bind(null,Aa),e.writeFloatBE=t.bind(null,Ra);function r(n,o,i){var a=n(o,i),u=(a>>31)*2+1,c=a>>>23&255,s=a&8388607;return c===255?s?NaN:u*(1/0):c===0?u*1401298464324817e-60*s:u*Math.pow(2,c-150)*(s+8388608)}e.readFloatLE=r.bind(null,Oa),e.readFloatBE=r.bind(null,ba)}(),typeof Float64Array<"u"?function(){var t=new Float64Array([-0]),r=new Uint8Array(t.buffer),n=r[7]===128;function o(c,s,f){t[0]=c,s[f]=r[0],s[f+1]=r[1],s[f+2]=r[2],s[f+3]=r[3],s[f+4]=r[4],s[f+5]=r[5],s[f+6]=r[6],s[f+7]=r[7]}function i(c,s,f){t[0]=c,s[f]=r[7],s[f+1]=r[6],s[f+2]=r[5],s[f+3]=r[4],s[f+4]=r[3],s[f+5]=r[2],s[f+6]=r[1],s[f+7]=r[0]}e.writeDoubleLE=n?o:i,e.writeDoubleBE=n?i:o;function a(c,s){return r[0]=c[s],r[1]=c[s+1],r[2]=c[s+2],r[3]=c[s+3],r[4]=c[s+4],r[5]=c[s+5],r[6]=c[s+6],r[7]=c[s+7],t[0]}function u(c,s){return r[7]=c[s],r[6]=c[s+1],r[5]=c[s+2],r[4]=c[s+3],r[3]=c[s+4],r[2]=c[s+5],r[1]=c[s+6],r[0]=c[s+7],t[0]}e.readDoubleLE=n?a:u,e.readDoubleBE=n?u:a}():function(){function t(n,o,i,a,u,c){var s=a<0?1:0;if(s&&(a=-a),a===0)n(0,u,c+o),n(1/a>0?0:2147483648,u,c+i);else if(isNaN(a))n(0,u,c+o),n(2146959360,u,c+i);else if(a>17976931348623157e292)n(0,u,c+o),n((s<<31|2146435072)>>>0,u,c+i);else{var f;if(a<22250738585072014e-324)f=a/5e-324,n(f>>>0,u,c+o),n((s<<31|f/4294967296)>>>0,u,c+i);else{var p=Math.floor(Math.log(a)/Math.LN2);p===1024&&(p=1023),f=a*Math.pow(2,-p),n(f*4503599627370496>>>0,u,c+o),n((s<<31|p+1023<<20|f*1048576&1048575)>>>0,u,c+i)}}}e.writeDoubleLE=t.bind(null,Aa,0,4),e.writeDoubleBE=t.bind(null,Ra,4,0);function r(n,o,i,a,u){var c=n(a,u+o),s=n(a,u+i),f=(s>>31)*2+1,p=s>>>20&2047,d=4294967296*(s&1048575)+c;return p===2047?d?NaN:f*(1/0):p===0?f*5e-324*d:f*Math.pow(2,p-1075)*(d+4503599627370496)}e.readDoubleLE=r.bind(null,Oa,0,4),e.readDoubleBE=r.bind(null,ba,4,0)}(),e}function Aa(e,t,r){t[r]=e&255,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}function Ra(e,t,r){t[r]=e>>>24,t[r+1]=e>>>16&255,t[r+2]=e>>>8&255,t[r+3]=e&255}function Oa(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function ba(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}});var Ca=_((hm,Ia)=>{"use strict";Ia.exports=up;function up(e){return null}});var wa=_(Na=>{"use strict";var Wn=Na;Wn.length=function(t){for(var r=0,n=0,o=0;o<t.length;++o)n=t.charCodeAt(o),n<128?r+=1:n<2048?r+=2:(n&64512)===55296&&(t.charCodeAt(o+1)&64512)===56320?(++o,r+=4):r+=3;return r};Wn.read=function(t,r,n){var o=n-r;if(o<1)return"";for(var i=null,a=[],u=0,c;r<n;)c=t[r++],c<128?a[u++]=c:c>191&&c<224?a[u++]=(c&31)<<6|t[r++]&63:c>239&&c<365?(c=((c&7)<<18|(t[r++]&63)<<12|(t[r++]&63)<<6|t[r++]&63)-65536,a[u++]=55296+(c>>10),a[u++]=56320+(c&1023)):a[u++]=(c&15)<<12|(t[r++]&63)<<6|t[r++]&63,u>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,a)),u=0);return i?(u&&i.push(String.fromCharCode.apply(String,a.slice(0,u))),i.join("")):String.fromCharCode.apply(String,a.slice(0,u))};Wn.write=function(t,r,n){for(var o=n,i,a,u=0;u<t.length;++u)i=t.charCodeAt(u),i<128?r[n++]=i:i<2048?(r[n++]=i>>6|192,r[n++]=i&63|128):(i&64512)===55296&&((a=t.charCodeAt(u+1))&64512)===56320?(i=65536+((i&1023)<<10)+(a&1023),++u,r[n++]=i>>18|240,r[n++]=i>>12&63|128,r[n++]=i>>6&63|128,r[n++]=i&63|128):(r[n++]=i>>12|224,r[n++]=i>>6&63|128,r[n++]=i&63|128);return n-o}});var xa=_((mm,Ma)=>{"use strict";Ma.exports=cp;function cp(e,t,r){var n=r||8192,o=n>>>1,i=null,a=n;return function(c){if(c<1||c>o)return e(c);a+c>n&&(i=e(n),a=0);var s=t.call(i,a,a+=c);return a&7&&(a=(a|7)+1),s}}});var Ua=_((Tm,Da)=>{"use strict";Da.exports=D;var he=At();function D(e,t){this.lo=e>>>0,this.hi=t>>>0}var Dt=D.zero=new D(0,0);Dt.toNumber=function(){return 0};Dt.zzEncode=Dt.zzDecode=function(){return this};Dt.length=function(){return 1};var lp=D.zeroHash="\0\0\0\0\0\0\0\0";D.fromNumber=function(t){if(t===0)return Dt;var r=t<0;r&&(t=-t);var n=t>>>0,o=(t-n)/4294967296>>>0;return r&&(o=~o>>>0,n=~n>>>0,++n>4294967295&&(n=0,++o>4294967295&&(o=0))),new D(n,o)};D.from=function(t){if(typeof t=="number")return D.fromNumber(t);if(he.isString(t))if(he.Long)t=he.Long.fromString(t);else return D.fromNumber(parseInt(t,10));return t.low||t.high?new D(t.low>>>0,t.high>>>0):Dt};D.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var r=~this.lo+1>>>0,n=~this.hi>>>0;return r||(n=n+1>>>0),-(r+n*4294967296)}return this.lo+this.hi*4294967296};D.prototype.toLong=function(t){return he.Long?new he.Long(this.lo|0,this.hi|0,!!t):{low:this.lo|0,high:this.hi|0,unsigned:!!t}};var vt=String.prototype.charCodeAt;D.fromHash=function(t){return t===lp?Dt:new D((vt.call(t,0)|vt.call(t,1)<<8|vt.call(t,2)<<16|vt.call(t,3)<<24)>>>0,(vt.call(t,4)|vt.call(t,5)<<8|vt.call(t,6)<<16|vt.call(t,7)<<24)>>>0)};D.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)};D.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this};D.prototype.zzDecode=function(){var t=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this};D.prototype.length=function(){var t=this.lo,r=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return n===0?r===0?t<16384?t<128?1:2:t<2097152?3:4:r<16384?r<128?5:6:r<2097152?7:8:n<128?9:10}});var At=_(Yn=>{"use strict";var h=Yn;h.asPromise=ha();h.base64=Sa();h.EventEmitter=ya();h.float=Pa();h.inquire=Ca();h.utf8=wa();h.pool=xa();h.LongBits=Ua();h.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node);h.global=h.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||Yn;h.emptyArray=Object.freeze?Object.freeze([]):[];h.emptyObject=Object.freeze?Object.freeze({}):{};h.isInteger=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};h.isString=function(t){return typeof t=="string"||t instanceof String};h.isObject=function(t){return t&&typeof t=="object"};h.isset=h.isSet=function(t,r){var n=t[r];return n!=null&&t.hasOwnProperty(r)?typeof n!="object"||(Array.isArray(n)?n.length:Object.keys(n).length)>0:!1};h.Buffer=function(){try{var e=h.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch{return null}}();h._Buffer_from=null;h._Buffer_allocUnsafe=null;h.newBuffer=function(t){return typeof t=="number"?h.Buffer?h._Buffer_allocUnsafe(t):new h.Array(t):h.Buffer?h._Buffer_from(t):typeof Uint8Array>"u"?t:new Uint8Array(t)};h.Array=typeof Uint8Array<"u"?Uint8Array:Array;h.Long=h.global.dcodeIO&&h.global.dcodeIO.Long||h.global.Long||h.inquire("long");h.key2Re=/^true|false|0|1$/;h.key32Re=/^-?(?:0|[1-9][0-9]*)$/;h.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;h.longToHash=function(t){return t?h.LongBits.from(t).toHash():h.LongBits.zeroHash};h.longFromHash=function(t,r){var n=h.LongBits.fromHash(t);return h.Long?h.Long.fromBits(n.lo,n.hi,r):n.toNumber(!!r)};function Ba(e,t,r){for(var n=Object.keys(t),o=0;o<n.length;++o)(e[n[o]]===void 0||!r)&&(e[n[o]]=t[n[o]]);return e}h.merge=Ba;h.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)};function Ga(e){function t(r,n){if(!(this instanceof t))return new t(r,n);Object.defineProperty(this,"message",{get:function(){return r}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:new Error().stack||""}),n&&Ba(this,n)}return t.prototype=Object.create(Error.prototype,{constructor:{value:t,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return e},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),t}h.newError=Ga;h.ProtocolError=Ga("ProtocolError");h.oneOfGetter=function(t){for(var r={},n=0;n<t.length;++n)r[t[n]]=1;return function(){for(var o=Object.keys(this),i=o.length-1;i>-1;--i)if(r[o[i]]===1&&this[o[i]]!==void 0&&this[o[i]]!==null)return o[i]}};h.oneOfSetter=function(t){return function(r){for(var n=0;n<t.length;++n)t[n]!==r&&delete this[t[n]]}};h.toJSONOptions={longs:String,enums:String,bytes:String,json:!0};h._configure=function(){var e=h.Buffer;if(!e){h._Buffer_from=h._Buffer_allocUnsafe=null;return}h._Buffer_from=e.from!==Uint8Array.from&&e.from||function(r,n){return new e(r,n)},h._Buffer_allocUnsafe=e.allocUnsafe||function(r){return new e(r)}}});var ei=_((gm,ja)=>{"use strict";ja.exports=y;var Y=At(),zn,Or=Y.LongBits,Va=Y.base64,Ha=Y.utf8;function Ee(e,t,r){this.fn=e,this.len=t,this.next=void 0,this.val=r}function Qn(){}function fp(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function y(){this.len=0,this.head=new Ee(Qn,0,0),this.tail=this.head,this.states=null}var Fa=function(){return Y.Buffer?function(){return(y.create=function(){return new zn})()}:function(){return new y}};y.create=Fa();y.alloc=function(t){return new Y.Array(t)};Y.Array!==Array&&(y.alloc=Y.pool(y.alloc,Y.Array.prototype.subarray));y.prototype._push=function(t,r,n){return this.tail=this.tail.next=new Ee(t,r,n),this.len+=r,this};function Zn(e,t,r){t[r]=e&255}function pp(e,t,r){for(;e>127;)t[r++]=e&127|128,e>>>=7;t[r]=e}function Jn(e,t){this.len=e,this.next=void 0,this.val=t}Jn.prototype=Object.create(Ee.prototype);Jn.prototype.fn=pp;y.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new Jn((t=t>>>0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this};y.prototype.int32=function(t){return t<0?this._push(ti,10,Or.fromNumber(t)):this.uint32(t)};y.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)};function ti(e,t,r){for(;e.hi;)t[r++]=e.lo&127|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=e.lo&127|128,e.lo=e.lo>>>7;t[r++]=e.lo}y.prototype.uint64=function(t){var r=Or.from(t);return this._push(ti,r.length(),r)};y.prototype.int64=y.prototype.uint64;y.prototype.sint64=function(t){var r=Or.from(t).zzEncode();return this._push(ti,r.length(),r)};y.prototype.bool=function(t){return this._push(Zn,1,t?1:0)};function $n(e,t,r){t[r]=e&255,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}y.prototype.fixed32=function(t){return this._push($n,4,t>>>0)};y.prototype.sfixed32=y.prototype.fixed32;y.prototype.fixed64=function(t){var r=Or.from(t);return this._push($n,4,r.lo)._push($n,4,r.hi)};y.prototype.sfixed64=y.prototype.fixed64;y.prototype.float=function(t){return this._push(Y.float.writeFloatLE,4,t)};y.prototype.double=function(t){return this._push(Y.float.writeDoubleLE,8,t)};var dp=Y.Array.prototype.set?function(t,r,n){r.set(t,n)}:function(t,r,n){for(var o=0;o<t.length;++o)r[n+o]=t[o]};y.prototype.bytes=function(t){var r=t.length>>>0;if(!r)return this._push(Zn,1,0);if(Y.isString(t)){var n=y.alloc(r=Va.length(t));Va.decode(t,n,0),t=n}return this.uint32(r)._push(dp,r,t)};y.prototype.string=function(t){var r=Ha.length(t);return r?this.uint32(r)._push(Ha.write,r,t):this._push(Zn,1,0)};y.prototype.fork=function(){return this.states=new fp(this),this.head=this.tail=new Ee(Qn,0,0),this.len=0,this};y.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new Ee(Qn,0,0),this.len=0),this};y.prototype.ldelim=function(){var t=this.head,r=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=t.next,this.tail=r,this.len+=n),this};y.prototype.finish=function(){for(var t=this.head.next,r=this.constructor.alloc(this.len),n=0;t;)t.fn(t.val,r,n),n+=t.len,t=t.next;return r};y._configure=function(e){zn=e,y.create=Fa(),zn._configure()}});var Xa=_((ym,qa)=>{"use strict";qa.exports=it;var ka=ei();(it.prototype=Object.create(ka.prototype)).constructor=it;var Rt=At();function it(){ka.call(this)}it._configure=function(){it.alloc=Rt._Buffer_allocUnsafe,it.writeBytesBuffer=Rt.Buffer&&Rt.Buffer.prototype instanceof Uint8Array&&Rt.Buffer.prototype.set.name==="set"?function(t,r,n){r.set(t,n)}:function(t,r,n){if(t.copy)t.copy(r,n,0,t.length);else for(var o=0;o<t.length;)r[n++]=t[o++]}};it.prototype.bytes=function(t){Rt.isString(t)&&(t=Rt._Buffer_from(t,"base64"));var r=t.length>>>0;return this.uint32(r),r&&this._push(it.writeBytesBuffer,r,t),this};function _p(e,t,r){e.length<40?Rt.utf8.write(e,t,r):t.utf8Write?t.utf8Write(e,r):t.write(e,r)}it.prototype.string=function(t){var r=Rt.Buffer.byteLength(t);return this.uint32(r),r&&this._push(_p,r,t),this};it._configure()});var ii=_((vm,$a)=>{"use strict";$a.exports=N;var tt=At(),ni,Ya=tt.LongBits,hp=tt.utf8;function et(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function N(e){this.buf=e,this.pos=0,this.len=e.length}var Ka=typeof Uint8Array<"u"?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new N(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new N(t);throw Error("illegal buffer")},za=function(){return tt.Buffer?function(r){return(N.create=function(o){return tt.Buffer.isBuffer(o)?new ni(o):Ka(o)})(r)}:Ka};N.create=za();N.prototype._slice=tt.Array.prototype.subarray||tt.Array.prototype.slice;N.prototype.uint32=function(){var t=4294967295;return function(){if(t=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(t=(t|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return t;if((this.pos+=5)>this.len)throw this.pos=this.len,et(this,10);return t}}();N.prototype.int32=function(){return this.uint32()|0};N.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(t&1)|0};function ri(){var e=new Ya(0,0),t=0;if(this.len-this.pos>4){for(;t<4;++t)if(e.lo=(e.lo|(this.buf[this.pos]&127)<<t*7)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(this.buf[this.pos]&127)<<28)>>>0,e.hi=(e.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return e;t=0}else{for(;t<3;++t){if(this.pos>=this.len)throw et(this);if(e.lo=(e.lo|(this.buf[this.pos]&127)<<t*7)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(this.buf[this.pos++]&127)<<t*7)>>>0,e}if(this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(this.buf[this.pos]&127)<<t*7+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw et(this);if(e.hi=(e.hi|(this.buf[this.pos]&127)<<t*7+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}N.prototype.bool=function(){return this.uint32()!==0};function br(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}N.prototype.fixed32=function(){if(this.pos+4>this.len)throw et(this,4);return br(this.buf,this.pos+=4)};N.prototype.sfixed32=function(){if(this.pos+4>this.len)throw et(this,4);return br(this.buf,this.pos+=4)|0};function Wa(){if(this.pos+8>this.len)throw et(this,8);return new Ya(br(this.buf,this.pos+=4),br(this.buf,this.pos+=4))}N.prototype.float=function(){if(this.pos+4>this.len)throw et(this,4);var t=tt.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t};N.prototype.double=function(){if(this.pos+8>this.len)throw et(this,4);var t=tt.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t};N.prototype.bytes=function(){var t=this.uint32(),r=this.pos,n=this.pos+t;if(n>this.len)throw et(this,t);if(this.pos+=t,Array.isArray(this.buf))return this.buf.slice(r,n);if(r===n){var o=tt.Buffer;return o?o.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,r,n)};N.prototype.string=function(){var t=this.bytes();return hp.read(t,0,t.length)};N.prototype.skip=function(t){if(typeof t=="number"){if(this.pos+t>this.len)throw et(this,t);this.pos+=t}else do if(this.pos>=this.len)throw et(this);while(this.buf[this.pos++]&128);return this};N.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(e=this.uint32()&7)!==4;)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this};N._configure=function(e){ni=e,N.create=za(),ni._configure();var t=tt.Long?"toLong":"toNumber";tt.merge(N.prototype,{int64:function(){return ri.call(this)[t](!1)},uint64:function(){return ri.call(this)[t](!0)},sint64:function(){return ri.call(this).zzDecode()[t](!1)},fixed64:function(){return Wa.call(this)[t](!0)},sfixed64:function(){return Wa.call(this)[t](!1)}})}});var tu=_((Am,Ja)=>{"use strict";Ja.exports=Ut;var Za=ii();(Ut.prototype=Object.create(Za.prototype)).constructor=Ut;var Qa=At();function Ut(e){Za.call(this,e)}Ut._configure=function(){Qa.Buffer&&(Ut.prototype._slice=Qa.Buffer.prototype.slice)};Ut.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))};Ut._configure()});var ru=_((Rm,eu)=>{"use strict";eu.exports=me;var oi=At();(me.prototype=Object.create(oi.EventEmitter.prototype)).constructor=me;function me(e,t,r){if(typeof e!="function")throw TypeError("rpcImpl must be a function");oi.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=!!t,this.responseDelimited=!!r}me.prototype.rpcCall=function e(t,r,n,o,i){if(!o)throw TypeError("request must be specified");var a=this;if(!i)return oi.asPromise(e,a,t,r,n,o);if(!a.rpcImpl){setTimeout(function(){i(Error("already ended"))},0);return}try{return a.rpcImpl(t,r[a.requestDelimited?"encodeDelimited":"encode"](o).finish(),function(c,s){if(c)return a.emit("error",c,t),i(c);if(s===null){a.end(!0);return}if(!(s instanceof n))try{s=n[a.responseDelimited?"decodeDelimited":"decode"](s)}catch(f){return a.emit("error",f,t),i(f)}return a.emit("data",s,t),i(null,s)})}catch(u){a.emit("error",u,t),setTimeout(function(){i(u)},0);return}};me.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var iu=_(nu=>{"use strict";var Ep=nu;Ep.Service=ru()});var su=_((bm,ou)=>{"use strict";ou.exports={}});var cu=_(uu=>{"use strict";var F=uu;F.build="minimal";F.Writer=ei();F.BufferWriter=Xa();F.Reader=ii();F.BufferReader=tu();F.util=At();F.rpc=iu();F.roots=su();F.configure=au;function au(){F.util._configure(),F.Writer._configure(F.BufferWriter),F.Reader._configure(F.BufferReader)}au()});var fu=_((Pm,lu)=>{"use strict";lu.exports=cu()});E();var Kt=v(P());E();var b=v(P()),ht=v(se());var yo="exception";var Dl=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Ul=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){a={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i},vo=function(){function e(t,r,n,o,i,a,u,c,s,f){u===void 0&&(u=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:l.SpanStatusCode.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=n,this._spanContext=o,this.parentSpanId=a,this.kind=i,this.links=u;var p=Date.now();this._performanceStartTime=b.otperformance.now(),this._performanceOffset=p-(this._performanceStartTime+(0,b.getTimeOrigin)()),this._startTimeProvided=c!=null,this.startTime=this._getTime(c??p),this.resource=t.resource,this.instrumentationLibrary=t.instrumentationLibrary,this._spanLimits=t.getSpanLimits(),f!=null&&this.setAttributes(f),this._spanProcessor=t.getActiveSpanProcessor(),this._spanProcessor.onStart(this,r),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(t,r){return r==null||this._isSpanEnded()?this:t.length===0?(l.diag.warn("Invalid attribute key: "+t),this):(0,b.isAttributeValue)(r)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,t)?(this._droppedAttributesCount++,this):(this.attributes[t]=this._truncateToSize(r),this):(l.diag.warn("Invalid attribute value set for key: "+t),this)},e.prototype.setAttributes=function(t){var r,n;try{for(var o=Dl(Object.entries(t)),i=o.next();!i.done;i=o.next()){var a=Ul(i.value,2),u=a[0],c=a[1];this.setAttribute(u,c)}}catch(s){r={error:s}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return this},e.prototype.addEvent=function(t,r,n){if(this._isSpanEnded())return this;if(this._spanLimits.eventCountLimit===0)return l.diag.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(l.diag.warn("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),(0,b.isTimeInput)(r)&&((0,b.isTimeInput)(n)||(n=r),r=void 0);var o=(0,b.sanitizeAttributes)(r);return this.events.push({name:t,attributes:o,time:this._getTime(n),droppedAttributesCount:0}),this},e.prototype.setStatus=function(t){return this._isSpanEnded()?this:(this.status=t,this)},e.prototype.updateName=function(t){return this._isSpanEnded()?this:(this.name=t,this)},e.prototype.end=function(t){if(this._isSpanEnded()){l.diag.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=(0,b.hrTimeDuration)(this.startTime,this.endTime),this._duration[0]<0&&(l.diag.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._spanProcessor.onEnd(this)},e.prototype._getTime=function(t){if(typeof t=="number"&&t<b.otperformance.now())return(0,b.hrTime)(t+this._performanceOffset);if(typeof t=="number")return(0,b.millisToHrTime)(t);if(t instanceof Date)return(0,b.millisToHrTime)(t.getTime());if((0,b.isTimeInputHrTime)(t))return t;if(this._startTimeProvided)return(0,b.millisToHrTime)(Date.now());var r=b.otperformance.now()-this._performanceStartTime;return(0,b.addHrTimes)(this.startTime,(0,b.millisToHrTime)(r))},e.prototype.isRecording=function(){return this._ended===!1},e.prototype.recordException=function(t,r){var n={};typeof t=="string"?n[ht.SemanticAttributes.EXCEPTION_MESSAGE]=t:t&&(t.code?n[ht.SemanticAttributes.EXCEPTION_TYPE]=t.code.toString():t.name&&(n[ht.SemanticAttributes.EXCEPTION_TYPE]=t.name),t.message&&(n[ht.SemanticAttributes.EXCEPTION_MESSAGE]=t.message),t.stack&&(n[ht.SemanticAttributes.EXCEPTION_STACKTRACE]=t.stack)),n[ht.SemanticAttributes.EXCEPTION_TYPE]||n[ht.SemanticAttributes.EXCEPTION_MESSAGE]?this.addEvent(yo,n,r):l.diag.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&&l.diag.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},e.prototype._truncateToLimitUtil=function(t,r){return t.length<=r?t:t.substr(0,r)},e.prototype._truncateToSize=function(t){var r=this,n=this._attributeValueLengthLimit;return n<=0?(l.diag.warn("Attribute value limit must be positive, got "+n),t):typeof t=="string"?this._truncateToLimitUtil(t,n):Array.isArray(t)?t.map(function(o){return typeof o=="string"?r._truncateToLimitUtil(o,n):o}):t},e}();E();var x=v(P());var ot;(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(ot||(ot={}));var st=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:ot.NOT_RECORD}},e.prototype.toString=function(){return"AlwaysOffSampler"},e}();var X=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:ot.RECORD_AND_SAMPLED}},e.prototype.toString=function(){return"AlwaysOnSampler"},e}();E();var Ao=v(P());var Et=function(){function e(t){var r,n,o,i;this._root=t.root,this._root||((0,Ao.globalErrorHandler)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new X),this._remoteParentSampled=(r=t.remoteParentSampled)!==null&&r!==void 0?r:new X,this._remoteParentNotSampled=(n=t.remoteParentNotSampled)!==null&&n!==void 0?n:new st,this._localParentSampled=(o=t.localParentSampled)!==null&&o!==void 0?o:new X,this._localParentNotSampled=(i=t.localParentNotSampled)!==null&&i!==void 0?i:new st}return e.prototype.shouldSample=function(t,r,n,o,i,a){var u=l.trace.getSpanContext(t);return!u||!(0,l.isSpanContextValid)(u)?this._root.shouldSample(t,r,n,o,i,a):u.isRemote?u.traceFlags&l.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(t,r,n,o,i,a):this._remoteParentNotSampled.shouldSample(t,r,n,o,i,a):u.traceFlags&l.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(t,r,n,o,i,a):this._localParentNotSampled.shouldSample(t,r,n,o,i,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}();E();var kt=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,r){return{decision:(0,l.isValidTraceId)(r)&&this._accumulate(r)<this._upperBound?ot.RECORD_AND_SAMPLED:ot.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 r=0,n=0;n<t.length/8;n++){var o=n*8,i=parseInt(t.slice(o,o+8),16);r=(r^i)>>>0}return r},e}();var Bl=(0,x.getEnv)(),Gl=x.TracesSamplerValues.AlwaysOn,qt=1;function Je(){return{sampler:Tn(Bl),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:(0,x.getEnv)().OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,x.getEnv)().OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:(0,x.getEnv)().OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,x.getEnv)().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:(0,x.getEnv)().OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:(0,x.getEnv)().OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:(0,x.getEnv)().OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:(0,x.getEnv)().OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT}}}function Tn(e){switch(e===void 0&&(e=(0,x.getEnv)()),e.OTEL_TRACES_SAMPLER){case x.TracesSamplerValues.AlwaysOn:return new X;case x.TracesSamplerValues.AlwaysOff:return new st;case x.TracesSamplerValues.ParentBasedAlwaysOn:return new Et({root:new X});case x.TracesSamplerValues.ParentBasedAlwaysOff:return new Et({root:new st});case x.TracesSamplerValues.TraceIdRatio:return new kt(Ro(e));case x.TracesSamplerValues.ParentBasedTraceIdRatio:return new Et({root:new kt(Ro(e))});default:return l.diag.error('OTEL_TRACES_SAMPLER value "'+e.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+Gl+'".'),new X}}function Ro(e){if(e.OTEL_TRACES_SAMPLER_ARG===void 0||e.OTEL_TRACES_SAMPLER_ARG==="")return l.diag.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+qt+"."),qt;var t=Number(e.OTEL_TRACES_SAMPLER_ARG);return isNaN(t)?(l.diag.error("OTEL_TRACES_SAMPLER_ARG="+e.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+qt+"."),qt):t<0||t>1?(l.diag.error("OTEL_TRACES_SAMPLER_ARG="+e.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+qt+"."),qt):t}var Xt=v(P());function Oo(e){var t={sampler:Tn()},r=Je(),n=Object.assign({},r,t,e);return n.generalLimits=Object.assign({},r.generalLimits,e.generalLimits||{}),n.spanLimits=Object.assign({},r.spanLimits,e.spanLimits||{}),n}function bo(e){var t,r,n,o,i,a,u,c,s,f,p,d,m=Object.assign({},e.spanLimits),g=(0,Xt.getEnvWithoutDefaults)();return m.attributeCountLimit=(a=(i=(o=(r=(t=e.spanLimits)===null||t===void 0?void 0:t.attributeCountLimit)!==null&&r!==void 0?r:(n=e.generalLimits)===null||n===void 0?void 0:n.attributeCountLimit)!==null&&o!==void 0?o:g.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&i!==void 0?i:g.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&a!==void 0?a:Xt.DEFAULT_ATTRIBUTE_COUNT_LIMIT,m.attributeValueLengthLimit=(d=(p=(f=(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&&f!==void 0?f:g.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&p!==void 0?p:g.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&d!==void 0?d:Xt.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,Object.assign({},e,{spanLimits:m})}E();var k=v(P()),Lo=function(){function e(t,r){this._exporter=t,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var n=(0,k.getEnv)();this._maxExportBatchSize=typeof r?.maxExportBatchSize=="number"?r.maxExportBatchSize:n.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=typeof r?.maxQueueSize=="number"?r.maxQueueSize:n.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=typeof r?.scheduledDelayMillis=="number"?r.scheduledDelayMillis:n.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis=typeof r?.exportTimeoutMillis=="number"?r.exportTimeoutMillis:n.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new k.BindOnceFuture(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(l.diag.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,r){},e.prototype.onEnd=function(t){this._shutdownOnce.isCalled||t.spanContext().traceFlags&l.TraceFlags.SAMPLED&&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&&l.diag.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(l.diag.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(r,n){for(var o=[],i=Math.ceil(t._finishedSpans.length/t._maxExportBatchSize),a=0,u=i;a<u;a++)o.push(t._flushOneBatch());Promise.all(o).then(function(){r()}).catch(n)})},e.prototype._flushOneBatch=function(){var t=this;return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise(function(r,n){var o=setTimeout(function(){n(new Error("Timeout"))},t._exportTimeoutMillis);l.context.with((0,k.suppressTracing)(l.context.active()),function(){var i=t._finishedSpans.splice(0,t._maxExportBatchSize),a=function(){return t._exporter.export(i,function(c){var s;clearTimeout(o),c.code===k.ExportResultCode.SUCCESS?r():n((s=c.error)!==null&&s!==void 0?s:new Error("BatchSpanProcessor: span export failed"))})},u=i.map(function(c){return c.resource}).filter(function(c){return c.asyncAttributesPending});u.length===0?a():Promise.all(u.map(function(c){var s;return(s=c.waitForAsyncAttributes)===null||s===void 0?void 0:s.call(c)})).then(a,function(c){(0,k.globalErrorHandler)(c),n(c)})})})},e.prototype._maybeStartTimer=function(){var t=this;if(!this._isExporting){var r=function(){t._isExporting=!0,t._flushOneBatch().then(function(){t._isExporting=!1,t._finishedSpans.length>0&&(t._clearTimer(),t._maybeStartTimer())}).catch(function(n){t._isExporting=!1,(0,k.globalErrorHandler)(n)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return r();this._timer===void 0&&(this._timer=setTimeout(function(){return r()},this._scheduledDelayMillis),(0,k.unrefTimer)(this._timer))}},e.prototype._clearTimer=function(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)},e}();var Vl=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(n[i]=o[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Mt=function(e){Vl(t,e);function t(r,n){var o=e.call(this,r,n)||this;return o.onInit(n),o}return t.prototype.onInit=function(r){var n=this;r?.disableAutoFlushOnDocumentHide!==!0&&typeof document<"u"&&(this._visibilityChangeListener=function(){document.visibilityState==="hidden"&&n.forceFlush()},this._pageHideListener=function(){n.forceFlush()},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}(Lo);var Hl=8,Fl=16,er=function(){function e(){this.generateTraceId=Po(Fl),this.generateSpanId=Po(Hl)}return e}();var tr=Array(32);function Po(e){return function(){for(var r=0;r<e*2;r++)tr[r]=Math.floor(Math.random()*16)+48,tr[r]>=58&&(tr[r]+=39);return String.fromCharCode.apply(null,tr.slice(0,e*2))}}var Io=function(){function e(t,r,n){this._tracerProvider=n;var o=Oo(r);this._sampler=o.sampler,this._generalLimits=o.generalLimits,this._spanLimits=o.spanLimits,this._idGenerator=r.idGenerator||new er,this.resource=n.resource,this.instrumentationLibrary=t}return e.prototype.startSpan=function(t,r,n){var o,i,a;r===void 0&&(r={}),n===void 0&&(n=l.context.active()),r.root&&(n=l.trace.deleteSpan(n));var u=l.trace.getSpan(n);if((0,Kt.isTracingSuppressed)(n)){l.diag.debug("Instrumentation suppressed, returning Noop Span");var c=l.trace.wrapSpanContext(l.INVALID_SPAN_CONTEXT);return c}var s=u?.spanContext(),f=this._idGenerator.generateSpanId(),p,d,m;!s||!l.trace.isSpanContextValid(s)?p=this._idGenerator.generateTraceId():(p=s.traceId,d=s.traceState,m=s.spanId);var g=(o=r.kind)!==null&&o!==void 0?o:l.SpanKind.INTERNAL,C=((i=r.links)!==null&&i!==void 0?i:[]).map(function(bt){return{context:bt.context,attributes:(0,Kt.sanitizeAttributes)(bt.attributes)}}),M=(0,Kt.sanitizeAttributes)(r.attributes),T=this._sampler.shouldSample(n,p,t,g,M,C);d=(a=T.traceState)!==null&&a!==void 0?a:d;var rt=T.decision===l.SamplingDecision.RECORD_AND_SAMPLED?l.TraceFlags.SAMPLED:l.TraceFlags.NONE,q={traceId:p,spanId:f,traceFlags:rt,traceState:d};if(T.decision===l.SamplingDecision.NOT_RECORD){l.diag.debug("Recording is off, propagating context in a non-recording span");var c=l.trace.wrapSpanContext(q);return c}var U=(0,Kt.sanitizeAttributes)(Object.assign(M,T.attributes)),Mr=new vo(this,n,t,q,g,m,C,r.startTime,void 0,U);return Mr},e.prototype.startActiveSpan=function(t,r,n,o){var i,a,u;if(!(arguments.length<2)){arguments.length===2?u=r:arguments.length===3?(i=r,u=n):(i=r,a=n,u=o);var c=a??l.context.active(),s=this.startSpan(t,i,c),f=l.trace.setSpan(c,s);return l.context.with(f,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}();E();var Q=v(P());E();var mt=v(se()),rr=v(P());function Co(){return"unknown_service"}var Tt=function(){return Tt=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Tt.apply(this,arguments)},jl=function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function u(f){try{s(n.next(f))}catch(p){a(p)}}function c(f){try{s(n.throw(f))}catch(p){a(p)}}function s(f){f.done?i(f.value):o(f.value).then(u,c)}s((n=n.apply(e,t||[])).next())})},kl=function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,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(f){return c([s,f])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=s[0]&2?o.return:s[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;switch(o=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,o=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1],i=s;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(s);break}i[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(f){s=[6,f],o=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},ql=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){a={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i},H=function(){function e(t,r){var n=this,o;this._attributes=t,this.asyncAttributesPending=r!=null,this._syncAttributes=(o=this._attributes)!==null&&o!==void 0?o:{},this._asyncAttributesPromise=r?.then(function(i){return n._attributes=Object.assign({},n._attributes,i),n.asyncAttributesPending=!1,i},function(i){return l.diag.debug("a resource's async attributes promise rejected: %s",i),n.asyncAttributesPending=!1,{}})}return e.empty=function(){return e.EMPTY},e.default=function(){var t;return new e((t={},t[mt.SemanticResourceAttributes.SERVICE_NAME]=Co(),t[mt.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]=rr.SDK_INFO[mt.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE],t[mt.SemanticResourceAttributes.TELEMETRY_SDK_NAME]=rr.SDK_INFO[mt.SemanticResourceAttributes.TELEMETRY_SDK_NAME],t[mt.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]=rr.SDK_INFO[mt.SemanticResourceAttributes.TELEMETRY_SDK_VERSION],t))},Object.defineProperty(e.prototype,"attributes",{get:function(){var t;return this.asyncAttributesPending&&l.diag.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 jl(this,void 0,void 0,function(){return kl(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 r=this,n;if(!t)return this;var o=Tt(Tt({},this._syncAttributes),(n=t._syncAttributes)!==null&&n!==void 0?n:t.attributes);if(!this._asyncAttributesPromise&&!t._asyncAttributesPromise)return new e(o);var i=Promise.all([this._asyncAttributesPromise,t._asyncAttributesPromise]).then(function(a){var u,c=ql(a,2),s=c[0],f=c[1];return Tt(Tt(Tt(Tt({},r._syncAttributes),s),(u=t._syncAttributes)!==null&&u!==void 0?u:t.attributes),f)});return new e(o,i)},e.EMPTY=new e({}),e}();E();var No=v(P()),wo=v(se());var Xl=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Kl=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){a={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i},Wl=function(){function e(){this._MAX_LENGTH=255,this._COMMA_SEPARATOR=",",this._LABEL_KEY_VALUE_SPLITTER="=",this._ERROR_MESSAGE_INVALID_CHARS="should be a ASCII string with a length greater than 0 and not exceed "+this._MAX_LENGTH+" characters.",this._ERROR_MESSAGE_INVALID_VALUE="should be a ASCII string with a length not exceed "+this._MAX_LENGTH+" characters."}return e.prototype.detect=function(t){var r={},n=(0,No.getEnv)(),o=n.OTEL_RESOURCE_ATTRIBUTES,i=n.OTEL_SERVICE_NAME;if(o)try{var a=this._parseResourceAttributes(o);Object.assign(r,a)}catch(u){l.diag.debug("EnvDetector failed: "+u.message)}return i&&(r[wo.SemanticResourceAttributes.SERVICE_NAME]=i),new H(r)},e.prototype._parseResourceAttributes=function(t){var r,n;if(!t)return{};var o={},i=t.split(this._COMMA_SEPARATOR,-1);try{for(var a=Xl(i),u=a.next();!u.done;u=a.next()){var c=u.value,s=c.split(this._LABEL_KEY_VALUE_SPLITTER,-1);if(s.length===2){var f=Kl(s,2),p=f[0],d=f[1];if(p=p.trim(),d=d.trim().split(/^"|"$/).join(""),!this._isValidAndNotEmpty(p))throw new Error("Attribute key "+this._ERROR_MESSAGE_INVALID_CHARS);if(!this._isValid(d))throw new Error("Attribute value "+this._ERROR_MESSAGE_INVALID_VALUE);o[p]=decodeURIComponent(d)}}}catch(m){r={error:m}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return o},e.prototype._isValid=function(t){return t.length<=this._MAX_LENGTH&&this._isBaggageOctetString(t)},e.prototype._isBaggageOctetString=function(t){for(var r=0;r<t.length;r++){var n=t.charCodeAt(r);if(n<33||n===44||n===59||n===92||n>126)return!1}return!0},e.prototype._isValidAndNotEmpty=function(t){return t.length>0&&this._isValid(t)},e}(),Mo=new Wl;E();var xo=function(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"};var Yl=function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function u(f){try{s(n.next(f))}catch(p){a(p)}}function c(f){try{s(n.throw(f))}catch(p){a(p)}}function s(f){f.done?i(f.value):o(f.value).then(u,c)}s((n=n.apply(e,t||[])).next())})},zl=function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,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(f){return c([s,f])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=s[0]&2?o.return:s[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;switch(o=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,o=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1],i=s;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(s);break}i[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(f){s=[6,f],o=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}};var Do=function(e){var t;e===void 0&&(e={});var r=((t=e.detectors)!==null&&t!==void 0?t:[]).map(function(o){try{var i=o.detect(e),a;if(xo(i)){var u=function(){return Yl(void 0,void 0,void 0,function(){var c;return zl(this,function(s){switch(s.label){case 0:return[4,i];case 1:return c=s.sent(),[2,c.attributes]}})})};a=new H({},u())}else a=i;return a.waitForAsyncAttributes?a.waitForAsyncAttributes().then(function(){return l.diag.debug(o.constructor.name+" found resource.",a)}):l.diag.debug(o.constructor.name+" found resource.",a),a}catch(c){return l.diag.error(o.constructor.name+" failed: "+c.message),H.empty()}}),n=r.reduce(function(o,i){return o.merge(i)},H.empty());return n.waitForAsyncAttributes&&n.waitForAsyncAttributes().then(function(){$l(r)}),n},$l=function(e){e.forEach(function(t){if(Object.keys(t.attributes).length>0){var r=JSON.stringify(t.attributes,null,4);l.diag.verbose(r)}})};var Uo=v(P()),nr=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Bo=function(){function e(t){this._spanProcessors=t}return e.prototype.forceFlush=function(){var t,r,n=[];try{for(var o=nr(this._spanProcessors),i=o.next();!i.done;i=o.next()){var a=i.value;n.push(a.forceFlush())}}catch(u){t={error:u}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return new Promise(function(u){Promise.all(n).then(function(){u()}).catch(function(c){(0,Uo.globalErrorHandler)(c||new Error("MultiSpanProcessor: forceFlush failed")),u()})})},e.prototype.onStart=function(t,r){var n,o;try{for(var i=nr(this._spanProcessors),a=i.next();!a.done;a=i.next()){var u=a.value;u.onStart(t,r)}}catch(c){n={error:c}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}},e.prototype.onEnd=function(t){var r,n;try{for(var o=nr(this._spanProcessors),i=o.next();!i.done;i=o.next()){var a=i.value;a.onEnd(t)}}catch(u){r={error:u}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},e.prototype.shutdown=function(){var t,r,n=[];try{for(var o=nr(this._spanProcessors),i=o.next();!i.done;i=o.next()){var a=i.value;n.push(a.shutdown())}}catch(u){t={error:u}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return new Promise(function(u,c){Promise.all(n).then(function(){u()},c)})},e}();var Go=function(){function e(){}return e.prototype.onStart=function(t,r){},e.prototype.onEnd=function(t){},e.prototype.shutdown=function(){return Promise.resolve()},e.prototype.forceFlush=function(){return Promise.resolve()},e}();var xt;(function(e){e[e.resolved=0]="resolved",e[e.timeout=1]="timeout",e[e.error=2]="error",e[e.unresolved=3]="unresolved"})(xt||(xt={}));var Vo=function(){function e(t){t===void 0&&(t={});var r;this._registeredSpanProcessors=[],this._tracers=new Map;var n=(0,Q.merge)({},Je(),bo(t));this.resource=(r=n.resource)!==null&&r!==void 0?r:H.empty(),this.resource=H.default().merge(this.resource),this._config=Object.assign({},n,{resource:this.resource});var o=this._buildExporterFromEnv();if(o!==void 0){var i=new Mt(o);this.activeSpanProcessor=i}else this.activeSpanProcessor=new Go}return e.prototype.getTracer=function(t,r,n){var o=t+"@"+(r||"")+":"+(n?.schemaUrl||"");return this._tracers.has(o)||this._tracers.set(o,new Io({name:t,version:r,schemaUrl:n?.schemaUrl},this._config,this)),this._tracers.get(o)},e.prototype.addSpanProcessor=function(t){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(function(r){return l.diag.error("Error while trying to shutdown current span processor",r)}),this._registeredSpanProcessors.push(t),this.activeSpanProcessor=new Bo(this._registeredSpanProcessors)},e.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},e.prototype.register=function(t){t===void 0&&(t={}),l.trace.setGlobalTracerProvider(this),t.propagator===void 0&&(t.propagator=this._buildPropagatorFromEnv()),t.contextManager&&l.context.setGlobalContextManager(t.contextManager),t.propagator&&l.propagation.setGlobalPropagator(t.propagator)},e.prototype.forceFlush=function(){var t=this._config.forceFlushTimeoutMillis,r=this._registeredSpanProcessors.map(function(n){return new Promise(function(o){var i,a=setTimeout(function(){o(new Error("Span processor did not completed within timeout period of "+t+" ms")),i=xt.timeout},t);n.forceFlush().then(function(){clearTimeout(a),i!==xt.timeout&&(i=xt.resolved,o(i))}).catch(function(u){clearTimeout(a),i=xt.error,o(u)})})});return new Promise(function(n,o){Promise.all(r).then(function(i){var a=i.filter(function(u){return u!==xt.resolved});a.length>0?o(a):n()}).catch(function(i){return o([i])})})},e.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},e.prototype._getPropagator=function(t){var r;return(r=this.constructor._registeredPropagators.get(t))===null||r===void 0?void 0:r()},e.prototype._getSpanExporter=function(t){var r;return(r=this.constructor._registeredExporters.get(t))===null||r===void 0?void 0:r()},e.prototype._buildPropagatorFromEnv=function(){var t=this,r=Array.from(new Set((0,Q.getEnv)().OTEL_PROPAGATORS)),n=r.map(function(i){var a=t._getPropagator(i);return a||l.diag.warn('Propagator "'+i+'" requested through environment variable is unavailable.'),a}),o=n.reduce(function(i,a){return a&&i.push(a),i},[]);if(o.length!==0)return r.length===1?o[0]:new Q.CompositePropagator({propagators:o})},e.prototype._buildExporterFromEnv=function(){var t=(0,Q.getEnv)().OTEL_TRACES_EXPORTER;if(!(t==="none"||t==="")){var r=this._getSpanExporter(t);return r||l.diag.error('Exporter "'+t+'" requested through environment variable is unavailable.'),r}},e._registeredPropagators=new Map([["tracecontext",function(){return new Q.W3CTraceContextPropagator}],["baggage",function(){return new Q.W3CBaggagePropagator}]]),e._registeredExporters=new Map,e}();E();var at={};z(at,J_);import*as J_ from"@opentelemetry/api-logs";var Nu=v(ko(),1);E();var or=v(P());E();E();E();var Wt=v(P()),tf=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ef=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){a={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i},qo=function(){function e(t,r,n){this.attributes={},this.totalAttributesCount=0,this._isReadonly=!1;var o=n.timestamp,i=n.observedTimestamp,a=n.severityNumber,u=n.severityText,c=n.body,s=n.attributes,f=s===void 0?{}:s,p=n.context,d=Date.now();if(this.hrTime=(0,Wt.timeInputToHrTime)(o??d),this.hrTimeObserved=(0,Wt.timeInputToHrTime)(i??d),p){var m=l.trace.getSpanContext(p);m&&l.isSpanContextValid(m)&&(this.spanContext=m)}this.severityNumber=a,this.severityText=u,this.body=c,this.resource=t.resource,this.instrumentationScope=r,this._logRecordLimits=t.logRecordLimits,this.setAttributes(f)}return Object.defineProperty(e.prototype,"severityText",{get:function(){return this._severityText},set:function(t){this._isLogRecordReadonly()||(this._severityText=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"severityNumber",{get:function(){return this._severityNumber},set:function(t){this._isLogRecordReadonly()||(this._severityNumber=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return this._body},set:function(t){this._isLogRecordReadonly()||(this._body=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedAttributesCount",{get:function(){return this.totalAttributesCount-Object.keys(this.attributes).length},enumerable:!1,configurable:!0}),e.prototype.setAttribute=function(t,r){return this._isLogRecordReadonly()?this:r===null?this:t.length===0?(l.diag.warn("Invalid attribute key: "+t),this):!(0,Wt.isAttributeValue)(r)&&!(typeof r=="object"&&!Array.isArray(r)&&Object.keys(r).length>0)?(l.diag.warn("Invalid attribute value set for key: "+t),this):(this.totalAttributesCount+=1,Object.keys(this.attributes).length>=this._logRecordLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,t)?this:((0,Wt.isAttributeValue)(r)?this.attributes[t]=this._truncateToSize(r):this.attributes[t]=r,this))},e.prototype.setAttributes=function(t){var r,n;try{for(var o=tf(Object.entries(t)),i=o.next();!i.done;i=o.next()){var a=ef(i.value,2),u=a[0],c=a[1];this.setAttribute(u,c)}}catch(s){r={error:s}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return this},e.prototype.setBody=function(t){return this.body=t,this},e.prototype.setSeverityNumber=function(t){return this.severityNumber=t,this},e.prototype.setSeverityText=function(t){return this.severityText=t,this},e.prototype._makeReadonly=function(){this._isReadonly=!0},e.prototype._truncateToSize=function(t){var r=this,n=this._logRecordLimits.attributeValueLengthLimit;return n<=0?(l.diag.warn("Attribute value limit must be positive, got "+n),t):typeof t=="string"?this._truncateToLimitUtil(t,n):Array.isArray(t)?t.map(function(o){return typeof o=="string"?r._truncateToLimitUtil(o,n):o}):t},e.prototype._truncateToLimitUtil=function(t,r){return t.length<=r?t:t.substring(0,r)},e.prototype._isLogRecordReadonly=function(){return this._isReadonly&&l.diag.warn("Can not execute the operation on emitted log record"),this._isReadonly},e}();var gn=function(){return gn=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},gn.apply(this,arguments)},Xo=function(){function e(t,r){this.instrumentationScope=t,this._sharedState=r}return e.prototype.emit=function(t){var r=t.context||l.context.active(),n=new qo(this._sharedState,this.instrumentationScope,gn({context:r},t));this._sharedState.activeProcessor.onEmit(n,r),n._makeReadonly()},e}();var ut=v(P());function Ko(){return{forceFlushTimeoutMillis:3e4,logRecordLimits:{attributeValueLengthLimit:(0,ut.getEnv)().OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,ut.getEnv)().OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT},includeTraceContext:!0}}function Wo(e){var t,r,n,o,i,a,u=(0,ut.getEnvWithoutDefaults)();return{attributeCountLimit:(n=(r=(t=e.attributeCountLimit)!==null&&t!==void 0?t:u.OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT)!==null&&r!==void 0?r:u.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&n!==void 0?n:ut.DEFAULT_ATTRIBUTE_COUNT_LIMIT,attributeValueLengthLimit:(a=(i=(o=e.attributeValueLengthLimit)!==null&&o!==void 0?o:u.OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&i!==void 0?i:u.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&a!==void 0?a:ut.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT}}var $o=v(P()),Yo=function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function u(f){try{s(n.next(f))}catch(p){a(p)}}function c(f){try{s(n.throw(f))}catch(p){a(p)}}function s(f){f.done?i(f.value):o(f.value).then(u,c)}s((n=n.apply(e,t||[])).next())})},zo=function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,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(f){return c([s,f])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=s[0]&2?o.return:s[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;switch(o=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,o=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1],i=s;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(s);break}i[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(f){s=[6,f],o=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},Qo=function(){function e(t,r){this.processors=t,this.forceFlushTimeoutMillis=r}return e.prototype.forceFlush=function(){return Yo(this,void 0,void 0,function(){var t;return zo(this,function(r){switch(r.label){case 0:return t=this.forceFlushTimeoutMillis,[4,Promise.all(this.processors.map(function(n){return(0,$o.callWithTimeout)(n.forceFlush(),t)}))];case 1:return r.sent(),[2]}})})},e.prototype.onEmit=function(t,r){this.processors.forEach(function(n){return n.onEmit(t,r)})},e.prototype.shutdown=function(){return Yo(this,void 0,void 0,function(){return zo(this,function(t){switch(t.label){case 0:return[4,Promise.all(this.processors.map(function(r){return r.shutdown()}))];case 1:return t.sent(),[2]}})})},e}();var Zo=function(){function e(){}return e.prototype.forceFlush=function(){return Promise.resolve()},e.prototype.onEmit=function(t,r){},e.prototype.shutdown=function(){return Promise.resolve()},e}();var Jo=function(){function e(t,r,n){this.resource=t,this.forceFlushTimeoutMillis=r,this.logRecordLimits=n,this.loggers=new Map,this.registeredLogRecordProcessors=[],this.activeProcessor=new Zo}return e}();var rf="unknown",yn=function(){function e(t){t===void 0&&(t={});var r=(0,or.merge)({},Ko(),t),n=r.resource,o=n===void 0?H.default():n,i=r.logRecordLimits,a=r.forceFlushTimeoutMillis;this._sharedState=new Jo(o,a,Wo(i)),this._shutdownOnce=new or.BindOnceFuture(this._shutdown,this)}return e.prototype.getLogger=function(t,r,n){if(this._shutdownOnce.isCalled)return l.diag.warn("A shutdown LoggerProvider cannot provide a Logger"),at.NOOP_LOGGER;t||l.diag.warn("Logger requested without instrumentation scope name.");var o=t||rf,i=o+"@"+(r||"")+":"+(n?.schemaUrl||"");return this._sharedState.loggers.has(i)||this._sharedState.loggers.set(i,new Xo({name:o,version:r,schemaUrl:n?.schemaUrl},this._sharedState)),this._sharedState.loggers.get(i)},e.prototype.addLogRecordProcessor=function(t){this._sharedState.registeredLogRecordProcessors.length===0&&this._sharedState.activeProcessor.shutdown().catch(function(r){return l.diag.error("Error while trying to shutdown current log record processor",r)}),this._sharedState.registeredLogRecordProcessors.push(t),this._sharedState.activeProcessor=new Qo(this._sharedState.registeredLogRecordProcessors,this._sharedState.forceFlushTimeoutMillis)},e.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?(l.diag.warn("invalid attempt to force flush after LoggerProvider shutdown"),this._shutdownOnce.promise):this._sharedState.activeProcessor.forceFlush()},e.prototype.shutdown=function(){return this._shutdownOnce.isCalled?(l.diag.warn("shutdown may only be called once per LoggerProvider"),this._shutdownOnce.promise):this._shutdownOnce.call()},e.prototype._shutdown=function(){return this._sharedState.activeProcessor.shutdown()},e}();var sr;(function(e){e[e.DELTA=0]="DELTA",e[e.CUMULATIVE=1]="CUMULATIVE"})(sr||(sr={}));var nf=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(n[i]=o[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),ts=function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function u(f){try{s(n.next(f))}catch(p){a(p)}}function c(f){try{s(n.throw(f))}catch(p){a(p)}}function s(f){f.done?i(f.value):o(f.value).then(u,c)}s((n=n.apply(e,t||[])).next())})},es=function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,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(f){return c([s,f])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=s[0]&2?o.return:s[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;switch(o=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,o=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1],i=s;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(s);break}i[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(f){s=[6,f],o=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}};var of=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function rs(e){return e!=null}function ns(e){var t=Object.keys(e);return t.length===0?"":(t=t.sort(),JSON.stringify(t.map(function(r){return[r,e[r]]})))}function is(e){var t,r;return e.name+":"+((t=e.version)!==null&&t!==void 0?t:"")+":"+((r=e.schemaUrl)!==null&&r!==void 0?r:"")}var sf=function(e){nf(t,e);function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return t}(Error);function vn(e,t){var r,n=new Promise(function(i,a){r=setTimeout(function(){a(new sf("Operation timed out."))},t)});return Promise.race([e,n]).then(function(o){return clearTimeout(r),o},function(o){throw clearTimeout(r),o})}function os(e){return ts(this,void 0,void 0,function(){var t=this;return es(this,function(r){return[2,Promise.all(e.map(function(n){return ts(t,void 0,void 0,function(){var o,i;return es(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,n];case 1:return o=a.sent(),[2,{status:"fulfilled",value:o}];case 2:return i=a.sent(),[2,{status:"rejected",reason:i}];case 3:return[2]}})})}))]})})}function ss(e){return e.status==="rejected"}function as(e,t){var r,n;if(e.size!==t.size)return!1;try{for(var o=of(e),i=o.next();!i.done;i=o.next()){var a=i.value;if(!t.has(a))return!1}}catch(u){r={error:u}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return!0}function us(e,t){return e.toLowerCase()===t.toLowerCase()}E();var ct;(function(e){e.COUNTER="COUNTER",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"})(ct||(ct={}));function lt(e,t,r){var n,o,i,a;return uf(e)||l.diag.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:(n=r?.description)!==null&&n!==void 0?n:"",unit:(o=r?.unit)!==null&&o!==void 0?o:"",valueType:(i=r?.valueType)!==null&&i!==void 0?i:l.ValueType.DOUBLE,advice:(a=r?.advice)!==null&&a!==void 0?a:{}}}function cs(e,t){var r,n;return{name:(r=e.name)!==null&&r!==void 0?r:t.name,description:(n=e.description)!==null&&n!==void 0?n:t.description,type:t.type,unit:t.unit,valueType:t.valueType,advice:t.advice}}function ls(e,t){return us(e.name,t.name)&&e.unit===t.unit&&e.type===t.type&&e.valueType===t.valueType}var af=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function uf(e){return e.match(af)!=null}E();var fs=function(){function e(){this._registeredViews=[]}return e.prototype.addView=function(t){this._registeredViews.push(t)},e.prototype.findViews=function(t,r){var n=this,o=this._registeredViews.filter(function(i){return n._matchInstrument(i.instrumentSelector,t)&&n._matchMeter(i.meterSelector,r)});return o},e.prototype._matchInstrument=function(t,r){return(t.getType()===void 0||r.type===t.getType())&&t.getNameFilter().match(r.name)&&t.getUnitFilter().match(r.unit)},e.prototype._matchMeter=function(t,r){return t.getNameFilter().match(r.name)&&(r.version===void 0||t.getVersionFilter().match(r.version))&&(r.schemaUrl===void 0||t.getSchemaUrlFilter().match(r.schemaUrl))},e}();E();var ps=v(P()),Yt=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(n[i]=o[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),An=function(){function e(t,r){this._writableMetricStorage=t,this._descriptor=r}return e.prototype._record=function(t,r,n){if(r===void 0&&(r={}),n===void 0&&(n=l.context.active()),typeof t!="number"){l.diag.warn("non-number value provided to metric "+this._descriptor.name+": "+t);return}this._descriptor.valueType===l.ValueType.INT&&!Number.isInteger(t)&&(l.diag.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,r,n,(0,ps.millisToHrTime)(Date.now()))},e}();var ds=function(e){Yt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(r,n,o){this._record(r,n,o)},t}(An);var _s=function(e){Yt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(r,n,o){if(r<0){l.diag.warn("negative value provided to counter "+this._descriptor.name+": "+r);return}this._record(r,n,o)},t}(An);var hs=function(e){Yt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(r,n,o){if(r<0){l.diag.warn("negative value provided to histogram "+this._descriptor.name+": "+r);return}this._record(r,n,o)},t}(An);var ar=function(){function e(t,r,n){this._observableRegistry=n,this._descriptor=t,this._metricStorages=r}return e.prototype.addCallback=function(t){this._observableRegistry.addCallback(t,this)},e.prototype.removeCallback=function(t){this._observableRegistry.removeCallback(t,this)},e}();var Es=function(e){Yt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(ar);var ms=function(e){Yt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(ar);var Ts=function(e){Yt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(ar);function fe(e){return e instanceof ar}var Ss=function(){function e(t){this._meterSharedState=t}return e.prototype.createHistogram=function(t,r){var n=lt(t,ct.HISTOGRAM,r),o=this._meterSharedState.registerMetricStorage(n);return new hs(o,n)},e.prototype.createCounter=function(t,r){var n=lt(t,ct.COUNTER,r),o=this._meterSharedState.registerMetricStorage(n);return new _s(o,n)},e.prototype.createUpDownCounter=function(t,r){var n=lt(t,ct.UP_DOWN_COUNTER,r),o=this._meterSharedState.registerMetricStorage(n);return new ds(o,n)},e.prototype.createObservableGauge=function(t,r){var n=lt(t,ct.OBSERVABLE_GAUGE,r),o=this._meterSharedState.registerAsyncMetricStorage(n);return new ms(n,o,this._meterSharedState.observableRegistry)},e.prototype.createObservableCounter=function(t,r){var n=lt(t,ct.OBSERVABLE_COUNTER,r),o=this._meterSharedState.registerAsyncMetricStorage(n);return new Es(n,o,this._meterSharedState.observableRegistry)},e.prototype.createObservableUpDownCounter=function(t,r){var n=lt(t,ct.OBSERVABLE_UP_DOWN_COUNTER,r),o=this._meterSharedState.registerAsyncMetricStorage(n);return new Ts(n,o,this._meterSharedState.observableRegistry)},e.prototype.addBatchObservableCallback=function(t,r){this._meterSharedState.observableRegistry.addBatchCallback(t,r)},e.prototype.removeBatchObservableCallback=function(t,r){this._meterSharedState.observableRegistry.removeBatchCallback(t,r)},e}();var ur=function(){function e(t){this._instrumentDescriptor=t}return e.prototype.getInstrumentDescriptor=function(){return this._instrumentDescriptor},e.prototype.updateDescription=function(t){this._instrumentDescriptor=lt(this._instrumentDescriptor.name,this._instrumentDescriptor.type,{description:t,valueType:this._instrumentDescriptor.valueType,unit:this._instrumentDescriptor.unit,advice:this._instrumentDescriptor.advice})},e}();var cf=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(n[i]=o[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),gs=function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,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(f){return c([s,f])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=s[0]&2?o.return:s[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;switch(o=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,o=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1],i=s;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(s);break}i[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(f){s=[6,f],o=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},lf=function(){function e(t){this._hash=t,this._valueMap=new Map,this._keyMap=new Map}return e.prototype.get=function(t,r){return r??(r=this._hash(t)),this._valueMap.get(r)},e.prototype.getOrDefault=function(t,r){var n=this._hash(t);if(this._valueMap.has(n))return this._valueMap.get(n);var o=r();return this._keyMap.has(n)||this._keyMap.set(n,t),this._valueMap.set(n,o),o},e.prototype.set=function(t,r,n){n??(n=this._hash(t)),this._keyMap.has(n)||this._keyMap.set(n,t),this._valueMap.set(n,r)},e.prototype.has=function(t,r){return r??(r=this._hash(t)),this._valueMap.has(r)},e.prototype.keys=function(){var t,r;return gs(this,function(n){switch(n.label){case 0:t=this._keyMap.entries(),r=t.next(),n.label=1;case 1:return r.done===!0?[3,3]:[4,[r.value[1],r.value[0]]];case 2:return n.sent(),r=t.next(),[3,1];case 3:return[2]}})},e.prototype.entries=function(){var t,r;return gs(this,function(n){switch(n.label){case 0:t=this._valueMap.entries(),r=t.next(),n.label=1;case 1:return r.done===!0?[3,3]:[4,[this._keyMap.get(r.value[0]),r.value[1],r.value[0]]];case 2:return n.sent(),r=t.next(),[3,1];case 3:return[2]}})},Object.defineProperty(e.prototype,"size",{get:function(){return this._valueMap.size},enumerable:!1,configurable:!0}),e}();var Z=function(e){cf(t,e);function t(){return e.call(this,ns)||this}return t}(lf);var ff=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){a={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i},cr=function(){function e(t){this._aggregator=t,this._activeCollectionStorage=new Z,this._cumulativeMemoStorage=new Z}return e.prototype.record=function(t,r,n,o){var i=this,a=this._activeCollectionStorage.getOrDefault(r,function(){return i._aggregator.createAccumulation(o)});a?.record(t)},e.prototype.batchCumulate=function(t,r){var n=this;Array.from(t.entries()).forEach(function(o){var i=ff(o,3),a=i[0],u=i[1],c=i[2],s=n._aggregator.createAccumulation(r);s?.record(u);var f=s;if(n._cumulativeMemoStorage.has(a,c)){var p=n._cumulativeMemoStorage.get(a,c);f=n._aggregator.diff(p,s)}if(n._activeCollectionStorage.has(a,c)){var d=n._activeCollectionStorage.get(a,c);f=n._aggregator.merge(d,f)}n._cumulativeMemoStorage.set(a,s,c),n._activeCollectionStorage.set(a,f,c)})},e.prototype.collect=function(){var t=this._activeCollectionStorage;return this._activeCollectionStorage=new Z,t},e}();var Rn=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ys=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){a={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i},lr=function(){function e(t,r){var n=this;this._aggregator=t,this._unreportedAccumulations=new Map,this._reportHistory=new Map,r.forEach(function(o){n._unreportedAccumulations.set(o,[])})}return e.prototype.buildMetrics=function(t,r,n,o){this._stashAccumulations(n);var i=this._getMergedUnreportedAccumulations(t),a=i,u;if(this._reportHistory.has(t)){var c=this._reportHistory.get(t),s=c.collectionTime;u=c.aggregationTemporality,u===sr.CUMULATIVE?a=e.merge(c.accumulations,i,this._aggregator):a=e.calibrateStartTime(c.accumulations,i,s)}else u=t.selectAggregationTemporality(r.type);this._reportHistory.set(t,{accumulations:a,collectionTime:o,aggregationTemporality:u});var f=pf(a);if(f.length!==0)return this._aggregator.toMetricData(r,u,f,o)},e.prototype._stashAccumulations=function(t){var r,n,o=this._unreportedAccumulations.keys();try{for(var i=Rn(o),a=i.next();!a.done;a=i.next()){var u=a.value,c=this._unreportedAccumulations.get(u);c===void 0&&(c=[],this._unreportedAccumulations.set(u,c)),c.push(t)}}catch(s){r={error:s}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},e.prototype._getMergedUnreportedAccumulations=function(t){var r,n,o=new Z,i=this._unreportedAccumulations.get(t);if(this._unreportedAccumulations.set(t,[]),i===void 0)return o;try{for(var a=Rn(i),u=a.next();!u.done;u=a.next()){var c=u.value;o=e.merge(o,c,this._aggregator)}}catch(s){r={error:s}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return o},e.merge=function(t,r,n){for(var o=t,i=r.entries(),a=i.next();a.done!==!0;){var u=ys(a.value,3),c=u[0],s=u[1],f=u[2];if(t.has(c,f)){var p=t.get(c,f),d=n.merge(p,s);o.set(c,d,f)}else o.set(c,s,f);a=i.next()}return o},e.calibrateStartTime=function(t,r,n){var o,i;try{for(var a=Rn(t.keys()),u=a.next();!u.done;u=a.next()){var c=ys(u.value,2),s=c[0],f=c[1],p=r.get(s,f);p?.setStartTime(n)}}catch(d){o={error:d}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}return r},e}();function pf(e){return Array.from(e.entries())}var df=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(n[i]=o[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),_f=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){a={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i},vs=function(e){df(t,e);function t(r,n,o,i){var a=e.call(this,r)||this;return a._attributesProcessor=o,a._deltaMetricStorage=new cr(n),a._temporalMetricStorage=new lr(n,i),a}return t.prototype.record=function(r,n){var o=this,i=new Z;Array.from(r.entries()).forEach(function(a){var u=_f(a,2),c=u[0],s=u[1];i.set(o._attributesProcessor.process(c),s)}),this._deltaMetricStorage.batchCumulate(i,n)},t.prototype.collect=function(r,n){var o=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(r,this._instrumentDescriptor,o,n)},t}(ur);E();function On(e,t){var r="";return e.unit!==t.unit&&(r+=" - Unit '"+e.unit+"' does not match '"+t.unit+`'
|
|
4
|
+
var ku=Object.create;var xr=Object.defineProperty;var qu=Object.getOwnPropertyDescriptor;var Xu=Object.getOwnPropertyNames;var Ku=Object.getPrototypeOf,Wu=Object.prototype.hasOwnProperty;var li=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Dr=(e,t)=>()=>(e&&(t=e(e=0)),t);var _=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var ge=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Xu(t))!Wu.call(e,o)&&o!==r&&xr(e,o,{get:()=>t[o],enumerable:!(n=qu(t,o))||n.enumerable});return e},z=(e,t,r)=>(ge(e,t,"default"),r&&ge(r,t,"default")),v=(e,t,r)=>(r=e!=null?ku(Ku(e)):{},ge(t||!e||!e.__esModule?xr(r,"default",{value:e,enumerable:!0}):r,e)),w=e=>ge(xr({},"__esModule",{value:!0}),e);var l={};import*as dd from"@opentelemetry/api";var E=Dr(()=>{z(l,dd)});var ie=_(ft=>{"use strict";Object.defineProperty(ft,"__esModule",{value:!0});ft.isTracingSuppressed=ft.unsuppressTracing=ft.suppressTracing=void 0;var Yu=(E(),w(l)),Ur=(0,Yu.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function zu(e){return e.setValue(Ur,!0)}ft.suppressTracing=zu;function $u(e){return e.deleteValue(Ur)}ft.unsuppressTracing=$u;function Qu(e){return e.getValue(Ur)===!0}ft.isTracingSuppressed=Qu});var Br=_(B=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});B.BAGGAGE_MAX_TOTAL_LENGTH=B.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=B.BAGGAGE_MAX_NAME_VALUE_PAIRS=B.BAGGAGE_HEADER=B.BAGGAGE_ITEMS_SEPARATOR=B.BAGGAGE_PROPERTIES_SEPARATOR=B.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;B.BAGGAGE_KEY_PAIR_SEPARATOR="=";B.BAGGAGE_PROPERTIES_SEPARATOR=";";B.BAGGAGE_ITEMS_SEPARATOR=",";B.BAGGAGE_HEADER="baggage";B.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;B.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;B.BAGGAGE_MAX_TOTAL_LENGTH=8192});var Vr=_(nt=>{"use strict";Object.defineProperty(nt,"__esModule",{value:!0});nt.parseKeyPairsIntoRecord=nt.parsePairKeyValue=nt.getKeyPairs=nt.serializeKeyPairs=void 0;var Ju=(E(),w(l)),Lt=Br();function Zu(e){return e.reduce((t,r)=>{let n=`${t}${t!==""?Lt.BAGGAGE_ITEMS_SEPARATOR:""}${r}`;return n.length>Lt.BAGGAGE_MAX_TOTAL_LENGTH?t:n},"")}nt.serializeKeyPairs=Zu;function tc(e){return e.getAllEntries().map(([t,r])=>{let n=`${encodeURIComponent(t)}=${encodeURIComponent(r.value)}`;return r.metadata!==void 0&&(n+=Lt.BAGGAGE_PROPERTIES_SEPARATOR+r.metadata.toString()),n})}nt.getKeyPairs=tc;function fi(e){let t=e.split(Lt.BAGGAGE_PROPERTIES_SEPARATOR);if(t.length<=0)return;let r=t.shift();if(!r)return;let n=r.indexOf(Lt.BAGGAGE_KEY_PAIR_SEPARATOR);if(n<=0)return;let o=decodeURIComponent(r.substring(0,n).trim()),i=decodeURIComponent(r.substring(n+1).trim()),a;return t.length>0&&(a=(0,Ju.baggageEntryMetadataFromString)(t.join(Lt.BAGGAGE_PROPERTIES_SEPARATOR))),{key:o,value:i,metadata:a}}nt.parsePairKeyValue=fi;function ec(e){return typeof e!="string"||e.length===0?{}:e.split(Lt.BAGGAGE_ITEMS_SEPARATOR).map(t=>fi(t)).filter(t=>t!==void 0&&t.value.length>0).reduce((t,r)=>(t[r.key]=r.value,t),{})}nt.parseKeyPairsIntoRecord=ec});var pi=_(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.W3CBaggagePropagator=void 0;var Gr=(E(),w(l)),rc=ie(),Pt=Br(),Hr=Vr(),Fr=class{inject(t,r,n){let o=Gr.propagation.getBaggage(t);if(!o||(0,rc.isTracingSuppressed)(t))return;let i=(0,Hr.getKeyPairs)(o).filter(u=>u.length<=Pt.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,Pt.BAGGAGE_MAX_NAME_VALUE_PAIRS),a=(0,Hr.serializeKeyPairs)(i);a.length>0&&n.set(r,Pt.BAGGAGE_HEADER,a)}extract(t,r,n){let o=n.get(r,Pt.BAGGAGE_HEADER),i=Array.isArray(o)?o.join(Pt.BAGGAGE_ITEMS_SEPARATOR):o;if(!i)return t;let a={};return i.length===0||(i.split(Pt.BAGGAGE_ITEMS_SEPARATOR).forEach(c=>{let s=(0,Hr.parsePairKeyValue)(c);if(s){let f={value:s.value};s.metadata&&(f.metadata=s.metadata),a[s.key]=f}}),Object.entries(a).length===0)?t:Gr.propagation.setBaggage(t,Gr.propagation.createBaggage(a))}fields(){return[Pt.BAGGAGE_HEADER]}};ye.W3CBaggagePropagator=Fr});var di=_(ve=>{"use strict";Object.defineProperty(ve,"__esModule",{value:!0});ve.AnchoredClock=void 0;var jr=class{constructor(t,r){this._monotonicClock=r,this._epochMillis=t.now(),this._performanceMillis=r.now()}now(){let t=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+t}};ve.AnchoredClock=jr});var Ti=_(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.isAttributeValue=pt.isAttributeKey=pt.sanitizeAttributes=void 0;var _i=(E(),w(l));function nc(e){let t={};if(typeof e!="object"||e==null)return t;for(let[r,n]of Object.entries(e)){if(!hi(r)){_i.diag.warn(`Invalid attribute key: ${r}`);continue}if(!Ei(n)){_i.diag.warn(`Invalid attribute value set for key: ${r}`);continue}Array.isArray(n)?t[r]=n.slice():t[r]=n}return t}pt.sanitizeAttributes=nc;function hi(e){return typeof e=="string"&&e.length>0}pt.isAttributeKey=hi;function Ei(e){return e==null?!0:Array.isArray(e)?ic(e):mi(e)}pt.isAttributeValue=Ei;function ic(e){let t;for(let r of e)if(r!=null){if(!t){if(mi(r)){t=typeof r;continue}return!1}if(typeof r!==t)return!1}return!0}function mi(e){switch(typeof e){case"number":case"boolean":case"string":return!0}return!1}});var kr=_(Ae=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:!0});Ae.loggingErrorHandler=void 0;var oc=(E(),w(l));function sc(){return e=>{oc.diag.error(ac(e))}}Ae.loggingErrorHandler=sc;function ac(e){return typeof e=="string"?e:JSON.stringify(uc(e))}function uc(e){let t={},r=e;for(;r!==null;)Object.getOwnPropertyNames(r).forEach(n=>{if(t[n])return;let o=r[n];o&&(t[n]=String(o))}),r=Object.getPrototypeOf(r);return t}});var qr=_(Gt=>{"use strict";Object.defineProperty(Gt,"__esModule",{value:!0});Gt.globalErrorHandler=Gt.setGlobalErrorHandler=void 0;var cc=kr(),Si=(0,cc.loggingErrorHandler)();function lc(e){Si=e}Gt.setGlobalErrorHandler=lc;function fc(e){try{Si(e)}catch{}}Gt.globalErrorHandler=fc});var Xr=_(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.TracesSamplerValues=void 0;var pc;(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"})(pc=oe.TracesSamplerValues||(oe.TracesSamplerValues={}))});var Oe=_(Re=>{"use strict";Object.defineProperty(Re,"__esModule",{value:!0});Re._globalThis=void 0;Re._globalThis=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});var be=_(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});L.getEnvWithoutDefaults=L.parseEnvironment=L.DEFAULT_ENVIRONMENT=L.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT=L.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT=L.DEFAULT_ATTRIBUTE_COUNT_LIMIT=L.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT=void 0;var dt=(E(),w(l)),dc=Xr(),_c=Oe(),hc=",",Ec=["OTEL_SDK_DISABLED"];function mc(e){return Ec.indexOf(e)>-1}var Tc=["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 Sc(e){return Tc.indexOf(e)>-1}var gc=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function yc(e){return gc.indexOf(e)>-1}L.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT=1/0;L.DEFAULT_ATTRIBUTE_COUNT_LIMIT=128;L.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT=128;L.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT=128;L.DEFAULT_ENVIRONMENT={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:dt.DiagLogLevel.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:L.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_ATTRIBUTE_COUNT_LIMIT:L.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:L.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:L.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:L.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:L.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:L.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:L.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:dc.TracesSamplerValues.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative"};function vc(e,t,r){if(typeof r[e]>"u")return;let n=String(r[e]);t[e]=n.toLowerCase()==="true"}function Ac(e,t,r,n=-1/0,o=1/0){if(typeof r[e]<"u"){let i=Number(r[e]);isNaN(i)||(i<n?t[e]=n:i>o?t[e]=o:t[e]=i)}}function Rc(e,t,r,n=hc){let o=r[e];typeof o=="string"&&(t[e]=o.split(n).map(i=>i.trim()))}var Oc={ALL:dt.DiagLogLevel.ALL,VERBOSE:dt.DiagLogLevel.VERBOSE,DEBUG:dt.DiagLogLevel.DEBUG,INFO:dt.DiagLogLevel.INFO,WARN:dt.DiagLogLevel.WARN,ERROR:dt.DiagLogLevel.ERROR,NONE:dt.DiagLogLevel.NONE};function bc(e,t,r){let n=r[e];if(typeof n=="string"){let o=Oc[n.toUpperCase()];o!=null&&(t[e]=o)}}function Kr(e){let t={};for(let r in L.DEFAULT_ENVIRONMENT){let n=r;switch(n){case"OTEL_LOG_LEVEL":bc(n,t,e);break;default:if(mc(n))vc(n,t,e);else if(Sc(n))Ac(n,t,e);else if(yc(n))Rc(n,t,e);else{let o=e[n];typeof o<"u"&&o!==null&&(t[n]=String(o))}}}return t}L.parseEnvironment=Kr;function Lc(){return typeof process<"u"&&process&&process.env?Kr(process.env):Kr(_c._globalThis)}L.getEnvWithoutDefaults=Lc});var yi=_(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.getEnv=void 0;var gi=be(),Pc=Oe();function Ic(){let e=(0,gi.parseEnvironment)(Pc._globalThis);return Object.assign({},gi.DEFAULT_ENVIRONMENT,e)}Le.getEnv=Ic});var vi=_(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.hexToBase64=void 0;function Cc(e){let t=e.length,r="";for(let n=0;n<t;n+=2){let o=e.substring(n,n+2),i=parseInt(o,16);r+=String.fromCharCode(i)}return btoa(r)}Pe.hexToBase64=Cc});var Ri=_(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.RandomIdGenerator=void 0;var Nc=8,wc=16,Wr=class{constructor(){this.generateTraceId=Ai(wc),this.generateSpanId=Ai(Nc)}};Ce.RandomIdGenerator=Wr;var Ie=Array(32);function Ai(e){return function(){for(let r=0;r<e*2;r++)Ie[r]=Math.floor(Math.random()*16)+48,Ie[r]>=58&&(Ie[r]+=39);return String.fromCharCode.apply(null,Ie.slice(0,e*2))}}});var Oi=_(Ne=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.otperformance=void 0;Ne.otperformance=performance});var Yr=_(we=>{"use strict";Object.defineProperty(we,"__esModule",{value:!0});we.VERSION=void 0;we.VERSION="1.19.0"});var bi=_(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});A.MessageTypeValues=A.RpcGrpcStatusCodeValues=A.MessagingOperationValues=A.MessagingDestinationKindValues=A.HttpFlavorValues=A.NetHostConnectionSubtypeValues=A.NetHostConnectionTypeValues=A.NetTransportValues=A.FaasInvokedProviderValues=A.FaasDocumentOperationValues=A.FaasTriggerValues=A.DbCassandraConsistencyLevelValues=A.DbSystemValues=A.SemanticAttributes=void 0;A.SemanticAttributes={AWS_LAMBDA_INVOKED_ARN:"aws.lambda.invoked_arn",DB_SYSTEM:"db.system",DB_CONNECTION_STRING:"db.connection_string",DB_USER:"db.user",DB_JDBC_DRIVER_CLASSNAME:"db.jdbc.driver_classname",DB_NAME:"db.name",DB_STATEMENT:"db.statement",DB_OPERATION:"db.operation",DB_MSSQL_INSTANCE_NAME:"db.mssql.instance_name",DB_CASSANDRA_KEYSPACE:"db.cassandra.keyspace",DB_CASSANDRA_PAGE_SIZE:"db.cassandra.page_size",DB_CASSANDRA_CONSISTENCY_LEVEL:"db.cassandra.consistency_level",DB_CASSANDRA_TABLE:"db.cassandra.table",DB_CASSANDRA_IDEMPOTENCE:"db.cassandra.idempotence",DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:"db.cassandra.speculative_execution_count",DB_CASSANDRA_COORDINATOR_ID:"db.cassandra.coordinator.id",DB_CASSANDRA_COORDINATOR_DC:"db.cassandra.coordinator.dc",DB_HBASE_NAMESPACE:"db.hbase.namespace",DB_REDIS_DATABASE_INDEX:"db.redis.database_index",DB_MONGODB_COLLECTION:"db.mongodb.collection",DB_SQL_TABLE:"db.sql.table",EXCEPTION_TYPE:"exception.type",EXCEPTION_MESSAGE:"exception.message",EXCEPTION_STACKTRACE:"exception.stacktrace",EXCEPTION_ESCAPED:"exception.escaped",FAAS_TRIGGER:"faas.trigger",FAAS_EXECUTION:"faas.execution",FAAS_DOCUMENT_COLLECTION:"faas.document.collection",FAAS_DOCUMENT_OPERATION:"faas.document.operation",FAAS_DOCUMENT_TIME:"faas.document.time",FAAS_DOCUMENT_NAME:"faas.document.name",FAAS_TIME:"faas.time",FAAS_CRON:"faas.cron",FAAS_COLDSTART:"faas.coldstart",FAAS_INVOKED_NAME:"faas.invoked_name",FAAS_INVOKED_PROVIDER:"faas.invoked_provider",FAAS_INVOKED_REGION:"faas.invoked_region",NET_TRANSPORT:"net.transport",NET_PEER_IP:"net.peer.ip",NET_PEER_PORT:"net.peer.port",NET_PEER_NAME:"net.peer.name",NET_HOST_IP:"net.host.ip",NET_HOST_PORT:"net.host.port",NET_HOST_NAME:"net.host.name",NET_HOST_CONNECTION_TYPE:"net.host.connection.type",NET_HOST_CONNECTION_SUBTYPE:"net.host.connection.subtype",NET_HOST_CARRIER_NAME:"net.host.carrier.name",NET_HOST_CARRIER_MCC:"net.host.carrier.mcc",NET_HOST_CARRIER_MNC:"net.host.carrier.mnc",NET_HOST_CARRIER_ICC:"net.host.carrier.icc",PEER_SERVICE:"peer.service",ENDUSER_ID:"enduser.id",ENDUSER_ROLE:"enduser.role",ENDUSER_SCOPE:"enduser.scope",THREAD_ID:"thread.id",THREAD_NAME:"thread.name",CODE_FUNCTION:"code.function",CODE_NAMESPACE:"code.namespace",CODE_FILEPATH:"code.filepath",CODE_LINENO:"code.lineno",HTTP_METHOD:"http.method",HTTP_URL:"http.url",HTTP_TARGET:"http.target",HTTP_HOST:"http.host",HTTP_SCHEME:"http.scheme",HTTP_STATUS_CODE:"http.status_code",HTTP_FLAVOR:"http.flavor",HTTP_USER_AGENT:"http.user_agent",HTTP_REQUEST_CONTENT_LENGTH:"http.request_content_length",HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:"http.request_content_length_uncompressed",HTTP_RESPONSE_CONTENT_LENGTH:"http.response_content_length",HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:"http.response_content_length_uncompressed",HTTP_SERVER_NAME:"http.server_name",HTTP_ROUTE:"http.route",HTTP_CLIENT_IP:"http.client_ip",AWS_DYNAMODB_TABLE_NAMES:"aws.dynamodb.table_names",AWS_DYNAMODB_CONSUMED_CAPACITY:"aws.dynamodb.consumed_capacity",AWS_DYNAMODB_ITEM_COLLECTION_METRICS:"aws.dynamodb.item_collection_metrics",AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:"aws.dynamodb.provisioned_read_capacity",AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:"aws.dynamodb.provisioned_write_capacity",AWS_DYNAMODB_CONSISTENT_READ:"aws.dynamodb.consistent_read",AWS_DYNAMODB_PROJECTION:"aws.dynamodb.projection",AWS_DYNAMODB_LIMIT:"aws.dynamodb.limit",AWS_DYNAMODB_ATTRIBUTES_TO_GET:"aws.dynamodb.attributes_to_get",AWS_DYNAMODB_INDEX_NAME:"aws.dynamodb.index_name",AWS_DYNAMODB_SELECT:"aws.dynamodb.select",AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:"aws.dynamodb.global_secondary_indexes",AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:"aws.dynamodb.local_secondary_indexes",AWS_DYNAMODB_EXCLUSIVE_START_TABLE:"aws.dynamodb.exclusive_start_table",AWS_DYNAMODB_TABLE_COUNT:"aws.dynamodb.table_count",AWS_DYNAMODB_SCAN_FORWARD:"aws.dynamodb.scan_forward",AWS_DYNAMODB_SEGMENT:"aws.dynamodb.segment",AWS_DYNAMODB_TOTAL_SEGMENTS:"aws.dynamodb.total_segments",AWS_DYNAMODB_COUNT:"aws.dynamodb.count",AWS_DYNAMODB_SCANNED_COUNT:"aws.dynamodb.scanned_count",AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:"aws.dynamodb.attribute_definitions",AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:"aws.dynamodb.global_secondary_index_updates",MESSAGING_SYSTEM:"messaging.system",MESSAGING_DESTINATION:"messaging.destination",MESSAGING_DESTINATION_KIND:"messaging.destination_kind",MESSAGING_TEMP_DESTINATION:"messaging.temp_destination",MESSAGING_PROTOCOL:"messaging.protocol",MESSAGING_PROTOCOL_VERSION:"messaging.protocol_version",MESSAGING_URL:"messaging.url",MESSAGING_MESSAGE_ID:"messaging.message_id",MESSAGING_CONVERSATION_ID:"messaging.conversation_id",MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:"messaging.message_payload_size_bytes",MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:"messaging.message_payload_compressed_size_bytes",MESSAGING_OPERATION:"messaging.operation",MESSAGING_CONSUMER_ID:"messaging.consumer_id",MESSAGING_RABBITMQ_ROUTING_KEY:"messaging.rabbitmq.routing_key",MESSAGING_KAFKA_MESSAGE_KEY:"messaging.kafka.message_key",MESSAGING_KAFKA_CONSUMER_GROUP:"messaging.kafka.consumer_group",MESSAGING_KAFKA_CLIENT_ID:"messaging.kafka.client_id",MESSAGING_KAFKA_PARTITION:"messaging.kafka.partition",MESSAGING_KAFKA_TOMBSTONE:"messaging.kafka.tombstone",RPC_SYSTEM:"rpc.system",RPC_SERVICE:"rpc.service",RPC_METHOD:"rpc.method",RPC_GRPC_STATUS_CODE:"rpc.grpc.status_code",RPC_JSONRPC_VERSION:"rpc.jsonrpc.version",RPC_JSONRPC_REQUEST_ID:"rpc.jsonrpc.request_id",RPC_JSONRPC_ERROR_CODE:"rpc.jsonrpc.error_code",RPC_JSONRPC_ERROR_MESSAGE:"rpc.jsonrpc.error_message",MESSAGE_TYPE:"message.type",MESSAGE_ID:"message.id",MESSAGE_COMPRESSED_SIZE:"message.compressed_size",MESSAGE_UNCOMPRESSED_SIZE:"message.uncompressed_size"};A.DbSystemValues={OTHER_SQL:"other_sql",MSSQL:"mssql",MYSQL:"mysql",ORACLE:"oracle",DB2:"db2",POSTGRESQL:"postgresql",REDSHIFT:"redshift",HIVE:"hive",CLOUDSCAPE:"cloudscape",HSQLDB:"hsqldb",PROGRESS:"progress",MAXDB:"maxdb",HANADB:"hanadb",INGRES:"ingres",FIRSTSQL:"firstsql",EDB:"edb",CACHE:"cache",ADABAS:"adabas",FIREBIRD:"firebird",DERBY:"derby",FILEMAKER:"filemaker",INFORMIX:"informix",INSTANTDB:"instantdb",INTERBASE:"interbase",MARIADB:"mariadb",NETEZZA:"netezza",PERVASIVE:"pervasive",POINTBASE:"pointbase",SQLITE:"sqlite",SYBASE:"sybase",TERADATA:"teradata",VERTICA:"vertica",H2:"h2",COLDFUSION:"coldfusion",CASSANDRA:"cassandra",HBASE:"hbase",MONGODB:"mongodb",REDIS:"redis",COUCHBASE:"couchbase",COUCHDB:"couchdb",COSMOSDB:"cosmosdb",DYNAMODB:"dynamodb",NEO4J:"neo4j",GEODE:"geode",ELASTICSEARCH:"elasticsearch",MEMCACHED:"memcached",COCKROACHDB:"cockroachdb"};A.DbCassandraConsistencyLevelValues={ALL:"all",EACH_QUORUM:"each_quorum",QUORUM:"quorum",LOCAL_QUORUM:"local_quorum",ONE:"one",TWO:"two",THREE:"three",LOCAL_ONE:"local_one",ANY:"any",SERIAL:"serial",LOCAL_SERIAL:"local_serial"};A.FaasTriggerValues={DATASOURCE:"datasource",HTTP:"http",PUBSUB:"pubsub",TIMER:"timer",OTHER:"other"};A.FaasDocumentOperationValues={INSERT:"insert",EDIT:"edit",DELETE:"delete"};A.FaasInvokedProviderValues={ALIBABA_CLOUD:"alibaba_cloud",AWS:"aws",AZURE:"azure",GCP:"gcp"};A.NetTransportValues={IP_TCP:"ip_tcp",IP_UDP:"ip_udp",IP:"ip",UNIX:"unix",PIPE:"pipe",INPROC:"inproc",OTHER:"other"};A.NetHostConnectionTypeValues={WIFI:"wifi",WIRED:"wired",CELL:"cell",UNAVAILABLE:"unavailable",UNKNOWN:"unknown"};A.NetHostConnectionSubtypeValues={GPRS:"gprs",EDGE:"edge",UMTS:"umts",CDMA:"cdma",EVDO_0:"evdo_0",EVDO_A:"evdo_a",CDMA2000_1XRTT:"cdma2000_1xrtt",HSDPA:"hsdpa",HSUPA:"hsupa",HSPA:"hspa",IDEN:"iden",EVDO_B:"evdo_b",LTE:"lte",EHRPD:"ehrpd",HSPAP:"hspap",GSM:"gsm",TD_SCDMA:"td_scdma",IWLAN:"iwlan",NR:"nr",NRNSA:"nrnsa",LTE_CA:"lte_ca"};A.HttpFlavorValues={HTTP_1_0:"1.0",HTTP_1_1:"1.1",HTTP_2_0:"2.0",SPDY:"SPDY",QUIC:"QUIC"};A.MessagingDestinationKindValues={QUEUE:"queue",TOPIC:"topic"};A.MessagingOperationValues={RECEIVE:"receive",PROCESS:"process"};A.RpcGrpcStatusCodeValues={OK:0,CANCELLED:1,UNKNOWN:2,INVALID_ARGUMENT:3,DEADLINE_EXCEEDED:4,NOT_FOUND:5,ALREADY_EXISTS:6,PERMISSION_DENIED:7,RESOURCE_EXHAUSTED:8,FAILED_PRECONDITION:9,ABORTED:10,OUT_OF_RANGE:11,UNIMPLEMENTED:12,INTERNAL:13,UNAVAILABLE:14,DATA_LOSS:15,UNAUTHENTICATED:16};A.MessageTypeValues={SENT:"SENT",RECEIVED:"RECEIVED"}});var Li=_(It=>{"use strict";var Mc=It&&It.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),xc=It&&It.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Mc(t,e,r)};Object.defineProperty(It,"__esModule",{value:!0});xc(bi(),It)});var Pi=_(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.TelemetrySdkLanguageValues=V.OsTypeValues=V.HostArchValues=V.AwsEcsLaunchtypeValues=V.CloudPlatformValues=V.CloudProviderValues=V.SemanticResourceAttributes=void 0;V.SemanticResourceAttributes={CLOUD_PROVIDER:"cloud.provider",CLOUD_ACCOUNT_ID:"cloud.account.id",CLOUD_REGION:"cloud.region",CLOUD_AVAILABILITY_ZONE:"cloud.availability_zone",CLOUD_PLATFORM:"cloud.platform",AWS_ECS_CONTAINER_ARN:"aws.ecs.container.arn",AWS_ECS_CLUSTER_ARN:"aws.ecs.cluster.arn",AWS_ECS_LAUNCHTYPE:"aws.ecs.launchtype",AWS_ECS_TASK_ARN:"aws.ecs.task.arn",AWS_ECS_TASK_FAMILY:"aws.ecs.task.family",AWS_ECS_TASK_REVISION:"aws.ecs.task.revision",AWS_EKS_CLUSTER_ARN:"aws.eks.cluster.arn",AWS_LOG_GROUP_NAMES:"aws.log.group.names",AWS_LOG_GROUP_ARNS:"aws.log.group.arns",AWS_LOG_STREAM_NAMES:"aws.log.stream.names",AWS_LOG_STREAM_ARNS:"aws.log.stream.arns",CONTAINER_NAME:"container.name",CONTAINER_ID:"container.id",CONTAINER_RUNTIME:"container.runtime",CONTAINER_IMAGE_NAME:"container.image.name",CONTAINER_IMAGE_TAG:"container.image.tag",DEPLOYMENT_ENVIRONMENT:"deployment.environment",DEVICE_ID:"device.id",DEVICE_MODEL_IDENTIFIER:"device.model.identifier",DEVICE_MODEL_NAME:"device.model.name",FAAS_NAME:"faas.name",FAAS_ID:"faas.id",FAAS_VERSION:"faas.version",FAAS_INSTANCE:"faas.instance",FAAS_MAX_MEMORY:"faas.max_memory",HOST_ID:"host.id",HOST_NAME:"host.name",HOST_TYPE:"host.type",HOST_ARCH:"host.arch",HOST_IMAGE_NAME:"host.image.name",HOST_IMAGE_ID:"host.image.id",HOST_IMAGE_VERSION:"host.image.version",K8S_CLUSTER_NAME:"k8s.cluster.name",K8S_NODE_NAME:"k8s.node.name",K8S_NODE_UID:"k8s.node.uid",K8S_NAMESPACE_NAME:"k8s.namespace.name",K8S_POD_UID:"k8s.pod.uid",K8S_POD_NAME:"k8s.pod.name",K8S_CONTAINER_NAME:"k8s.container.name",K8S_REPLICASET_UID:"k8s.replicaset.uid",K8S_REPLICASET_NAME:"k8s.replicaset.name",K8S_DEPLOYMENT_UID:"k8s.deployment.uid",K8S_DEPLOYMENT_NAME:"k8s.deployment.name",K8S_STATEFULSET_UID:"k8s.statefulset.uid",K8S_STATEFULSET_NAME:"k8s.statefulset.name",K8S_DAEMONSET_UID:"k8s.daemonset.uid",K8S_DAEMONSET_NAME:"k8s.daemonset.name",K8S_JOB_UID:"k8s.job.uid",K8S_JOB_NAME:"k8s.job.name",K8S_CRONJOB_UID:"k8s.cronjob.uid",K8S_CRONJOB_NAME:"k8s.cronjob.name",OS_TYPE:"os.type",OS_DESCRIPTION:"os.description",OS_NAME:"os.name",OS_VERSION:"os.version",PROCESS_PID:"process.pid",PROCESS_EXECUTABLE_NAME:"process.executable.name",PROCESS_EXECUTABLE_PATH:"process.executable.path",PROCESS_COMMAND:"process.command",PROCESS_COMMAND_LINE:"process.command_line",PROCESS_COMMAND_ARGS:"process.command_args",PROCESS_OWNER:"process.owner",PROCESS_RUNTIME_NAME:"process.runtime.name",PROCESS_RUNTIME_VERSION:"process.runtime.version",PROCESS_RUNTIME_DESCRIPTION:"process.runtime.description",SERVICE_NAME:"service.name",SERVICE_NAMESPACE:"service.namespace",SERVICE_INSTANCE_ID:"service.instance.id",SERVICE_VERSION:"service.version",TELEMETRY_SDK_NAME:"telemetry.sdk.name",TELEMETRY_SDK_LANGUAGE:"telemetry.sdk.language",TELEMETRY_SDK_VERSION:"telemetry.sdk.version",TELEMETRY_AUTO_VERSION:"telemetry.auto.version",WEBENGINE_NAME:"webengine.name",WEBENGINE_VERSION:"webengine.version",WEBENGINE_DESCRIPTION:"webengine.description"};V.CloudProviderValues={ALIBABA_CLOUD:"alibaba_cloud",AWS:"aws",AZURE:"azure",GCP:"gcp"};V.CloudPlatformValues={ALIBABA_CLOUD_ECS:"alibaba_cloud_ecs",ALIBABA_CLOUD_FC:"alibaba_cloud_fc",AWS_EC2:"aws_ec2",AWS_ECS:"aws_ecs",AWS_EKS:"aws_eks",AWS_LAMBDA:"aws_lambda",AWS_ELASTIC_BEANSTALK:"aws_elastic_beanstalk",AZURE_VM:"azure_vm",AZURE_CONTAINER_INSTANCES:"azure_container_instances",AZURE_AKS:"azure_aks",AZURE_FUNCTIONS:"azure_functions",AZURE_APP_SERVICE:"azure_app_service",GCP_COMPUTE_ENGINE:"gcp_compute_engine",GCP_CLOUD_RUN:"gcp_cloud_run",GCP_KUBERNETES_ENGINE:"gcp_kubernetes_engine",GCP_CLOUD_FUNCTIONS:"gcp_cloud_functions",GCP_APP_ENGINE:"gcp_app_engine"};V.AwsEcsLaunchtypeValues={EC2:"ec2",FARGATE:"fargate"};V.HostArchValues={AMD64:"amd64",ARM32:"arm32",ARM64:"arm64",IA64:"ia64",PPC32:"ppc32",PPC64:"ppc64",X86:"x86"};V.OsTypeValues={WINDOWS:"windows",LINUX:"linux",DARWIN:"darwin",FREEBSD:"freebsd",NETBSD:"netbsd",OPENBSD:"openbsd",DRAGONFLYBSD:"dragonflybsd",HPUX:"hpux",AIX:"aix",SOLARIS:"solaris",Z_OS:"z_os"};V.TelemetrySdkLanguageValues={CPP:"cpp",DOTNET:"dotnet",ERLANG:"erlang",GO:"go",JAVA:"java",NODEJS:"nodejs",PHP:"php",PYTHON:"python",RUBY:"ruby",WEBJS:"webjs"}});var Ii=_(Ct=>{"use strict";var Dc=Ct&&Ct.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Uc=Ct&&Ct.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Dc(t,e,r)};Object.defineProperty(Ct,"__esModule",{value:!0});Uc(Pi(),Ct)});var se=_(_t=>{"use strict";var Bc=_t&&_t.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Ci=_t&&_t.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Bc(t,e,r)};Object.defineProperty(_t,"__esModule",{value:!0});Ci(Li(),_t);Ci(Ii(),_t)});var Ni=_(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.SDK_INFO=void 0;var Vc=Yr(),ae=se();Me.SDK_INFO={[ae.SemanticResourceAttributes.TELEMETRY_SDK_NAME]:"opentelemetry",[ae.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]:"browser",[ae.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]:ae.TelemetrySdkLanguageValues.WEBJS,[ae.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]:Vc.VERSION}});var wi=_(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.unrefTimer=void 0;function Gc(e){}xe.unrefTimer=Gc});var zr=_(j=>{"use strict";var Hc=j&&j.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Nt=j&&j.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Hc(t,e,r)};Object.defineProperty(j,"__esModule",{value:!0});Nt(yi(),j);Nt(Oe(),j);Nt(vi(),j);Nt(Ri(),j);Nt(Oi(),j);Nt(Ni(),j);Nt(wi(),j)});var Ui=_(O=>{"use strict";Object.defineProperty(O,"__esModule",{value:!0});O.addHrTimes=O.isTimeInput=O.isTimeInputHrTime=O.hrTimeToMicroseconds=O.hrTimeToMilliseconds=O.hrTimeToNanoseconds=O.hrTimeToTimeStamp=O.hrTimeDuration=O.timeInputToHrTime=O.hrTime=O.getTimeOrigin=O.millisToHrTime=void 0;var $r=zr(),Mi=9,Fc=6,jc=Math.pow(10,Fc),De=Math.pow(10,Mi);function ue(e){let t=e/1e3,r=Math.trunc(t),n=Math.round(e%1e3*jc);return[r,n]}O.millisToHrTime=ue;function Qr(){let e=$r.otperformance.timeOrigin;if(typeof e!="number"){let t=$r.otperformance;e=t.timing&&t.timing.fetchStart}return e}O.getTimeOrigin=Qr;function xi(e){let t=ue(Qr()),r=ue(typeof e=="number"?e:$r.otperformance.now());return Di(t,r)}O.hrTime=xi;function kc(e){if(Jr(e))return e;if(typeof e=="number")return e<Qr()?xi(e):ue(e);if(e instanceof Date)return ue(e.getTime());throw TypeError("Invalid input type")}O.timeInputToHrTime=kc;function qc(e,t){let r=t[0]-e[0],n=t[1]-e[1];return n<0&&(r-=1,n+=De),[r,n]}O.hrTimeDuration=qc;function Xc(e){let t=Mi,r=`${"0".repeat(t)}${e[1]}Z`,n=r.substr(r.length-t-1);return new Date(e[0]*1e3).toISOString().replace("000Z",n)}O.hrTimeToTimeStamp=Xc;function Kc(e){return e[0]*De+e[1]}O.hrTimeToNanoseconds=Kc;function Wc(e){return e[0]*1e3+e[1]/1e6}O.hrTimeToMilliseconds=Wc;function Yc(e){return e[0]*1e6+e[1]/1e3}O.hrTimeToMicroseconds=Yc;function Jr(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}O.isTimeInputHrTime=Jr;function zc(e){return Jr(e)||typeof e=="number"||e instanceof Date}O.isTimeInput=zc;function Di(e,t){let r=[e[0]+t[0],e[1]+t[1]];return r[1]>=De&&(r[1]-=De,r[0]+=1),r}O.addHrTimes=Di});var Vi=_(Bi=>{"use strict";Object.defineProperty(Bi,"__esModule",{value:!0})});var Gi=_(ce=>{"use strict";Object.defineProperty(ce,"__esModule",{value:!0});ce.ExportResultCode=void 0;var $c;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})($c=ce.ExportResultCode||(ce.ExportResultCode={}))});var Fi=_(Ue=>{"use strict";Object.defineProperty(Ue,"__esModule",{value:!0});Ue.CompositePropagator=void 0;var Hi=(E(),w(l)),Zr=class{constructor(t={}){var r;this._propagators=(r=t.propagators)!==null&&r!==void 0?r:[],this._fields=Array.from(new Set(this._propagators.map(n=>typeof n.fields=="function"?n.fields():[]).reduce((n,o)=>n.concat(o),[])))}inject(t,r,n){for(let o of this._propagators)try{o.inject(t,r,n)}catch(i){Hi.diag.warn(`Failed to inject with ${o.constructor.name}. Err: ${i.message}`)}}extract(t,r,n){return this._propagators.reduce((o,i)=>{try{return i.extract(o,r,n)}catch(a){Hi.diag.warn(`Failed to inject with ${i.constructor.name}. Err: ${a.message}`)}return o},t)}fields(){return this._fields.slice()}};Ue.CompositePropagator=Zr});var ji=_(Ht=>{"use strict";Object.defineProperty(Ht,"__esModule",{value:!0});Ht.validateValue=Ht.validateKey=void 0;var tn="[_0-9a-z-*/]",Qc=`[a-z]${tn}{0,255}`,Jc=`[a-z0-9]${tn}{0,240}@[a-z]${tn}{0,13}`,Zc=new RegExp(`^(?:${Qc}|${Jc})$`),tl=/^[ -~]{0,255}[!-~]$/,el=/,|=/;function rl(e){return Zc.test(e)}Ht.validateKey=rl;function nl(e){return tl.test(e)&&!el.test(e)}Ht.validateValue=nl});var rn=_(Be=>{"use strict";Object.defineProperty(Be,"__esModule",{value:!0});Be.TraceState=void 0;var ki=ji(),qi=32,il=512,Xi=",",Ki="=",en=class e{constructor(t){this._internalState=new Map,t&&this._parse(t)}set(t,r){let n=this._clone();return n._internalState.has(t)&&n._internalState.delete(t),n._internalState.set(t,r),n}unset(t){let r=this._clone();return r._internalState.delete(t),r}get(t){return this._internalState.get(t)}serialize(){return this._keys().reduce((t,r)=>(t.push(r+Ki+this.get(r)),t),[]).join(Xi)}_parse(t){t.length>il||(this._internalState=t.split(Xi).reverse().reduce((r,n)=>{let o=n.trim(),i=o.indexOf(Ki);if(i!==-1){let a=o.slice(0,i),u=o.slice(i+1,n.length);(0,ki.validateKey)(a)&&(0,ki.validateValue)(u)&&r.set(a,u)}return r},new Map),this._internalState.size>qi&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,qi))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}};Be.TraceState=en});var Yi=_(G=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});G.W3CTraceContextPropagator=G.parseTraceParent=G.TRACE_STATE_HEADER=G.TRACE_PARENT_HEADER=void 0;var Ve=(E(),w(l)),ol=ie(),sl=rn();G.TRACE_PARENT_HEADER="traceparent";G.TRACE_STATE_HEADER="tracestate";var al="00",ul="(?!ff)[\\da-f]{2}",cl="(?![0]{32})[\\da-f]{32}",ll="(?![0]{16})[\\da-f]{16}",fl="[\\da-f]{2}",pl=new RegExp(`^\\s?(${ul})-(${cl})-(${ll})-(${fl})(-.*)?\\s?$`);function Wi(e){let t=pl.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}G.parseTraceParent=Wi;var nn=class{inject(t,r,n){let o=Ve.trace.getSpanContext(t);if(!o||(0,ol.isTracingSuppressed)(t)||!(0,Ve.isSpanContextValid)(o))return;let i=`${al}-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||Ve.TraceFlags.NONE).toString(16)}`;n.set(r,G.TRACE_PARENT_HEADER,i),o.traceState&&n.set(r,G.TRACE_STATE_HEADER,o.traceState.serialize())}extract(t,r,n){let o=n.get(r,G.TRACE_PARENT_HEADER);if(!o)return t;let i=Array.isArray(o)?o[0]:o;if(typeof i!="string")return t;let a=Wi(i);if(!a)return t;a.isRemote=!0;let u=n.get(r,G.TRACE_STATE_HEADER);if(u){let c=Array.isArray(u)?u.join(","):u;a.traceState=new sl.TraceState(typeof c=="string"?c:void 0)}return Ve.trace.setSpanContext(t,a)}fields(){return[G.TRACE_PARENT_HEADER,G.TRACE_STATE_HEADER]}};G.W3CTraceContextPropagator=nn});var $i=_(zi=>{"use strict";Object.defineProperty(zi,"__esModule",{value:!0})});var Qi=_($=>{"use strict";Object.defineProperty($,"__esModule",{value:!0});$.getRPCMetadata=$.deleteRPCMetadata=$.setRPCMetadata=$.RPCType=void 0;var dl=(E(),w(l)),on=(0,dl.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),_l;(function(e){e.HTTP="http"})(_l=$.RPCType||($.RPCType={}));function hl(e,t){return e.setValue(on,t)}$.setRPCMetadata=hl;function El(e){return e.deleteValue(on)}$.deleteRPCMetadata=El;function ml(e){return e.getValue(on)}$.getRPCMetadata=ml});var an=_(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.AlwaysOffSampler=void 0;var Tl=(E(),w(l)),sn=class{shouldSample(){return{decision:Tl.SamplingDecision.NOT_RECORD}}toString(){return"AlwaysOffSampler"}};Ge.AlwaysOffSampler=sn});var cn=_(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.AlwaysOnSampler=void 0;var Sl=(E(),w(l)),un=class{shouldSample(){return{decision:Sl.SamplingDecision.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}};He.AlwaysOnSampler=un});var Zi=_(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.ParentBasedSampler=void 0;var Fe=(E(),w(l)),gl=qr(),Ji=an(),ln=cn(),fn=class{constructor(t){var r,n,o,i;this._root=t.root,this._root||((0,gl.globalErrorHandler)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new ln.AlwaysOnSampler),this._remoteParentSampled=(r=t.remoteParentSampled)!==null&&r!==void 0?r:new ln.AlwaysOnSampler,this._remoteParentNotSampled=(n=t.remoteParentNotSampled)!==null&&n!==void 0?n:new Ji.AlwaysOffSampler,this._localParentSampled=(o=t.localParentSampled)!==null&&o!==void 0?o:new ln.AlwaysOnSampler,this._localParentNotSampled=(i=t.localParentNotSampled)!==null&&i!==void 0?i:new Ji.AlwaysOffSampler}shouldSample(t,r,n,o,i,a){let u=Fe.trace.getSpanContext(t);return!u||!(0,Fe.isSpanContextValid)(u)?this._root.shouldSample(t,r,n,o,i,a):u.isRemote?u.traceFlags&Fe.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(t,r,n,o,i,a):this._remoteParentNotSampled.shouldSample(t,r,n,o,i,a):u.traceFlags&Fe.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(t,r,n,o,i,a):this._localParentNotSampled.shouldSample(t,r,n,o,i,a)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}};je.ParentBasedSampler=fn});var to=_(ke=>{"use strict";Object.defineProperty(ke,"__esModule",{value:!0});ke.TraceIdRatioBasedSampler=void 0;var pn=(E(),w(l)),dn=class{constructor(t=0){this._ratio=t,this._ratio=this._normalize(t),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(t,r){return{decision:(0,pn.isValidTraceId)(r)&&this._accumulate(r)<this._upperBound?pn.SamplingDecision.RECORD_AND_SAMPLED:pn.SamplingDecision.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(t){return typeof t!="number"||isNaN(t)?0:t>=1?1:t<=0?0:t}_accumulate(t){let r=0;for(let n=0;n<t.length/8;n++){let o=n*8,i=parseInt(t.slice(o,o+8),16);r=(r^i)>>>0}return r}};ke.TraceIdRatioBasedSampler=dn});var oo=_(qe=>{"use strict";Object.defineProperty(qe,"__esModule",{value:!0});qe.isPlainObject=void 0;var yl="[object Object]",vl="[object Null]",Al="[object Undefined]",Rl=Function.prototype,eo=Rl.toString,Ol=eo.call(Object),bl=Ll(Object.getPrototypeOf,Object),ro=Object.prototype,no=ro.hasOwnProperty,wt=Symbol?Symbol.toStringTag:void 0,io=ro.toString;function Ll(e,t){return function(r){return e(t(r))}}function Pl(e){if(!Il(e)||Cl(e)!==yl)return!1;let t=bl(e);if(t===null)return!0;let r=no.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&eo.call(r)===Ol}qe.isPlainObject=Pl;function Il(e){return e!=null&&typeof e=="object"}function Cl(e){return e==null?e===void 0?Al:vl:wt&&wt in Object(e)?Nl(e):wl(e)}function Nl(e){let t=no.call(e,wt),r=e[wt],n=!1;try{e[wt]=void 0,n=!0}catch{}let o=io.call(e);return n&&(t?e[wt]=r:delete e[wt]),o}function wl(e){return io.call(e)}});var lo=_(We=>{"use strict";Object.defineProperty(We,"__esModule",{value:!0});We.merge=void 0;var so=oo(),Ml=20;function xl(...e){let t=e.shift(),r=new WeakMap;for(;e.length>0;)t=uo(t,e.shift(),0,r);return t}We.merge=xl;function _n(e){return Ke(e)?e.slice():e}function uo(e,t,r=0,n){let o;if(!(r>Ml)){if(r++,Xe(e)||Xe(t)||co(t))o=_n(t);else if(Ke(e)){if(o=e.slice(),Ke(t))for(let i=0,a=t.length;i<a;i++)o.push(_n(t[i]));else if(le(t)){let i=Object.keys(t);for(let a=0,u=i.length;a<u;a++){let c=i[a];o[c]=_n(t[c])}}}else if(le(e))if(le(t)){if(!Dl(e,t))return t;o=Object.assign({},e);let i=Object.keys(t);for(let a=0,u=i.length;a<u;a++){let c=i[a],s=t[c];if(Xe(s))typeof s>"u"?delete o[c]:o[c]=s;else{let f=o[c],p=s;if(ao(e,c,n)||ao(t,c,n))delete o[c];else{if(le(f)&&le(p)){let d=n.get(f)||[],m=n.get(p)||[];d.push({obj:e,key:c}),m.push({obj:t,key:c}),n.set(f,d),n.set(p,m)}o[c]=uo(o[c],s,r,n)}}}}else o=t;return o}}function ao(e,t,r){let n=r.get(e[t])||[];for(let o=0,i=n.length;o<i;o++){let a=n[o];if(a.key===t&&a.obj===e)return!0}return!1}function Ke(e){return Array.isArray(e)}function co(e){return typeof e=="function"}function le(e){return!Xe(e)&&!Ke(e)&&!co(e)&&typeof e=="object"}function Xe(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function Dl(e,t){return!(!(0,so.isPlainObject)(e)||!(0,so.isPlainObject)(t))}});var fo=_(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.callWithTimeout=Ft.TimeoutError=void 0;var Ye=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};Ft.TimeoutError=Ye;function Ul(e,t){let r,n=new Promise(function(i,a){r=setTimeout(function(){a(new Ye("Operation timed out."))},t)});return Promise.race([e,n]).then(o=>(clearTimeout(r),o),o=>{throw clearTimeout(r),o})}Ft.callWithTimeout=Ul});var _o=_(jt=>{"use strict";Object.defineProperty(jt,"__esModule",{value:!0});jt.isUrlIgnored=jt.urlMatches=void 0;function po(e,t){return typeof t=="string"?e===t:!!e.match(t)}jt.urlMatches=po;function Bl(e,t){if(!t)return!1;for(let r of t)if(po(e,r))return!0;return!1}jt.isUrlIgnored=Bl});var ho=_(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.isWrapped=void 0;function Vl(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}ze.isWrapped=Vl});var Eo=_($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});$e.Deferred=void 0;var hn=class{constructor(){this._promise=new Promise((t,r)=>{this._resolve=t,this._reject=r})}get promise(){return this._promise}resolve(t){this._resolve(t)}reject(t){this._reject(t)}};$e.Deferred=hn});var mo=_(Qe=>{"use strict";Object.defineProperty(Qe,"__esModule",{value:!0});Qe.BindOnceFuture=void 0;var Gl=Eo(),En=class{constructor(t,r){this._callback=t,this._that=r,this._isCalled=!1,this._deferred=new Gl.Deferred}get isCalled(){return this._isCalled}get promise(){return this._deferred.promise}call(...t){if(!this._isCalled){this._isCalled=!0;try{Promise.resolve(this._callback.call(this._that,...t)).then(r=>this._deferred.resolve(r),r=>this._deferred.reject(r))}catch(r){this._deferred.reject(r)}}return this._deferred.promise}};Qe.BindOnceFuture=En});var So=_(Je=>{"use strict";Object.defineProperty(Je,"__esModule",{value:!0});Je._export=void 0;var To=(E(),w(l)),Hl=ie();function Fl(e,t){return new Promise(r=>{To.context.with((0,Hl.suppressTracing)(To.context.active()),()=>{e.export(t,n=>{r(n)})})})}Je._export=Fl});var P=_(S=>{"use strict";var jl=S&&S.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),R=S&&S.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&jl(t,e,r)};Object.defineProperty(S,"__esModule",{value:!0});S.internal=S.baggageUtils=void 0;R(pi(),S);R(di(),S);R(Ti(),S);R(qr(),S);R(kr(),S);R(Ui(),S);R(Vi(),S);R(Gi(),S);S.baggageUtils=Vr();R(zr(),S);R(Fi(),S);R(Yi(),S);R($i(),S);R(Qi(),S);R(an(),S);R(cn(),S);R(Zi(),S);R(to(),S);R(ie(),S);R(rn(),S);R(be(),S);R(lo(),S);R(Xr(),S);R(fo(),S);R(_o(),S);R(ho(),S);R(mo(),S);R(Yr(),S);var kl=So();S.internal={_export:kl._export}});var Ho=_(St=>{"use strict";Object.defineProperty(St,"__esModule",{value:!0});St.disableInstrumentations=St.enableInstrumentations=St.parseInstrumentationOptions=void 0;function Go(e=[]){let t=[];for(let r=0,n=e.length;r<n;r++){let o=e[r];if(Array.isArray(o)){let i=Go(o);t=t.concat(i.instrumentations)}else typeof o=="function"?t.push(new o):o.instrumentationName&&t.push(o)}return{instrumentations:t}}St.parseInstrumentationOptions=Go;function af(e,t,r){for(let n=0,o=e.length;n<o;n++){let i=e[n];t&&i.setTracerProvider(t),r&&i.setMeterProvider(r),i.getConfig().enabled||i.enable()}}St.enableInstrumentations=af;function uf(e){e.forEach(t=>t.disable())}St.disableInstrumentations=uf});var jo=_(ir=>{"use strict";Object.defineProperty(ir,"__esModule",{value:!0});ir.registerInstrumentations=void 0;var Fo=(E(),w(l)),Tn=Ho();function cf(e){let{instrumentations:t}=(0,Tn.parseInstrumentationOptions)(e.instrumentations),r=e.tracerProvider||Fo.trace.getTracerProvider(),n=e.meterProvider||Fo.metrics.getMeterProvider();return(0,Tn.enableInstrumentations)(t,r,n),()=>{(0,Tn.disableInstrumentations)(t)}}ir.registerInstrumentations=cf});var pe={};import*as qE from"async_hooks";var Bs=Dr(()=>{z(pe,qE)});var de={};import*as XE from"events";var Vs=Dr(()=>{z(de,XE)});var Gs=_(_r=>{"use strict";Object.defineProperty(_r,"__esModule",{value:!0});_r.AbstractAsyncHooksContextManager=void 0;var Vf=(Vs(),w(de)),Gf=["addListener","on","once","prependListener","prependOnceListener"],Cn=class{constructor(){this._kOtListeners=Symbol("OtListeners"),this._wrapped=!1}bind(t,r){return r instanceof Vf.EventEmitter?this._bindEventEmitter(t,r):typeof r=="function"?this._bindFunction(t,r):r}_bindFunction(t,r){let n=this,o=function(...i){return n.with(t,()=>r.apply(this,i))};return Object.defineProperty(o,"length",{enumerable:!1,configurable:!0,writable:!1,value:r.length}),o}_bindEventEmitter(t,r){return this._getPatchMap(r)!==void 0||(this._createPatchMap(r),Gf.forEach(o=>{r[o]!==void 0&&(r[o]=this._patchAddListener(r,r[o],t))}),typeof r.removeListener=="function"&&(r.removeListener=this._patchRemoveListener(r,r.removeListener)),typeof r.off=="function"&&(r.off=this._patchRemoveListener(r,r.off)),typeof r.removeAllListeners=="function"&&(r.removeAllListeners=this._patchRemoveAllListeners(r,r.removeAllListeners))),r}_patchRemoveListener(t,r){let n=this;return function(o,i){var a;let u=(a=n._getPatchMap(t))===null||a===void 0?void 0:a[o];if(u===void 0)return r.call(this,o,i);let c=u.get(i);return r.call(this,o,c||i)}}_patchRemoveAllListeners(t,r){let n=this;return function(o){let i=n._getPatchMap(t);return i!==void 0&&(arguments.length===0?n._createPatchMap(t):i[o]!==void 0&&delete i[o]),r.apply(this,arguments)}}_patchAddListener(t,r,n){let o=this;return function(i,a){if(o._wrapped)return r.call(this,i,a);let u=o._getPatchMap(t);u===void 0&&(u=o._createPatchMap(t));let c=u[i];c===void 0&&(c=new WeakMap,u[i]=c);let s=o.bind(n,a);c.set(a,s),o._wrapped=!0;try{return r.call(this,i,s)}finally{o._wrapped=!1}}}_createPatchMap(t){let r=Object.create(null);return t[this._kOtListeners]=r,r}_getPatchMap(t){return t[this._kOtListeners]}};_r.AbstractAsyncHooksContextManager=Cn});var Hs=_(hr=>{"use strict";Object.defineProperty(hr,"__esModule",{value:!0});hr.AsyncLocalStorageContextManager=void 0;var Hf=(E(),w(l)),Ff=(Bs(),w(pe)),jf=Gs(),Nn=class extends jf.AbstractAsyncHooksContextManager{constructor(){super(),this._asyncLocalStorage=new Ff.AsyncLocalStorage}active(){var t;return(t=this._asyncLocalStorage.getStore())!==null&&t!==void 0?t:Hf.ROOT_CONTEXT}with(t,r,n,...o){let i=n==null?r:r.bind(n);return this._asyncLocalStorage.run(t,i,...o)}enable(){return this}disable(){return this._asyncLocalStorage.disable(),this}};hr.AsyncLocalStorageContextManager=Nn});var Bn=_(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.toAnyValue=gt.toKeyValue=gt.toAttributes=void 0;function Yf(e){return Object.keys(e).map(t=>Dn(t,e[t]))}gt.toAttributes=Yf;function Dn(e,t){return{key:e,value:Un(t)}}gt.toKeyValue=Dn;function Un(e){let 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(Un)}}:t==="object"&&e!=null?{kvlistValue:{values:Object.entries(e).map(([r,n])=>Dn(r,n))}}:{}}gt.toAnyValue=Un});var la=_(yt=>{"use strict";Object.defineProperty(yt,"__esModule",{value:!0});yt.toOtlpSpanEvent=yt.toOtlpLink=yt.sdkSpanToOtlpSpan=void 0;var Vn=Bn();function zf(e,t){var r;let n=e.spanContext(),o=e.status;return{traceId:t.encodeSpanContext(n.traceId),spanId:t.encodeSpanContext(n.spanId),parentSpanId:t.encodeOptionalSpanContext(e.parentSpanId),traceState:(r=n.traceState)===null||r===void 0?void 0:r.serialize(),name:e.name,kind:e.kind==null?0:e.kind+1,startTimeUnixNano:t.encodeHrTime(e.startTime),endTimeUnixNano:t.encodeHrTime(e.endTime),attributes:(0,Vn.toAttributes)(e.attributes),droppedAttributesCount:e.droppedAttributesCount,events:e.events.map(i=>ca(i,t)),droppedEventsCount:e.droppedEventsCount,status:{code:o.code,message:o.message},links:e.links.map(i=>ua(i,t)),droppedLinksCount:e.droppedLinksCount}}yt.sdkSpanToOtlpSpan=zf;function ua(e,t){var r;return{attributes:e.attributes?(0,Vn.toAttributes)(e.attributes):[],spanId:t.encodeSpanContext(e.context.spanId),traceId:t.encodeSpanContext(e.context.traceId),traceState:(r=e.context.traceState)===null||r===void 0?void 0:r.serialize(),droppedAttributesCount:e.droppedAttributesCount||0}}yt.toOtlpLink=ua;function ca(e,t){return{attributes:e.attributes?(0,Vn.toAttributes)(e.attributes):[],name:e.name,timeUnixNano:t.encodeHrTime(e.time),droppedAttributesCount:e.droppedAttributesCount||0}}yt.toOtlpSpanEvent=ca});var ha=_(W=>{"use strict";Object.defineProperty(W,"__esModule",{value:!0});W.getOtlpEncoder=W.encodeAsString=W.encodeAsLongBits=W.toLongBits=W.hrTimeToNanos=void 0;var Tr=P(),$f=BigInt(1e9);function Gn(e){return BigInt(e[0])*$f+BigInt(e[1])}W.hrTimeToNanos=Gn;function pa(e){let t=Number(BigInt.asUintN(32,e)),r=Number(BigInt.asUintN(32,e>>BigInt(32)));return{low:t,high:r}}W.toLongBits=pa;function Hn(e){let t=Gn(e);return pa(t)}W.encodeAsLongBits=Hn;function da(e){return Gn(e).toString()}W.encodeAsString=da;var Qf=typeof BigInt<"u"?da:Tr.hrTimeToNanoseconds;function fa(e){return e}function _a(e){if(e!==void 0)return(0,Tr.hexToBase64)(e)}var Jf={encodeHrTime:Hn,encodeSpanContext:Tr.hexToBase64,encodeOptionalSpanContext:_a};function Zf(e){var t,r;if(e===void 0)return Jf;let n=(t=e.useLongBits)!==null&&t!==void 0?t:!0,o=(r=e.useHex)!==null&&r!==void 0?r:!1;return{encodeHrTime:n?Hn:Qf,encodeSpanContext:o?fa:Tr.hexToBase64,encodeOptionalSpanContext:o?fa:_a}}W.getOtlpEncoder=Zf});var Fn=_(Sr=>{"use strict";Object.defineProperty(Sr,"__esModule",{value:!0});Sr.createExportTraceServiceRequest=void 0;var tp=Bn(),ep=la(),rp=ha();function np(e,t){let r=(0,rp.getOtlpEncoder)(t);return{resourceSpans:op(e,r)}}Sr.createExportTraceServiceRequest=np;function ip(e){let t=new Map;for(let r of e){let n=t.get(r.resource);n||(n=new Map,t.set(r.resource,n));let o=`${r.instrumentationLibrary.name}@${r.instrumentationLibrary.version||""}:${r.instrumentationLibrary.schemaUrl||""}`,i=n.get(o);i||(i=[],n.set(o,i)),i.push(r)}return t}function op(e,t){let r=ip(e),n=[],o=r.entries(),i=o.next();for(;!i.done;){let[a,u]=i.value,c=[],s=u.values(),f=s.next();for(;!f.done;){let d=f.value;if(d.length>0){let{name:m,version:g,schemaUrl:C}=d[0].instrumentationLibrary,M=d.map(T=>(0,ep.sdkSpanToOtlpSpan)(T,t));c.push({scope:{name:m,version:g},spans:M,schemaUrl:C})}f=s.next()}let p={resource:{attributes:(0,tp.toAttributes)(a.attributes),droppedAttributesCount:0},scopeSpans:c,schemaUrl:void 0};n.push(p),i=o.next()}return n}});var Ta=_(I=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0});I.parseRetryAfterToMills=I.isExportRetryable=I.invalidTimeout=I.configureExporterTimeout=I.appendRootPathToUrlIfNeeded=I.appendResourcePathToUrl=I.parseHeaders=I.DEFAULT_EXPORT_BACKOFF_MULTIPLIER=I.DEFAULT_EXPORT_MAX_BACKOFF=I.DEFAULT_EXPORT_INITIAL_BACKOFF=I.DEFAULT_EXPORT_MAX_ATTEMPTS=void 0;var jn=(E(),w(l)),Ea=P(),ma=1e4;I.DEFAULT_EXPORT_MAX_ATTEMPTS=5;I.DEFAULT_EXPORT_INITIAL_BACKOFF=1e3;I.DEFAULT_EXPORT_MAX_BACKOFF=5e3;I.DEFAULT_EXPORT_BACKOFF_MULTIPLIER=1.5;function sp(e={}){let t={};return Object.entries(e).forEach(([r,n])=>{typeof n<"u"?t[r]=String(n):jn.diag.warn(`Header "${r}" has wrong value and will be ignored`)}),t}I.parseHeaders=sp;function ap(e,t){return e.endsWith("/")||(e=e+"/"),e+t}I.appendResourcePathToUrl=ap;function up(e){try{let t=new URL(e);return t.pathname===""&&(t.pathname=t.pathname+"/"),t.toString()}catch{return jn.diag.warn(`Could not parse export URL: '${e}'`),e}}I.appendRootPathToUrlIfNeeded=up;function cp(e){return typeof e=="number"?e<=0?kn(e,ma):e:lp()}I.configureExporterTimeout=cp;function lp(){var e;let t=Number((e=(0,Ea.getEnv)().OTEL_EXPORTER_OTLP_TRACES_TIMEOUT)!==null&&e!==void 0?e:(0,Ea.getEnv)().OTEL_EXPORTER_OTLP_TIMEOUT);return t<=0?kn(t,ma):t}function kn(e,t){return jn.diag.warn("Timeout must be greater than 0",e),t}I.invalidTimeout=kn;function fp(e){return[429,502,503,504].includes(e)}I.isExportRetryable=fp;function pp(e){if(e==null)return-1;let t=Number.parseInt(e,10);if(Number.isInteger(t))return t>0?t*1e3:-1;let r=new Date(e).getTime()-Date.now();return r>=0?r:0}I.parseRetryAfterToMills=pp});var ga=_(gr=>{"use strict";Object.defineProperty(gr,"__esModule",{value:!0});gr.OTLPExporterBase=void 0;var Sa=(E(),w(l)),_e=P(),dp=Ta(),qn=class{constructor(t={}){this._sendingPromises=[],this.url=this.getDefaultUrl(t),typeof t.hostname=="string"&&(this.hostname=t.hostname),this.shutdown=this.shutdown.bind(this),this._shutdownOnce=new _e.BindOnceFuture(this._shutdown,this),this._concurrencyLimit=typeof t.concurrencyLimit=="number"?t.concurrencyLimit:30,this.timeoutMillis=(0,dp.configureExporterTimeout)(t.timeoutMillis),this.onInit(t)}export(t,r){if(this._shutdownOnce.isCalled){r({code:_e.ExportResultCode.FAILED,error:new Error("Exporter has been shutdown")});return}if(this._sendingPromises.length>=this._concurrencyLimit){r({code:_e.ExportResultCode.FAILED,error:new Error("Concurrent export limit reached")});return}this._export(t).then(()=>{r({code:_e.ExportResultCode.SUCCESS})}).catch(n=>{r({code:_e.ExportResultCode.FAILED,error:n})})}_export(t){return new Promise((r,n)=>{try{Sa.diag.debug("items to be sent",t),this.send(t,r,n)}catch(o){n(o)}})}shutdown(){return this._shutdownOnce.call()}forceFlush(){return Promise.all(this._sendingPromises).then(()=>{})}_shutdown(){return Sa.diag.debug("shutdown started"),this.onShutdown(),this.forceFlush()}};gr.OTLPExporterBase=qn});var Ra=_((ym,Aa)=>{"use strict";Aa.exports=Ep;function Ep(e,t){for(var r=new Array(arguments.length-1),n=0,o=2,i=!0;o<arguments.length;)r[n++]=arguments[o++];return new Promise(function(u,c){r[n]=function(f){if(i)if(i=!1,f)c(f);else{for(var p=new Array(arguments.length-1),d=0;d<p.length;)p[d++]=arguments[d];u.apply(null,p)}};try{e.apply(t||null,r)}catch(s){i&&(i=!1,c(s))}})}});var Pa=_(La=>{"use strict";var vr=La;vr.length=function(t){var r=t.length;if(!r)return 0;for(var n=0;--r%4>1&&t.charAt(r)==="=";)++n;return Math.ceil(t.length*3)/4-n};var Jt=new Array(64),ba=new Array(123);for(Z=0;Z<64;)ba[Jt[Z]=Z<26?Z+65:Z<52?Z+71:Z<62?Z-4:Z-59|43]=Z++;var Z;vr.encode=function(t,r,n){for(var o=null,i=[],a=0,u=0,c;r<n;){var s=t[r++];switch(u){case 0:i[a++]=Jt[s>>2],c=(s&3)<<4,u=1;break;case 1:i[a++]=Jt[c|s>>4],c=(s&15)<<2,u=2;break;case 2:i[a++]=Jt[c|s>>6],i[a++]=Jt[s&63],u=0;break}a>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,i)),a=0)}return u&&(i[a++]=Jt[c],i[a++]=61,u===1&&(i[a++]=61)),o?(a&&o.push(String.fromCharCode.apply(String,i.slice(0,a))),o.join("")):String.fromCharCode.apply(String,i.slice(0,a))};var Oa="invalid encoding";vr.decode=function(t,r,n){for(var o=n,i=0,a,u=0;u<t.length;){var c=t.charCodeAt(u++);if(c===61&&i>1)break;if((c=ba[c])===void 0)throw Error(Oa);switch(i){case 0:a=c,i=1;break;case 1:r[n++]=a<<2|(c&48)>>4,a=c,i=2;break;case 2:r[n++]=(a&15)<<4|(c&60)>>2,a=c,i=3;break;case 3:r[n++]=(a&3)<<6|c,i=0;break}}if(i===1)throw Error(Oa);return n-o};vr.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}});var Ca=_((Am,Ia)=>{"use strict";Ia.exports=Ar;function Ar(){this._listeners={}}Ar.prototype.on=function(t,r,n){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:r,ctx:n||this}),this};Ar.prototype.off=function(t,r){if(t===void 0)this._listeners={};else if(r===void 0)this._listeners[t]=[];else for(var n=this._listeners[t],o=0;o<n.length;)n[o].fn===r?n.splice(o,1):++o;return this};Ar.prototype.emit=function(t){var r=this._listeners[t];if(r){for(var n=[],o=1;o<arguments.length;)n.push(arguments[o++]);for(o=0;o<r.length;)r[o].fn.apply(r[o++].ctx,n)}return this}});var Ba=_((Rm,Ua)=>{"use strict";Ua.exports=Na(Na);function Na(e){return typeof Float32Array<"u"?function(){var t=new Float32Array([-0]),r=new Uint8Array(t.buffer),n=r[3]===128;function o(c,s,f){t[0]=c,s[f]=r[0],s[f+1]=r[1],s[f+2]=r[2],s[f+3]=r[3]}function i(c,s,f){t[0]=c,s[f]=r[3],s[f+1]=r[2],s[f+2]=r[1],s[f+3]=r[0]}e.writeFloatLE=n?o:i,e.writeFloatBE=n?i:o;function a(c,s){return r[0]=c[s],r[1]=c[s+1],r[2]=c[s+2],r[3]=c[s+3],t[0]}function u(c,s){return r[3]=c[s],r[2]=c[s+1],r[1]=c[s+2],r[0]=c[s+3],t[0]}e.readFloatLE=n?a:u,e.readFloatBE=n?u:a}():function(){function t(n,o,i,a){var u=o<0?1:0;if(u&&(o=-o),o===0)n(1/o>0?0:2147483648,i,a);else if(isNaN(o))n(2143289344,i,a);else if(o>34028234663852886e22)n((u<<31|2139095040)>>>0,i,a);else if(o<11754943508222875e-54)n((u<<31|Math.round(o/1401298464324817e-60))>>>0,i,a);else{var c=Math.floor(Math.log(o)/Math.LN2),s=Math.round(o*Math.pow(2,-c)*8388608)&8388607;n((u<<31|c+127<<23|s)>>>0,i,a)}}e.writeFloatLE=t.bind(null,wa),e.writeFloatBE=t.bind(null,Ma);function r(n,o,i){var a=n(o,i),u=(a>>31)*2+1,c=a>>>23&255,s=a&8388607;return c===255?s?NaN:u*(1/0):c===0?u*1401298464324817e-60*s:u*Math.pow(2,c-150)*(s+8388608)}e.readFloatLE=r.bind(null,xa),e.readFloatBE=r.bind(null,Da)}(),typeof Float64Array<"u"?function(){var t=new Float64Array([-0]),r=new Uint8Array(t.buffer),n=r[7]===128;function o(c,s,f){t[0]=c,s[f]=r[0],s[f+1]=r[1],s[f+2]=r[2],s[f+3]=r[3],s[f+4]=r[4],s[f+5]=r[5],s[f+6]=r[6],s[f+7]=r[7]}function i(c,s,f){t[0]=c,s[f]=r[7],s[f+1]=r[6],s[f+2]=r[5],s[f+3]=r[4],s[f+4]=r[3],s[f+5]=r[2],s[f+6]=r[1],s[f+7]=r[0]}e.writeDoubleLE=n?o:i,e.writeDoubleBE=n?i:o;function a(c,s){return r[0]=c[s],r[1]=c[s+1],r[2]=c[s+2],r[3]=c[s+3],r[4]=c[s+4],r[5]=c[s+5],r[6]=c[s+6],r[7]=c[s+7],t[0]}function u(c,s){return r[7]=c[s],r[6]=c[s+1],r[5]=c[s+2],r[4]=c[s+3],r[3]=c[s+4],r[2]=c[s+5],r[1]=c[s+6],r[0]=c[s+7],t[0]}e.readDoubleLE=n?a:u,e.readDoubleBE=n?u:a}():function(){function t(n,o,i,a,u,c){var s=a<0?1:0;if(s&&(a=-a),a===0)n(0,u,c+o),n(1/a>0?0:2147483648,u,c+i);else if(isNaN(a))n(0,u,c+o),n(2146959360,u,c+i);else if(a>17976931348623157e292)n(0,u,c+o),n((s<<31|2146435072)>>>0,u,c+i);else{var f;if(a<22250738585072014e-324)f=a/5e-324,n(f>>>0,u,c+o),n((s<<31|f/4294967296)>>>0,u,c+i);else{var p=Math.floor(Math.log(a)/Math.LN2);p===1024&&(p=1023),f=a*Math.pow(2,-p),n(f*4503599627370496>>>0,u,c+o),n((s<<31|p+1023<<20|f*1048576&1048575)>>>0,u,c+i)}}}e.writeDoubleLE=t.bind(null,wa,0,4),e.writeDoubleBE=t.bind(null,Ma,4,0);function r(n,o,i,a,u){var c=n(a,u+o),s=n(a,u+i),f=(s>>31)*2+1,p=s>>>20&2047,d=4294967296*(s&1048575)+c;return p===2047?d?NaN:f*(1/0):p===0?f*5e-324*d:f*Math.pow(2,p-1075)*(d+4503599627370496)}e.readDoubleLE=r.bind(null,xa,0,4),e.readDoubleBE=r.bind(null,Da,4,0)}(),e}function wa(e,t,r){t[r]=e&255,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}function Ma(e,t,r){t[r]=e>>>24,t[r+1]=e>>>16&255,t[r+2]=e>>>8&255,t[r+3]=e&255}function xa(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function Da(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}});var Ga=_((Om,Va)=>{"use strict";Va.exports=mp;function mp(e){return null}});var Fa=_(Ha=>{"use strict";var Kn=Ha;Kn.length=function(t){for(var r=0,n=0,o=0;o<t.length;++o)n=t.charCodeAt(o),n<128?r+=1:n<2048?r+=2:(n&64512)===55296&&(t.charCodeAt(o+1)&64512)===56320?(++o,r+=4):r+=3;return r};Kn.read=function(t,r,n){var o=n-r;if(o<1)return"";for(var i=null,a=[],u=0,c;r<n;)c=t[r++],c<128?a[u++]=c:c>191&&c<224?a[u++]=(c&31)<<6|t[r++]&63:c>239&&c<365?(c=((c&7)<<18|(t[r++]&63)<<12|(t[r++]&63)<<6|t[r++]&63)-65536,a[u++]=55296+(c>>10),a[u++]=56320+(c&1023)):a[u++]=(c&15)<<12|(t[r++]&63)<<6|t[r++]&63,u>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,a)),u=0);return i?(u&&i.push(String.fromCharCode.apply(String,a.slice(0,u))),i.join("")):String.fromCharCode.apply(String,a.slice(0,u))};Kn.write=function(t,r,n){for(var o=n,i,a,u=0;u<t.length;++u)i=t.charCodeAt(u),i<128?r[n++]=i:i<2048?(r[n++]=i>>6|192,r[n++]=i&63|128):(i&64512)===55296&&((a=t.charCodeAt(u+1))&64512)===56320?(i=65536+((i&1023)<<10)+(a&1023),++u,r[n++]=i>>18|240,r[n++]=i>>12&63|128,r[n++]=i>>6&63|128,r[n++]=i&63|128):(r[n++]=i>>12|224,r[n++]=i>>6&63|128,r[n++]=i&63|128);return n-o}});var ka=_((Lm,ja)=>{"use strict";ja.exports=Tp;function Tp(e,t,r){var n=r||8192,o=n>>>1,i=null,a=n;return function(c){if(c<1||c>o)return e(c);a+c>n&&(i=e(n),a=0);var s=t.call(i,a,a+=c);return a&7&&(a=(a|7)+1),s}}});var Xa=_((Pm,qa)=>{"use strict";qa.exports=D;var he=At();function D(e,t){this.lo=e>>>0,this.hi=t>>>0}var Dt=D.zero=new D(0,0);Dt.toNumber=function(){return 0};Dt.zzEncode=Dt.zzDecode=function(){return this};Dt.length=function(){return 1};var Sp=D.zeroHash="\0\0\0\0\0\0\0\0";D.fromNumber=function(t){if(t===0)return Dt;var r=t<0;r&&(t=-t);var n=t>>>0,o=(t-n)/4294967296>>>0;return r&&(o=~o>>>0,n=~n>>>0,++n>4294967295&&(n=0,++o>4294967295&&(o=0))),new D(n,o)};D.from=function(t){if(typeof t=="number")return D.fromNumber(t);if(he.isString(t))if(he.Long)t=he.Long.fromString(t);else return D.fromNumber(parseInt(t,10));return t.low||t.high?new D(t.low>>>0,t.high>>>0):Dt};D.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var r=~this.lo+1>>>0,n=~this.hi>>>0;return r||(n=n+1>>>0),-(r+n*4294967296)}return this.lo+this.hi*4294967296};D.prototype.toLong=function(t){return he.Long?new he.Long(this.lo|0,this.hi|0,!!t):{low:this.lo|0,high:this.hi|0,unsigned:!!t}};var vt=String.prototype.charCodeAt;D.fromHash=function(t){return t===Sp?Dt:new D((vt.call(t,0)|vt.call(t,1)<<8|vt.call(t,2)<<16|vt.call(t,3)<<24)>>>0,(vt.call(t,4)|vt.call(t,5)<<8|vt.call(t,6)<<16|vt.call(t,7)<<24)>>>0)};D.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)};D.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this};D.prototype.zzDecode=function(){var t=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this};D.prototype.length=function(){var t=this.lo,r=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return n===0?r===0?t<16384?t<128?1:2:t<2097152?3:4:r<16384?r<128?5:6:r<2097152?7:8:n<128?9:10}});var At=_(Wn=>{"use strict";var h=Wn;h.asPromise=Ra();h.base64=Pa();h.EventEmitter=Ca();h.float=Ba();h.inquire=Ga();h.utf8=Fa();h.pool=ka();h.LongBits=Xa();h.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node);h.global=h.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||Wn;h.emptyArray=Object.freeze?Object.freeze([]):[];h.emptyObject=Object.freeze?Object.freeze({}):{};h.isInteger=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};h.isString=function(t){return typeof t=="string"||t instanceof String};h.isObject=function(t){return t&&typeof t=="object"};h.isset=h.isSet=function(t,r){var n=t[r];return n!=null&&t.hasOwnProperty(r)?typeof n!="object"||(Array.isArray(n)?n.length:Object.keys(n).length)>0:!1};h.Buffer=function(){try{var e=h.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch{return null}}();h._Buffer_from=null;h._Buffer_allocUnsafe=null;h.newBuffer=function(t){return typeof t=="number"?h.Buffer?h._Buffer_allocUnsafe(t):new h.Array(t):h.Buffer?h._Buffer_from(t):typeof Uint8Array>"u"?t:new Uint8Array(t)};h.Array=typeof Uint8Array<"u"?Uint8Array:Array;h.Long=h.global.dcodeIO&&h.global.dcodeIO.Long||h.global.Long||h.inquire("long");h.key2Re=/^true|false|0|1$/;h.key32Re=/^-?(?:0|[1-9][0-9]*)$/;h.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;h.longToHash=function(t){return t?h.LongBits.from(t).toHash():h.LongBits.zeroHash};h.longFromHash=function(t,r){var n=h.LongBits.fromHash(t);return h.Long?h.Long.fromBits(n.lo,n.hi,r):n.toNumber(!!r)};function Ka(e,t,r){for(var n=Object.keys(t),o=0;o<n.length;++o)(e[n[o]]===void 0||!r)&&(e[n[o]]=t[n[o]]);return e}h.merge=Ka;h.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)};function Wa(e){function t(r,n){if(!(this instanceof t))return new t(r,n);Object.defineProperty(this,"message",{get:function(){return r}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:new Error().stack||""}),n&&Ka(this,n)}return t.prototype=Object.create(Error.prototype,{constructor:{value:t,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return e},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),t}h.newError=Wa;h.ProtocolError=Wa("ProtocolError");h.oneOfGetter=function(t){for(var r={},n=0;n<t.length;++n)r[t[n]]=1;return function(){for(var o=Object.keys(this),i=o.length-1;i>-1;--i)if(r[o[i]]===1&&this[o[i]]!==void 0&&this[o[i]]!==null)return o[i]}};h.oneOfSetter=function(t){return function(r){for(var n=0;n<t.length;++n)t[n]!==r&&delete this[t[n]]}};h.toJSONOptions={longs:String,enums:String,bytes:String,json:!0};h._configure=function(){var e=h.Buffer;if(!e){h._Buffer_from=h._Buffer_allocUnsafe=null;return}h._Buffer_from=e.from!==Uint8Array.from&&e.from||function(r,n){return new e(r,n)},h._Buffer_allocUnsafe=e.allocUnsafe||function(r){return new e(r)}}});var ti=_((Cm,Qa)=>{"use strict";Qa.exports=y;var Y=At(),Yn,Rr=Y.LongBits,Ya=Y.base64,za=Y.utf8;function Ee(e,t,r){this.fn=e,this.len=t,this.next=void 0,this.val=r}function $n(){}function gp(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function y(){this.len=0,this.head=new Ee($n,0,0),this.tail=this.head,this.states=null}var $a=function(){return Y.Buffer?function(){return(y.create=function(){return new Yn})()}:function(){return new y}};y.create=$a();y.alloc=function(t){return new Y.Array(t)};Y.Array!==Array&&(y.alloc=Y.pool(y.alloc,Y.Array.prototype.subarray));y.prototype._push=function(t,r,n){return this.tail=this.tail.next=new Ee(t,r,n),this.len+=r,this};function Qn(e,t,r){t[r]=e&255}function yp(e,t,r){for(;e>127;)t[r++]=e&127|128,e>>>=7;t[r]=e}function Jn(e,t){this.len=e,this.next=void 0,this.val=t}Jn.prototype=Object.create(Ee.prototype);Jn.prototype.fn=yp;y.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new Jn((t=t>>>0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this};y.prototype.int32=function(t){return t<0?this._push(Zn,10,Rr.fromNumber(t)):this.uint32(t)};y.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)};function Zn(e,t,r){for(;e.hi;)t[r++]=e.lo&127|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[r++]=e.lo&127|128,e.lo=e.lo>>>7;t[r++]=e.lo}y.prototype.uint64=function(t){var r=Rr.from(t);return this._push(Zn,r.length(),r)};y.prototype.int64=y.prototype.uint64;y.prototype.sint64=function(t){var r=Rr.from(t).zzEncode();return this._push(Zn,r.length(),r)};y.prototype.bool=function(t){return this._push(Qn,1,t?1:0)};function zn(e,t,r){t[r]=e&255,t[r+1]=e>>>8&255,t[r+2]=e>>>16&255,t[r+3]=e>>>24}y.prototype.fixed32=function(t){return this._push(zn,4,t>>>0)};y.prototype.sfixed32=y.prototype.fixed32;y.prototype.fixed64=function(t){var r=Rr.from(t);return this._push(zn,4,r.lo)._push(zn,4,r.hi)};y.prototype.sfixed64=y.prototype.fixed64;y.prototype.float=function(t){return this._push(Y.float.writeFloatLE,4,t)};y.prototype.double=function(t){return this._push(Y.float.writeDoubleLE,8,t)};var vp=Y.Array.prototype.set?function(t,r,n){r.set(t,n)}:function(t,r,n){for(var o=0;o<t.length;++o)r[n+o]=t[o]};y.prototype.bytes=function(t){var r=t.length>>>0;if(!r)return this._push(Qn,1,0);if(Y.isString(t)){var n=y.alloc(r=Ya.length(t));Ya.decode(t,n,0),t=n}return this.uint32(r)._push(vp,r,t)};y.prototype.string=function(t){var r=za.length(t);return r?this.uint32(r)._push(za.write,r,t):this._push(Qn,1,0)};y.prototype.fork=function(){return this.states=new gp(this),this.head=this.tail=new Ee($n,0,0),this.len=0,this};y.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new Ee($n,0,0),this.len=0),this};y.prototype.ldelim=function(){var t=this.head,r=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=t.next,this.tail=r,this.len+=n),this};y.prototype.finish=function(){for(var t=this.head.next,r=this.constructor.alloc(this.len),n=0;t;)t.fn(t.val,r,n),n+=t.len,t=t.next;return r};y._configure=function(e){Yn=e,y.create=$a(),Yn._configure()}});var tu=_((Nm,Za)=>{"use strict";Za.exports=it;var Ja=ti();(it.prototype=Object.create(Ja.prototype)).constructor=it;var Rt=At();function it(){Ja.call(this)}it._configure=function(){it.alloc=Rt._Buffer_allocUnsafe,it.writeBytesBuffer=Rt.Buffer&&Rt.Buffer.prototype instanceof Uint8Array&&Rt.Buffer.prototype.set.name==="set"?function(t,r,n){r.set(t,n)}:function(t,r,n){if(t.copy)t.copy(r,n,0,t.length);else for(var o=0;o<t.length;)r[n++]=t[o++]}};it.prototype.bytes=function(t){Rt.isString(t)&&(t=Rt._Buffer_from(t,"base64"));var r=t.length>>>0;return this.uint32(r),r&&this._push(it.writeBytesBuffer,r,t),this};function Ap(e,t,r){e.length<40?Rt.utf8.write(e,t,r):t.utf8Write?t.utf8Write(e,r):t.write(e,r)}it.prototype.string=function(t){var r=Rt.Buffer.byteLength(t);return this.uint32(r),r&&this._push(Ap,r,t),this};it._configure()});var ni=_((wm,ou)=>{"use strict";ou.exports=N;var tt=At(),ri,nu=tt.LongBits,Rp=tt.utf8;function et(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function N(e){this.buf=e,this.pos=0,this.len=e.length}var eu=typeof Uint8Array<"u"?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new N(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new N(t);throw Error("illegal buffer")},iu=function(){return tt.Buffer?function(r){return(N.create=function(o){return tt.Buffer.isBuffer(o)?new ri(o):eu(o)})(r)}:eu};N.create=iu();N.prototype._slice=tt.Array.prototype.subarray||tt.Array.prototype.slice;N.prototype.uint32=function(){var t=4294967295;return function(){if(t=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(t=(t|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return t;if((this.pos+=5)>this.len)throw this.pos=this.len,et(this,10);return t}}();N.prototype.int32=function(){return this.uint32()|0};N.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(t&1)|0};function ei(){var e=new nu(0,0),t=0;if(this.len-this.pos>4){for(;t<4;++t)if(e.lo=(e.lo|(this.buf[this.pos]&127)<<t*7)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(this.buf[this.pos]&127)<<28)>>>0,e.hi=(e.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return e;t=0}else{for(;t<3;++t){if(this.pos>=this.len)throw et(this);if(e.lo=(e.lo|(this.buf[this.pos]&127)<<t*7)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(this.buf[this.pos++]&127)<<t*7)>>>0,e}if(this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(this.buf[this.pos]&127)<<t*7+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw et(this);if(e.hi=(e.hi|(this.buf[this.pos]&127)<<t*7+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}N.prototype.bool=function(){return this.uint32()!==0};function Or(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}N.prototype.fixed32=function(){if(this.pos+4>this.len)throw et(this,4);return Or(this.buf,this.pos+=4)};N.prototype.sfixed32=function(){if(this.pos+4>this.len)throw et(this,4);return Or(this.buf,this.pos+=4)|0};function ru(){if(this.pos+8>this.len)throw et(this,8);return new nu(Or(this.buf,this.pos+=4),Or(this.buf,this.pos+=4))}N.prototype.float=function(){if(this.pos+4>this.len)throw et(this,4);var t=tt.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t};N.prototype.double=function(){if(this.pos+8>this.len)throw et(this,4);var t=tt.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t};N.prototype.bytes=function(){var t=this.uint32(),r=this.pos,n=this.pos+t;if(n>this.len)throw et(this,t);if(this.pos+=t,Array.isArray(this.buf))return this.buf.slice(r,n);if(r===n){var o=tt.Buffer;return o?o.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,r,n)};N.prototype.string=function(){var t=this.bytes();return Rp.read(t,0,t.length)};N.prototype.skip=function(t){if(typeof t=="number"){if(this.pos+t>this.len)throw et(this,t);this.pos+=t}else do if(this.pos>=this.len)throw et(this);while(this.buf[this.pos++]&128);return this};N.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(e=this.uint32()&7)!==4;)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this};N._configure=function(e){ri=e,N.create=iu(),ri._configure();var t=tt.Long?"toLong":"toNumber";tt.merge(N.prototype,{int64:function(){return ei.call(this)[t](!1)},uint64:function(){return ei.call(this)[t](!0)},sint64:function(){return ei.call(this).zzDecode()[t](!1)},fixed64:function(){return ru.call(this)[t](!0)},sfixed64:function(){return ru.call(this)[t](!1)}})}});var cu=_((Mm,uu)=>{"use strict";uu.exports=Ut;var au=ni();(Ut.prototype=Object.create(au.prototype)).constructor=Ut;var su=At();function Ut(e){au.call(this,e)}Ut._configure=function(){su.Buffer&&(Ut.prototype._slice=su.Buffer.prototype.slice)};Ut.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))};Ut._configure()});var fu=_((xm,lu)=>{"use strict";lu.exports=me;var ii=At();(me.prototype=Object.create(ii.EventEmitter.prototype)).constructor=me;function me(e,t,r){if(typeof e!="function")throw TypeError("rpcImpl must be a function");ii.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=!!t,this.responseDelimited=!!r}me.prototype.rpcCall=function e(t,r,n,o,i){if(!o)throw TypeError("request must be specified");var a=this;if(!i)return ii.asPromise(e,a,t,r,n,o);if(!a.rpcImpl){setTimeout(function(){i(Error("already ended"))},0);return}try{return a.rpcImpl(t,r[a.requestDelimited?"encodeDelimited":"encode"](o).finish(),function(c,s){if(c)return a.emit("error",c,t),i(c);if(s===null){a.end(!0);return}if(!(s instanceof n))try{s=n[a.responseDelimited?"decodeDelimited":"decode"](s)}catch(f){return a.emit("error",f,t),i(f)}return a.emit("data",s,t),i(null,s)})}catch(u){a.emit("error",u,t),setTimeout(function(){i(u)},0);return}};me.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var du=_(pu=>{"use strict";var Op=pu;Op.Service=fu()});var hu=_((Um,_u)=>{"use strict";_u.exports={}});var Tu=_(mu=>{"use strict";var F=mu;F.build="minimal";F.Writer=ti();F.BufferWriter=tu();F.Reader=ni();F.BufferReader=cu();F.util=At();F.rpc=du();F.roots=hu();F.configure=Eu;function Eu(){F.util._configure(),F.Writer._configure(F.BufferWriter),F.Reader._configure(F.BufferReader)}Eu()});var gu=_((Vm,Su)=>{"use strict";Su.exports=Tu()});E();var Kt=v(P());E();var b=v(P()),ht=v(se());var go="exception";var ql=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Xl=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){a={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i},yo=function(){function e(t,r,n,o,i,a,u,c,s,f){u===void 0&&(u=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:l.SpanStatusCode.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=n,this._spanContext=o,this.parentSpanId=a,this.kind=i,this.links=u;var p=Date.now();this._performanceStartTime=b.otperformance.now(),this._performanceOffset=p-(this._performanceStartTime+(0,b.getTimeOrigin)()),this._startTimeProvided=c!=null,this.startTime=this._getTime(c??p),this.resource=t.resource,this.instrumentationLibrary=t.instrumentationLibrary,this._spanLimits=t.getSpanLimits(),f!=null&&this.setAttributes(f),this._spanProcessor=t.getActiveSpanProcessor(),this._spanProcessor.onStart(this,r),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(t,r){return r==null||this._isSpanEnded()?this:t.length===0?(l.diag.warn("Invalid attribute key: "+t),this):(0,b.isAttributeValue)(r)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,t)?(this._droppedAttributesCount++,this):(this.attributes[t]=this._truncateToSize(r),this):(l.diag.warn("Invalid attribute value set for key: "+t),this)},e.prototype.setAttributes=function(t){var r,n;try{for(var o=ql(Object.entries(t)),i=o.next();!i.done;i=o.next()){var a=Xl(i.value,2),u=a[0],c=a[1];this.setAttribute(u,c)}}catch(s){r={error:s}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return this},e.prototype.addEvent=function(t,r,n){if(this._isSpanEnded())return this;if(this._spanLimits.eventCountLimit===0)return l.diag.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(l.diag.warn("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),(0,b.isTimeInput)(r)&&((0,b.isTimeInput)(n)||(n=r),r=void 0);var o=(0,b.sanitizeAttributes)(r);return this.events.push({name:t,attributes:o,time:this._getTime(n),droppedAttributesCount:0}),this},e.prototype.setStatus=function(t){return this._isSpanEnded()?this:(this.status=t,this)},e.prototype.updateName=function(t){return this._isSpanEnded()?this:(this.name=t,this)},e.prototype.end=function(t){if(this._isSpanEnded()){l.diag.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=(0,b.hrTimeDuration)(this.startTime,this.endTime),this._duration[0]<0&&(l.diag.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._spanProcessor.onEnd(this)},e.prototype._getTime=function(t){if(typeof t=="number"&&t<b.otperformance.now())return(0,b.hrTime)(t+this._performanceOffset);if(typeof t=="number")return(0,b.millisToHrTime)(t);if(t instanceof Date)return(0,b.millisToHrTime)(t.getTime());if((0,b.isTimeInputHrTime)(t))return t;if(this._startTimeProvided)return(0,b.millisToHrTime)(Date.now());var r=b.otperformance.now()-this._performanceStartTime;return(0,b.addHrTimes)(this.startTime,(0,b.millisToHrTime)(r))},e.prototype.isRecording=function(){return this._ended===!1},e.prototype.recordException=function(t,r){var n={};typeof t=="string"?n[ht.SemanticAttributes.EXCEPTION_MESSAGE]=t:t&&(t.code?n[ht.SemanticAttributes.EXCEPTION_TYPE]=t.code.toString():t.name&&(n[ht.SemanticAttributes.EXCEPTION_TYPE]=t.name),t.message&&(n[ht.SemanticAttributes.EXCEPTION_MESSAGE]=t.message),t.stack&&(n[ht.SemanticAttributes.EXCEPTION_STACKTRACE]=t.stack)),n[ht.SemanticAttributes.EXCEPTION_TYPE]||n[ht.SemanticAttributes.EXCEPTION_MESSAGE]?this.addEvent(go,n,r):l.diag.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&&l.diag.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},e.prototype._truncateToLimitUtil=function(t,r){return t.length<=r?t:t.substr(0,r)},e.prototype._truncateToSize=function(t){var r=this,n=this._attributeValueLengthLimit;return n<=0?(l.diag.warn("Attribute value limit must be positive, got "+n),t):typeof t=="string"?this._truncateToLimitUtil(t,n):Array.isArray(t)?t.map(function(o){return typeof o=="string"?r._truncateToLimitUtil(o,n):o}):t},e}();E();var x=v(P());var ot;(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(ot||(ot={}));var st=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:ot.NOT_RECORD}},e.prototype.toString=function(){return"AlwaysOffSampler"},e}();var X=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:ot.RECORD_AND_SAMPLED}},e.prototype.toString=function(){return"AlwaysOnSampler"},e}();E();var vo=v(P());var Et=function(){function e(t){var r,n,o,i;this._root=t.root,this._root||((0,vo.globalErrorHandler)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new X),this._remoteParentSampled=(r=t.remoteParentSampled)!==null&&r!==void 0?r:new X,this._remoteParentNotSampled=(n=t.remoteParentNotSampled)!==null&&n!==void 0?n:new st,this._localParentSampled=(o=t.localParentSampled)!==null&&o!==void 0?o:new X,this._localParentNotSampled=(i=t.localParentNotSampled)!==null&&i!==void 0?i:new st}return e.prototype.shouldSample=function(t,r,n,o,i,a){var u=l.trace.getSpanContext(t);return!u||!(0,l.isSpanContextValid)(u)?this._root.shouldSample(t,r,n,o,i,a):u.isRemote?u.traceFlags&l.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(t,r,n,o,i,a):this._remoteParentNotSampled.shouldSample(t,r,n,o,i,a):u.traceFlags&l.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(t,r,n,o,i,a):this._localParentNotSampled.shouldSample(t,r,n,o,i,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}();E();var kt=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,r){return{decision:(0,l.isValidTraceId)(r)&&this._accumulate(r)<this._upperBound?ot.RECORD_AND_SAMPLED:ot.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 r=0,n=0;n<t.length/8;n++){var o=n*8,i=parseInt(t.slice(o,o+8),16);r=(r^i)>>>0}return r},e}();var Kl=(0,x.getEnv)(),Wl=x.TracesSamplerValues.AlwaysOn,qt=1;function Ze(){return{sampler:mn(Kl),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:(0,x.getEnv)().OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,x.getEnv)().OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:(0,x.getEnv)().OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,x.getEnv)().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:(0,x.getEnv)().OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:(0,x.getEnv)().OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:(0,x.getEnv)().OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:(0,x.getEnv)().OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT}}}function mn(e){switch(e===void 0&&(e=(0,x.getEnv)()),e.OTEL_TRACES_SAMPLER){case x.TracesSamplerValues.AlwaysOn:return new X;case x.TracesSamplerValues.AlwaysOff:return new st;case x.TracesSamplerValues.ParentBasedAlwaysOn:return new Et({root:new X});case x.TracesSamplerValues.ParentBasedAlwaysOff:return new Et({root:new st});case x.TracesSamplerValues.TraceIdRatio:return new kt(Ao(e));case x.TracesSamplerValues.ParentBasedTraceIdRatio:return new Et({root:new kt(Ao(e))});default:return l.diag.error('OTEL_TRACES_SAMPLER value "'+e.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+Wl+'".'),new X}}function Ao(e){if(e.OTEL_TRACES_SAMPLER_ARG===void 0||e.OTEL_TRACES_SAMPLER_ARG==="")return l.diag.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+qt+"."),qt;var t=Number(e.OTEL_TRACES_SAMPLER_ARG);return isNaN(t)?(l.diag.error("OTEL_TRACES_SAMPLER_ARG="+e.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+qt+"."),qt):t<0||t>1?(l.diag.error("OTEL_TRACES_SAMPLER_ARG="+e.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+qt+"."),qt):t}var Xt=v(P());function Ro(e){var t={sampler:mn()},r=Ze(),n=Object.assign({},r,t,e);return n.generalLimits=Object.assign({},r.generalLimits,e.generalLimits||{}),n.spanLimits=Object.assign({},r.spanLimits,e.spanLimits||{}),n}function Oo(e){var t,r,n,o,i,a,u,c,s,f,p,d,m=Object.assign({},e.spanLimits),g=(0,Xt.getEnvWithoutDefaults)();return m.attributeCountLimit=(a=(i=(o=(r=(t=e.spanLimits)===null||t===void 0?void 0:t.attributeCountLimit)!==null&&r!==void 0?r:(n=e.generalLimits)===null||n===void 0?void 0:n.attributeCountLimit)!==null&&o!==void 0?o:g.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&i!==void 0?i:g.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&a!==void 0?a:Xt.DEFAULT_ATTRIBUTE_COUNT_LIMIT,m.attributeValueLengthLimit=(d=(p=(f=(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&&f!==void 0?f:g.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&p!==void 0?p:g.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&d!==void 0?d:Xt.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,Object.assign({},e,{spanLimits:m})}E();var k=v(P()),bo=function(){function e(t,r){this._exporter=t,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var n=(0,k.getEnv)();this._maxExportBatchSize=typeof r?.maxExportBatchSize=="number"?r.maxExportBatchSize:n.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=typeof r?.maxQueueSize=="number"?r.maxQueueSize:n.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=typeof r?.scheduledDelayMillis=="number"?r.scheduledDelayMillis:n.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis=typeof r?.exportTimeoutMillis=="number"?r.exportTimeoutMillis:n.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new k.BindOnceFuture(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(l.diag.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,r){},e.prototype.onEnd=function(t){this._shutdownOnce.isCalled||t.spanContext().traceFlags&l.TraceFlags.SAMPLED&&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&&l.diag.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(l.diag.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(r,n){for(var o=[],i=Math.ceil(t._finishedSpans.length/t._maxExportBatchSize),a=0,u=i;a<u;a++)o.push(t._flushOneBatch());Promise.all(o).then(function(){r()}).catch(n)})},e.prototype._flushOneBatch=function(){var t=this;return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise(function(r,n){var o=setTimeout(function(){n(new Error("Timeout"))},t._exportTimeoutMillis);l.context.with((0,k.suppressTracing)(l.context.active()),function(){var i=t._finishedSpans.splice(0,t._maxExportBatchSize),a=function(){return t._exporter.export(i,function(c){var s;clearTimeout(o),c.code===k.ExportResultCode.SUCCESS?r():n((s=c.error)!==null&&s!==void 0?s:new Error("BatchSpanProcessor: span export failed"))})},u=i.map(function(c){return c.resource}).filter(function(c){return c.asyncAttributesPending});u.length===0?a():Promise.all(u.map(function(c){var s;return(s=c.waitForAsyncAttributes)===null||s===void 0?void 0:s.call(c)})).then(a,function(c){(0,k.globalErrorHandler)(c),n(c)})})})},e.prototype._maybeStartTimer=function(){var t=this;if(!this._isExporting){var r=function(){t._isExporting=!0,t._flushOneBatch().then(function(){t._isExporting=!1,t._finishedSpans.length>0&&(t._clearTimer(),t._maybeStartTimer())}).catch(function(n){t._isExporting=!1,(0,k.globalErrorHandler)(n)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return r();this._timer===void 0&&(this._timer=setTimeout(function(){return r()},this._scheduledDelayMillis),(0,k.unrefTimer)(this._timer))}},e.prototype._clearTimer=function(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)},e}();var Yl=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(n[i]=o[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Mt=function(e){Yl(t,e);function t(r,n){var o=e.call(this,r,n)||this;return o.onInit(n),o}return t.prototype.onInit=function(r){var n=this;r?.disableAutoFlushOnDocumentHide!==!0&&typeof document<"u"&&(this._visibilityChangeListener=function(){document.visibilityState==="hidden"&&n.forceFlush()},this._pageHideListener=function(){n.forceFlush()},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}(bo);var zl=8,$l=16,er=function(){function e(){this.generateTraceId=Lo($l),this.generateSpanId=Lo(zl)}return e}();var tr=Array(32);function Lo(e){return function(){for(var r=0;r<e*2;r++)tr[r]=Math.floor(Math.random()*16)+48,tr[r]>=58&&(tr[r]+=39);return String.fromCharCode.apply(null,tr.slice(0,e*2))}}var Po=function(){function e(t,r,n){this._tracerProvider=n;var o=Ro(r);this._sampler=o.sampler,this._generalLimits=o.generalLimits,this._spanLimits=o.spanLimits,this._idGenerator=r.idGenerator||new er,this.resource=n.resource,this.instrumentationLibrary=t}return e.prototype.startSpan=function(t,r,n){var o,i,a;r===void 0&&(r={}),n===void 0&&(n=l.context.active()),r.root&&(n=l.trace.deleteSpan(n));var u=l.trace.getSpan(n);if((0,Kt.isTracingSuppressed)(n)){l.diag.debug("Instrumentation suppressed, returning Noop Span");var c=l.trace.wrapSpanContext(l.INVALID_SPAN_CONTEXT);return c}var s=u?.spanContext(),f=this._idGenerator.generateSpanId(),p,d,m;!s||!l.trace.isSpanContextValid(s)?p=this._idGenerator.generateTraceId():(p=s.traceId,d=s.traceState,m=s.spanId);var g=(o=r.kind)!==null&&o!==void 0?o:l.SpanKind.INTERNAL,C=((i=r.links)!==null&&i!==void 0?i:[]).map(function(bt){return{context:bt.context,attributes:(0,Kt.sanitizeAttributes)(bt.attributes)}}),M=(0,Kt.sanitizeAttributes)(r.attributes),T=this._sampler.shouldSample(n,p,t,g,M,C);d=(a=T.traceState)!==null&&a!==void 0?a:d;var rt=T.decision===l.SamplingDecision.RECORD_AND_SAMPLED?l.TraceFlags.SAMPLED:l.TraceFlags.NONE,q={traceId:p,spanId:f,traceFlags:rt,traceState:d};if(T.decision===l.SamplingDecision.NOT_RECORD){l.diag.debug("Recording is off, propagating context in a non-recording span");var c=l.trace.wrapSpanContext(q);return c}var U=(0,Kt.sanitizeAttributes)(Object.assign(M,T.attributes)),wr=new yo(this,n,t,q,g,m,C,r.startTime,void 0,U);return wr},e.prototype.startActiveSpan=function(t,r,n,o){var i,a,u;if(!(arguments.length<2)){arguments.length===2?u=r:arguments.length===3?(i=r,u=n):(i=r,a=n,u=o);var c=a??l.context.active(),s=this.startSpan(t,i,c),f=l.trace.setSpan(c,s);return l.context.with(f,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}();E();var Q=v(P());E();var mt=v(se()),rr=v(P());function Io(){return"unknown_service"}var Tt=function(){return Tt=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Tt.apply(this,arguments)},Ql=function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function u(f){try{s(n.next(f))}catch(p){a(p)}}function c(f){try{s(n.throw(f))}catch(p){a(p)}}function s(f){f.done?i(f.value):o(f.value).then(u,c)}s((n=n.apply(e,t||[])).next())})},Jl=function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,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(f){return c([s,f])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=s[0]&2?o.return:s[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;switch(o=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,o=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1],i=s;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(s);break}i[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(f){s=[6,f],o=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},Zl=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){a={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i},H=function(){function e(t,r){var n=this,o;this._attributes=t,this.asyncAttributesPending=r!=null,this._syncAttributes=(o=this._attributes)!==null&&o!==void 0?o:{},this._asyncAttributesPromise=r?.then(function(i){return n._attributes=Object.assign({},n._attributes,i),n.asyncAttributesPending=!1,i},function(i){return l.diag.debug("a resource's async attributes promise rejected: %s",i),n.asyncAttributesPending=!1,{}})}return e.empty=function(){return e.EMPTY},e.default=function(){var t;return new e((t={},t[mt.SemanticResourceAttributes.SERVICE_NAME]=Io(),t[mt.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]=rr.SDK_INFO[mt.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE],t[mt.SemanticResourceAttributes.TELEMETRY_SDK_NAME]=rr.SDK_INFO[mt.SemanticResourceAttributes.TELEMETRY_SDK_NAME],t[mt.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]=rr.SDK_INFO[mt.SemanticResourceAttributes.TELEMETRY_SDK_VERSION],t))},Object.defineProperty(e.prototype,"attributes",{get:function(){var t;return this.asyncAttributesPending&&l.diag.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 Ql(this,void 0,void 0,function(){return Jl(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 r=this,n;if(!t)return this;var o=Tt(Tt({},this._syncAttributes),(n=t._syncAttributes)!==null&&n!==void 0?n:t.attributes);if(!this._asyncAttributesPromise&&!t._asyncAttributesPromise)return new e(o);var i=Promise.all([this._asyncAttributesPromise,t._asyncAttributesPromise]).then(function(a){var u,c=Zl(a,2),s=c[0],f=c[1];return Tt(Tt(Tt(Tt({},r._syncAttributes),s),(u=t._syncAttributes)!==null&&u!==void 0?u:t.attributes),f)});return new e(o,i)},e.EMPTY=new e({}),e}();E();var Co=v(P()),No=v(se());var tf=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ef=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){a={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i},rf=function(){function e(){this._MAX_LENGTH=255,this._COMMA_SEPARATOR=",",this._LABEL_KEY_VALUE_SPLITTER="=",this._ERROR_MESSAGE_INVALID_CHARS="should be a ASCII string with a length greater than 0 and not exceed "+this._MAX_LENGTH+" characters.",this._ERROR_MESSAGE_INVALID_VALUE="should be a ASCII string with a length not exceed "+this._MAX_LENGTH+" characters."}return e.prototype.detect=function(t){var r={},n=(0,Co.getEnv)(),o=n.OTEL_RESOURCE_ATTRIBUTES,i=n.OTEL_SERVICE_NAME;if(o)try{var a=this._parseResourceAttributes(o);Object.assign(r,a)}catch(u){l.diag.debug("EnvDetector failed: "+u.message)}return i&&(r[No.SemanticResourceAttributes.SERVICE_NAME]=i),new H(r)},e.prototype._parseResourceAttributes=function(t){var r,n;if(!t)return{};var o={},i=t.split(this._COMMA_SEPARATOR,-1);try{for(var a=tf(i),u=a.next();!u.done;u=a.next()){var c=u.value,s=c.split(this._LABEL_KEY_VALUE_SPLITTER,-1);if(s.length===2){var f=ef(s,2),p=f[0],d=f[1];if(p=p.trim(),d=d.trim().split(/^"|"$/).join(""),!this._isValidAndNotEmpty(p))throw new Error("Attribute key "+this._ERROR_MESSAGE_INVALID_CHARS);if(!this._isValid(d))throw new Error("Attribute value "+this._ERROR_MESSAGE_INVALID_VALUE);o[p]=decodeURIComponent(d)}}}catch(m){r={error:m}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return o},e.prototype._isValid=function(t){return t.length<=this._MAX_LENGTH&&this._isBaggageOctetString(t)},e.prototype._isBaggageOctetString=function(t){for(var r=0;r<t.length;r++){var n=t.charCodeAt(r);if(n<33||n===44||n===59||n===92||n>126)return!1}return!0},e.prototype._isValidAndNotEmpty=function(t){return t.length>0&&this._isValid(t)},e}(),wo=new rf;E();var Mo=function(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"};var nf=function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function u(f){try{s(n.next(f))}catch(p){a(p)}}function c(f){try{s(n.throw(f))}catch(p){a(p)}}function s(f){f.done?i(f.value):o(f.value).then(u,c)}s((n=n.apply(e,t||[])).next())})},of=function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,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(f){return c([s,f])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=s[0]&2?o.return:s[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;switch(o=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,o=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1],i=s;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(s);break}i[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(f){s=[6,f],o=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}};var xo=function(e){var t;e===void 0&&(e={});var r=((t=e.detectors)!==null&&t!==void 0?t:[]).map(function(o){try{var i=o.detect(e),a;if(Mo(i)){var u=function(){return nf(void 0,void 0,void 0,function(){var c;return of(this,function(s){switch(s.label){case 0:return[4,i];case 1:return c=s.sent(),[2,c.attributes]}})})};a=new H({},u())}else a=i;return a.waitForAsyncAttributes?a.waitForAsyncAttributes().then(function(){return l.diag.debug(o.constructor.name+" found resource.",a)}):l.diag.debug(o.constructor.name+" found resource.",a),a}catch(c){return l.diag.error(o.constructor.name+" failed: "+c.message),H.empty()}}),n=r.reduce(function(o,i){return o.merge(i)},H.empty());return n.waitForAsyncAttributes&&n.waitForAsyncAttributes().then(function(){sf(r)}),n},sf=function(e){e.forEach(function(t){if(Object.keys(t.attributes).length>0){var r=JSON.stringify(t.attributes,null,4);l.diag.verbose(r)}})};var Do=v(P()),nr=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Uo=function(){function e(t){this._spanProcessors=t}return e.prototype.forceFlush=function(){var t,r,n=[];try{for(var o=nr(this._spanProcessors),i=o.next();!i.done;i=o.next()){var a=i.value;n.push(a.forceFlush())}}catch(u){t={error:u}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return new Promise(function(u){Promise.all(n).then(function(){u()}).catch(function(c){(0,Do.globalErrorHandler)(c||new Error("MultiSpanProcessor: forceFlush failed")),u()})})},e.prototype.onStart=function(t,r){var n,o;try{for(var i=nr(this._spanProcessors),a=i.next();!a.done;a=i.next()){var u=a.value;u.onStart(t,r)}}catch(c){n={error:c}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}},e.prototype.onEnd=function(t){var r,n;try{for(var o=nr(this._spanProcessors),i=o.next();!i.done;i=o.next()){var a=i.value;a.onEnd(t)}}catch(u){r={error:u}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},e.prototype.shutdown=function(){var t,r,n=[];try{for(var o=nr(this._spanProcessors),i=o.next();!i.done;i=o.next()){var a=i.value;n.push(a.shutdown())}}catch(u){t={error:u}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return new Promise(function(u,c){Promise.all(n).then(function(){u()},c)})},e}();var Bo=function(){function e(){}return e.prototype.onStart=function(t,r){},e.prototype.onEnd=function(t){},e.prototype.shutdown=function(){return Promise.resolve()},e.prototype.forceFlush=function(){return Promise.resolve()},e}();var xt;(function(e){e[e.resolved=0]="resolved",e[e.timeout=1]="timeout",e[e.error=2]="error",e[e.unresolved=3]="unresolved"})(xt||(xt={}));var Vo=function(){function e(t){t===void 0&&(t={});var r;this._registeredSpanProcessors=[],this._tracers=new Map;var n=(0,Q.merge)({},Ze(),Oo(t));this.resource=(r=n.resource)!==null&&r!==void 0?r:H.empty(),this.resource=H.default().merge(this.resource),this._config=Object.assign({},n,{resource:this.resource});var o=this._buildExporterFromEnv();if(o!==void 0){var i=new Mt(o);this.activeSpanProcessor=i}else this.activeSpanProcessor=new Bo}return e.prototype.getTracer=function(t,r,n){var o=t+"@"+(r||"")+":"+(n?.schemaUrl||"");return this._tracers.has(o)||this._tracers.set(o,new Po({name:t,version:r,schemaUrl:n?.schemaUrl},this._config,this)),this._tracers.get(o)},e.prototype.addSpanProcessor=function(t){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(function(r){return l.diag.error("Error while trying to shutdown current span processor",r)}),this._registeredSpanProcessors.push(t),this.activeSpanProcessor=new Uo(this._registeredSpanProcessors)},e.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},e.prototype.register=function(t){t===void 0&&(t={}),l.trace.setGlobalTracerProvider(this),t.propagator===void 0&&(t.propagator=this._buildPropagatorFromEnv()),t.contextManager&&l.context.setGlobalContextManager(t.contextManager),t.propagator&&l.propagation.setGlobalPropagator(t.propagator)},e.prototype.forceFlush=function(){var t=this._config.forceFlushTimeoutMillis,r=this._registeredSpanProcessors.map(function(n){return new Promise(function(o){var i,a=setTimeout(function(){o(new Error("Span processor did not completed within timeout period of "+t+" ms")),i=xt.timeout},t);n.forceFlush().then(function(){clearTimeout(a),i!==xt.timeout&&(i=xt.resolved,o(i))}).catch(function(u){clearTimeout(a),i=xt.error,o(u)})})});return new Promise(function(n,o){Promise.all(r).then(function(i){var a=i.filter(function(u){return u!==xt.resolved});a.length>0?o(a):n()}).catch(function(i){return o([i])})})},e.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},e.prototype._getPropagator=function(t){var r;return(r=this.constructor._registeredPropagators.get(t))===null||r===void 0?void 0:r()},e.prototype._getSpanExporter=function(t){var r;return(r=this.constructor._registeredExporters.get(t))===null||r===void 0?void 0:r()},e.prototype._buildPropagatorFromEnv=function(){var t=this,r=Array.from(new Set((0,Q.getEnv)().OTEL_PROPAGATORS)),n=r.map(function(i){var a=t._getPropagator(i);return a||l.diag.warn('Propagator "'+i+'" requested through environment variable is unavailable.'),a}),o=n.reduce(function(i,a){return a&&i.push(a),i},[]);if(o.length!==0)return r.length===1?o[0]:new Q.CompositePropagator({propagators:o})},e.prototype._buildExporterFromEnv=function(){var t=(0,Q.getEnv)().OTEL_TRACES_EXPORTER;if(!(t==="none"||t==="")){var r=this._getSpanExporter(t);return r||l.diag.error('Exporter "'+t+'" requested through environment variable is unavailable.'),r}},e._registeredPropagators=new Map([["tracecontext",function(){return new Q.W3CTraceContextPropagator}],["baggage",function(){return new Q.W3CBaggagePropagator}]]),e._registeredExporters=new Map,e}();E();var at={};z(at,uh);import*as uh from"@opentelemetry/api-logs";var Hu=v(jo(),1);E();var or=v(P());E();E();E();var Wt=v(P()),lf=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ff=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){a={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i},ko=function(){function e(t,r,n){this.attributes={},this.totalAttributesCount=0,this._isReadonly=!1;var o=n.timestamp,i=n.observedTimestamp,a=n.severityNumber,u=n.severityText,c=n.body,s=n.attributes,f=s===void 0?{}:s,p=n.context,d=Date.now();if(this.hrTime=(0,Wt.timeInputToHrTime)(o??d),this.hrTimeObserved=(0,Wt.timeInputToHrTime)(i??d),p){var m=l.trace.getSpanContext(p);m&&l.isSpanContextValid(m)&&(this.spanContext=m)}this.severityNumber=a,this.severityText=u,this.body=c,this.resource=t.resource,this.instrumentationScope=r,this._logRecordLimits=t.logRecordLimits,this.setAttributes(f)}return Object.defineProperty(e.prototype,"severityText",{get:function(){return this._severityText},set:function(t){this._isLogRecordReadonly()||(this._severityText=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"severityNumber",{get:function(){return this._severityNumber},set:function(t){this._isLogRecordReadonly()||(this._severityNumber=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return this._body},set:function(t){this._isLogRecordReadonly()||(this._body=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedAttributesCount",{get:function(){return this.totalAttributesCount-Object.keys(this.attributes).length},enumerable:!1,configurable:!0}),e.prototype.setAttribute=function(t,r){return this._isLogRecordReadonly()?this:r===null?this:t.length===0?(l.diag.warn("Invalid attribute key: "+t),this):!(0,Wt.isAttributeValue)(r)&&!(typeof r=="object"&&!Array.isArray(r)&&Object.keys(r).length>0)?(l.diag.warn("Invalid attribute value set for key: "+t),this):(this.totalAttributesCount+=1,Object.keys(this.attributes).length>=this._logRecordLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,t)?this:((0,Wt.isAttributeValue)(r)?this.attributes[t]=this._truncateToSize(r):this.attributes[t]=r,this))},e.prototype.setAttributes=function(t){var r,n;try{for(var o=lf(Object.entries(t)),i=o.next();!i.done;i=o.next()){var a=ff(i.value,2),u=a[0],c=a[1];this.setAttribute(u,c)}}catch(s){r={error:s}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return this},e.prototype.setBody=function(t){return this.body=t,this},e.prototype.setSeverityNumber=function(t){return this.severityNumber=t,this},e.prototype.setSeverityText=function(t){return this.severityText=t,this},e.prototype._makeReadonly=function(){this._isReadonly=!0},e.prototype._truncateToSize=function(t){var r=this,n=this._logRecordLimits.attributeValueLengthLimit;return n<=0?(l.diag.warn("Attribute value limit must be positive, got "+n),t):typeof t=="string"?this._truncateToLimitUtil(t,n):Array.isArray(t)?t.map(function(o){return typeof o=="string"?r._truncateToLimitUtil(o,n):o}):t},e.prototype._truncateToLimitUtil=function(t,r){return t.length<=r?t:t.substring(0,r)},e.prototype._isLogRecordReadonly=function(){return this._isReadonly&&l.diag.warn("Can not execute the operation on emitted log record"),this._isReadonly},e}();var Sn=function(){return Sn=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Sn.apply(this,arguments)},qo=function(){function e(t,r){this.instrumentationScope=t,this._sharedState=r}return e.prototype.emit=function(t){var r=t.context||l.context.active(),n=new ko(this._sharedState,this.instrumentationScope,Sn({context:r},t));this._sharedState.activeProcessor.onEmit(n,r),n._makeReadonly()},e}();var ut=v(P());function Xo(){return{forceFlushTimeoutMillis:3e4,logRecordLimits:{attributeValueLengthLimit:(0,ut.getEnv)().OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,ut.getEnv)().OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT},includeTraceContext:!0}}function Ko(e){var t,r,n,o,i,a,u=(0,ut.getEnvWithoutDefaults)();return{attributeCountLimit:(n=(r=(t=e.attributeCountLimit)!==null&&t!==void 0?t:u.OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT)!==null&&r!==void 0?r:u.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&n!==void 0?n:ut.DEFAULT_ATTRIBUTE_COUNT_LIMIT,attributeValueLengthLimit:(a=(i=(o=e.attributeValueLengthLimit)!==null&&o!==void 0?o:u.OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&i!==void 0?i:u.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&a!==void 0?a:ut.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT}}var zo=v(P()),Wo=function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function u(f){try{s(n.next(f))}catch(p){a(p)}}function c(f){try{s(n.throw(f))}catch(p){a(p)}}function s(f){f.done?i(f.value):o(f.value).then(u,c)}s((n=n.apply(e,t||[])).next())})},Yo=function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,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(f){return c([s,f])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=s[0]&2?o.return:s[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;switch(o=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,o=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1],i=s;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(s);break}i[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(f){s=[6,f],o=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},$o=function(){function e(t,r){this.processors=t,this.forceFlushTimeoutMillis=r}return e.prototype.forceFlush=function(){return Wo(this,void 0,void 0,function(){var t;return Yo(this,function(r){switch(r.label){case 0:return t=this.forceFlushTimeoutMillis,[4,Promise.all(this.processors.map(function(n){return(0,zo.callWithTimeout)(n.forceFlush(),t)}))];case 1:return r.sent(),[2]}})})},e.prototype.onEmit=function(t,r){this.processors.forEach(function(n){return n.onEmit(t,r)})},e.prototype.shutdown=function(){return Wo(this,void 0,void 0,function(){return Yo(this,function(t){switch(t.label){case 0:return[4,Promise.all(this.processors.map(function(r){return r.shutdown()}))];case 1:return t.sent(),[2]}})})},e}();var Qo=function(){function e(){}return e.prototype.forceFlush=function(){return Promise.resolve()},e.prototype.onEmit=function(t,r){},e.prototype.shutdown=function(){return Promise.resolve()},e}();var Jo=function(){function e(t,r,n){this.resource=t,this.forceFlushTimeoutMillis=r,this.logRecordLimits=n,this.loggers=new Map,this.registeredLogRecordProcessors=[],this.activeProcessor=new Qo}return e}();var pf="unknown",gn=function(){function e(t){t===void 0&&(t={});var r=(0,or.merge)({},Xo(),t),n=r.resource,o=n===void 0?H.default():n,i=r.logRecordLimits,a=r.forceFlushTimeoutMillis;this._sharedState=new Jo(o,a,Ko(i)),this._shutdownOnce=new or.BindOnceFuture(this._shutdown,this)}return e.prototype.getLogger=function(t,r,n){if(this._shutdownOnce.isCalled)return l.diag.warn("A shutdown LoggerProvider cannot provide a Logger"),at.NOOP_LOGGER;t||l.diag.warn("Logger requested without instrumentation scope name.");var o=t||pf,i=o+"@"+(r||"")+":"+(n?.schemaUrl||"");return this._sharedState.loggers.has(i)||this._sharedState.loggers.set(i,new qo({name:o,version:r,schemaUrl:n?.schemaUrl},this._sharedState)),this._sharedState.loggers.get(i)},e.prototype.addLogRecordProcessor=function(t){this._sharedState.registeredLogRecordProcessors.length===0&&this._sharedState.activeProcessor.shutdown().catch(function(r){return l.diag.error("Error while trying to shutdown current log record processor",r)}),this._sharedState.registeredLogRecordProcessors.push(t),this._sharedState.activeProcessor=new $o(this._sharedState.registeredLogRecordProcessors,this._sharedState.forceFlushTimeoutMillis)},e.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?(l.diag.warn("invalid attempt to force flush after LoggerProvider shutdown"),this._shutdownOnce.promise):this._sharedState.activeProcessor.forceFlush()},e.prototype.shutdown=function(){return this._shutdownOnce.isCalled?(l.diag.warn("shutdown may only be called once per LoggerProvider"),this._shutdownOnce.promise):this._shutdownOnce.call()},e.prototype._shutdown=function(){return this._sharedState.activeProcessor.shutdown()},e}();var sr;(function(e){e[e.DELTA=0]="DELTA",e[e.CUMULATIVE=1]="CUMULATIVE"})(sr||(sr={}));var df=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(n[i]=o[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Zo=function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function u(f){try{s(n.next(f))}catch(p){a(p)}}function c(f){try{s(n.throw(f))}catch(p){a(p)}}function s(f){f.done?i(f.value):o(f.value).then(u,c)}s((n=n.apply(e,t||[])).next())})},ts=function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,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(f){return c([s,f])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=s[0]&2?o.return:s[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;switch(o=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,o=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1],i=s;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(s);break}i[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(f){s=[6,f],o=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}};var _f=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function es(e){return e!=null}function rs(e){var t=Object.keys(e);return t.length===0?"":(t=t.sort(),JSON.stringify(t.map(function(r){return[r,e[r]]})))}function ns(e){var t,r;return e.name+":"+((t=e.version)!==null&&t!==void 0?t:"")+":"+((r=e.schemaUrl)!==null&&r!==void 0?r:"")}var hf=function(e){df(t,e);function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return t}(Error);function yn(e,t){var r,n=new Promise(function(i,a){r=setTimeout(function(){a(new hf("Operation timed out."))},t)});return Promise.race([e,n]).then(function(o){return clearTimeout(r),o},function(o){throw clearTimeout(r),o})}function is(e){return Zo(this,void 0,void 0,function(){var t=this;return ts(this,function(r){return[2,Promise.all(e.map(function(n){return Zo(t,void 0,void 0,function(){var o,i;return ts(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,n];case 1:return o=a.sent(),[2,{status:"fulfilled",value:o}];case 2:return i=a.sent(),[2,{status:"rejected",reason:i}];case 3:return[2]}})})}))]})})}function os(e){return e.status==="rejected"}function ss(e,t){var r,n;if(e.size!==t.size)return!1;try{for(var o=_f(e),i=o.next();!i.done;i=o.next()){var a=i.value;if(!t.has(a))return!1}}catch(u){r={error:u}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return!0}function as(e,t){return e.toLowerCase()===t.toLowerCase()}E();var ct;(function(e){e.COUNTER="COUNTER",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"})(ct||(ct={}));function lt(e,t,r){var n,o,i,a;return mf(e)||l.diag.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:(n=r?.description)!==null&&n!==void 0?n:"",unit:(o=r?.unit)!==null&&o!==void 0?o:"",valueType:(i=r?.valueType)!==null&&i!==void 0?i:l.ValueType.DOUBLE,advice:(a=r?.advice)!==null&&a!==void 0?a:{}}}function us(e,t){var r,n;return{name:(r=e.name)!==null&&r!==void 0?r:t.name,description:(n=e.description)!==null&&n!==void 0?n:t.description,type:t.type,unit:t.unit,valueType:t.valueType,advice:t.advice}}function cs(e,t){return as(e.name,t.name)&&e.unit===t.unit&&e.type===t.type&&e.valueType===t.valueType}var Ef=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function mf(e){return e.match(Ef)!=null}E();var ls=function(){function e(){this._registeredViews=[]}return e.prototype.addView=function(t){this._registeredViews.push(t)},e.prototype.findViews=function(t,r){var n=this,o=this._registeredViews.filter(function(i){return n._matchInstrument(i.instrumentSelector,t)&&n._matchMeter(i.meterSelector,r)});return o},e.prototype._matchInstrument=function(t,r){return(t.getType()===void 0||r.type===t.getType())&&t.getNameFilter().match(r.name)&&t.getUnitFilter().match(r.unit)},e.prototype._matchMeter=function(t,r){return t.getNameFilter().match(r.name)&&(r.version===void 0||t.getVersionFilter().match(r.version))&&(r.schemaUrl===void 0||t.getSchemaUrlFilter().match(r.schemaUrl))},e}();E();var fs=v(P()),Yt=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(n[i]=o[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),vn=function(){function e(t,r){this._writableMetricStorage=t,this._descriptor=r}return e.prototype._record=function(t,r,n){if(r===void 0&&(r={}),n===void 0&&(n=l.context.active()),typeof t!="number"){l.diag.warn("non-number value provided to metric "+this._descriptor.name+": "+t);return}this._descriptor.valueType===l.ValueType.INT&&!Number.isInteger(t)&&(l.diag.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,r,n,(0,fs.millisToHrTime)(Date.now()))},e}();var ps=function(e){Yt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(r,n,o){this._record(r,n,o)},t}(vn);var ds=function(e){Yt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.add=function(r,n,o){if(r<0){l.diag.warn("negative value provided to counter "+this._descriptor.name+": "+r);return}this._record(r,n,o)},t}(vn);var _s=function(e){Yt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.record=function(r,n,o){if(r<0){l.diag.warn("negative value provided to histogram "+this._descriptor.name+": "+r);return}this._record(r,n,o)},t}(vn);var ar=function(){function e(t,r,n){this._observableRegistry=n,this._descriptor=t,this._metricStorages=r}return e.prototype.addCallback=function(t){this._observableRegistry.addCallback(t,this)},e.prototype.removeCallback=function(t){this._observableRegistry.removeCallback(t,this)},e}();var hs=function(e){Yt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(ar);var Es=function(e){Yt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(ar);var ms=function(e){Yt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(ar);function fe(e){return e instanceof ar}var Ts=function(){function e(t){this._meterSharedState=t}return e.prototype.createHistogram=function(t,r){var n=lt(t,ct.HISTOGRAM,r),o=this._meterSharedState.registerMetricStorage(n);return new _s(o,n)},e.prototype.createCounter=function(t,r){var n=lt(t,ct.COUNTER,r),o=this._meterSharedState.registerMetricStorage(n);return new ds(o,n)},e.prototype.createUpDownCounter=function(t,r){var n=lt(t,ct.UP_DOWN_COUNTER,r),o=this._meterSharedState.registerMetricStorage(n);return new ps(o,n)},e.prototype.createObservableGauge=function(t,r){var n=lt(t,ct.OBSERVABLE_GAUGE,r),o=this._meterSharedState.registerAsyncMetricStorage(n);return new Es(n,o,this._meterSharedState.observableRegistry)},e.prototype.createObservableCounter=function(t,r){var n=lt(t,ct.OBSERVABLE_COUNTER,r),o=this._meterSharedState.registerAsyncMetricStorage(n);return new hs(n,o,this._meterSharedState.observableRegistry)},e.prototype.createObservableUpDownCounter=function(t,r){var n=lt(t,ct.OBSERVABLE_UP_DOWN_COUNTER,r),o=this._meterSharedState.registerAsyncMetricStorage(n);return new ms(n,o,this._meterSharedState.observableRegistry)},e.prototype.addBatchObservableCallback=function(t,r){this._meterSharedState.observableRegistry.addBatchCallback(t,r)},e.prototype.removeBatchObservableCallback=function(t,r){this._meterSharedState.observableRegistry.removeBatchCallback(t,r)},e}();var ur=function(){function e(t){this._instrumentDescriptor=t}return e.prototype.getInstrumentDescriptor=function(){return this._instrumentDescriptor},e.prototype.updateDescription=function(t){this._instrumentDescriptor=lt(this._instrumentDescriptor.name,this._instrumentDescriptor.type,{description:t,valueType:this._instrumentDescriptor.valueType,unit:this._instrumentDescriptor.unit,advice:this._instrumentDescriptor.advice})},e}();var Tf=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(n[i]=o[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ss=function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,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(f){return c([s,f])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=s[0]&2?o.return:s[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;switch(o=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,o=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1],i=s;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(s);break}i[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(f){s=[6,f],o=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},Sf=function(){function e(t){this._hash=t,this._valueMap=new Map,this._keyMap=new Map}return e.prototype.get=function(t,r){return r??(r=this._hash(t)),this._valueMap.get(r)},e.prototype.getOrDefault=function(t,r){var n=this._hash(t);if(this._valueMap.has(n))return this._valueMap.get(n);var o=r();return this._keyMap.has(n)||this._keyMap.set(n,t),this._valueMap.set(n,o),o},e.prototype.set=function(t,r,n){n??(n=this._hash(t)),this._keyMap.has(n)||this._keyMap.set(n,t),this._valueMap.set(n,r)},e.prototype.has=function(t,r){return r??(r=this._hash(t)),this._valueMap.has(r)},e.prototype.keys=function(){var t,r;return Ss(this,function(n){switch(n.label){case 0:t=this._keyMap.entries(),r=t.next(),n.label=1;case 1:return r.done===!0?[3,3]:[4,[r.value[1],r.value[0]]];case 2:return n.sent(),r=t.next(),[3,1];case 3:return[2]}})},e.prototype.entries=function(){var t,r;return Ss(this,function(n){switch(n.label){case 0:t=this._valueMap.entries(),r=t.next(),n.label=1;case 1:return r.done===!0?[3,3]:[4,[this._keyMap.get(r.value[0]),r.value[1],r.value[0]]];case 2:return n.sent(),r=t.next(),[3,1];case 3:return[2]}})},Object.defineProperty(e.prototype,"size",{get:function(){return this._valueMap.size},enumerable:!1,configurable:!0}),e}();var J=function(e){Tf(t,e);function t(){return e.call(this,rs)||this}return t}(Sf);var gf=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){a={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i},cr=function(){function e(t){this._aggregator=t,this._activeCollectionStorage=new J,this._cumulativeMemoStorage=new J}return e.prototype.record=function(t,r,n,o){var i=this,a=this._activeCollectionStorage.getOrDefault(r,function(){return i._aggregator.createAccumulation(o)});a?.record(t)},e.prototype.batchCumulate=function(t,r){var n=this;Array.from(t.entries()).forEach(function(o){var i=gf(o,3),a=i[0],u=i[1],c=i[2],s=n._aggregator.createAccumulation(r);s?.record(u);var f=s;if(n._cumulativeMemoStorage.has(a,c)){var p=n._cumulativeMemoStorage.get(a,c);f=n._aggregator.diff(p,s)}if(n._activeCollectionStorage.has(a,c)){var d=n._activeCollectionStorage.get(a,c);f=n._aggregator.merge(d,f)}n._cumulativeMemoStorage.set(a,s,c),n._activeCollectionStorage.set(a,f,c)})},e.prototype.collect=function(){var t=this._activeCollectionStorage;return this._activeCollectionStorage=new J,t},e}();var An=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},gs=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){a={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i},lr=function(){function e(t,r){var n=this;this._aggregator=t,this._unreportedAccumulations=new Map,this._reportHistory=new Map,r.forEach(function(o){n._unreportedAccumulations.set(o,[])})}return e.prototype.buildMetrics=function(t,r,n,o){this._stashAccumulations(n);var i=this._getMergedUnreportedAccumulations(t),a=i,u;if(this._reportHistory.has(t)){var c=this._reportHistory.get(t),s=c.collectionTime;u=c.aggregationTemporality,u===sr.CUMULATIVE?a=e.merge(c.accumulations,i,this._aggregator):a=e.calibrateStartTime(c.accumulations,i,s)}else u=t.selectAggregationTemporality(r.type);this._reportHistory.set(t,{accumulations:a,collectionTime:o,aggregationTemporality:u});var f=yf(a);if(f.length!==0)return this._aggregator.toMetricData(r,u,f,o)},e.prototype._stashAccumulations=function(t){var r,n,o=this._unreportedAccumulations.keys();try{for(var i=An(o),a=i.next();!a.done;a=i.next()){var u=a.value,c=this._unreportedAccumulations.get(u);c===void 0&&(c=[],this._unreportedAccumulations.set(u,c)),c.push(t)}}catch(s){r={error:s}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},e.prototype._getMergedUnreportedAccumulations=function(t){var r,n,o=new J,i=this._unreportedAccumulations.get(t);if(this._unreportedAccumulations.set(t,[]),i===void 0)return o;try{for(var a=An(i),u=a.next();!u.done;u=a.next()){var c=u.value;o=e.merge(o,c,this._aggregator)}}catch(s){r={error:s}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return o},e.merge=function(t,r,n){for(var o=t,i=r.entries(),a=i.next();a.done!==!0;){var u=gs(a.value,3),c=u[0],s=u[1],f=u[2];if(t.has(c,f)){var p=t.get(c,f),d=n.merge(p,s);o.set(c,d,f)}else o.set(c,s,f);a=i.next()}return o},e.calibrateStartTime=function(t,r,n){var o,i;try{for(var a=An(t.keys()),u=a.next();!u.done;u=a.next()){var c=gs(u.value,2),s=c[0],f=c[1],p=r.get(s,f);p?.setStartTime(n)}}catch(d){o={error:d}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}return r},e}();function yf(e){return Array.from(e.entries())}var vf=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(n[i]=o[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Af=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){a={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i},ys=function(e){vf(t,e);function t(r,n,o,i){var a=e.call(this,r)||this;return a._attributesProcessor=o,a._deltaMetricStorage=new cr(n),a._temporalMetricStorage=new lr(n,i),a}return t.prototype.record=function(r,n){var o=this,i=new J;Array.from(r.entries()).forEach(function(a){var u=Af(a,2),c=u[0],s=u[1];i.set(o._attributesProcessor.process(c),s)}),this._deltaMetricStorage.batchCumulate(i,n)},t.prototype.collect=function(r,n){var o=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(r,this._instrumentDescriptor,o,n)},t}(ur);E();function Rn(e,t){var r="";return e.unit!==t.unit&&(r+=" - Unit '"+e.unit+"' does not match '"+t.unit+`'
|
|
5
5
|
`),e.type!==t.type&&(r+=" - Type '"+e.type+"' does not match '"+t.type+`'
|
|
6
6
|
`),e.valueType!==t.valueType&&(r+=" - Value Type '"+e.valueType+"' does not match '"+t.valueType+`'
|
|
7
7
|
`),e.description!==t.description&&(r+=" - Description '"+e.description+"' does not match '"+t.description+`'
|
|
8
|
-
`),r}function
|
|
8
|
+
`),r}function Rf(e,t){return" - use valueType '"+e.valueType+"' on instrument creation or use an instrument name other than '"+t.name+"'"}function Of(e,t){return" - use unit '"+e.unit+"' on instrument creation or use an instrument name other than '"+t.name+"'"}function bf(e,t){var r={name:t.name,type:t.type,unit:t.unit},n=JSON.stringify(r);return" - create a new view with a name other than '"+e.name+"' and InstrumentSelector '"+n+"'"}function Lf(e,t){var r={name:t.name,type:t.type,unit:t.unit},n=JSON.stringify(r);return" - create a new view with a name other than '"+e.name+"' and InstrumentSelector '"+n+`'
|
|
9
9
|
- OR - create a new view with the name `+e.name+" and description '"+e.description+"' and InstrumentSelector "+n+`
|
|
10
|
-
- OR - create a new view with the name `+t.name+" and description '"+e.description+"' and InstrumentSelector "+n}function
|
|
10
|
+
- OR - create a new view with the name `+t.name+" and description '"+e.description+"' and InstrumentSelector "+n}function On(e,t){return e.valueType!==t.valueType?Rf(e,t):e.unit!==t.unit?Of(e,t):e.type!==t.type?bf(e,t):e.description!==t.description?Lf(e,t):""}var bn=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},vs=function(){function e(){this._sharedRegistry=new Map,this._perCollectorRegistry=new Map}return e.create=function(){return new e},e.prototype.getStorages=function(t){var r,n,o,i,a=[];try{for(var u=bn(this._sharedRegistry.values()),c=u.next();!c.done;c=u.next()){var s=c.value;a=a.concat(s)}}catch(m){r={error:m}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}var f=this._perCollectorRegistry.get(t);if(f!=null)try{for(var p=bn(f.values()),d=p.next();!d.done;d=p.next()){var s=d.value;a=a.concat(s)}}catch(m){o={error:m}}finally{try{d&&!d.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}return a},e.prototype.register=function(t){this._registerStorage(t,this._sharedRegistry)},e.prototype.registerForCollector=function(t,r){var n=this._perCollectorRegistry.get(t);n==null&&(n=new Map,this._perCollectorRegistry.set(t,n)),this._registerStorage(r,n)},e.prototype.findOrUpdateCompatibleStorage=function(t){var r=this._sharedRegistry.get(t.name);return r===void 0?null:this._findOrUpdateCompatibleStorage(t,r)},e.prototype.findOrUpdateCompatibleCollectorStorage=function(t,r){var n=this._perCollectorRegistry.get(t);if(n===void 0)return null;var o=n.get(r.name);return o===void 0?null:this._findOrUpdateCompatibleStorage(r,o)},e.prototype._registerStorage=function(t,r){var n=t.getInstrumentDescriptor(),o=r.get(n.name);if(o===void 0){r.set(n.name,[t]);return}o.push(t)},e.prototype._findOrUpdateCompatibleStorage=function(t,r){var n,o,i=null;try{for(var a=bn(r),u=a.next();!u.done;u=a.next()){var c=u.value,s=c.getInstrumentDescriptor();cs(s,t)?(s.description!==t.description&&(t.description.length>s.description.length&&c.updateDescription(t.description),l.diag.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.
|
|
11
11
|
`,`Details:
|
|
12
|
-
`,
|
|
13
|
-
To resolve the conflict:`,
|
|
12
|
+
`,Rn(s,t),`The longer description will be used.
|
|
13
|
+
To resolve the conflict:`,On(s,t))),i=c):l.diag.warn("A view or instrument with the name ",t.name,` has already been registered and is incompatible with another registered view.
|
|
14
14
|
`,`Details:
|
|
15
|
-
`,
|
|
16
|
-
`,bn(s,t))}}catch(f){n={error:f}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}return i},e}();var Rs=function(){function e(t){this._backingStorages=t}return e.prototype.record=function(t,r,n,o){this._backingStorages.forEach(function(i){i.record(t,r,n,o)})},e}();E();E();var Os=function(){function e(t,r){this._instrumentName=t,this._valueType=r,this._buffer=new Z}return e.prototype.observe=function(t,r){if(r===void 0&&(r={}),typeof t!="number"){l.diag.warn("non-number value provided to metric "+this._instrumentName+": "+t);return}this._valueType===l.ValueType.INT&&!Number.isInteger(t)&&(l.diag.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(r,t)},e}();var bs=function(){function e(){this._buffer=new Map}return e.prototype.observe=function(t,r,n){if(n===void 0&&(n={}),!!fe(t)){var o=this._buffer.get(t);if(o==null&&(o=new Z,this._buffer.set(t,o)),typeof r!="number"){l.diag.warn("non-number value provided to metric "+t._descriptor.name+": "+r);return}t._descriptor.valueType===l.ValueType.INT&&!Number.isInteger(r)&&(l.diag.warn("INT value type cannot accept a floating-point value for "+t._descriptor.name+", ignoring the fractional digits."),r=Math.trunc(r),!Number.isInteger(r))||o.set(n,r)}},e}();var Pn=function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function u(f){try{s(n.next(f))}catch(p){a(p)}}function c(f){try{s(n.throw(f))}catch(p){a(p)}}function s(f){f.done?i(f.value):o(f.value).then(u,c)}s((n=n.apply(e,t||[])).next())})},In=function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,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(f){return c([s,f])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=s[0]&2?o.return:s[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;switch(o=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,o=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1],i=s;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(s);break}i[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(f){s=[6,f],o=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},Ls=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){a={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i},Ps=function(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))},Is=function(){function e(){this._callbacks=[],this._batchCallbacks=[]}return e.prototype.addCallback=function(t,r){var n=this._findCallback(t,r);n>=0||this._callbacks.push({callback:t,instrument:r})},e.prototype.removeCallback=function(t,r){var n=this._findCallback(t,r);n<0||this._callbacks.splice(n,1)},e.prototype.addBatchCallback=function(t,r){var n=new Set(r.filter(fe));if(n.size===0){l.diag.error("BatchObservableCallback is not associated with valid instruments",r);return}var o=this._findBatchCallback(t,n);o>=0||this._batchCallbacks.push({callback:t,instruments:n})},e.prototype.removeBatchCallback=function(t,r){var n=new Set(r.filter(fe)),o=this._findBatchCallback(t,n);o<0||this._batchCallbacks.splice(o,1)},e.prototype.observe=function(t,r){return Pn(this,void 0,void 0,function(){var n,o,i,a;return In(this,function(u){switch(u.label){case 0:return n=this._observeCallbacks(t,r),o=this._observeBatchCallbacks(t,r),[4,os(Ps(Ps([],Ls(n),!1),Ls(o),!1))];case 1:return i=u.sent(),a=i.filter(ss).map(function(c){return c.reason}),[2,a]}})})},e.prototype._observeCallbacks=function(t,r){var n=this;return this._callbacks.map(function(o){var i=o.callback,a=o.instrument;return Pn(n,void 0,void 0,function(){var u,c;return In(this,function(s){switch(s.label){case 0:return u=new Os(a._descriptor.name,a._descriptor.valueType),c=Promise.resolve(i(u)),r!=null&&(c=vn(c,r)),[4,c];case 1:return s.sent(),a._metricStorages.forEach(function(f){f.record(u._buffer,t)}),[2]}})})})},e.prototype._observeBatchCallbacks=function(t,r){var n=this;return this._batchCallbacks.map(function(o){var i=o.callback,a=o.instruments;return Pn(n,void 0,void 0,function(){var u,c;return In(this,function(s){switch(s.label){case 0:return u=new bs,c=Promise.resolve(i(u)),r!=null&&(c=vn(c,r)),[4,c];case 1:return s.sent(),a.forEach(function(f){var p=u._buffer.get(f);p!=null&&f._metricStorages.forEach(function(d){d.record(p,t)})}),[2]}})})})},e.prototype._findCallback=function(t,r){return this._callbacks.findIndex(function(n){return n.callback===t&&n.instrument===r})},e.prototype._findBatchCallback=function(t,r){return this._batchCallbacks.findIndex(function(n){return n.callback===t&&as(n.instruments,r)})},e}();var Sf=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(n[i]=o[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Cs=function(e){Sf(t,e);function t(r,n,o,i){var a=e.call(this,r)||this;return a._attributesProcessor=o,a._deltaMetricStorage=new cr(n),a._temporalMetricStorage=new lr(n,i),a}return t.prototype.record=function(r,n,o,i){n=this._attributesProcessor.process(n,o),this._deltaMetricStorage.record(r,n,o,i)},t.prototype.collect=function(r,n){var o=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(r,this._instrumentDescriptor,o,n)},t}(ur);var Ns=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(n[i]=o[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),fr=function(){function e(){}return e.Noop=function(){return yf},e}();var gf=function(e){Ns(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.process=function(r,n){return r},t}(fr);var fE=function(e){Ns(t,e);function t(r){var n=e.call(this)||this;return n._allowedAttributeNames=r,n}return t.prototype.process=function(r,n){var o=this,i={};return Object.keys(r).filter(function(a){return o._allowedAttributeNames.includes(a)}).forEach(function(a){return i[a]=r[a]}),i},t}(fr);var yf=new gf;var vf=function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function u(f){try{s(n.next(f))}catch(p){a(p)}}function c(f){try{s(n.throw(f))}catch(p){a(p)}}function s(f){f.done?i(f.value):o(f.value).then(u,c)}s((n=n.apply(e,t||[])).next())})},Af=function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,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(f){return c([s,f])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=s[0]&2?o.return:s[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;switch(o=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,o=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1],i=s;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(s);break}i[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(f){s=[6,f],o=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},Rf=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){a={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i},ws=function(){function e(t,r){this._meterProviderSharedState=t,this._instrumentationScope=r,this.metricStorageRegistry=new As,this.observableRegistry=new Is,this.meter=new Ss(this)}return e.prototype.registerMetricStorage=function(t){var r=this._registerMetricStorage(t,Cs);return r.length===1?r[0]:new Rs(r)},e.prototype.registerAsyncMetricStorage=function(t){var r=this._registerMetricStorage(t,vs);return r},e.prototype.collect=function(t,r,n){return vf(this,void 0,void 0,function(){var o,i,a;return Af(this,function(u){switch(u.label){case 0:return[4,this.observableRegistry.observe(r,n?.timeoutMillis)];case 1:return o=u.sent(),i=this.metricStorageRegistry.getStorages(t),i.length===0?[2,null]:(a=i.map(function(c){return c.collect(t,r)}).filter(rs),a.length===0?[2,{errors:o}]:[2,{scopeMetrics:{scope:this._instrumentationScope,metrics:a},errors:o}])}})})},e.prototype._registerMetricStorage=function(t,r){var n=this,o=this._meterProviderSharedState.viewRegistry.findViews(t,this._instrumentationScope),i=o.map(function(c){var s=cs(c,t),f=n.metricStorageRegistry.findOrUpdateCompatibleStorage(s);if(f!=null)return f;var p=c.aggregation.createAggregator(s),d=new r(s,p,c.attributesProcessor,n._meterProviderSharedState.metricCollectors);return n.metricStorageRegistry.register(d),d});if(i.length===0){var a=this._meterProviderSharedState.selectAggregations(t.type),u=a.map(function(c){var s=Rf(c,2),f=s[0],p=s[1],d=n.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(f,t);if(d!=null)return d;var m=p.createAggregator(t),g=new r(t,m,fr.Noop(),[f]);return n.metricStorageRegistry.registerForCollector(f,g),g});i=i.concat(u)}return i},e}();var Of=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Ms=function(){function e(t){this.resource=t,this.viewRegistry=new fs,this.metricCollectors=[],this.meterSharedStates=new Map}return e.prototype.getMeterSharedState=function(t){var r=is(t),n=this.meterSharedStates.get(r);return n==null&&(n=new ws(this,t),this.meterSharedStates.set(r,n)),n},e.prototype.selectAggregations=function(t){var r,n,o=[];try{for(var i=Of(this.metricCollectors),a=i.next();!a.done;a=i.next()){var u=a.value;o.push([u,u.selectAggregation(t)])}}catch(c){r={error:c}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return o},e}();var xs=v(P()),pr=function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function u(f){try{s(n.next(f))}catch(p){a(p)}}function c(f){try{s(n.throw(f))}catch(p){a(p)}}function s(f){f.done?i(f.value):o(f.value).then(u,c)}s((n=n.apply(e,t||[])).next())})},dr=function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,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(f){return c([s,f])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=s[0]&2?o.return:s[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;switch(o=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,o=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1],i=s;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(s);break}i[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(f){s=[6,f],o=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},bf=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){a={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i},Lf=function(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))},Ds=function(){function e(t,r){this._sharedState=t,this._metricReader=r}return e.prototype.collect=function(t){return pr(this,void 0,void 0,function(){var r,n,o,i,a=this;return dr(this,function(u){switch(u.label){case 0:return r=(0,xs.millisToHrTime)(Date.now()),n=[],o=[],i=Array.from(this._sharedState.meterSharedStates.values()).map(function(c){return pr(a,void 0,void 0,function(){var s;return dr(this,function(f){switch(f.label){case 0:return[4,c.collect(this,r,t)];case 1:return s=f.sent(),s?.scopeMetrics!=null&&n.push(s.scopeMetrics),s?.errors!=null&&o.push.apply(o,Lf([],bf(s.errors),!1)),[2]}})})}),[4,Promise.all(i)];case 1:return u.sent(),[2,{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:n},errors:o}]}})})},e.prototype.forceFlush=function(t){return pr(this,void 0,void 0,function(){return dr(this,function(r){switch(r.label){case 0:return[4,this._metricReader.forceFlush(t)];case 1:return r.sent(),[2]}})})},e.prototype.shutdown=function(t){return pr(this,void 0,void 0,function(){return dr(this,function(r){switch(r.label){case 0:return[4,this._metricReader.shutdown(t)];case 1:return r.sent(),[2]}})})},e.prototype.selectAggregationTemporality=function(t){return this._metricReader.selectAggregationTemporality(t)},e.prototype.selectAggregation=function(t){return this._metricReader.selectAggregation(t)},e}();var Us=function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function u(f){try{s(n.next(f))}catch(p){a(p)}}function c(f){try{s(n.throw(f))}catch(p){a(p)}}function s(f){f.done?i(f.value):o(f.value).then(u,c)}s((n=n.apply(e,t||[])).next())})},Bs=function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,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(f){return c([s,f])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=s[0]&2?o.return:s[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;switch(o=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,o=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1],i=s;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(s);break}i[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(f){s=[6,f],o=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},Pf=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Cn=function(){function e(t){var r,n,o;this._shutdown=!1;var i=H.default().merge((o=t?.resource)!==null&&o!==void 0?o:H.empty());if(this._sharedState=new Ms(i),t?.views!=null&&t.views.length>0)try{for(var a=Pf(t.views),u=a.next();!u.done;u=a.next()){var c=u.value;this._sharedState.viewRegistry.addView(c)}}catch(s){r={error:s}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}}return e.prototype.getMeter=function(t,r,n){return r===void 0&&(r=""),n===void 0&&(n={}),this._shutdown?(l.diag.warn("A shutdown MeterProvider cannot provide a Meter"),(0,l.createNoopMeter)()):this._sharedState.getMeterSharedState({name:t,version:r,schemaUrl:n.schemaUrl}).meter},e.prototype.addMetricReader=function(t){var r=new Ds(this._sharedState,t);t.setMetricProducer(r),this._sharedState.metricCollectors.push(r)},e.prototype.shutdown=function(t){return Us(this,void 0,void 0,function(){return Bs(this,function(r){switch(r.label){case 0:return this._shutdown?(l.diag.warn("shutdown may only be called once per MeterProvider"),[2]):(this._shutdown=!0,[4,Promise.all(this._sharedState.metricCollectors.map(function(n){return n.shutdown(t)}))]);case 1:return r.sent(),[2]}})})},e.prototype.forceFlush=function(t){return Us(this,void 0,void 0,function(){return Bs(this,function(r){switch(r.label){case 0:return this._shutdown?(l.diag.warn("invalid attempt to force flush after MeterProvider shutdown"),[2]):[4,Promise.all(this._sharedState.metricCollectors.map(function(n){return n.forceFlush(t)}))];case 1:return r.sent(),[2]}})})},e}();var wr=v(be(),1),wu=v(Fs(),1),Ot=v(P(),1);var js="http.method",ks="http.url",Er="http.host",qs="http.scheme",Mn="http.status_code",Xs="http.user_agent",xn="http.response_content_length_uncompressed",Ks="net.peer.port",Ws="net.peer.name";var Ys="service.name",zs="service.version";E();var xf=Symbol.for("@vercel/request-context");function K(){return globalThis[xf]?.get()}function mr(e){return Object.fromEntries(Object.entries(e).filter(([t,r])=>r!==void 0))}function $s(e){return e?e.split("::").at(-1):void 0}function Qs(e=K(),t){if(!e)return;let r=t?Uf(t,e.headers):void 0;return mr({[Er]:e.headers.host,[Xs]:e.headers["user-agent"],"http.referer":e.headers.referer,"vercel.request_id":$s(e.headers["x-vercel-id"]),"vercel.matched_path":e.headers["x-matched-path"],"vercel.edge_region":process.env.VERCEL_REGION,...r})}var Df={keys(e){return[]},get(e,t){return e[t.toLocaleLowerCase()]}};function Uf(e,t){if(typeof e=="function")return e(t,Df);let r={};for(let[n,o]of Object.entries(e)){let i=t[o.toLocaleLowerCase()];i!==void 0&&(r[n]=i)}return r}E();function zt(e){return(e&l.TraceFlags.SAMPLED)!==0}var Tr=class{constructor(t,r){this.processors=t;this.attributesFromHeaders=r;this.rootSpanIds=new Map;this.waitSpanEnd=new Map}forceFlush(){return Promise.all(this.processors.map(t=>t.forceFlush().catch(r=>{l.diag.error("@vercel/otel: forceFlush failed:",r)}))).then(()=>{})}shutdown(){return Promise.all(this.processors.map(t=>t.shutdown().catch(()=>{}))).then(()=>{})}onStart(t,r){let{traceId:n,spanId:o,traceFlags:i}=t.spanContext(),a=!t.parentSpanId||!this.rootSpanIds.has(n);if(a?this.rootSpanIds.set(n,{rootSpanId:o,open:[]}):this.rootSpanIds.get(n)?.open.push(t),a&&zt(i)){let u=K(),c=Qs(u,this.attributesFromHeaders);c&&t.setAttributes(c),u&&u.waitUntil(async()=>{if(this.rootSpanIds.has(n)){let s=new Promise(p=>{this.waitSpanEnd.set(n,p)}),f;await Promise.race([s,new Promise(p=>{f=setTimeout(()=>{this.waitSpanEnd.delete(n),p(void 0)},50)})]),f&&clearTimeout(f)}return this.forceFlush()})}for(let u of this.processors)u.onStart(t,r)}onEnd(t){let{traceId:r,spanId:n,traceFlags:o}=t.spanContext(),i=zt(o),a=this.rootSpanIds.get(r),u=a?.rootSpanId===n;if(i){let c=Gf(t);c&&Object.assign(t.attributes,c)}if(u){if(this.rootSpanIds.delete(r),a.open.length>0){for(let c of a.open)if(!c.ended&&c.spanContext().spanId!==n)try{c.end()}catch(s){l.diag.error("@vercel/otel: onEnd failed:",s)}}}else if(a)for(let c=0;c<a.open.length;c++)a.open[c]?.spanContext().spanId===n&&a.open.splice(c,1);for(let c of this.processors)c.onEnd(t);if(u){let c=this.waitSpanEnd.get(r);c&&(this.waitSpanEnd.delete(r),c())}}},Bf={[l.SpanKind.INTERNAL]:"internal",[l.SpanKind.SERVER]:"server",[l.SpanKind.CLIENT]:"client",[l.SpanKind.PRODUCER]:"producer",[l.SpanKind.CONSUMER]:"consumer"};function Gf(e){let{kind:t,attributes:r}=e,{"operation.name":n,"resource.name":o,"span.type":i,"next.span_type":a,"http.method":u,"http.route":c}=r;if(n)return;let s=o??(u&&typeof u=="string"&&c&&typeof c=="string"?`${u} ${c}`:c);if(e.kind===l.SpanKind.SERVER&&u&&c&&typeof u=="string"&&typeof c=="string")return{"operation.name":"web.request","resource.name":s};let f=e.instrumentationLibrary.name,p=a??i;if(p&&typeof p=="string"){let d=Zs(f,p);return c?{"operation.name":d,"resource.name":s}:{"operation.name":d}}return{"operation.name":Zs(f,t===l.SpanKind.INTERNAL?"":Bf[t])}}function Zs(e,t){if(!e)return t;let r=e.replace(/[ @./]/g,"_");return r.startsWith("_")&&(r=r.slice(1)),t?`${r}.${t}`:r}var da=v(jn(),1);var pa=v(fa(),1);E();var $t=class extends pa.OTLPExporterBase{constructor(t={}){super(t),t.headers&&(this._headers=t.headers)}onShutdown(){l.diag.debug("@vercel/otel/otlp: onShutdown")}onInit(){l.diag.debug("@vercel/otel/otlp: onInit")}send(t,r,n){if(this._shutdownOnce.isCalled){l.diag.debug("@vercel/otel/otlp: Shutdown already started. Cannot send objects");return}let o=this.convert(t),i,a,u;try{({body:i,contentType:a,headers:u}=this.toMessage(o))}catch(s){l.diag.warn("@vercel/otel/otlp: no proto",s);return}let c=fetch(this.url,{method:"POST",body:i,headers:{...this._headers,...u,"Content-Type":a,"User-Agent":"OTel-OTLP-Exporter-JavaScript/0.46.0"},next:{internal:!0}}).then(s=>{l.diag.debug("@vercel/otel/otlp: onSuccess",s.status,s.statusText),r(),s.arrayBuffer().catch(()=>{})}).catch(s=>{l.diag.error("@vercel/otel/otlp: onError",s),n(s)}).finally(()=>{let s=this._sendingPromises.indexOf(c);this._sendingPromises.splice(s,1)});this._sendingPromises.push(c)}getDefaultUrl(t){throw new Error("Method not implemented.")}};var op="v1/traces",sp=`http://localhost:4318/${op}`;function vr(e){return typeof e.url=="string"?e.url:sp}var Qt=class{constructor(t={}){this.impl=new Kn(t)}export(t,r){this.impl.export(t,r)}shutdown(){return this.impl.shutdown()}forceFlush(){return this.impl.forceFlush()}},Kn=class extends $t{convert(t){return(0,da.createExportTraceServiceRequest)(t,{useHex:!0,useLongBits:!1})}toMessage(t){return{body:JSON.stringify(t),contentType:"application/json"}}getDefaultUrl(t){return vr(t)}};var hu=v(jn(),1);var pu=v(fu(),1);function du(e){let t=new pu.Writer;return mp(e,t),t.finish()}function mp(e,t){if(e.resourceSpans!=null&&e.resourceSpans.length)for(let r=0;r<e.resourceSpans.length;++r)Tp(e.resourceSpans[r],t.uint32(10).fork()).ldelim();return t}function Tp(e,t){if(e.resource!=null&&Sp(e.resource,t.uint32(10).fork()).ldelim(),e.scopeSpans!=null&&e.scopeSpans.length)for(let r=0;r<e.scopeSpans.length;++r)gp(e.scopeSpans[r],t.uint32(18).fork()).ldelim();return e.schemaUrl!=null&&t.uint32(26).string(e.schemaUrl),t}function Sp(e,t){if(e.attributes!=null&&e.attributes.length)for(let r=0;r<e.attributes.length;++r)Jt(e.attributes[r],t.uint32(10).fork()).ldelim();return e.droppedAttributesCount!=null&&t.uint32(16).uint32(e.droppedAttributesCount),t}function gp(e,t){if(e.scope!=null&&Ap(e.scope,t.uint32(10).fork()).ldelim(),e.spans!=null&&e.spans.length)for(let r=0;r<e.spans.length;++r)Rp(e.spans[r],t.uint32(18).fork()).ldelim();return e.schemaUrl!=null&&t.uint32(26).string(e.schemaUrl),t}function Jt(e,t){return e.key!=null&&t.uint32(10).string(e.key),e.value!=null&&_u(e.value,t.uint32(18).fork()).ldelim(),t}function _u(e,t){return e.stringValue!=null&&t.uint32(10).string(e.stringValue),e.boolValue!=null&&t.uint32(16).bool(e.boolValue),e.intValue!=null&&t.uint32(24).int64(e.intValue),e.doubleValue!=null&&t.uint32(33).double(e.doubleValue),e.arrayValue!=null&&yp(e.arrayValue,t.uint32(42).fork()).ldelim(),e.kvlistValue!=null&&vp(e.kvlistValue,t.uint32(50).fork()).ldelim(),e.bytesValue!=null&&t.uint32(58).bytes(e.bytesValue),t}function yp(e,t){if(e.values!=null&&e.values.length)for(let r=0;r<e.values.length;++r)_u(e.values[r],t.uint32(10).fork()).ldelim();return t}function vp(e,t){if(e.values!=null&&e.values.length)for(let r=0;r<e.values.length;++r)Jt(e.values[r],t.uint32(10).fork()).ldelim();return t}function Ap(e,t){if(e.name!=null&&t.uint32(10).string(e.name),e.version!=null&&t.uint32(18).string(e.version),e.attributes!=null&&e.attributes.length)for(let r=0;r<e.attributes.length;++r)Jt(e.attributes[r],t.uint32(26).fork()).ldelim();return e.droppedAttributesCount!=null&&t.uint32(32).uint32(e.droppedAttributesCount),t}function Rp(e,t){if(e.traceId!=null&&t.uint32(10).bytes(e.traceId),e.spanId!=null&&t.uint32(18).bytes(e.spanId),e.traceState!=null&&t.uint32(26).string(e.traceState),e.parentSpanId!=null&&t.uint32(34).bytes(e.parentSpanId),e.name!=null&&t.uint32(42).string(e.name),e.kind!=null&&t.uint32(48).int32(e.kind),e.startTimeUnixNano!=null&&t.uint32(57).fixed64(e.startTimeUnixNano),e.endTimeUnixNano!=null&&t.uint32(65).fixed64(e.endTimeUnixNano),e.attributes!=null&&e.attributes.length)for(let r=0;r<e.attributes.length;++r)Jt(e.attributes[r],t.uint32(74).fork()).ldelim();if(e.droppedAttributesCount!=null&&t.uint32(80).uint32(e.droppedAttributesCount),e.events!=null&&e.events.length)for(let r=0;r<e.events.length;++r)bp(e.events[r],t.uint32(90).fork()).ldelim();if(e.droppedEventsCount!=null&&t.uint32(96).uint32(e.droppedEventsCount),e.links!=null&&e.links.length)for(let r=0;r<e.links.length;++r)Lp(e.links[r],t.uint32(106).fork()).ldelim();return e.droppedLinksCount!=null&&t.uint32(112).uint32(e.droppedLinksCount),e.status!=null&&Op(e.status,t.uint32(122).fork()).ldelim(),t}function Op(e,t){return e.message!=null&&t.uint32(18).string(e.message),e.code!=null&&t.uint32(24).int32(e.code),t}function bp(e,t){if(e.timeUnixNano!=null&&t.uint32(9).fixed64(e.timeUnixNano),e.name!=null&&t.uint32(18).string(e.name),e.attributes!=null&&e.attributes.length)for(let r=0;r<e.attributes.length;++r)Jt(e.attributes[r],t.uint32(26).fork()).ldelim();return e.droppedAttributesCount!=null&&t.uint32(32).uint32(e.droppedAttributesCount),t}function Lp(e,t){if(e.traceId!=null&&t.uint32(10).bytes(e.traceId),e.spanId!=null&&t.uint32(18).bytes(e.spanId),e.traceState!=null&&t.uint32(26).string(e.traceState),e.attributes!=null&&e.attributes.length)for(let r=0;r<e.attributes.length;++r)Jt(e.attributes[r],t.uint32(34).fork()).ldelim();return e.droppedAttributesCount!=null&&t.uint32(40).uint32(e.droppedAttributesCount),t}var Bt=class{constructor(t={}){this.impl=new si(t)}export(t,r){this.impl.export(t,r)}shutdown(){return this.impl.shutdown()}forceFlush(){return this.impl.forceFlush()}},si=class extends $t{convert(t){return(0,hu.createExportTraceServiceRequest)(t,void 0)}toMessage(t){return{body:du(t),contentType:"application/x-protobuf",headers:{accept:"application/x-protobuf"}}}getDefaultUrl(t){return vr(t)}};E();function Eu(e,t){return e.replace(/\{(?<temp1>[^{}]+)\}/g,(r,n)=>{let o=t[n];return o!==void 0?String(o):r})}var te=class{constructor(t={}){this.instrumentationName="@vercel/otel/fetch";this.instrumentationVersion="1.0.0";this.config=t}getConfig(){return this.config}setConfig(){}setTracerProvider(t){this.tracerProvider=t}setMeterProvider(){}shouldIgnore(t,r){let n=this.config.ignoreUrls??[];if(r?.opentelemetry?.ignore!==void 0)return r.opentelemetry.ignore;if(n.length===0)return!1;let o=t.toString();return n.some(i=>typeof i=="string"?i==="*"?!0:o.startsWith(i):i.test(o))}shouldPropagate(t,r){let n=process.env.VERCEL_URL||process.env.NEXT_PUBLIC_VERCEL_URL||null,o=process.env.VERCEL_BRANCH_URL||process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL||null,i=this.config.propagateContextUrls??[],a=this.config.dontPropagateContextUrls??[];if(r?.opentelemetry?.propagateContext)return r.opentelemetry.propagateContext;let u=t.toString();return a.length>0&&a.some(c=>typeof c=="string"?c==="*"?!0:u.startsWith(c):c.test(u))?!1:n&&t.protocol==="https:"&&(t.host===n||t.host===o||t.host===K()?.headers.host)||!n&&t.protocol==="http:"&&t.hostname==="localhost"?!0:i.some(c=>typeof c=="string"?c==="*"?!0:u.startsWith(c):c.test(u))}startSpan({tracer:t,url:r,fetchType:n,method:o="GET",name:i,attributes:a={}}){let u=this.config.resourceNameTemplate,c={[js]:o,[ks]:r.toString(),[Er]:r.host,[qs]:r.protocol.replace(":",""),[Ws]:r.hostname,[Ks]:r.port},s=u?Eu(u,c):Cp(r.toString()),f=i??`${n} ${o} ${r.toString()}`,p=l.context.active();return t.startSpan(f,{kind:l.SpanKind.CLIENT,attributes:{...c,"operation.name":`${n}.${o}`,"http.client.name":n,"resource.name":s,...a}},p)}instrumentHttp(t,r){let{tracerProvider:n}=this;if(!n)return;let o=n.getTracer(this.instrumentationName,this.instrumentationVersion),{attributesFromRequestHeaders:i,attributesFromResponseHeaders:a}=this.config,u=t.request,c=t.get,s=f=>(p,d,m)=>{let g,C={},M;if(typeof p=="string"||p instanceof URL?(g=new URL(p.toString()),typeof d=="function"?M=d:d&&typeof m=="function"?(C=d,M=m):d&&(C=d)):(C=p,typeof d=="function"&&(M=d),g=wp(C,r)),this.shouldIgnore(g))return f.apply(this,[g,C,M]);let T=this.startSpan({tracer:o,url:g,fetchType:"http",method:C.method||"GET"});if(!T.isRecording()||!zt(T.spanContext().traceFlags))return T.end(),f.apply(this,[g,C,M]);if(this.shouldPropagate(g)){let rt=l.context.active(),q=l.trace.setSpan(rt,T);l.propagation.inject(q,C.headers||{},Ip)}i&&Lr(T,i,C.headers||{},Tu);try{let rt=Date.now(),q=f.apply(this,[g,C,M]);return q.prependListener("response",U=>{let Mr=Date.now()-rt;T.setAttribute("http.response_time",Mr),U.statusCode!==void 0?(T.setAttribute(Mn,U.statusCode),U.statusCode>=500&&Gt(T,`Status: ${U.statusCode}`)):Gt(T,"Response status code is undefined"),a&&Lr(T,a,U.headers,Tu),q.listenerCount("response")<=1&&U.resume(),U.on("end",()=>{let bt,xr=U.statusCode;U.aborted&&!U.complete?bt={code:l.SpanStatusCode.ERROR}:xr&&xr>=100&&xr<500?bt={code:l.SpanStatusCode.UNSET}:bt={code:l.SpanStatusCode.ERROR},T.setStatus(bt),T.isRecording()&&(U.headers["content-length"]&&T.setAttribute(xn,U.headers["content-length"]),T.end())})}),q.on("error",U=>{T.isRecording()&&(Gt(T,U),T.end())}),q.on("close",()=>{T.isRecording()&&T.end()}),q}catch(rt){throw Gt(T,rt),T.end(),rt}};t.request=s(u),t.get=s(c)}instrumentFetch(){let{tracerProvider:t}=this;if(!t)return;let r=t.getTracer(this.instrumentationName,this.instrumentationVersion),{attributesFromRequestHeaders:n,attributesFromResponseHeaders:o}=this.config;process.env.NEXT_OTEL_FETCH_DISABLED="1";let i=globalThis.fetch;this.originalFetch=i;let a=async(u,c)=>{let s=c;if(s?.next?.internal)return i(u,s);let f=new Request(u instanceof Request?u.clone():u,s),p=new URL(f.url);if(this.shouldIgnore(p,s))return i(u,s);let d=this.startSpan({tracer:r,url:p,fetchType:"fetch",method:f.method,name:s?.opentelemetry?.spanName,attributes:s?.opentelemetry?.attributes});if(!d.isRecording()||!zt(d.spanContext().traceFlags))return d.end(),i(u,s);if(this.shouldPropagate(p,s)){let m=l.context.active(),g=l.trace.setSpan(m,d);l.propagation.inject(g,f.headers,Pp)}n&&Lr(d,n,f.headers,mu);try{let m=Date.now();s?.body&&s.body instanceof FormData&&f.headers.delete("content-type");let g=await i(u,{...s,headers:f.headers}),C=Date.now()-m;return d.setAttribute(Mn,g.status),d.setAttribute("http.response_time",C),o&&Lr(d,o,g.headers,mu),g.status>=500&&Gt(d,`Status: ${g.status} (${g.statusText})`),g.body?Np(g).then(M=>{d.isRecording()&&(d.setAttribute(xn,M),d.end())},M=>{d.isRecording()&&(Gt(d,M),d.end())}):d.end(),g}catch(m){throw Gt(d,m),d.end(),m}};globalThis.fetch=a}enable(){this.disable(),this.instrumentFetch();try{let t=fi("node:http"),r=fi("node:https");this.instrumentHttp(t,"http:"),this.instrumentHttp(r,"https:")}catch{}}disable(){this.originalFetch&&(globalThis.fetch=this.originalFetch)}},Pp={set(e,t,r){e.set(t,r)}},mu={get(e,t){let r=e.get(t);if(r!==null)return r.includes(",")?r.split(",").map(n=>n.trimStart()):r},keys(e){let t=[];return e.forEach((r,n)=>{t.push(n)}),t}},Ip={set(e,t,r){e[t.toLowerCase()]=r}},Tu={get(e,t){return e[t.toLowerCase()]},keys(e){return Object.keys(e)}};function Cp(e){let t=e.indexOf("?");return t===-1?e:e.substring(0,t)}function Np(e){let t=0,n=e.clone().body?.getReader();if(!n)return Promise.resolve(0);let o=()=>n.read().then(({done:i,value:a})=>{if(!i)return t+=a.byteLength,o()});return o().then(()=>t)}function Gt(e,t){if(t instanceof Error)e.recordException(t),e.setStatus({code:l.SpanStatusCode.ERROR,message:t.message});else{let r=String(t);e.setStatus({code:l.SpanStatusCode.ERROR,message:r})}}function Lr(e,t,r,n){for(let[o,i]of Object.entries(t)){let a=n.get(r,i);a!==void 0&&e.setAttribute(o,a)}}function wp(e,t){if(e.socketPath)throw new Error("Cannot construct a network URL: options.socketPath is specified, indicating a Unix domain socket.");let r=e.protocol??t;r&&!r.endsWith(":")&&(r+=":");let n=e.hostname,o=e.port??e.defaultPort;if(!n&&e.host){let s=e.host.split(":");n=s[0];let f=s[1];if(s.length>1&&f&&o===void 0){let p=parseInt(f,10);isNaN(p)||(o=p)}}n||(n="localhost");let i;if(o!==void 0&&o!==""){let s=parseInt(String(o),10);isNaN(s)?i=r==="https:"?443:80:i=s}else i=r==="https:"?443:80;let a=e.path||"/",u=`${r}//${n}:${i}`,c=new URL(a,u);if(e.auth){let s=e.auth.split(":");c.username=decodeURIComponent(s[0]||""),s.length>1&&(c.password=decodeURIComponent(s[1]||""))}return c}E();var Su=v(P(),1),Mp="00",ai="traceparent",ui="tracestate",Te=class{fields(){return[ai,ui]}inject(t,r,n){let o=l.trace.getSpanContext(t);if(!o||(0,Su.isTracingSuppressed)(t)||!(0,l.isSpanContextValid)(o))return;let i=`${Mp}-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||0).toString(16)}`;n.set(r,ai,i),o.traceState&&n.set(r,ui,o.traceState.serialize())}extract(t,r,n){let o=n.get(r,ai);if(!o)return t;let i=Array.isArray(o)?o[0]:o;if(typeof i!="string")return t;let a=xp(i);if(!a)return t;a.isRemote=!0;let u=n.get(r,ui);if(u){let c=Array.isArray(u)?u.join(","):u;a.traceState=(0,l.createTraceState)(typeof c=="string"?c:void 0)}return l.trace.setSpanContext(t,a)}};function xp(e){let[t,r,n,o,i]=e.split("-");return!t||!r||!n||!o||t.length!==2||r.length!==32||n.length!==16||o.length!==2||t==="00"&&i?null:{traceId:r,spanId:n,traceFlags:parseInt(o,16)}}E();var Pr=class{fields(){return[]}inject(){}extract(t){let r=K();if(!r?.telemetry)return l.diag.warn("@vercel/otel: Vercel telemetry extension not found."),t;let{rootSpanContext:n}=r.telemetry;return n?(l.diag.debug("@vercel/otel: Extracted root SpanContext from Vercel request context.",n),l.trace.setSpanContext(t,{...n,isRemote:!0,traceFlags:n.traceFlags||l.TraceFlags.SAMPLED})):t}};E();var Ir=v(P(),1);var ee=v(P()),Dp=BigInt(1e9);function yu(e){return BigInt(e[0])*Dp+BigInt(e[1])}function Up(e){var t=Number(BigInt.asUintN(32,e)),r=Number(BigInt.asUintN(32,e>>BigInt(32)));return{low:t,high:r}}function vu(e){var t=yu(e);return Up(t)}function Bp(e){var t=yu(e);return t.toString()}var Gp=typeof BigInt<"u"?Bp:ee.hrTimeToNanoseconds;function gu(e){return e}function Au(e){if(e!==void 0)return(0,ee.hexToBase64)(e)}var Vp={encodeHrTime:vu,encodeSpanContext:ee.hexToBase64,encodeOptionalSpanContext:Au};function Ru(e){var t,r;if(e===void 0)return Vp;var n=(t=e.useLongBits)!==null&&t!==void 0?t:!0,o=(r=e.useHex)!==null&&r!==void 0?r:!1;return{encodeHrTime:n?vu:Gp,encodeSpanContext:o?gu:ee.hexToBase64,encodeOptionalSpanContext:o?gu:Au}}var Hp=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){a={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i};function re(e){return Object.keys(e).map(function(t){return Ou(t,e[t])})}function Ou(e,t){return{key:e,value:bu(t)}}function bu(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(bu)}}:t==="object"&&e!=null?{kvlistValue:{values:Object.entries(e).map(function(r){var n=Hp(r,2),o=n[0],i=n[1];return Ou(o,i)})}}:{}}function Lu(e,t){var r,n=e.spanContext(),o=e.status;return{traceId:t.encodeSpanContext(n.traceId),spanId:t.encodeSpanContext(n.spanId),parentSpanId:t.encodeOptionalSpanContext(e.parentSpanId),traceState:(r=n.traceState)===null||r===void 0?void 0:r.serialize(),name:e.name,kind:e.kind==null?0:e.kind+1,startTimeUnixNano:t.encodeHrTime(e.startTime),endTimeUnixNano:t.encodeHrTime(e.endTime),attributes:re(e.attributes),droppedAttributesCount:e.droppedAttributesCount,events:e.events.map(function(i){return jp(i,t)}),droppedEventsCount:e.droppedEventsCount,status:{code:o.code,message:o.message},links:e.links.map(function(i){return Fp(i,t)}),droppedLinksCount:e.droppedLinksCount}}function Fp(e,t){var r;return{attributes:e.attributes?re(e.attributes):[],spanId:t.encodeSpanContext(e.context.spanId),traceId:t.encodeSpanContext(e.context.traceId),traceState:(r=e.context.traceState)===null||r===void 0?void 0:r.serialize(),droppedAttributesCount:e.droppedAttributesCount||0}}function jp(e,t){return{attributes:e.attributes?re(e.attributes):[],name:e.name,timeUnixNano:t.encodeHrTime(e.time),droppedAttributesCount:e.droppedAttributesCount||0}}var kp=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},qp=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){a={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i};function ci(e,t){var r=Ru(t);return{resourceSpans:Kp(e,r)}}function Xp(e){var t,r,n=new Map;try{for(var o=kp(e),i=o.next();!i.done;i=o.next()){var a=i.value,u=n.get(a.resource);u||(u=new Map,n.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(f){t={error:f}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return n}function Kp(e,t){for(var r=Xp(e),n=[],o=r.entries(),i=o.next();!i.done;){for(var a=qp(i.value,2),u=a[0],c=a[1],s=[],f=c.values(),p=f.next();!p.done;){var d=p.value;if(d.length>0){var m=d[0].instrumentationLibrary,g=m.name,C=m.version,M=m.schemaUrl,T=d.map(function(q){return Lu(q,t)});s.push({scope:{name:g,version:C},spans:T,schemaUrl:M})}p=f.next()}var rt={resource:{attributes:re(u.attributes),droppedAttributesCount:0},scopeSpans:s,schemaUrl:void 0};n.push(rt),i=o.next()}return n}var Cr=class{export(t,r){let n=K();if(!n?.telemetry){l.diag.warn("@vercel/otel: no telemetry context found"),r({code:Ir.ExportResultCode.SUCCESS,error:void 0});return}try{let o=ci(t,{useHex:!0,useLongBits:!1});n.telemetry.reportSpans(o),r({code:Ir.ExportResultCode.SUCCESS,error:void 0})}catch(o){r({code:Ir.ExportResultCode.FAILED,error:o instanceof Error?o:new Error(String(o))})}}shutdown(){return Promise.resolve()}forceFlush(){return Promise.resolve()}};E();function li(){return!!K()?.telemetry?.traceDrains?.length}var Pu=!1,Se=class{constructor(t){this.processor=t}forceFlush(){return this.processor.forceFlush()}shutdown(){return this.processor.shutdown()}onStart(t,r){if(li()){Pu||(Pu=!0,l.diag.debug("@vercel/otel: skipping automatic exporter due to configured trace drains"));return}this.processor.onStart(t,r)}onEnd(t){li()||this.processor.onEnd(t)}};var Wp={ALL:l.DiagLogLevel.ALL,VERBOSE:l.DiagLogLevel.VERBOSE,DEBUG:l.DiagLogLevel.DEBUG,INFO:l.DiagLogLevel.INFO,WARN:l.DiagLogLevel.WARN,ERROR:l.DiagLogLevel.ERROR,NONE:l.DiagLogLevel.NONE},Nr=class{constructor(t={}){this.configuration=t}start(){let t=Yp(),r=this.configuration,n=process.env.NEXT_RUNTIME||"nodejs",o=!!t.OTEL_SDK_DISABLED;if(process.env.OTEL_LOG_LEVEL&&l.diag.setLogger(new l.DiagConsoleLogger,{logLevel:Wp[process.env.OTEL_LOG_LEVEL.toUpperCase()]}),o)return;let i=r.idGenerator??new er,a=r.contextManager??new wu.AsyncLocalStorageContextManager;a.enable(),this.contextManager=a;let u=t.OTEL_SERVICE_NAME||r.serviceName||"app",c=new H(mr({[Ys]:u,"node.ci":process.env.CI?!0:void 0,"node.env":"production",env:process.env.VERCEL_ENV||process.env.NEXT_PUBLIC_VERCEL_ENV,"vercel.region":process.env.VERCEL_REGION,"vercel.runtime":n,"vercel.sha":process.env.VERCEL_GIT_COMMIT_SHA||process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA,"vercel.host":process.env.VERCEL_URL||process.env.NEXT_PUBLIC_VERCEL_URL||void 0,"vercel.branch_host":process.env.VERCEL_BRANCH_URL||process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL||void 0,"vercel.deployment_id":process.env.VERCEL_DEPLOYMENT_ID||void 0,[zs]:process.env.VERCEL_DEPLOYMENT_ID,"vercel.project_id":process.env.VERCEL_PROJECT_ID||void 0,...r.attributes})),s=r.resourceDetectors??[Mo];if(r.autoDetectResources??!0){let T={detectors:s};c=c.merge(Do(T))}let p=$p(r.propagators,r,t),d=Qp(r.traceSampler,t),m=Zp(r.spanProcessors,r,t);m.length===0&&l.diag.warn("@vercel/otel: No span processors configured. No spans will be exported.");let g=r.spanLimits,C=new Vo({resource:c,idGenerator:i,sampler:d,spanLimits:g});if(C.addSpanProcessor(new Tr(m,r.attributesFromHeaders)),C.register({contextManager:a,propagator:new Ot.CompositePropagator({propagators:p})}),this.tracerProvider=C,r.logRecordProcessor){let T=new yn({resource:c});this.loggerProvider=T,T.addLogRecordProcessor(r.logRecordProcessor),at.logs.setGlobalLoggerProvider(T)}if(r.metricReader||r.views){let T=new Cn({resource:c,views:r.views??[]});r.metricReader&&T.addMetricReader(r.metricReader),l.metrics.setGlobalMeterProvider(T),this.meterProvider=T}let M=zp(r.instrumentations,r.instrumentationConfig);this.disableInstrumentations=(0,Nu.registerInstrumentations)({instrumentations:M}),l.diag.info("@vercel/otel: started",u,n)}async shutdown(){let t=[];this.tracerProvider&&t.push(this.tracerProvider.shutdown()),this.loggerProvider&&t.push(this.loggerProvider.shutdown()),this.meterProvider&&t.push(this.meterProvider.shutdown()),l.diag.info("@vercel/otel: shutting down",t.length,process.env.NEXT_RUNTIME),await Promise.all(t),this.contextManager&&this.contextManager.disable();let{disableInstrumentations:r}=this;r&&r()}};function Yp(){let e=(0,wr.parseEnvironment)(process.env);return{...wr.DEFAULT_ENVIRONMENT,...e}}function zp(e,t){return(e??["auto"]).map(r=>r==="auto"?(l.diag.debug("@vercel/otel: Configure instrumentations: fetch",t?.fetch),[new te(t?.fetch)]):r==="fetch"?(l.diag.debug("@vercel/otel: Configure instrumentations: fetch",t?.fetch),new te(t?.fetch)):r).flat()}function $p(e,t,r){let n=process.env.OTEL_PROPAGATORS&&r.OTEL_PROPAGATORS&&r.OTEL_PROPAGATORS.length>0?r.OTEL_PROPAGATORS:void 0;return(e??n??["auto"]).map(o=>{if(o==="none")return[];if(o==="auto"){let i=[];return i.push({name:"tracecontext",propagator:new Te}),i.push({name:"baggage",propagator:new Ot.W3CBaggagePropagator}),i.push({name:"vercel-runtime",propagator:new Pr}),l.diag.debug(`@vercel/otel: Configure propagators: ${i.map(a=>a.name).join(", ")}`),i.map(a=>a.propagator)}if(o==="tracecontext")return l.diag.debug("@vercel/otel: Configure propagator: tracecontext"),new Te;if(o==="baggage")return l.diag.debug("@vercel/otel: Configure propagator: baggage"),new Ot.W3CBaggagePropagator;if(typeof o=="string")throw new Error(`Unknown propagator: "${o}"`);return o}).flat()}var Iu="always_on",ne=1;function Qp(e,t){if(e&&typeof e!="string")return e;let r=e&&e!=="auto"?e:t.OTEL_TRACES_SAMPLER||Iu;switch(l.diag.debug("@vercel/otel: Configure sampler: ",r),r){case"always_on":return new X;case"always_off":return new st;case"parentbased_always_on":return new Et({root:new X});case"parentbased_always_off":return new Et({root:new st});case"traceidratio":return new kt(Cu(t));case"parentbased_traceidratio":return new Et({root:new kt(Cu(t))});default:return l.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER value "${String(t.OTEL_TRACES_SAMPLER)} invalid, defaulting to ${Iu}".`),new X}}function Cu(e){if(e.OTEL_TRACES_SAMPLER_ARG===void 0||e.OTEL_TRACES_SAMPLER_ARG==="")return l.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${ne}.`),ne;l.diag.debug("@vercel/otel: Configure sampler probability: ",e.OTEL_TRACES_SAMPLER_ARG);let t=Number(e.OTEL_TRACES_SAMPLER_ARG);return isNaN(t)?(l.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG=${e.OTEL_TRACES_SAMPLER_ARG} was given, but it is invalid, defaulting to ${ne}.`),ne):t<0||t>1?(l.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG=${e.OTEL_TRACES_SAMPLER_ARG} was given, but it is out of range ([0..1]), defaulting to ${ne}.`),ne):t}function Zp(e,t,r){return[...(e??["auto"]).flatMap(n=>{if(n==="auto"){let o=[new Mt(new Cr)];if(process.env.VERCEL_OTEL_ENDPOINTS){let i=process.env.VERCEL_OTEL_ENDPOINTS_PORT||"4318",a=process.env.VERCEL_OTEL_ENDPOINTS_PROTOCOL||"http/protobuf";l.diag.debug("@vercel/otel: Configure vercel otel collector on port: ",i,a);let u={url:`http://localhost:${i}/v1/traces`,headers:{}},c=a==="http/protobuf"?new Bt(u):new Qt(u);o.push(new Se(new Mt(c)))}else(!t.traceExporter||t.traceExporter==="auto"||r.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT||r.OTEL_EXPORTER_OTLP_ENDPOINT)&&o.push(new Se(new Mt(Jp(r))));return o}return n}).filter(rd),...t.traceExporter&&t.traceExporter!=="auto"?[new Mt(t.traceExporter)]:[]]}function Jp(e){let t=process.env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL??process.env.OTEL_EXPORTER_OTLP_PROTOCOL??"http/protobuf",r=ed(e),n={...Ot.baggageUtils.parseKeyPairsIntoRecord(e.OTEL_EXPORTER_OTLP_HEADERS),...Ot.baggageUtils.parseKeyPairsIntoRecord(e.OTEL_EXPORTER_OTLP_TRACES_HEADERS)};switch(l.diag.debug("@vercel/otel: Configure trace exporter: ",t,r,`headers: ${Object.keys(n).join(",")||"<none>"}`),t){case"http/json":return new Qt({url:r,headers:n});case"http/protobuf":return new Bt({url:r,headers:n});default:return l.diag.warn(`@vercel/otel: Unsupported OTLP traces protocol: ${t}. Using http/protobuf.`),new Bt}}var Mu="v1/traces",td=`http://localhost:4318/${Mu}`;function ed(e){let t=e.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT;if(t&&typeof t=="string")return t;let r=e.OTEL_EXPORTER_OTLP_ENDPOINT;return r&&typeof r=="string"?`${r}/${Mu}`:td}function rd(e){return e!=null}function MT(e){let t;e?typeof e=="string"?t={serviceName:e}:t=e:t={},new Nr(t).start()}export{te as FetchInstrumentation,Qt as OTLPHttpJsonTraceExporter,Bt as OTLPHttpProtoTraceExporter,MT as registerOTel};
|
|
15
|
+
`,Rn(s,t),`To resolve the conflict:
|
|
16
|
+
`,On(s,t))}}catch(f){n={error:f}}finally{try{u&&!u.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}return i},e}();var As=function(){function e(t){this._backingStorages=t}return e.prototype.record=function(t,r,n,o){this._backingStorages.forEach(function(i){i.record(t,r,n,o)})},e}();E();E();var Rs=function(){function e(t,r){this._instrumentName=t,this._valueType=r,this._buffer=new J}return e.prototype.observe=function(t,r){if(r===void 0&&(r={}),typeof t!="number"){l.diag.warn("non-number value provided to metric "+this._instrumentName+": "+t);return}this._valueType===l.ValueType.INT&&!Number.isInteger(t)&&(l.diag.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(r,t)},e}();var Os=function(){function e(){this._buffer=new Map}return e.prototype.observe=function(t,r,n){if(n===void 0&&(n={}),!!fe(t)){var o=this._buffer.get(t);if(o==null&&(o=new J,this._buffer.set(t,o)),typeof r!="number"){l.diag.warn("non-number value provided to metric "+t._descriptor.name+": "+r);return}t._descriptor.valueType===l.ValueType.INT&&!Number.isInteger(r)&&(l.diag.warn("INT value type cannot accept a floating-point value for "+t._descriptor.name+", ignoring the fractional digits."),r=Math.trunc(r),!Number.isInteger(r))||o.set(n,r)}},e}();var Ln=function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function u(f){try{s(n.next(f))}catch(p){a(p)}}function c(f){try{s(n.throw(f))}catch(p){a(p)}}function s(f){f.done?i(f.value):o(f.value).then(u,c)}s((n=n.apply(e,t||[])).next())})},Pn=function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,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(f){return c([s,f])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=s[0]&2?o.return:s[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;switch(o=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,o=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1],i=s;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(s);break}i[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(f){s=[6,f],o=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},bs=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){a={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i},Ls=function(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))},Ps=function(){function e(){this._callbacks=[],this._batchCallbacks=[]}return e.prototype.addCallback=function(t,r){var n=this._findCallback(t,r);n>=0||this._callbacks.push({callback:t,instrument:r})},e.prototype.removeCallback=function(t,r){var n=this._findCallback(t,r);n<0||this._callbacks.splice(n,1)},e.prototype.addBatchCallback=function(t,r){var n=new Set(r.filter(fe));if(n.size===0){l.diag.error("BatchObservableCallback is not associated with valid instruments",r);return}var o=this._findBatchCallback(t,n);o>=0||this._batchCallbacks.push({callback:t,instruments:n})},e.prototype.removeBatchCallback=function(t,r){var n=new Set(r.filter(fe)),o=this._findBatchCallback(t,n);o<0||this._batchCallbacks.splice(o,1)},e.prototype.observe=function(t,r){return Ln(this,void 0,void 0,function(){var n,o,i,a;return Pn(this,function(u){switch(u.label){case 0:return n=this._observeCallbacks(t,r),o=this._observeBatchCallbacks(t,r),[4,is(Ls(Ls([],bs(n),!1),bs(o),!1))];case 1:return i=u.sent(),a=i.filter(os).map(function(c){return c.reason}),[2,a]}})})},e.prototype._observeCallbacks=function(t,r){var n=this;return this._callbacks.map(function(o){var i=o.callback,a=o.instrument;return Ln(n,void 0,void 0,function(){var u,c;return Pn(this,function(s){switch(s.label){case 0:return u=new Rs(a._descriptor.name,a._descriptor.valueType),c=Promise.resolve(i(u)),r!=null&&(c=yn(c,r)),[4,c];case 1:return s.sent(),a._metricStorages.forEach(function(f){f.record(u._buffer,t)}),[2]}})})})},e.prototype._observeBatchCallbacks=function(t,r){var n=this;return this._batchCallbacks.map(function(o){var i=o.callback,a=o.instruments;return Ln(n,void 0,void 0,function(){var u,c;return Pn(this,function(s){switch(s.label){case 0:return u=new Os,c=Promise.resolve(i(u)),r!=null&&(c=yn(c,r)),[4,c];case 1:return s.sent(),a.forEach(function(f){var p=u._buffer.get(f);p!=null&&f._metricStorages.forEach(function(d){d.record(p,t)})}),[2]}})})})},e.prototype._findCallback=function(t,r){return this._callbacks.findIndex(function(n){return n.callback===t&&n.instrument===r})},e.prototype._findBatchCallback=function(t,r){return this._batchCallbacks.findIndex(function(n){return n.callback===t&&ss(n.instruments,r)})},e}();var Pf=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(n[i]=o[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Is=function(e){Pf(t,e);function t(r,n,o,i){var a=e.call(this,r)||this;return a._attributesProcessor=o,a._deltaMetricStorage=new cr(n),a._temporalMetricStorage=new lr(n,i),a}return t.prototype.record=function(r,n,o,i){n=this._attributesProcessor.process(n,o),this._deltaMetricStorage.record(r,n,o,i)},t.prototype.collect=function(r,n){var o=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(r,this._instrumentDescriptor,o,n)},t}(ur);var Cs=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(n[i]=o[i])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),fr=function(){function e(){}return e.Noop=function(){return Cf},e}();var If=function(e){Cs(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.process=function(r,n){return r},t}(fr);var gE=function(e){Cs(t,e);function t(r){var n=e.call(this)||this;return n._allowedAttributeNames=r,n}return t.prototype.process=function(r,n){var o=this,i={};return Object.keys(r).filter(function(a){return o._allowedAttributeNames.includes(a)}).forEach(function(a){return i[a]=r[a]}),i},t}(fr);var Cf=new If;var Nf=function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function u(f){try{s(n.next(f))}catch(p){a(p)}}function c(f){try{s(n.throw(f))}catch(p){a(p)}}function s(f){f.done?i(f.value):o(f.value).then(u,c)}s((n=n.apply(e,t||[])).next())})},wf=function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,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(f){return c([s,f])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=s[0]&2?o.return:s[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;switch(o=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,o=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1],i=s;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(s);break}i[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(f){s=[6,f],o=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},Mf=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){a={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i},Ns=function(){function e(t,r){this._meterProviderSharedState=t,this._instrumentationScope=r,this.metricStorageRegistry=new vs,this.observableRegistry=new Ps,this.meter=new Ts(this)}return e.prototype.registerMetricStorage=function(t){var r=this._registerMetricStorage(t,Is);return r.length===1?r[0]:new As(r)},e.prototype.registerAsyncMetricStorage=function(t){var r=this._registerMetricStorage(t,ys);return r},e.prototype.collect=function(t,r,n){return Nf(this,void 0,void 0,function(){var o,i,a;return wf(this,function(u){switch(u.label){case 0:return[4,this.observableRegistry.observe(r,n?.timeoutMillis)];case 1:return o=u.sent(),i=this.metricStorageRegistry.getStorages(t),i.length===0?[2,null]:(a=i.map(function(c){return c.collect(t,r)}).filter(es),a.length===0?[2,{errors:o}]:[2,{scopeMetrics:{scope:this._instrumentationScope,metrics:a},errors:o}])}})})},e.prototype._registerMetricStorage=function(t,r){var n=this,o=this._meterProviderSharedState.viewRegistry.findViews(t,this._instrumentationScope),i=o.map(function(c){var s=us(c,t),f=n.metricStorageRegistry.findOrUpdateCompatibleStorage(s);if(f!=null)return f;var p=c.aggregation.createAggregator(s),d=new r(s,p,c.attributesProcessor,n._meterProviderSharedState.metricCollectors);return n.metricStorageRegistry.register(d),d});if(i.length===0){var a=this._meterProviderSharedState.selectAggregations(t.type),u=a.map(function(c){var s=Mf(c,2),f=s[0],p=s[1],d=n.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(f,t);if(d!=null)return d;var m=p.createAggregator(t),g=new r(t,m,fr.Noop(),[f]);return n.metricStorageRegistry.registerForCollector(f,g),g});i=i.concat(u)}return i},e}();var xf=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ws=function(){function e(t){this.resource=t,this.viewRegistry=new ls,this.metricCollectors=[],this.meterSharedStates=new Map}return e.prototype.getMeterSharedState=function(t){var r=ns(t),n=this.meterSharedStates.get(r);return n==null&&(n=new Ns(this,t),this.meterSharedStates.set(r,n)),n},e.prototype.selectAggregations=function(t){var r,n,o=[];try{for(var i=xf(this.metricCollectors),a=i.next();!a.done;a=i.next()){var u=a.value;o.push([u,u.selectAggregation(t)])}}catch(c){r={error:c}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return o},e}();var Ms=v(P()),pr=function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function u(f){try{s(n.next(f))}catch(p){a(p)}}function c(f){try{s(n.throw(f))}catch(p){a(p)}}function s(f){f.done?i(f.value):o(f.value).then(u,c)}s((n=n.apply(e,t||[])).next())})},dr=function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,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(f){return c([s,f])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=s[0]&2?o.return:s[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;switch(o=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,o=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1],i=s;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(s);break}i[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(f){s=[6,f],o=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},Df=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){a={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i},Uf=function(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))},xs=function(){function e(t,r){this._sharedState=t,this._metricReader=r}return e.prototype.collect=function(t){return pr(this,void 0,void 0,function(){var r,n,o,i,a=this;return dr(this,function(u){switch(u.label){case 0:return r=(0,Ms.millisToHrTime)(Date.now()),n=[],o=[],i=Array.from(this._sharedState.meterSharedStates.values()).map(function(c){return pr(a,void 0,void 0,function(){var s;return dr(this,function(f){switch(f.label){case 0:return[4,c.collect(this,r,t)];case 1:return s=f.sent(),s?.scopeMetrics!=null&&n.push(s.scopeMetrics),s?.errors!=null&&o.push.apply(o,Uf([],Df(s.errors),!1)),[2]}})})}),[4,Promise.all(i)];case 1:return u.sent(),[2,{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:n},errors:o}]}})})},e.prototype.forceFlush=function(t){return pr(this,void 0,void 0,function(){return dr(this,function(r){switch(r.label){case 0:return[4,this._metricReader.forceFlush(t)];case 1:return r.sent(),[2]}})})},e.prototype.shutdown=function(t){return pr(this,void 0,void 0,function(){return dr(this,function(r){switch(r.label){case 0:return[4,this._metricReader.shutdown(t)];case 1:return r.sent(),[2]}})})},e.prototype.selectAggregationTemporality=function(t){return this._metricReader.selectAggregationTemporality(t)},e.prototype.selectAggregation=function(t){return this._metricReader.selectAggregation(t)},e}();var Ds=function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function u(f){try{s(n.next(f))}catch(p){a(p)}}function c(f){try{s(n.throw(f))}catch(p){a(p)}}function s(f){f.done?i(f.value):o(f.value).then(u,c)}s((n=n.apply(e,t||[])).next())})},Us=function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,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(f){return c([s,f])}}function c(s){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=s[0]&2?o.return:s[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,s[1])).done)return i;switch(o=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,o=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){r.label=s[1];break}if(s[0]===6&&r.label<i[1]){r.label=i[1],i=s;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(s);break}i[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(f){s=[6,f],o=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},Bf=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},In=function(){function e(t){var r,n,o;this._shutdown=!1;var i=H.default().merge((o=t?.resource)!==null&&o!==void 0?o:H.empty());if(this._sharedState=new ws(i),t?.views!=null&&t.views.length>0)try{for(var a=Bf(t.views),u=a.next();!u.done;u=a.next()){var c=u.value;this._sharedState.viewRegistry.addView(c)}}catch(s){r={error:s}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}}return e.prototype.getMeter=function(t,r,n){return r===void 0&&(r=""),n===void 0&&(n={}),this._shutdown?(l.diag.warn("A shutdown MeterProvider cannot provide a Meter"),(0,l.createNoopMeter)()):this._sharedState.getMeterSharedState({name:t,version:r,schemaUrl:n.schemaUrl}).meter},e.prototype.addMetricReader=function(t){var r=new xs(this._sharedState,t);t.setMetricProducer(r),this._sharedState.metricCollectors.push(r)},e.prototype.shutdown=function(t){return Ds(this,void 0,void 0,function(){return Us(this,function(r){switch(r.label){case 0:return this._shutdown?(l.diag.warn("shutdown may only be called once per MeterProvider"),[2]):(this._shutdown=!0,[4,Promise.all(this._sharedState.metricCollectors.map(function(n){return n.shutdown(t)}))]);case 1:return r.sent(),[2]}})})},e.prototype.forceFlush=function(t){return Ds(this,void 0,void 0,function(){return Us(this,function(r){switch(r.label){case 0:return this._shutdown?(l.diag.warn("invalid attempt to force flush after MeterProvider shutdown"),[2]):[4,Promise.all(this._sharedState.metricCollectors.map(function(n){return n.forceFlush(t)}))];case 1:return r.sent(),[2]}})})},e}();var Nr=v(be(),1),Fu=v(Hs(),1),Ot=v(P(),1);E();var kf=Symbol.for("@vercel/request-context");function K(){return globalThis[kf]?.get()}var Fs="http.method",js="http.url",Er="http.host",ks="http.scheme",wn="http.status_code",qs="http.user_agent",Mn="http.response_content_length_uncompressed",Xs="net.peer.port",Ks="net.peer.name",Ws="cloud.region";var Ys="deployment.environment.name",zs="deployment.id";var $s="process.runtime.name",Qs="vcs.ref.head.name",Js="vcs.ref.head.revision",Zs="vcs.repository.name",ta="vcs.repository.ref.revision";var ea="service.name",ra="service.version";function xn(e){return Object.fromEntries(Object.entries(e).filter(([t,r])=>r!==void 0))}function ia({attributes:e,env:t=process.env,runtime:r,serviceName:n}){let o=t.VERCEL_ENV||t.NEXT_PUBLIC_VERCEL_ENV,i=t.VERCEL_DEPLOYMENT_ID,a=t.VERCEL_GIT_COMMIT_SHA||t.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA,u=t.VERCEL_REGION,c=t.VERCEL_GIT_COMMIT_REF,s=t.VERCEL_URL||t.NEXT_PUBLIC_VERCEL_URL||void 0,f=t.VERCEL_BRANCH_URL||t.NEXT_PUBLIC_VERCEL_BRANCH_URL||void 0,p=t.VERCEL_GIT_REPO_SLUG;return xn({[ea]:n,"node.ci":t.CI?!0:void 0,"node.env":t.NODE_ENV,[Ys]:o,env:o,[Ws]:u,"vercel.region":u,[$s]:r,"vercel.runtime":r,[Qs]:c,[Js]:a,[Zs]:p,[ta]:a,"vercel.sha":a,"vercel.host":s,"vercel.branch_host":f,[zs]:i,"vercel.deployment_id":i,[ra]:i,"vercel.project_id":t.VERCEL_PROJECT_ID||void 0,...e})}function oa(e){return e?e.split("::").at(-1):void 0}function sa(e=K(),t){if(!e)return;let r=t?Xf(t,e.headers):void 0;return xn({[Er]:e.headers.host,[qs]:e.headers["user-agent"],"http.referer":e.headers.referer,"vercel.request_id":oa(e.headers["x-vercel-id"]),"vercel.matched_path":e.headers["x-matched-path"],"vercel.edge_region":process.env.VERCEL_REGION,...r})}var qf={keys(e){return[]},get(e,t){return e[t.toLocaleLowerCase()]}};function Xf(e,t){if(typeof e=="function")return e(t,qf);let r={};for(let[n,o]of Object.entries(e)){let i=t[o.toLocaleLowerCase()];i!==void 0&&(r[n]=i)}return r}E();function zt(e){return(e&l.TraceFlags.SAMPLED)!==0}var mr=class{constructor(t,r){this.processors=t;this.attributesFromHeaders=r;this.rootSpanIds=new Map;this.waitSpanEnd=new Map}forceFlush(){return Promise.all(this.processors.map(t=>t.forceFlush().catch(r=>{l.diag.error("@vercel/otel: forceFlush failed:",r)}))).then(()=>{})}shutdown(){return Promise.all(this.processors.map(t=>t.shutdown().catch(()=>{}))).then(()=>{})}onStart(t,r){let{traceId:n,spanId:o,traceFlags:i}=t.spanContext(),a=!t.parentSpanId||!this.rootSpanIds.has(n);if(a?this.rootSpanIds.set(n,{rootSpanId:o,open:[]}):this.rootSpanIds.get(n)?.open.push(t),a&&zt(i)){let u=K(),c=sa(u,this.attributesFromHeaders);c&&t.setAttributes(c),u&&u.waitUntil(async()=>{if(this.rootSpanIds.has(n)){let s=new Promise(p=>{this.waitSpanEnd.set(n,p)}),f;await Promise.race([s,new Promise(p=>{f=setTimeout(()=>{this.waitSpanEnd.delete(n),p(void 0)},50)})]),f&&clearTimeout(f)}return this.forceFlush()})}for(let u of this.processors)u.onStart(t,r)}onEnd(t){let{traceId:r,spanId:n,traceFlags:o}=t.spanContext(),i=zt(o),a=this.rootSpanIds.get(r),u=a?.rootSpanId===n;if(i){let c=Wf(t);c&&Object.assign(t.attributes,c)}if(u){if(this.rootSpanIds.delete(r),a.open.length>0){for(let c of a.open)if(!c.ended&&c.spanContext().spanId!==n)try{c.end()}catch(s){l.diag.error("@vercel/otel: onEnd failed:",s)}}}else if(a)for(let c=0;c<a.open.length;c++)a.open[c]?.spanContext().spanId===n&&a.open.splice(c,1);for(let c of this.processors)c.onEnd(t);if(u){let c=this.waitSpanEnd.get(r);c&&(this.waitSpanEnd.delete(r),c())}}},Kf={[l.SpanKind.INTERNAL]:"internal",[l.SpanKind.SERVER]:"server",[l.SpanKind.CLIENT]:"client",[l.SpanKind.PRODUCER]:"producer",[l.SpanKind.CONSUMER]:"consumer"};function Wf(e){let{kind:t,attributes:r}=e,{"operation.name":n,"resource.name":o,"span.type":i,"next.span_type":a,"http.method":u,"http.route":c}=r;if(n)return;let s=o??(u&&typeof u=="string"&&c&&typeof c=="string"?`${u} ${c}`:c);if(e.kind===l.SpanKind.SERVER&&u&&c&&typeof u=="string"&&typeof c=="string")return{"operation.name":"web.request","resource.name":s};let f=e.instrumentationLibrary.name,p=a??i;if(p&&typeof p=="string"){let d=aa(f,p);return c?{"operation.name":d,"resource.name":s}:{"operation.name":d}}return{"operation.name":aa(f,t===l.SpanKind.INTERNAL?"":Kf[t])}}function aa(e,t){if(!e)return t;let r=e.replace(/[ @./]/g,"_");return r.startsWith("_")&&(r=r.slice(1)),t?`${r}.${t}`:r}var va=v(Fn(),1);var ya=v(ga(),1);E();var $t=class extends ya.OTLPExporterBase{constructor(t={}){super(t),t.headers&&(this._headers=t.headers)}onShutdown(){l.diag.debug("@vercel/otel/otlp: onShutdown")}onInit(){l.diag.debug("@vercel/otel/otlp: onInit")}send(t,r,n){if(this._shutdownOnce.isCalled){l.diag.debug("@vercel/otel/otlp: Shutdown already started. Cannot send objects");return}let o=this.convert(t),i,a,u;try{({body:i,contentType:a,headers:u}=this.toMessage(o))}catch(s){l.diag.warn("@vercel/otel/otlp: no proto",s);return}let c=fetch(this.url,{method:"POST",body:i,headers:{...this._headers,...u,"Content-Type":a,"User-Agent":"OTel-OTLP-Exporter-JavaScript/0.46.0"},next:{internal:!0}}).then(s=>{l.diag.debug("@vercel/otel/otlp: onSuccess",s.status,s.statusText),r(),s.arrayBuffer().catch(()=>{})}).catch(s=>{l.diag.error("@vercel/otel/otlp: onError",s),n(s)}).finally(()=>{let s=this._sendingPromises.indexOf(c);this._sendingPromises.splice(s,1)});this._sendingPromises.push(c)}getDefaultUrl(t){throw new Error("Method not implemented.")}};var _p="v1/traces",hp=`http://localhost:4318/${_p}`;function yr(e){return typeof e.url=="string"?e.url:hp}var Qt=class{constructor(t={}){this.impl=new Xn(t)}export(t,r){this.impl.export(t,r)}shutdown(){return this.impl.shutdown()}forceFlush(){return this.impl.forceFlush()}},Xn=class extends $t{convert(t){return(0,va.createExportTraceServiceRequest)(t,{useHex:!0,useLongBits:!1})}toMessage(t){return{body:JSON.stringify(t),contentType:"application/json"}}getDefaultUrl(t){return yr(t)}};var Ru=v(Fn(),1);var yu=v(gu(),1);function vu(e){let t=new yu.Writer;return bp(e,t),t.finish()}function bp(e,t){if(e.resourceSpans!=null&&e.resourceSpans.length)for(let r=0;r<e.resourceSpans.length;++r)Lp(e.resourceSpans[r],t.uint32(10).fork()).ldelim();return t}function Lp(e,t){if(e.resource!=null&&Pp(e.resource,t.uint32(10).fork()).ldelim(),e.scopeSpans!=null&&e.scopeSpans.length)for(let r=0;r<e.scopeSpans.length;++r)Ip(e.scopeSpans[r],t.uint32(18).fork()).ldelim();return e.schemaUrl!=null&&t.uint32(26).string(e.schemaUrl),t}function Pp(e,t){if(e.attributes!=null&&e.attributes.length)for(let r=0;r<e.attributes.length;++r)Zt(e.attributes[r],t.uint32(10).fork()).ldelim();return e.droppedAttributesCount!=null&&t.uint32(16).uint32(e.droppedAttributesCount),t}function Ip(e,t){if(e.scope!=null&&wp(e.scope,t.uint32(10).fork()).ldelim(),e.spans!=null&&e.spans.length)for(let r=0;r<e.spans.length;++r)Mp(e.spans[r],t.uint32(18).fork()).ldelim();return e.schemaUrl!=null&&t.uint32(26).string(e.schemaUrl),t}function Zt(e,t){return e.key!=null&&t.uint32(10).string(e.key),e.value!=null&&Au(e.value,t.uint32(18).fork()).ldelim(),t}function Au(e,t){return e.stringValue!=null&&t.uint32(10).string(e.stringValue),e.boolValue!=null&&t.uint32(16).bool(e.boolValue),e.intValue!=null&&t.uint32(24).int64(e.intValue),e.doubleValue!=null&&t.uint32(33).double(e.doubleValue),e.arrayValue!=null&&Cp(e.arrayValue,t.uint32(42).fork()).ldelim(),e.kvlistValue!=null&&Np(e.kvlistValue,t.uint32(50).fork()).ldelim(),e.bytesValue!=null&&t.uint32(58).bytes(e.bytesValue),t}function Cp(e,t){if(e.values!=null&&e.values.length)for(let r=0;r<e.values.length;++r)Au(e.values[r],t.uint32(10).fork()).ldelim();return t}function Np(e,t){if(e.values!=null&&e.values.length)for(let r=0;r<e.values.length;++r)Zt(e.values[r],t.uint32(10).fork()).ldelim();return t}function wp(e,t){if(e.name!=null&&t.uint32(10).string(e.name),e.version!=null&&t.uint32(18).string(e.version),e.attributes!=null&&e.attributes.length)for(let r=0;r<e.attributes.length;++r)Zt(e.attributes[r],t.uint32(26).fork()).ldelim();return e.droppedAttributesCount!=null&&t.uint32(32).uint32(e.droppedAttributesCount),t}function Mp(e,t){if(e.traceId!=null&&t.uint32(10).bytes(e.traceId),e.spanId!=null&&t.uint32(18).bytes(e.spanId),e.traceState!=null&&t.uint32(26).string(e.traceState),e.parentSpanId!=null&&t.uint32(34).bytes(e.parentSpanId),e.name!=null&&t.uint32(42).string(e.name),e.kind!=null&&t.uint32(48).int32(e.kind),e.startTimeUnixNano!=null&&t.uint32(57).fixed64(e.startTimeUnixNano),e.endTimeUnixNano!=null&&t.uint32(65).fixed64(e.endTimeUnixNano),e.attributes!=null&&e.attributes.length)for(let r=0;r<e.attributes.length;++r)Zt(e.attributes[r],t.uint32(74).fork()).ldelim();if(e.droppedAttributesCount!=null&&t.uint32(80).uint32(e.droppedAttributesCount),e.events!=null&&e.events.length)for(let r=0;r<e.events.length;++r)Dp(e.events[r],t.uint32(90).fork()).ldelim();if(e.droppedEventsCount!=null&&t.uint32(96).uint32(e.droppedEventsCount),e.links!=null&&e.links.length)for(let r=0;r<e.links.length;++r)Up(e.links[r],t.uint32(106).fork()).ldelim();return e.droppedLinksCount!=null&&t.uint32(112).uint32(e.droppedLinksCount),e.status!=null&&xp(e.status,t.uint32(122).fork()).ldelim(),t}function xp(e,t){return e.message!=null&&t.uint32(18).string(e.message),e.code!=null&&t.uint32(24).int32(e.code),t}function Dp(e,t){if(e.timeUnixNano!=null&&t.uint32(9).fixed64(e.timeUnixNano),e.name!=null&&t.uint32(18).string(e.name),e.attributes!=null&&e.attributes.length)for(let r=0;r<e.attributes.length;++r)Zt(e.attributes[r],t.uint32(26).fork()).ldelim();return e.droppedAttributesCount!=null&&t.uint32(32).uint32(e.droppedAttributesCount),t}function Up(e,t){if(e.traceId!=null&&t.uint32(10).bytes(e.traceId),e.spanId!=null&&t.uint32(18).bytes(e.spanId),e.traceState!=null&&t.uint32(26).string(e.traceState),e.attributes!=null&&e.attributes.length)for(let r=0;r<e.attributes.length;++r)Zt(e.attributes[r],t.uint32(34).fork()).ldelim();return e.droppedAttributesCount!=null&&t.uint32(40).uint32(e.droppedAttributesCount),t}var Bt=class{constructor(t={}){this.impl=new oi(t)}export(t,r){this.impl.export(t,r)}shutdown(){return this.impl.shutdown()}forceFlush(){return this.impl.forceFlush()}},oi=class extends $t{convert(t){return(0,Ru.createExportTraceServiceRequest)(t,void 0)}toMessage(t){return{body:vu(t),contentType:"application/x-protobuf",headers:{accept:"application/x-protobuf"}}}getDefaultUrl(t){return yr(t)}};E();function Ou(e,t){return e.replace(/\{(?<temp1>[^{}]+)\}/g,(r,n)=>{let o=t[n];return o!==void 0?String(o):r})}var te=class{constructor(t={}){this.instrumentationName="@vercel/otel/fetch";this.instrumentationVersion="1.0.0";this.config=t}getConfig(){return this.config}setConfig(){}setTracerProvider(t){this.tracerProvider=t}setMeterProvider(){}shouldIgnore(t,r){let n=this.config.ignoreUrls??[];if(r?.opentelemetry?.ignore!==void 0)return r.opentelemetry.ignore;if(n.length===0)return!1;let o=t.toString();return n.some(i=>typeof i=="string"?i==="*"?!0:o.startsWith(i):i.test(o))}shouldPropagate(t,r){let n=process.env.VERCEL_URL||process.env.NEXT_PUBLIC_VERCEL_URL||null,o=process.env.VERCEL_BRANCH_URL||process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL||null,i=this.config.propagateContextUrls??[],a=this.config.dontPropagateContextUrls??[];if(r?.opentelemetry?.propagateContext)return r.opentelemetry.propagateContext;let u=t.toString();return a.length>0&&a.some(c=>typeof c=="string"?c==="*"?!0:u.startsWith(c):c.test(u))?!1:n&&t.protocol==="https:"&&(t.host===n||t.host===o||t.host===K()?.headers.host)||!n&&t.protocol==="http:"&&t.hostname==="localhost"?!0:i.some(c=>typeof c=="string"?c==="*"?!0:u.startsWith(c):c.test(u))}startSpan({tracer:t,url:r,fetchType:n,method:o="GET",name:i,attributes:a={}}){let u=this.config.resourceNameTemplate,c={[Fs]:o,[js]:r.toString(),[Er]:r.host,[ks]:r.protocol.replace(":",""),[Ks]:r.hostname,[Xs]:r.port},s=u?Ou(u,c):Gp(r.toString()),f=i??`${n} ${o} ${r.toString()}`,p=l.context.active();return t.startSpan(f,{kind:l.SpanKind.CLIENT,attributes:{...c,"operation.name":`${n}.${o}`,"http.client.name":n,"resource.name":s,...a}},p)}instrumentHttp(t,r){let{tracerProvider:n}=this;if(!n)return;let o=n.getTracer(this.instrumentationName,this.instrumentationVersion),{attributesFromRequestHeaders:i,attributesFromResponseHeaders:a}=this.config,u=t.request,c=t.get,s=f=>(p,d,m)=>{let g,C={},M;if(typeof p=="string"||p instanceof URL?(g=new URL(p.toString()),typeof d=="function"?M=d:d&&typeof m=="function"?(C=d,M=m):d&&(C=d)):(C=p,typeof d=="function"&&(M=d),g=Fp(C,r)),this.shouldIgnore(g))return f.apply(this,[g,C,M]);let T=this.startSpan({tracer:o,url:g,fetchType:"http",method:C.method||"GET"});if(!T.isRecording()||!zt(T.spanContext().traceFlags))return T.end(),f.apply(this,[g,C,M]);if(this.shouldPropagate(g)){let rt=l.context.active(),q=l.trace.setSpan(rt,T);l.propagation.inject(q,C.headers||{},Vp)}i&&br(T,i,C.headers||{},Lu);try{let rt=Date.now(),q=f.apply(this,[g,C,M]);return q.prependListener("response",U=>{let wr=Date.now()-rt;T.setAttribute("http.response_time",wr),U.statusCode!==void 0?(T.setAttribute(wn,U.statusCode),U.statusCode>=500&&Vt(T,`Status: ${U.statusCode}`)):Vt(T,"Response status code is undefined"),a&&br(T,a,U.headers,Lu),q.listenerCount("response")<=1&&U.resume(),U.on("end",()=>{let bt,Mr=U.statusCode;U.aborted&&!U.complete?bt={code:l.SpanStatusCode.ERROR}:Mr&&Mr>=100&&Mr<500?bt={code:l.SpanStatusCode.UNSET}:bt={code:l.SpanStatusCode.ERROR},T.setStatus(bt),T.isRecording()&&(U.headers["content-length"]&&T.setAttribute(Mn,U.headers["content-length"]),T.end())})}),q.on("error",U=>{T.isRecording()&&(Vt(T,U),T.end())}),q.on("close",()=>{T.isRecording()&&T.end()}),q}catch(rt){throw Vt(T,rt),T.end(),rt}};t.request=s(u),t.get=s(c)}instrumentFetch(){let{tracerProvider:t}=this;if(!t)return;let r=t.getTracer(this.instrumentationName,this.instrumentationVersion),{attributesFromRequestHeaders:n,attributesFromResponseHeaders:o}=this.config;process.env.NEXT_OTEL_FETCH_DISABLED="1";let i=globalThis.fetch;this.originalFetch=i;let a=async(u,c)=>{let s=c;if(s?.next?.internal)return i(u,s);let f=new Request(u instanceof Request?u.clone():u,s),p=new URL(f.url);if(this.shouldIgnore(p,s))return i(u,s);let d=this.startSpan({tracer:r,url:p,fetchType:"fetch",method:f.method,name:s?.opentelemetry?.spanName,attributes:s?.opentelemetry?.attributes});if(!d.isRecording()||!zt(d.spanContext().traceFlags))return d.end(),i(u,s);if(this.shouldPropagate(p,s)){let m=l.context.active(),g=l.trace.setSpan(m,d);l.propagation.inject(g,f.headers,Bp)}n&&br(d,n,f.headers,bu);try{let m=Date.now();s?.body&&s.body instanceof FormData&&f.headers.delete("content-type");let g=await i(u,{...s,headers:f.headers}),C=Date.now()-m;return d.setAttribute(wn,g.status),d.setAttribute("http.response_time",C),o&&br(d,o,g.headers,bu),g.status>=500&&Vt(d,`Status: ${g.status} (${g.statusText})`),g.body?Hp(g).then(M=>{d.isRecording()&&(d.setAttribute(Mn,M),d.end())},M=>{d.isRecording()&&(Vt(d,M),d.end())}):d.end(),g}catch(m){throw Vt(d,m),d.end(),m}};globalThis.fetch=a}enable(){this.disable(),this.instrumentFetch();try{let t=li("node:http"),r=li("node:https");this.instrumentHttp(t,"http:"),this.instrumentHttp(r,"https:")}catch{}}disable(){this.originalFetch&&(globalThis.fetch=this.originalFetch)}},Bp={set(e,t,r){e.set(t,r)}},bu={get(e,t){let r=e.get(t);if(r!==null)return r.includes(",")?r.split(",").map(n=>n.trimStart()):r},keys(e){let t=[];return e.forEach((r,n)=>{t.push(n)}),t}},Vp={set(e,t,r){e[t.toLowerCase()]=r}},Lu={get(e,t){return e[t.toLowerCase()]},keys(e){return Object.keys(e)}};function Gp(e){let t=e.indexOf("?");return t===-1?e:e.substring(0,t)}function Hp(e){let t=0,n=e.clone().body?.getReader();if(!n)return Promise.resolve(0);let o=()=>n.read().then(({done:i,value:a})=>{if(!i)return t+=a.byteLength,o()});return o().then(()=>t)}function Vt(e,t){if(t instanceof Error)e.recordException(t),e.setStatus({code:l.SpanStatusCode.ERROR,message:t.message});else{let r=String(t);e.setStatus({code:l.SpanStatusCode.ERROR,message:r})}}function br(e,t,r,n){for(let[o,i]of Object.entries(t)){let a=n.get(r,i);a!==void 0&&e.setAttribute(o,a)}}function Fp(e,t){if(e.socketPath)throw new Error("Cannot construct a network URL: options.socketPath is specified, indicating a Unix domain socket.");let r=e.protocol??t;r&&!r.endsWith(":")&&(r+=":");let n=e.hostname,o=e.port??e.defaultPort;if(!n&&e.host){let s=e.host.split(":");n=s[0];let f=s[1];if(s.length>1&&f&&o===void 0){let p=parseInt(f,10);isNaN(p)||(o=p)}}n||(n="localhost");let i;if(o!==void 0&&o!==""){let s=parseInt(String(o),10);isNaN(s)?i=r==="https:"?443:80:i=s}else i=r==="https:"?443:80;let a=e.path||"/",u=`${r}//${n}:${i}`,c=new URL(a,u);if(e.auth){let s=e.auth.split(":");c.username=decodeURIComponent(s[0]||""),s.length>1&&(c.password=decodeURIComponent(s[1]||""))}return c}E();var Pu=v(P(),1),jp="00",si="traceparent",ai="tracestate",Te=class{fields(){return[si,ai]}inject(t,r,n){let o=l.trace.getSpanContext(t);if(!o||(0,Pu.isTracingSuppressed)(t)||!(0,l.isSpanContextValid)(o))return;let i=`${jp}-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||0).toString(16)}`;n.set(r,si,i),o.traceState&&n.set(r,ai,o.traceState.serialize())}extract(t,r,n){let o=n.get(r,si);if(!o)return t;let i=Array.isArray(o)?o[0]:o;if(typeof i!="string")return t;let a=kp(i);if(!a)return t;a.isRemote=!0;let u=n.get(r,ai);if(u){let c=Array.isArray(u)?u.join(","):u;a.traceState=(0,l.createTraceState)(typeof c=="string"?c:void 0)}return l.trace.setSpanContext(t,a)}};function kp(e){let[t,r,n,o,i]=e.split("-");return!t||!r||!n||!o||t.length!==2||r.length!==32||n.length!==16||o.length!==2||t==="00"&&i?null:{traceId:r,spanId:n,traceFlags:parseInt(o,16)}}E();var Lr=class{fields(){return[]}inject(){}extract(t){let r=K();if(!r?.telemetry)return l.diag.warn("@vercel/otel: Vercel telemetry extension not found."),t;let{rootSpanContext:n}=r.telemetry;return n?(l.diag.debug("@vercel/otel: Extracted root SpanContext from Vercel request context.",n),l.trace.setSpanContext(t,{...n,isRemote:!0,traceFlags:n.traceFlags||l.TraceFlags.SAMPLED})):t}};E();var Pr=v(P(),1);var ee=v(P()),qp=BigInt(1e9);function Cu(e){return BigInt(e[0])*qp+BigInt(e[1])}function Xp(e){var t=Number(BigInt.asUintN(32,e)),r=Number(BigInt.asUintN(32,e>>BigInt(32)));return{low:t,high:r}}function Nu(e){var t=Cu(e);return Xp(t)}function Kp(e){var t=Cu(e);return t.toString()}var Wp=typeof BigInt<"u"?Kp:ee.hrTimeToNanoseconds;function Iu(e){return e}function wu(e){if(e!==void 0)return(0,ee.hexToBase64)(e)}var Yp={encodeHrTime:Nu,encodeSpanContext:ee.hexToBase64,encodeOptionalSpanContext:wu};function Mu(e){var t,r;if(e===void 0)return Yp;var n=(t=e.useLongBits)!==null&&t!==void 0?t:!0,o=(r=e.useHex)!==null&&r!==void 0?r:!1;return{encodeHrTime:n?Nu:Wp,encodeSpanContext:o?Iu:ee.hexToBase64,encodeOptionalSpanContext:o?Iu:wu}}var zp=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){a={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i};function re(e){return Object.keys(e).map(function(t){return xu(t,e[t])})}function xu(e,t){return{key:e,value:Du(t)}}function Du(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(Du)}}:t==="object"&&e!=null?{kvlistValue:{values:Object.entries(e).map(function(r){var n=zp(r,2),o=n[0],i=n[1];return xu(o,i)})}}:{}}function Uu(e,t){var r,n=e.spanContext(),o=e.status;return{traceId:t.encodeSpanContext(n.traceId),spanId:t.encodeSpanContext(n.spanId),parentSpanId:t.encodeOptionalSpanContext(e.parentSpanId),traceState:(r=n.traceState)===null||r===void 0?void 0:r.serialize(),name:e.name,kind:e.kind==null?0:e.kind+1,startTimeUnixNano:t.encodeHrTime(e.startTime),endTimeUnixNano:t.encodeHrTime(e.endTime),attributes:re(e.attributes),droppedAttributesCount:e.droppedAttributesCount,events:e.events.map(function(i){return Qp(i,t)}),droppedEventsCount:e.droppedEventsCount,status:{code:o.code,message:o.message},links:e.links.map(function(i){return $p(i,t)}),droppedLinksCount:e.droppedLinksCount}}function $p(e,t){var r;return{attributes:e.attributes?re(e.attributes):[],spanId:t.encodeSpanContext(e.context.spanId),traceId:t.encodeSpanContext(e.context.traceId),traceState:(r=e.context.traceState)===null||r===void 0?void 0:r.serialize(),droppedAttributesCount:e.droppedAttributesCount||0}}function Qp(e,t){return{attributes:e.attributes?re(e.attributes):[],name:e.name,timeUnixNano:t.encodeHrTime(e.time),droppedAttributesCount:e.droppedAttributesCount||0}}var Jp=function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Zp=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){a={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i};function ui(e,t){var r=Mu(t);return{resourceSpans:ed(e,r)}}function td(e){var t,r,n=new Map;try{for(var o=Jp(e),i=o.next();!i.done;i=o.next()){var a=i.value,u=n.get(a.resource);u||(u=new Map,n.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(f){t={error:f}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return n}function ed(e,t){for(var r=td(e),n=[],o=r.entries(),i=o.next();!i.done;){for(var a=Zp(i.value,2),u=a[0],c=a[1],s=[],f=c.values(),p=f.next();!p.done;){var d=p.value;if(d.length>0){var m=d[0].instrumentationLibrary,g=m.name,C=m.version,M=m.schemaUrl,T=d.map(function(q){return Uu(q,t)});s.push({scope:{name:g,version:C},spans:T,schemaUrl:M})}p=f.next()}var rt={resource:{attributes:re(u.attributes),droppedAttributesCount:0},scopeSpans:s,schemaUrl:void 0};n.push(rt),i=o.next()}return n}var Ir=class{export(t,r){let n=K();if(!n?.telemetry){l.diag.warn("@vercel/otel: no telemetry context found"),r({code:Pr.ExportResultCode.SUCCESS,error:void 0});return}try{let o=ui(t,{useHex:!0,useLongBits:!1});n.telemetry.reportSpans(o),r({code:Pr.ExportResultCode.SUCCESS,error:void 0})}catch(o){r({code:Pr.ExportResultCode.FAILED,error:o instanceof Error?o:new Error(String(o))})}}shutdown(){return Promise.resolve()}forceFlush(){return Promise.resolve()}};E();function ci(){return!!K()?.telemetry?.traceDrains?.length}var Bu=!1,Se=class{constructor(t){this.processor=t}forceFlush(){return this.processor.forceFlush()}shutdown(){return this.processor.shutdown()}onStart(t,r){if(ci()){Bu||(Bu=!0,l.diag.debug("@vercel/otel: skipping automatic exporter due to configured trace drains"));return}this.processor.onStart(t,r)}onEnd(t){ci()||this.processor.onEnd(t)}};var rd={ALL:l.DiagLogLevel.ALL,VERBOSE:l.DiagLogLevel.VERBOSE,DEBUG:l.DiagLogLevel.DEBUG,INFO:l.DiagLogLevel.INFO,WARN:l.DiagLogLevel.WARN,ERROR:l.DiagLogLevel.ERROR,NONE:l.DiagLogLevel.NONE},Cr=class{constructor(t={}){this.configuration=t}start(){let t=nd(),r=this.configuration,n=process.env.NEXT_RUNTIME||"nodejs",o=!!t.OTEL_SDK_DISABLED;if(process.env.OTEL_LOG_LEVEL&&l.diag.setLogger(new l.DiagConsoleLogger,{logLevel:rd[process.env.OTEL_LOG_LEVEL.toUpperCase()]}),o)return;let i=r.idGenerator??new er,a=r.contextManager??new Fu.AsyncLocalStorageContextManager;a.enable(),this.contextManager=a;let u=t.OTEL_SERVICE_NAME||r.serviceName||"app",c=new H(ia({attributes:r.attributes,runtime:n,serviceName:u})),s=r.resourceDetectors??[wo];if(r.autoDetectResources??!0){let T={detectors:s};c=c.merge(xo(T))}let p=od(r.propagators,r,t),d=sd(r.traceSampler,t),m=ad(r.spanProcessors,r,t);m.length===0&&l.diag.warn("@vercel/otel: No span processors configured. No spans will be exported.");let g=r.spanLimits,C=new Vo({resource:c,idGenerator:i,sampler:d,spanLimits:g});if(C.addSpanProcessor(new mr(m,r.attributesFromHeaders)),C.register({contextManager:a,propagator:new Ot.CompositePropagator({propagators:p})}),this.tracerProvider=C,r.logRecordProcessor){let T=new gn({resource:c});this.loggerProvider=T,T.addLogRecordProcessor(r.logRecordProcessor),at.logs.setGlobalLoggerProvider(T)}if(r.metricReader||r.views){let T=new In({resource:c,views:r.views??[]});r.metricReader&&T.addMetricReader(r.metricReader),l.metrics.setGlobalMeterProvider(T),this.meterProvider=T}let M=id(r.instrumentations,r.instrumentationConfig);this.disableInstrumentations=(0,Hu.registerInstrumentations)({instrumentations:M}),l.diag.info("@vercel/otel: started",u,n)}async shutdown(){let t=[];this.tracerProvider&&t.push(this.tracerProvider.shutdown()),this.loggerProvider&&t.push(this.loggerProvider.shutdown()),this.meterProvider&&t.push(this.meterProvider.shutdown()),l.diag.info("@vercel/otel: shutting down",t.length,process.env.NEXT_RUNTIME),await Promise.all(t),this.contextManager&&this.contextManager.disable();let{disableInstrumentations:r}=this;r&&r()}};function nd(){let e=(0,Nr.parseEnvironment)(process.env);return{...Nr.DEFAULT_ENVIRONMENT,...e}}function id(e,t){return(e??["auto"]).map(r=>r==="auto"?(l.diag.debug("@vercel/otel: Configure instrumentations: fetch",t?.fetch),[new te(t?.fetch)]):r==="fetch"?(l.diag.debug("@vercel/otel: Configure instrumentations: fetch",t?.fetch),new te(t?.fetch)):r).flat()}function od(e,t,r){let n=process.env.OTEL_PROPAGATORS&&r.OTEL_PROPAGATORS&&r.OTEL_PROPAGATORS.length>0?r.OTEL_PROPAGATORS:void 0;return(e??n??["auto"]).map(o=>{if(o==="none")return[];if(o==="auto"){let i=[];return i.push({name:"tracecontext",propagator:new Te}),i.push({name:"baggage",propagator:new Ot.W3CBaggagePropagator}),i.push({name:"vercel-runtime",propagator:new Lr}),l.diag.debug(`@vercel/otel: Configure propagators: ${i.map(a=>a.name).join(", ")}`),i.map(a=>a.propagator)}if(o==="tracecontext")return l.diag.debug("@vercel/otel: Configure propagator: tracecontext"),new Te;if(o==="baggage")return l.diag.debug("@vercel/otel: Configure propagator: baggage"),new Ot.W3CBaggagePropagator;if(typeof o=="string")throw new Error(`Unknown propagator: "${o}"`);return o}).flat()}var Vu="always_on",ne=1;function sd(e,t){if(e&&typeof e!="string")return e;let r=e&&e!=="auto"?e:t.OTEL_TRACES_SAMPLER||Vu;switch(l.diag.debug("@vercel/otel: Configure sampler: ",r),r){case"always_on":return new X;case"always_off":return new st;case"parentbased_always_on":return new Et({root:new X});case"parentbased_always_off":return new Et({root:new st});case"traceidratio":return new kt(Gu(t));case"parentbased_traceidratio":return new Et({root:new kt(Gu(t))});default:return l.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER value "${String(t.OTEL_TRACES_SAMPLER)} invalid, defaulting to ${Vu}".`),new X}}function Gu(e){if(e.OTEL_TRACES_SAMPLER_ARG===void 0||e.OTEL_TRACES_SAMPLER_ARG==="")return l.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${ne}.`),ne;l.diag.debug("@vercel/otel: Configure sampler probability: ",e.OTEL_TRACES_SAMPLER_ARG);let t=Number(e.OTEL_TRACES_SAMPLER_ARG);return isNaN(t)?(l.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG=${e.OTEL_TRACES_SAMPLER_ARG} was given, but it is invalid, defaulting to ${ne}.`),ne):t<0||t>1?(l.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG=${e.OTEL_TRACES_SAMPLER_ARG} was given, but it is out of range ([0..1]), defaulting to ${ne}.`),ne):t}function ad(e,t,r){return[...(e??["auto"]).flatMap(n=>{if(n==="auto"){let o=[new Mt(new Ir)];if(process.env.VERCEL_OTEL_ENDPOINTS){let i=process.env.VERCEL_OTEL_ENDPOINTS_PORT||"4318",a=process.env.VERCEL_OTEL_ENDPOINTS_PROTOCOL||"http/protobuf";l.diag.debug("@vercel/otel: Configure vercel otel collector on port: ",i,a);let u={url:`http://localhost:${i}/v1/traces`,headers:{}},c=a==="http/protobuf"?new Bt(u):new Qt(u);o.push(new Se(new Mt(c)))}else(!t.traceExporter||t.traceExporter==="auto"||r.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT||r.OTEL_EXPORTER_OTLP_ENDPOINT)&&o.push(new Se(new Mt(ud(r))));return o}return n}).filter(fd),...t.traceExporter&&t.traceExporter!=="auto"?[new Mt(t.traceExporter)]:[]]}function ud(e){let t=process.env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL??process.env.OTEL_EXPORTER_OTLP_PROTOCOL??"http/protobuf",r=ld(e),n={...Ot.baggageUtils.parseKeyPairsIntoRecord(e.OTEL_EXPORTER_OTLP_HEADERS),...Ot.baggageUtils.parseKeyPairsIntoRecord(e.OTEL_EXPORTER_OTLP_TRACES_HEADERS)};switch(l.diag.debug("@vercel/otel: Configure trace exporter: ",t,r,`headers: ${Object.keys(n).join(",")||"<none>"}`),t){case"http/json":return new Qt({url:r,headers:n});case"http/protobuf":return new Bt({url:r,headers:n});default:return l.diag.warn(`@vercel/otel: Unsupported OTLP traces protocol: ${t}. Using http/protobuf.`),new Bt}}var ju="v1/traces",cd=`http://localhost:4318/${ju}`;function ld(e){let t=e.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT;if(t&&typeof t=="string")return t;let r=e.OTEL_EXPORTER_OTLP_ENDPOINT;return r&&typeof r=="string"?`${r}/${ju}`:cd}function fd(e){return e!=null}function kT(e){let t;e?typeof e=="string"?t={serviceName:e}:t=e:t={},new Cr(t).start()}export{te as FetchInstrumentation,Qt as OTLPHttpJsonTraceExporter,Bt as OTLPHttpProtoTraceExporter,kT as registerOTel};
|
|
17
17
|
//# sourceMappingURL=index.js.map
|