@vercel/otel 1.11.0 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/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 Ou=Object.create;var Dr=Object.defineProperty;var Ru=Object.getOwnPropertyDescriptor;var bu=Object.getOwnPropertyNames;var Lu=Object.getPrototypeOf,Pu=Object.prototype.hasOwnProperty;var Ur=(t,e)=>()=>(t&&(e=t(t=0)),e);var d=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var vt=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of bu(e))!Pu.call(t,o)&&o!==r&&Dr(t,o,{get:()=>e[o],enumerable:!(n=Ru(e,o))||n.enumerable});return t},z=(t,e,r)=>(vt(t,e,"default"),r&&vt(r,e,"default")),g=(t,e,r)=>(r=t!=null?Ou(Lu(t)):{},vt(e||!t||!t.__esModule?Dr(r,"default",{value:t,enumerable:!0}):r,t)),w=t=>vt(Dr({},"__esModule",{value:!0}),t);var l={};import*as Kp from"@opentelemetry/api";var E=Ur(()=>{z(l,Kp)});var ot=d(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.isTracingSuppressed=de.unsuppressTracing=de.suppressTracing=void 0;var Iu=(E(),w(l)),Br=(0,Iu.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Cu(t){return t.setValue(Br,!0)}de.suppressTracing=Cu;function Nu(t){return t.deleteValue(Br)}de.unsuppressTracing=Nu;function wu(t){return t.getValue(Br)===!0}de.isTracingSuppressed=wu});var Gr=d(G=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});G.BAGGAGE_MAX_TOTAL_LENGTH=G.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=G.BAGGAGE_MAX_NAME_VALUE_PAIRS=G.BAGGAGE_HEADER=G.BAGGAGE_ITEMS_SEPARATOR=G.BAGGAGE_PROPERTIES_SEPARATOR=G.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;G.BAGGAGE_KEY_PAIR_SEPARATOR="=";G.BAGGAGE_PROPERTIES_SEPARATOR=";";G.BAGGAGE_ITEMS_SEPARATOR=",";G.BAGGAGE_HEADER="baggage";G.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;G.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;G.BAGGAGE_MAX_TOTAL_LENGTH=8192});var Vr=d(re=>{"use strict";Object.defineProperty(re,"__esModule",{value:!0});re.parseKeyPairsIntoRecord=re.parsePairKeyValue=re.getKeyPairs=re.serializeKeyPairs=void 0;var Mu=(E(),w(l)),Ie=Gr();function xu(t){return t.reduce((e,r)=>{let n=`${e}${e!==""?Ie.BAGGAGE_ITEMS_SEPARATOR:""}${r}`;return n.length>Ie.BAGGAGE_MAX_TOTAL_LENGTH?e:n},"")}re.serializeKeyPairs=xu;function Du(t){return t.getAllEntries().map(([e,r])=>{let n=`${encodeURIComponent(e)}=${encodeURIComponent(r.value)}`;return r.metadata!==void 0&&(n+=Ie.BAGGAGE_PROPERTIES_SEPARATOR+r.metadata.toString()),n})}re.getKeyPairs=Du;function fi(t){let e=t.split(Ie.BAGGAGE_PROPERTIES_SEPARATOR);if(e.length<=0)return;let r=e.shift();if(!r)return;let n=r.indexOf(Ie.BAGGAGE_KEY_PAIR_SEPARATOR);if(n<=0)return;let o=decodeURIComponent(r.substring(0,n).trim()),i=decodeURIComponent(r.substring(n+1).trim()),s;return e.length>0&&(s=(0,Mu.baggageEntryMetadataFromString)(e.join(Ie.BAGGAGE_PROPERTIES_SEPARATOR))),{key:o,value:i,metadata:s}}re.parsePairKeyValue=fi;function Uu(t){return typeof t!="string"||t.length===0?{}:t.split(Ie.BAGGAGE_ITEMS_SEPARATOR).map(e=>fi(e)).filter(e=>e!==void 0&&e.value.length>0).reduce((e,r)=>(e[r.key]=r.value,e),{})}re.parseKeyPairsIntoRecord=Uu});var pi=d(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.W3CBaggagePropagator=void 0;var Hr=(E(),w(l)),Bu=ot(),Ce=Gr(),Fr=Vr(),jr=class{inject(e,r,n){let o=Hr.propagation.getBaggage(e);if(!o||(0,Bu.isTracingSuppressed)(e))return;let i=(0,Fr.getKeyPairs)(o).filter(u=>u.length<=Ce.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,Ce.BAGGAGE_MAX_NAME_VALUE_PAIRS),s=(0,Fr.serializeKeyPairs)(i);s.length>0&&n.set(r,Ce.BAGGAGE_HEADER,s)}extract(e,r,n){let o=n.get(r,Ce.BAGGAGE_HEADER),i=Array.isArray(o)?o.join(Ce.BAGGAGE_ITEMS_SEPARATOR):o;if(!i)return e;let s={};return i.length===0||(i.split(Ce.BAGGAGE_ITEMS_SEPARATOR).forEach(c=>{let a=(0,Fr.parsePairKeyValue)(c);if(a){let f={value:a.value};a.metadata&&(f.metadata=a.metadata),s[a.key]=f}}),Object.entries(s).length===0)?e:Hr.propagation.setBaggage(e,Hr.propagation.createBaggage(s))}fields(){return[Ce.BAGGAGE_HEADER]}};At.W3CBaggagePropagator=jr});var di=d(Ot=>{"use strict";Object.defineProperty(Ot,"__esModule",{value:!0});Ot.AnchoredClock=void 0;var kr=class{constructor(e,r){this._monotonicClock=r,this._epochMillis=e.now(),this._performanceMillis=r.now()}now(){let e=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+e}};Ot.AnchoredClock=kr});var Ti=d(_e=>{"use strict";Object.defineProperty(_e,"__esModule",{value:!0});_e.isAttributeValue=_e.isAttributeKey=_e.sanitizeAttributes=void 0;var _i=(E(),w(l));function Gu(t){let e={};if(typeof t!="object"||t==null)return e;for(let[r,n]of Object.entries(t)){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)?e[r]=n.slice():e[r]=n}return e}_e.sanitizeAttributes=Gu;function hi(t){return typeof t=="string"&&t.length>0}_e.isAttributeKey=hi;function Ei(t){return t==null?!0:Array.isArray(t)?Vu(t):mi(t)}_e.isAttributeValue=Ei;function Vu(t){let e;for(let r of t)if(r!=null){if(!e){if(mi(r)){e=typeof r;continue}return!1}if(typeof r!==e)return!1}return!0}function mi(t){switch(typeof t){case"number":case"boolean":case"string":return!0}return!1}});var qr=d(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.loggingErrorHandler=void 0;var Hu=(E(),w(l));function Fu(){return t=>{Hu.diag.error(ju(t))}}Rt.loggingErrorHandler=Fu;function ju(t){return typeof t=="string"?t:JSON.stringify(ku(t))}function ku(t){let e={},r=t;for(;r!==null;)Object.getOwnPropertyNames(r).forEach(n=>{if(e[n])return;let o=r[n];o&&(e[n]=String(o))}),r=Object.getPrototypeOf(r);return e}});var Xr=d(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.globalErrorHandler=Fe.setGlobalErrorHandler=void 0;var qu=qr(),Si=(0,qu.loggingErrorHandler)();function Xu(t){Si=t}Fe.setGlobalErrorHandler=Xu;function Ku(t){try{Si(t)}catch{}}Fe.globalErrorHandler=Ku});var Kr=d(at=>{"use strict";Object.defineProperty(at,"__esModule",{value:!0});at.TracesSamplerValues=void 0;var Wu;(function(t){t.AlwaysOff="always_off",t.AlwaysOn="always_on",t.ParentBasedAlwaysOff="parentbased_always_off",t.ParentBasedAlwaysOn="parentbased_always_on",t.ParentBasedTraceIdRatio="parentbased_traceidratio",t.TraceIdRatio="traceidratio"})(Wu=at.TracesSamplerValues||(at.TracesSamplerValues={}))});var Lt=d(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt._globalThis=void 0;bt._globalThis=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});var Pt=d(P=>{"use strict";Object.defineProperty(P,"__esModule",{value:!0});P.getEnvWithoutDefaults=P.parseEnvironment=P.DEFAULT_ENVIRONMENT=P.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT=P.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT=P.DEFAULT_ATTRIBUTE_COUNT_LIMIT=P.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT=void 0;var he=(E(),w(l)),Yu=Kr(),zu=Lt(),$u=",",Qu=["OTEL_SDK_DISABLED"];function Zu(t){return Qu.indexOf(t)>-1}var Ju=["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 ec(t){return Ju.indexOf(t)>-1}var tc=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function rc(t){return tc.indexOf(t)>-1}P.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT=1/0;P.DEFAULT_ATTRIBUTE_COUNT_LIMIT=128;P.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT=128;P.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT=128;P.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:he.DiagLogLevel.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:P.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_ATTRIBUTE_COUNT_LIMIT:P.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:P.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:P.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:P.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:P.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:P.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:P.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:Yu.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 nc(t,e,r){if(typeof r[t]>"u")return;let n=String(r[t]);e[t]=n.toLowerCase()==="true"}function ic(t,e,r,n=-1/0,o=1/0){if(typeof r[t]<"u"){let i=Number(r[t]);isNaN(i)||(i<n?e[t]=n:i>o?e[t]=o:e[t]=i)}}function oc(t,e,r,n=$u){let o=r[t];typeof o=="string"&&(e[t]=o.split(n).map(i=>i.trim()))}var ac={ALL:he.DiagLogLevel.ALL,VERBOSE:he.DiagLogLevel.VERBOSE,DEBUG:he.DiagLogLevel.DEBUG,INFO:he.DiagLogLevel.INFO,WARN:he.DiagLogLevel.WARN,ERROR:he.DiagLogLevel.ERROR,NONE:he.DiagLogLevel.NONE};function sc(t,e,r){let n=r[t];if(typeof n=="string"){let o=ac[n.toUpperCase()];o!=null&&(e[t]=o)}}function Wr(t){let e={};for(let r in P.DEFAULT_ENVIRONMENT){let n=r;switch(n){case"OTEL_LOG_LEVEL":sc(n,e,t);break;default:if(Zu(n))nc(n,e,t);else if(ec(n))ic(n,e,t);else if(rc(n))oc(n,e,t);else{let o=t[n];typeof o<"u"&&o!==null&&(e[n]=String(o))}}}return e}P.parseEnvironment=Wr;function uc(){return typeof process<"u"&&process&&process.env?Wr(process.env):Wr(zu._globalThis)}P.getEnvWithoutDefaults=uc});var yi=d(It=>{"use strict";Object.defineProperty(It,"__esModule",{value:!0});It.getEnv=void 0;var gi=Pt(),cc=Lt();function lc(){let t=(0,gi.parseEnvironment)(cc._globalThis);return Object.assign({},gi.DEFAULT_ENVIRONMENT,t)}It.getEnv=lc});var vi=d(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.hexToBase64=void 0;function fc(t){let e=t.length,r="";for(let n=0;n<e;n+=2){let o=t.substring(n,n+2),i=parseInt(o,16);r+=String.fromCharCode(i)}return btoa(r)}Ct.hexToBase64=fc});var Oi=d(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.RandomIdGenerator=void 0;var pc=8,dc=16,Yr=class{constructor(){this.generateTraceId=Ai(dc),this.generateSpanId=Ai(pc)}};wt.RandomIdGenerator=Yr;var Nt=Array(32);function Ai(t){return function(){for(let r=0;r<t*2;r++)Nt[r]=Math.floor(Math.random()*16)+48,Nt[r]>=58&&(Nt[r]+=39);return String.fromCharCode.apply(null,Nt.slice(0,t*2))}}});var Ri=d(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});Mt.otperformance=void 0;Mt.otperformance=performance});var zr=d(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.VERSION=void 0;xt.VERSION="1.19.0"});var bi=d(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=d(Ne=>{"use strict";var _c=Ne&&Ne.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),hc=Ne&&Ne.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&_c(e,t,r)};Object.defineProperty(Ne,"__esModule",{value:!0});hc(bi(),Ne)});var Pi=d(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=d(we=>{"use strict";var Ec=we&&we.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),mc=we&&we.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Ec(e,t,r)};Object.defineProperty(we,"__esModule",{value:!0});mc(Pi(),we)});var me=d(Ee=>{"use strict";var Tc=Ee&&Ee.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),Ci=Ee&&Ee.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Tc(e,t,r)};Object.defineProperty(Ee,"__esModule",{value:!0});Ci(Li(),Ee);Ci(Ii(),Ee)});var Ni=d(Dt=>{"use strict";Object.defineProperty(Dt,"__esModule",{value:!0});Dt.SDK_INFO=void 0;var Sc=zr(),st=me();Dt.SDK_INFO={[st.SemanticResourceAttributes.TELEMETRY_SDK_NAME]:"opentelemetry",[st.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]:"browser",[st.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]:st.TelemetrySdkLanguageValues.WEBJS,[st.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]:Sc.VERSION}});var wi=d(Ut=>{"use strict";Object.defineProperty(Ut,"__esModule",{value:!0});Ut.unrefTimer=void 0;function gc(t){}Ut.unrefTimer=gc});var $r=d(k=>{"use strict";var yc=k&&k.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),Me=k&&k.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&yc(e,t,r)};Object.defineProperty(k,"__esModule",{value:!0});Me(yi(),k);Me(Lt(),k);Me(vi(),k);Me(Oi(),k);Me(Ri(),k);Me(Ni(),k);Me(wi(),k)});var Ui=d(b=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});b.addHrTimes=b.isTimeInput=b.isTimeInputHrTime=b.hrTimeToMicroseconds=b.hrTimeToMilliseconds=b.hrTimeToNanoseconds=b.hrTimeToTimeStamp=b.hrTimeDuration=b.timeInputToHrTime=b.hrTime=b.getTimeOrigin=b.millisToHrTime=void 0;var Qr=$r(),Mi=9,vc=6,Ac=Math.pow(10,vc),Bt=Math.pow(10,Mi);function ut(t){let e=t/1e3,r=Math.trunc(e),n=Math.round(t%1e3*Ac);return[r,n]}b.millisToHrTime=ut;function Zr(){let t=Qr.otperformance.timeOrigin;if(typeof t!="number"){let e=Qr.otperformance;t=e.timing&&e.timing.fetchStart}return t}b.getTimeOrigin=Zr;function xi(t){let e=ut(Zr()),r=ut(typeof t=="number"?t:Qr.otperformance.now());return Di(e,r)}b.hrTime=xi;function Oc(t){if(Jr(t))return t;if(typeof t=="number")return t<Zr()?xi(t):ut(t);if(t instanceof Date)return ut(t.getTime());throw TypeError("Invalid input type")}b.timeInputToHrTime=Oc;function Rc(t,e){let r=e[0]-t[0],n=e[1]-t[1];return n<0&&(r-=1,n+=Bt),[r,n]}b.hrTimeDuration=Rc;function bc(t){let e=Mi,r=`${"0".repeat(e)}${t[1]}Z`,n=r.substr(r.length-e-1);return new Date(t[0]*1e3).toISOString().replace("000Z",n)}b.hrTimeToTimeStamp=bc;function Lc(t){return t[0]*Bt+t[1]}b.hrTimeToNanoseconds=Lc;function Pc(t){return t[0]*1e3+t[1]/1e6}b.hrTimeToMilliseconds=Pc;function Ic(t){return t[0]*1e6+t[1]/1e3}b.hrTimeToMicroseconds=Ic;function Jr(t){return Array.isArray(t)&&t.length===2&&typeof t[0]=="number"&&typeof t[1]=="number"}b.isTimeInputHrTime=Jr;function Cc(t){return Jr(t)||typeof t=="number"||t instanceof Date}b.isTimeInput=Cc;function Di(t,e){let r=[t[0]+e[0],t[1]+e[1]];return r[1]>=Bt&&(r[1]-=Bt,r[0]+=1),r}b.addHrTimes=Di});var Gi=d(Bi=>{"use strict";Object.defineProperty(Bi,"__esModule",{value:!0})});var Vi=d(ct=>{"use strict";Object.defineProperty(ct,"__esModule",{value:!0});ct.ExportResultCode=void 0;var Nc;(function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})(Nc=ct.ExportResultCode||(ct.ExportResultCode={}))});var Fi=d(Gt=>{"use strict";Object.defineProperty(Gt,"__esModule",{value:!0});Gt.CompositePropagator=void 0;var Hi=(E(),w(l)),en=class{constructor(e={}){var r;this._propagators=(r=e.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(e,r,n){for(let o of this._propagators)try{o.inject(e,r,n)}catch(i){Hi.diag.warn(`Failed to inject with ${o.constructor.name}. Err: ${i.message}`)}}extract(e,r,n){return this._propagators.reduce((o,i)=>{try{return i.extract(o,r,n)}catch(s){Hi.diag.warn(`Failed to inject with ${i.constructor.name}. Err: ${s.message}`)}return o},e)}fields(){return this._fields.slice()}};Gt.CompositePropagator=en});var ji=d(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.validateValue=je.validateKey=void 0;var tn="[_0-9a-z-*/]",wc=`[a-z]${tn}{0,255}`,Mc=`[a-z0-9]${tn}{0,240}@[a-z]${tn}{0,13}`,xc=new RegExp(`^(?:${wc}|${Mc})$`),Dc=/^[ -~]{0,255}[!-~]$/,Uc=/,|=/;function Bc(t){return xc.test(t)}je.validateKey=Bc;function Gc(t){return Dc.test(t)&&!Uc.test(t)}je.validateValue=Gc});var nn=d(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:!0});Vt.TraceState=void 0;var ki=ji(),qi=32,Vc=512,Xi=",",Ki="=",rn=class t{constructor(e){this._internalState=new Map,e&&this._parse(e)}set(e,r){let n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,r),n}unset(e){let r=this._clone();return r._internalState.delete(e),r}get(e){return this._internalState.get(e)}serialize(){return this._keys().reduce((e,r)=>(e.push(r+Ki+this.get(r)),e),[]).join(Xi)}_parse(e){e.length>Vc||(this._internalState=e.split(Xi).reverse().reduce((r,n)=>{let o=n.trim(),i=o.indexOf(Ki);if(i!==-1){let s=o.slice(0,i),u=o.slice(i+1,n.length);(0,ki.validateKey)(s)&&(0,ki.validateValue)(u)&&r.set(s,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 e=new t;return e._internalState=new Map(this._internalState),e}};Vt.TraceState=rn});var Yi=d(H=>{"use strict";Object.defineProperty(H,"__esModule",{value:!0});H.W3CTraceContextPropagator=H.parseTraceParent=H.TRACE_STATE_HEADER=H.TRACE_PARENT_HEADER=void 0;var Ht=(E(),w(l)),Hc=ot(),Fc=nn();H.TRACE_PARENT_HEADER="traceparent";H.TRACE_STATE_HEADER="tracestate";var jc="00",kc="(?!ff)[\\da-f]{2}",qc="(?![0]{32})[\\da-f]{32}",Xc="(?![0]{16})[\\da-f]{16}",Kc="[\\da-f]{2}",Wc=new RegExp(`^\\s?(${kc})-(${qc})-(${Xc})-(${Kc})(-.*)?\\s?$`);function Wi(t){let e=Wc.exec(t);return!e||e[1]==="00"&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}}H.parseTraceParent=Wi;var on=class{inject(e,r,n){let o=Ht.trace.getSpanContext(e);if(!o||(0,Hc.isTracingSuppressed)(e)||!(0,Ht.isSpanContextValid)(o))return;let i=`${jc}-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||Ht.TraceFlags.NONE).toString(16)}`;n.set(r,H.TRACE_PARENT_HEADER,i),o.traceState&&n.set(r,H.TRACE_STATE_HEADER,o.traceState.serialize())}extract(e,r,n){let o=n.get(r,H.TRACE_PARENT_HEADER);if(!o)return e;let i=Array.isArray(o)?o[0]:o;if(typeof i!="string")return e;let s=Wi(i);if(!s)return e;s.isRemote=!0;let u=n.get(r,H.TRACE_STATE_HEADER);if(u){let c=Array.isArray(u)?u.join(","):u;s.traceState=new Fc.TraceState(typeof c=="string"?c:void 0)}return Ht.trace.setSpanContext(e,s)}fields(){return[H.TRACE_PARENT_HEADER,H.TRACE_STATE_HEADER]}};H.W3CTraceContextPropagator=on});var $i=d(zi=>{"use strict";Object.defineProperty(zi,"__esModule",{value:!0})});var Qi=d($=>{"use strict";Object.defineProperty($,"__esModule",{value:!0});$.getRPCMetadata=$.deleteRPCMetadata=$.setRPCMetadata=$.RPCType=void 0;var Yc=(E(),w(l)),an=(0,Yc.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),zc;(function(t){t.HTTP="http"})(zc=$.RPCType||($.RPCType={}));function $c(t,e){return t.setValue(an,e)}$.setRPCMetadata=$c;function Qc(t){return t.deleteValue(an)}$.deleteRPCMetadata=Qc;function Zc(t){return t.getValue(an)}$.getRPCMetadata=Zc});var un=d(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.AlwaysOffSampler=void 0;var Jc=(E(),w(l)),sn=class{shouldSample(){return{decision:Jc.SamplingDecision.NOT_RECORD}}toString(){return"AlwaysOffSampler"}};Ft.AlwaysOffSampler=sn});var ln=d(jt=>{"use strict";Object.defineProperty(jt,"__esModule",{value:!0});jt.AlwaysOnSampler=void 0;var el=(E(),w(l)),cn=class{shouldSample(){return{decision:el.SamplingDecision.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}};jt.AlwaysOnSampler=cn});var Ji=d(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.ParentBasedSampler=void 0;var kt=(E(),w(l)),tl=Xr(),Zi=un(),fn=ln(),pn=class{constructor(e){var r,n,o,i;this._root=e.root,this._root||((0,tl.globalErrorHandler)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new fn.AlwaysOnSampler),this._remoteParentSampled=(r=e.remoteParentSampled)!==null&&r!==void 0?r:new fn.AlwaysOnSampler,this._remoteParentNotSampled=(n=e.remoteParentNotSampled)!==null&&n!==void 0?n:new Zi.AlwaysOffSampler,this._localParentSampled=(o=e.localParentSampled)!==null&&o!==void 0?o:new fn.AlwaysOnSampler,this._localParentNotSampled=(i=e.localParentNotSampled)!==null&&i!==void 0?i:new Zi.AlwaysOffSampler}shouldSample(e,r,n,o,i,s){let u=kt.trace.getSpanContext(e);return!u||!(0,kt.isSpanContextValid)(u)?this._root.shouldSample(e,r,n,o,i,s):u.isRemote?u.traceFlags&kt.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(e,r,n,o,i,s):this._remoteParentNotSampled.shouldSample(e,r,n,o,i,s):u.traceFlags&kt.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(e,r,n,o,i,s):this._localParentNotSampled.shouldSample(e,r,n,o,i,s)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}};qt.ParentBasedSampler=pn});var eo=d(Xt=>{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});Xt.TraceIdRatioBasedSampler=void 0;var dn=(E(),w(l)),_n=class{constructor(e=0){this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(e,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(e){return typeof e!="number"||isNaN(e)?0:e>=1?1:e<=0?0:e}_accumulate(e){let r=0;for(let n=0;n<e.length/8;n++){let o=n*8,i=parseInt(e.slice(o,o+8),16);r=(r^i)>>>0}return r}};Xt.TraceIdRatioBasedSampler=_n});var oo=d(Kt=>{"use strict";Object.defineProperty(Kt,"__esModule",{value:!0});Kt.isPlainObject=void 0;var rl="[object Object]",nl="[object Null]",il="[object Undefined]",ol=Function.prototype,to=ol.toString,al=to.call(Object),sl=ul(Object.getPrototypeOf,Object),ro=Object.prototype,no=ro.hasOwnProperty,xe=Symbol?Symbol.toStringTag:void 0,io=ro.toString;function ul(t,e){return function(r){return t(e(r))}}function cl(t){if(!ll(t)||fl(t)!==rl)return!1;let e=sl(t);if(e===null)return!0;let r=no.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&to.call(r)===al}Kt.isPlainObject=cl;function ll(t){return t!=null&&typeof t=="object"}function fl(t){return t==null?t===void 0?il:nl:xe&&xe in Object(t)?pl(t):dl(t)}function pl(t){let e=no.call(t,xe),r=t[xe],n=!1;try{t[xe]=void 0,n=!0}catch{}let o=io.call(t);return n&&(e?t[xe]=r:delete t[xe]),o}function dl(t){return io.call(t)}});var lo=d(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.merge=void 0;var ao=oo(),_l=20;function hl(...t){let e=t.shift(),r=new WeakMap;for(;t.length>0;)e=uo(e,t.shift(),0,r);return e}zt.merge=hl;function hn(t){return Yt(t)?t.slice():t}function uo(t,e,r=0,n){let o;if(!(r>_l)){if(r++,Wt(t)||Wt(e)||co(e))o=hn(e);else if(Yt(t)){if(o=t.slice(),Yt(e))for(let i=0,s=e.length;i<s;i++)o.push(hn(e[i]));else if(lt(e)){let i=Object.keys(e);for(let s=0,u=i.length;s<u;s++){let c=i[s];o[c]=hn(e[c])}}}else if(lt(t))if(lt(e)){if(!El(t,e))return e;o=Object.assign({},t);let i=Object.keys(e);for(let s=0,u=i.length;s<u;s++){let c=i[s],a=e[c];if(Wt(a))typeof a>"u"?delete o[c]:o[c]=a;else{let f=o[c],p=a;if(so(t,c,n)||so(e,c,n))delete o[c];else{if(lt(f)&<(p)){let _=n.get(f)||[],S=n.get(p)||[];_.push({obj:t,key:c}),S.push({obj:e,key:c}),n.set(f,_),n.set(p,S)}o[c]=uo(o[c],a,r,n)}}}}else o=e;return o}}function so(t,e,r){let n=r.get(t[e])||[];for(let o=0,i=n.length;o<i;o++){let s=n[o];if(s.key===e&&s.obj===t)return!0}return!1}function Yt(t){return Array.isArray(t)}function co(t){return typeof t=="function"}function lt(t){return!Wt(t)&&!Yt(t)&&!co(t)&&typeof t=="object"}function Wt(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t>"u"||t instanceof Date||t instanceof RegExp||t===null}function El(t,e){return!(!(0,ao.isPlainObject)(t)||!(0,ao.isPlainObject)(e))}});var fo=d(ke=>{"use strict";Object.defineProperty(ke,"__esModule",{value:!0});ke.callWithTimeout=ke.TimeoutError=void 0;var $t=class t extends Error{constructor(e){super(e),Object.setPrototypeOf(this,t.prototype)}};ke.TimeoutError=$t;function ml(t,e){let r,n=new Promise(function(i,s){r=setTimeout(function(){s(new $t("Operation timed out."))},e)});return Promise.race([t,n]).then(o=>(clearTimeout(r),o),o=>{throw clearTimeout(r),o})}ke.callWithTimeout=ml});var _o=d(qe=>{"use strict";Object.defineProperty(qe,"__esModule",{value:!0});qe.isUrlIgnored=qe.urlMatches=void 0;function po(t,e){return typeof e=="string"?t===e:!!t.match(e)}qe.urlMatches=po;function Tl(t,e){if(!e)return!1;for(let r of e)if(po(t,r))return!0;return!1}qe.isUrlIgnored=Tl});var ho=d(Qt=>{"use strict";Object.defineProperty(Qt,"__esModule",{value:!0});Qt.isWrapped=void 0;function Sl(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}Qt.isWrapped=Sl});var Eo=d(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.Deferred=void 0;var En=class{constructor(){this._promise=new Promise((e,r)=>{this._resolve=e,this._reject=r})}get promise(){return this._promise}resolve(e){this._resolve(e)}reject(e){this._reject(e)}};Zt.Deferred=En});var mo=d(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.BindOnceFuture=void 0;var gl=Eo(),mn=class{constructor(e,r){this._callback=e,this._that=r,this._isCalled=!1,this._deferred=new gl.Deferred}get isCalled(){return this._isCalled}get promise(){return this._deferred.promise}call(...e){if(!this._isCalled){this._isCalled=!0;try{Promise.resolve(this._callback.call(this._that,...e)).then(r=>this._deferred.resolve(r),r=>this._deferred.reject(r))}catch(r){this._deferred.reject(r)}}return this._deferred.promise}};Jt.BindOnceFuture=mn});var So=d(er=>{"use strict";Object.defineProperty(er,"__esModule",{value:!0});er._export=void 0;var To=(E(),w(l)),yl=ot();function vl(t,e){return new Promise(r=>{To.context.with((0,yl.suppressTracing)(To.context.active()),()=>{t.export(e,n=>{r(n)})})})}er._export=vl});var I=d(T=>{"use strict";var Al=T&&T.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),R=T&&T.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Al(e,t,r)};Object.defineProperty(T,"__esModule",{value:!0});T.internal=T.baggageUtils=void 0;R(pi(),T);R(di(),T);R(Ti(),T);R(Xr(),T);R(qr(),T);R(Ui(),T);R(Gi(),T);R(Vi(),T);T.baggageUtils=Vr();R($r(),T);R(Fi(),T);R(Yi(),T);R($i(),T);R(Qi(),T);R(un(),T);R(ln(),T);R(Ji(),T);R(eo(),T);R(ot(),T);R(nn(),T);R(Pt(),T);R(lo(),T);R(Kr(),T);R(fo(),T);R(_o(),T);R(ho(),T);R(mo(),T);R(zr(),T);var Ol=So();T.internal={_export:Ol._export}});var Ho=d(ve=>{"use strict";Object.defineProperty(ve,"__esModule",{value:!0});ve.disableInstrumentations=ve.enableInstrumentations=ve.parseInstrumentationOptions=void 0;function Vo(t=[]){let e=[];for(let r=0,n=t.length;r<n;r++){let o=t[r];if(Array.isArray(o)){let i=Vo(o);e=e.concat(i.instrumentations)}else typeof o=="function"?e.push(new o):o.instrumentationName&&e.push(o)}return{instrumentations:e}}ve.parseInstrumentationOptions=Vo;function Fl(t,e,r){for(let n=0,o=t.length;n<o;n++){let i=t[n];e&&i.setTracerProvider(e),r&&i.setMeterProvider(r),i.getConfig().enabled||i.enable()}}ve.enableInstrumentations=Fl;function jl(t){t.forEach(e=>e.disable())}ve.disableInstrumentations=jl});var jo=d(ar=>{"use strict";Object.defineProperty(ar,"__esModule",{value:!0});ar.registerInstrumentations=void 0;var Fo=(E(),w(l)),Sn=Ho();function kl(t){let{instrumentations:e}=(0,Sn.parseInstrumentationOptions)(t.instrumentations),r=t.tracerProvider||Fo.trace.getTracerProvider(),n=t.meterProvider||Fo.metrics.getMeterProvider();return(0,Sn.enableInstrumentations)(e,r,n),()=>{(0,Sn.disableInstrumentations)(e)}}ar.registerInstrumentations=kl});var pt={};import*as AE from"async_hooks";var Ba=Ur(()=>{z(pt,AE)});var dt={};import*as OE from"events";var Ga=Ur(()=>{z(dt,OE)});var Va=d(Er=>{"use strict";Object.defineProperty(Er,"__esModule",{value:!0});Er.AbstractAsyncHooksContextManager=void 0;var Sf=(Ga(),w(dt)),gf=["addListener","on","once","prependListener","prependOnceListener"],Nn=class{constructor(){this._kOtListeners=Symbol("OtListeners"),this._wrapped=!1}bind(e,r){return r instanceof Sf.EventEmitter?this._bindEventEmitter(e,r):typeof r=="function"?this._bindFunction(e,r):r}_bindFunction(e,r){let n=this,o=function(...i){return n.with(e,()=>r.apply(this,i))};return Object.defineProperty(o,"length",{enumerable:!1,configurable:!0,writable:!1,value:r.length}),o}_bindEventEmitter(e,r){return this._getPatchMap(r)!==void 0||(this._createPatchMap(r),gf.forEach(o=>{r[o]!==void 0&&(r[o]=this._patchAddListener(r,r[o],e))}),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(e,r){let n=this;return function(o,i){var s;let u=(s=n._getPatchMap(e))===null||s===void 0?void 0:s[o];if(u===void 0)return r.call(this,o,i);let c=u.get(i);return r.call(this,o,c||i)}}_patchRemoveAllListeners(e,r){let n=this;return function(o){let i=n._getPatchMap(e);return i!==void 0&&(arguments.length===0?n._createPatchMap(e):i[o]!==void 0&&delete i[o]),r.apply(this,arguments)}}_patchAddListener(e,r,n){let o=this;return function(i,s){if(o._wrapped)return r.call(this,i,s);let u=o._getPatchMap(e);u===void 0&&(u=o._createPatchMap(e));let c=u[i];c===void 0&&(c=new WeakMap,u[i]=c);let a=o.bind(n,s);c.set(s,a),o._wrapped=!0;try{return r.call(this,i,a)}finally{o._wrapped=!1}}}_createPatchMap(e){let r=Object.create(null);return e[this._kOtListeners]=r,r}_getPatchMap(e){return e[this._kOtListeners]}};Er.AbstractAsyncHooksContextManager=Nn});var Ha=d(mr=>{"use strict";Object.defineProperty(mr,"__esModule",{value:!0});mr.AsyncLocalStorageContextManager=void 0;var yf=(E(),w(l)),vf=(Ba(),w(pt)),Af=Va(),wn=class extends Af.AbstractAsyncHooksContextManager{constructor(){super(),this._asyncLocalStorage=new vf.AsyncLocalStorage}active(){var e;return(e=this._asyncLocalStorage.getStore())!==null&&e!==void 0?e:yf.ROOT_CONTEXT}with(e,r,n,...o){let i=n==null?r:r.bind(n);return this._asyncLocalStorage.run(e,i,...o)}enable(){return this}disable(){return this._asyncLocalStorage.disable(),this}};mr.AsyncLocalStorageContextManager=wn});var Un=d(Ae=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:!0});Ae.toAnyValue=Ae.toKeyValue=Ae.toAttributes=void 0;function If(t){return Object.keys(t).map(e=>xn(e,t[e]))}Ae.toAttributes=If;function xn(t,e){return{key:t,value:Dn(e)}}Ae.toKeyValue=xn;function Dn(t){let e=typeof t;return e==="string"?{stringValue:t}:e==="number"?Number.isInteger(t)?{intValue:t}:{doubleValue:t}:e==="boolean"?{boolValue:t}:t instanceof Uint8Array?{bytesValue:t}:Array.isArray(t)?{arrayValue:{values:t.map(Dn)}}:e==="object"&&t!=null?{kvlistValue:{values:Object.entries(t).map(([r,n])=>xn(r,n))}}:{}}Ae.toAnyValue=Dn});var Ka=d(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.toOtlpSpanEvent=Oe.toOtlpLink=Oe.sdkSpanToOtlpSpan=void 0;var Bn=Un();function Cf(t,e){var r;let n=t.spanContext(),o=t.status;return{traceId:e.encodeSpanContext(n.traceId),spanId:e.encodeSpanContext(n.spanId),parentSpanId:e.encodeOptionalSpanContext(t.parentSpanId),traceState:(r=n.traceState)===null||r===void 0?void 0:r.serialize(),name:t.name,kind:t.kind==null?0:t.kind+1,startTimeUnixNano:e.encodeHrTime(t.startTime),endTimeUnixNano:e.encodeHrTime(t.endTime),attributes:(0,Bn.toAttributes)(t.attributes),droppedAttributesCount:t.droppedAttributesCount,events:t.events.map(i=>Xa(i,e)),droppedEventsCount:t.droppedEventsCount,status:{code:o.code,message:o.message},links:t.links.map(i=>qa(i,e)),droppedLinksCount:t.droppedLinksCount}}Oe.sdkSpanToOtlpSpan=Cf;function qa(t,e){var r;return{attributes:t.attributes?(0,Bn.toAttributes)(t.attributes):[],spanId:e.encodeSpanContext(t.context.spanId),traceId:e.encodeSpanContext(t.context.traceId),traceState:(r=t.context.traceState)===null||r===void 0?void 0:r.serialize(),droppedAttributesCount:t.droppedAttributesCount||0}}Oe.toOtlpLink=qa;function Xa(t,e){return{attributes:t.attributes?(0,Bn.toAttributes)(t.attributes):[],name:t.name,timeUnixNano:e.encodeHrTime(t.time),droppedAttributesCount:t.droppedAttributesCount||0}}Oe.toOtlpSpanEvent=Xa});var Qa=d(K=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0});K.getOtlpEncoder=K.encodeAsString=K.encodeAsLongBits=K.toLongBits=K.hrTimeToNanos=void 0;var gr=I(),Nf=BigInt(1e9);function Gn(t){return BigInt(t[0])*Nf+BigInt(t[1])}K.hrTimeToNanos=Gn;function Ya(t){let e=Number(BigInt.asUintN(32,t)),r=Number(BigInt.asUintN(32,t>>BigInt(32)));return{low:e,high:r}}K.toLongBits=Ya;function Vn(t){let e=Gn(t);return Ya(e)}K.encodeAsLongBits=Vn;function za(t){return Gn(t).toString()}K.encodeAsString=za;var wf=typeof BigInt<"u"?za:gr.hrTimeToNanoseconds;function Wa(t){return t}function $a(t){if(t!==void 0)return(0,gr.hexToBase64)(t)}var Mf={encodeHrTime:Vn,encodeSpanContext:gr.hexToBase64,encodeOptionalSpanContext:$a};function xf(t){var e,r;if(t===void 0)return Mf;let n=(e=t.useLongBits)!==null&&e!==void 0?e:!0,o=(r=t.useHex)!==null&&r!==void 0?r:!1;return{encodeHrTime:n?Vn:wf,encodeSpanContext:o?Wa:gr.hexToBase64,encodeOptionalSpanContext:o?Wa:$a}}K.getOtlpEncoder=xf});var Hn=d(yr=>{"use strict";Object.defineProperty(yr,"__esModule",{value:!0});yr.createExportTraceServiceRequest=void 0;var Df=Un(),Uf=Ka(),Bf=Qa();function Gf(t,e){let r=(0,Bf.getOtlpEncoder)(e);return{resourceSpans:Hf(t,r)}}yr.createExportTraceServiceRequest=Gf;function Vf(t){let e=new Map;for(let r of t){let n=e.get(r.resource);n||(n=new Map,e.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 e}function Hf(t,e){let r=Vf(t),n=[],o=r.entries(),i=o.next();for(;!i.done;){let[s,u]=i.value,c=[],a=u.values(),f=a.next();for(;!f.done;){let _=f.value;if(_.length>0){let{name:S,version:x,schemaUrl:O}=_[0].instrumentationLibrary,B=_.map(m=>(0,Uf.sdkSpanToOtlpSpan)(m,e));c.push({scope:{name:S,version:x},spans:B,schemaUrl:O})}f=a.next()}let p={resource:{attributes:(0,Df.toAttributes)(s.attributes),droppedAttributesCount:0},scopeSpans:c,schemaUrl:void 0};n.push(p),i=o.next()}return n}});var es=d(C=>{"use strict";Object.defineProperty(C,"__esModule",{value:!0});C.parseRetryAfterToMills=C.isExportRetryable=C.invalidTimeout=C.configureExporterTimeout=C.appendRootPathToUrlIfNeeded=C.appendResourcePathToUrl=C.parseHeaders=C.DEFAULT_EXPORT_BACKOFF_MULTIPLIER=C.DEFAULT_EXPORT_MAX_BACKOFF=C.DEFAULT_EXPORT_INITIAL_BACKOFF=C.DEFAULT_EXPORT_MAX_ATTEMPTS=void 0;var Fn=(E(),w(l)),Za=I(),Ja=1e4;C.DEFAULT_EXPORT_MAX_ATTEMPTS=5;C.DEFAULT_EXPORT_INITIAL_BACKOFF=1e3;C.DEFAULT_EXPORT_MAX_BACKOFF=5e3;C.DEFAULT_EXPORT_BACKOFF_MULTIPLIER=1.5;function Ff(t={}){let e={};return Object.entries(t).forEach(([r,n])=>{typeof n<"u"?e[r]=String(n):Fn.diag.warn(`Header "${r}" has wrong value and will be ignored`)}),e}C.parseHeaders=Ff;function jf(t,e){return t.endsWith("/")||(t=t+"/"),t+e}C.appendResourcePathToUrl=jf;function kf(t){try{let e=new URL(t);return e.pathname===""&&(e.pathname=e.pathname+"/"),e.toString()}catch{return Fn.diag.warn(`Could not parse export URL: '${t}'`),t}}C.appendRootPathToUrlIfNeeded=kf;function qf(t){return typeof t=="number"?t<=0?jn(t,Ja):t:Xf()}C.configureExporterTimeout=qf;function Xf(){var t;let e=Number((t=(0,Za.getEnv)().OTEL_EXPORTER_OTLP_TRACES_TIMEOUT)!==null&&t!==void 0?t:(0,Za.getEnv)().OTEL_EXPORTER_OTLP_TIMEOUT);return e<=0?jn(e,Ja):e}function jn(t,e){return Fn.diag.warn("Timeout must be greater than 0",t),e}C.invalidTimeout=jn;function Kf(t){return[429,502,503,504].includes(t)}C.isExportRetryable=Kf;function Wf(t){if(t==null)return-1;let e=Number.parseInt(t,10);if(Number.isInteger(e))return e>0?e*1e3:-1;let r=new Date(t).getTime()-Date.now();return r>=0?r:0}C.parseRetryAfterToMills=Wf});var rs=d(vr=>{"use strict";Object.defineProperty(vr,"__esModule",{value:!0});vr.OTLPExporterBase=void 0;var ts=(E(),w(l)),ht=I(),Yf=es(),kn=class{constructor(e={}){this._sendingPromises=[],this.url=this.getDefaultUrl(e),typeof e.hostname=="string"&&(this.hostname=e.hostname),this.shutdown=this.shutdown.bind(this),this._shutdownOnce=new ht.BindOnceFuture(this._shutdown,this),this._concurrencyLimit=typeof e.concurrencyLimit=="number"?e.concurrencyLimit:30,this.timeoutMillis=(0,Yf.configureExporterTimeout)(e.timeoutMillis),this.onInit(e)}export(e,r){if(this._shutdownOnce.isCalled){r({code:ht.ExportResultCode.FAILED,error:new Error("Exporter has been shutdown")});return}if(this._sendingPromises.length>=this._concurrencyLimit){r({code:ht.ExportResultCode.FAILED,error:new Error("Concurrent export limit reached")});return}this._export(e).then(()=>{r({code:ht.ExportResultCode.SUCCESS})}).catch(n=>{r({code:ht.ExportResultCode.FAILED,error:n})})}_export(e){return new Promise((r,n)=>{try{ts.diag.debug("items to be sent",e),this.send(e,r,n)}catch(o){n(o)}})}shutdown(){return this._shutdownOnce.call()}forceFlush(){return Promise.all(this._sendingPromises).then(()=>{})}_shutdown(){return ts.diag.debug("shutdown started"),this.onShutdown(),this.forceFlush()}};vr.OTLPExporterBase=kn});var as=d((JE,os)=>{"use strict";os.exports=Qf;function Qf(t,e){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),_=0;_<p.length;)p[_++]=arguments[_];u.apply(null,p)}};try{t.apply(e||null,r)}catch(a){i&&(i=!1,c(a))}})}});var ls=d(cs=>{"use strict";var Or=cs;Or.length=function(e){var r=e.length;if(!r)return 0;for(var n=0;--r%4>1&&e.charAt(r)==="=";)++n;return Math.ceil(e.length*3)/4-n};var Je=new Array(64),us=new Array(123);for(J=0;J<64;)us[Je[J]=J<26?J+65:J<52?J+71:J<62?J-4:J-59|43]=J++;var J;Or.encode=function(e,r,n){for(var o=null,i=[],s=0,u=0,c;r<n;){var a=e[r++];switch(u){case 0:i[s++]=Je[a>>2],c=(a&3)<<4,u=1;break;case 1:i[s++]=Je[c|a>>4],c=(a&15)<<2,u=2;break;case 2:i[s++]=Je[c|a>>6],i[s++]=Je[a&63],u=0;break}s>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,i)),s=0)}return u&&(i[s++]=Je[c],i[s++]=61,u===1&&(i[s++]=61)),o?(s&&o.push(String.fromCharCode.apply(String,i.slice(0,s))),o.join("")):String.fromCharCode.apply(String,i.slice(0,s))};var ss="invalid encoding";Or.decode=function(e,r,n){for(var o=n,i=0,s,u=0;u<e.length;){var c=e.charCodeAt(u++);if(c===61&&i>1)break;if((c=us[c])===void 0)throw Error(ss);switch(i){case 0:s=c,i=1;break;case 1:r[n++]=s<<2|(c&48)>>4,s=c,i=2;break;case 2:r[n++]=(s&15)<<4|(c&60)>>2,s=c,i=3;break;case 3:r[n++]=(s&3)<<6|c,i=0;break}}if(i===1)throw Error(ss);return n-o};Or.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}});var ps=d((tm,fs)=>{"use strict";fs.exports=Rr;function Rr(){this._listeners={}}Rr.prototype.on=function(e,r,n){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:r,ctx:n||this}),this};Rr.prototype.off=function(e,r){if(e===void 0)this._listeners={};else if(r===void 0)this._listeners[e]=[];else for(var n=this._listeners[e],o=0;o<n.length;)n[o].fn===r?n.splice(o,1):++o;return this};Rr.prototype.emit=function(e){var r=this._listeners[e];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 Ss=d((rm,Ts)=>{"use strict";Ts.exports=ds(ds);function ds(t){return typeof Float32Array<"u"?function(){var e=new Float32Array([-0]),r=new Uint8Array(e.buffer),n=r[3]===128;function o(c,a,f){e[0]=c,a[f]=r[0],a[f+1]=r[1],a[f+2]=r[2],a[f+3]=r[3]}function i(c,a,f){e[0]=c,a[f]=r[3],a[f+1]=r[2],a[f+2]=r[1],a[f+3]=r[0]}t.writeFloatLE=n?o:i,t.writeFloatBE=n?i:o;function s(c,a){return r[0]=c[a],r[1]=c[a+1],r[2]=c[a+2],r[3]=c[a+3],e[0]}function u(c,a){return r[3]=c[a],r[2]=c[a+1],r[1]=c[a+2],r[0]=c[a+3],e[0]}t.readFloatLE=n?s:u,t.readFloatBE=n?u:s}():function(){function e(n,o,i,s){var u=o<0?1:0;if(u&&(o=-o),o===0)n(1/o>0?0:2147483648,i,s);else if(isNaN(o))n(2143289344,i,s);else if(o>34028234663852886e22)n((u<<31|2139095040)>>>0,i,s);else if(o<11754943508222875e-54)n((u<<31|Math.round(o/1401298464324817e-60))>>>0,i,s);else{var c=Math.floor(Math.log(o)/Math.LN2),a=Math.round(o*Math.pow(2,-c)*8388608)&8388607;n((u<<31|c+127<<23|a)>>>0,i,s)}}t.writeFloatLE=e.bind(null,_s),t.writeFloatBE=e.bind(null,hs);function r(n,o,i){var s=n(o,i),u=(s>>31)*2+1,c=s>>>23&255,a=s&8388607;return c===255?a?NaN:u*(1/0):c===0?u*1401298464324817e-60*a:u*Math.pow(2,c-150)*(a+8388608)}t.readFloatLE=r.bind(null,Es),t.readFloatBE=r.bind(null,ms)}(),typeof Float64Array<"u"?function(){var e=new Float64Array([-0]),r=new Uint8Array(e.buffer),n=r[7]===128;function o(c,a,f){e[0]=c,a[f]=r[0],a[f+1]=r[1],a[f+2]=r[2],a[f+3]=r[3],a[f+4]=r[4],a[f+5]=r[5],a[f+6]=r[6],a[f+7]=r[7]}function i(c,a,f){e[0]=c,a[f]=r[7],a[f+1]=r[6],a[f+2]=r[5],a[f+3]=r[4],a[f+4]=r[3],a[f+5]=r[2],a[f+6]=r[1],a[f+7]=r[0]}t.writeDoubleLE=n?o:i,t.writeDoubleBE=n?i:o;function s(c,a){return r[0]=c[a],r[1]=c[a+1],r[2]=c[a+2],r[3]=c[a+3],r[4]=c[a+4],r[5]=c[a+5],r[6]=c[a+6],r[7]=c[a+7],e[0]}function u(c,a){return r[7]=c[a],r[6]=c[a+1],r[5]=c[a+2],r[4]=c[a+3],r[3]=c[a+4],r[2]=c[a+5],r[1]=c[a+6],r[0]=c[a+7],e[0]}t.readDoubleLE=n?s:u,t.readDoubleBE=n?u:s}():function(){function e(n,o,i,s,u,c){var a=s<0?1:0;if(a&&(s=-s),s===0)n(0,u,c+o),n(1/s>0?0:2147483648,u,c+i);else if(isNaN(s))n(0,u,c+o),n(2146959360,u,c+i);else if(s>17976931348623157e292)n(0,u,c+o),n((a<<31|2146435072)>>>0,u,c+i);else{var f;if(s<22250738585072014e-324)f=s/5e-324,n(f>>>0,u,c+o),n((a<<31|f/4294967296)>>>0,u,c+i);else{var p=Math.floor(Math.log(s)/Math.LN2);p===1024&&(p=1023),f=s*Math.pow(2,-p),n(f*4503599627370496>>>0,u,c+o),n((a<<31|p+1023<<20|f*1048576&1048575)>>>0,u,c+i)}}}t.writeDoubleLE=e.bind(null,_s,0,4),t.writeDoubleBE=e.bind(null,hs,4,0);function r(n,o,i,s,u){var c=n(s,u+o),a=n(s,u+i),f=(a>>31)*2+1,p=a>>>20&2047,_=4294967296*(a&1048575)+c;return p===2047?_?NaN:f*(1/0):p===0?f*5e-324*_:f*Math.pow(2,p-1075)*(_+4503599627370496)}t.readDoubleLE=r.bind(null,Es,0,4),t.readDoubleBE=r.bind(null,ms,4,0)}(),t}function _s(t,e,r){e[r]=t&255,e[r+1]=t>>>8&255,e[r+2]=t>>>16&255,e[r+3]=t>>>24}function hs(t,e,r){e[r]=t>>>24,e[r+1]=t>>>16&255,e[r+2]=t>>>8&255,e[r+3]=t&255}function Es(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0}function ms(t,e){return(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}});var ys=d((nm,gs)=>{"use strict";gs.exports=Zf;function Zf(t){return null}});var As=d(vs=>{"use strict";var Xn=vs;Xn.length=function(e){for(var r=0,n=0,o=0;o<e.length;++o)n=e.charCodeAt(o),n<128?r+=1:n<2048?r+=2:(n&64512)===55296&&(e.charCodeAt(o+1)&64512)===56320?(++o,r+=4):r+=3;return r};Xn.read=function(e,r,n){var o=n-r;if(o<1)return"";for(var i=null,s=[],u=0,c;r<n;)c=e[r++],c<128?s[u++]=c:c>191&&c<224?s[u++]=(c&31)<<6|e[r++]&63:c>239&&c<365?(c=((c&7)<<18|(e[r++]&63)<<12|(e[r++]&63)<<6|e[r++]&63)-65536,s[u++]=55296+(c>>10),s[u++]=56320+(c&1023)):s[u++]=(c&15)<<12|(e[r++]&63)<<6|e[r++]&63,u>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,s)),u=0);return i?(u&&i.push(String.fromCharCode.apply(String,s.slice(0,u))),i.join("")):String.fromCharCode.apply(String,s.slice(0,u))};Xn.write=function(e,r,n){for(var o=n,i,s,u=0;u<e.length;++u)i=e.charCodeAt(u),i<128?r[n++]=i:i<2048?(r[n++]=i>>6|192,r[n++]=i&63|128):(i&64512)===55296&&((s=e.charCodeAt(u+1))&64512)===56320?(i=65536+((i&1023)<<10)+(s&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 Rs=d((om,Os)=>{"use strict";Os.exports=Jf;function Jf(t,e,r){var n=r||8192,o=n>>>1,i=null,s=n;return function(c){if(c<1||c>o)return t(c);s+c>n&&(i=t(n),s=0);var a=e.call(i,s,s+=c);return s&7&&(s=(s|7)+1),a}}});var Ls=d((am,bs)=>{"use strict";bs.exports=U;var Et=be();function U(t,e){this.lo=t>>>0,this.hi=e>>>0}var Be=U.zero=new U(0,0);Be.toNumber=function(){return 0};Be.zzEncode=Be.zzDecode=function(){return this};Be.length=function(){return 1};var ep=U.zeroHash="\0\0\0\0\0\0\0\0";U.fromNumber=function(e){if(e===0)return Be;var r=e<0;r&&(e=-e);var n=e>>>0,o=(e-n)/4294967296>>>0;return r&&(o=~o>>>0,n=~n>>>0,++n>4294967295&&(n=0,++o>4294967295&&(o=0))),new U(n,o)};U.from=function(e){if(typeof e=="number")return U.fromNumber(e);if(Et.isString(e))if(Et.Long)e=Et.Long.fromString(e);else return U.fromNumber(parseInt(e,10));return e.low||e.high?new U(e.low>>>0,e.high>>>0):Be};U.prototype.toNumber=function(e){if(!e&&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};U.prototype.toLong=function(e){return Et.Long?new Et.Long(this.lo|0,this.hi|0,!!e):{low:this.lo|0,high:this.hi|0,unsigned:!!e}};var Re=String.prototype.charCodeAt;U.fromHash=function(e){return e===ep?Be:new U((Re.call(e,0)|Re.call(e,1)<<8|Re.call(e,2)<<16|Re.call(e,3)<<24)>>>0,(Re.call(e,4)|Re.call(e,5)<<8|Re.call(e,6)<<16|Re.call(e,7)<<24)>>>0)};U.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)};U.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this};U.prototype.zzDecode=function(){var e=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this};U.prototype.length=function(){var e=this.lo,r=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return n===0?r===0?e<16384?e<128?1:2:e<2097152?3:4:r<16384?r<128?5:6:r<2097152?7:8:n<128?9:10}});var be=d(Kn=>{"use strict";var h=Kn;h.asPromise=as();h.base64=ls();h.EventEmitter=ps();h.float=Ss();h.inquire=ys();h.utf8=As();h.pool=Rs();h.LongBits=Ls();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||Kn;h.emptyArray=Object.freeze?Object.freeze([]):[];h.emptyObject=Object.freeze?Object.freeze({}):{};h.isInteger=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};h.isString=function(e){return typeof e=="string"||e instanceof String};h.isObject=function(e){return e&&typeof e=="object"};h.isset=h.isSet=function(e,r){var n=e[r];return n!=null&&e.hasOwnProperty(r)?typeof n!="object"||(Array.isArray(n)?n.length:Object.keys(n).length)>0:!1};h.Buffer=function(){try{var t=h.inquire("buffer").Buffer;return t.prototype.utf8Write?t:null}catch{return null}}();h._Buffer_from=null;h._Buffer_allocUnsafe=null;h.newBuffer=function(e){return typeof e=="number"?h.Buffer?h._Buffer_allocUnsafe(e):new h.Array(e):h.Buffer?h._Buffer_from(e):typeof Uint8Array>"u"?e:new Uint8Array(e)};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(e){return e?h.LongBits.from(e).toHash():h.LongBits.zeroHash};h.longFromHash=function(e,r){var n=h.LongBits.fromHash(e);return h.Long?h.Long.fromBits(n.lo,n.hi,r):n.toNumber(!!r)};function Ps(t,e,r){for(var n=Object.keys(e),o=0;o<n.length;++o)(t[n[o]]===void 0||!r)&&(t[n[o]]=e[n[o]]);return t}h.merge=Ps;h.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)};function Is(t){function e(r,n){if(!(this instanceof e))return new e(r,n);Object.defineProperty(this,"message",{get:function(){return r}}),Error.captureStackTrace?Error.captureStackTrace(this,e):Object.defineProperty(this,"stack",{value:new Error().stack||""}),n&&Ps(this,n)}return e.prototype=Object.create(Error.prototype,{constructor:{value:e,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return t},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),e}h.newError=Is;h.ProtocolError=Is("ProtocolError");h.oneOfGetter=function(e){for(var r={},n=0;n<e.length;++n)r[e[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(e){return function(r){for(var n=0;n<e.length;++n)e[n]!==r&&delete this[e[n]]}};h.toJSONOptions={longs:String,enums:String,bytes:String,json:!0};h._configure=function(){var t=h.Buffer;if(!t){h._Buffer_from=h._Buffer_allocUnsafe=null;return}h._Buffer_from=t.from!==Uint8Array.from&&t.from||function(r,n){return new t(r,n)},h._Buffer_allocUnsafe=t.allocUnsafe||function(r){return new t(r)}}});var Jn=d((um,Ms)=>{"use strict";Ms.exports=y;var W=be(),Wn,br=W.LongBits,Cs=W.base64,Ns=W.utf8;function mt(t,e,r){this.fn=t,this.len=e,this.next=void 0,this.val=r}function zn(){}function tp(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function y(){this.len=0,this.head=new mt(zn,0,0),this.tail=this.head,this.states=null}var ws=function(){return W.Buffer?function(){return(y.create=function(){return new Wn})()}:function(){return new y}};y.create=ws();y.alloc=function(e){return new W.Array(e)};W.Array!==Array&&(y.alloc=W.pool(y.alloc,W.Array.prototype.subarray));y.prototype._push=function(e,r,n){return this.tail=this.tail.next=new mt(e,r,n),this.len+=r,this};function $n(t,e,r){e[r]=t&255}function rp(t,e,r){for(;t>127;)e[r++]=t&127|128,t>>>=7;e[r]=t}function Qn(t,e){this.len=t,this.next=void 0,this.val=e}Qn.prototype=Object.create(mt.prototype);Qn.prototype.fn=rp;y.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new Qn((e=e>>>0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this};y.prototype.int32=function(e){return e<0?this._push(Zn,10,br.fromNumber(e)):this.uint32(e)};y.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)};function Zn(t,e,r){for(;t.hi;)e[r++]=t.lo&127|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)e[r++]=t.lo&127|128,t.lo=t.lo>>>7;e[r++]=t.lo}y.prototype.uint64=function(e){var r=br.from(e);return this._push(Zn,r.length(),r)};y.prototype.int64=y.prototype.uint64;y.prototype.sint64=function(e){var r=br.from(e).zzEncode();return this._push(Zn,r.length(),r)};y.prototype.bool=function(e){return this._push($n,1,e?1:0)};function Yn(t,e,r){e[r]=t&255,e[r+1]=t>>>8&255,e[r+2]=t>>>16&255,e[r+3]=t>>>24}y.prototype.fixed32=function(e){return this._push(Yn,4,e>>>0)};y.prototype.sfixed32=y.prototype.fixed32;y.prototype.fixed64=function(e){var r=br.from(e);return this._push(Yn,4,r.lo)._push(Yn,4,r.hi)};y.prototype.sfixed64=y.prototype.fixed64;y.prototype.float=function(e){return this._push(W.float.writeFloatLE,4,e)};y.prototype.double=function(e){return this._push(W.float.writeDoubleLE,8,e)};var np=W.Array.prototype.set?function(e,r,n){r.set(e,n)}:function(e,r,n){for(var o=0;o<e.length;++o)r[n+o]=e[o]};y.prototype.bytes=function(e){var r=e.length>>>0;if(!r)return this._push($n,1,0);if(W.isString(e)){var n=y.alloc(r=Cs.length(e));Cs.decode(e,n,0),e=n}return this.uint32(r)._push(np,r,e)};y.prototype.string=function(e){var r=Ns.length(e);return r?this.uint32(r)._push(Ns.write,r,e):this._push($n,1,0)};y.prototype.fork=function(){return this.states=new tp(this),this.head=this.tail=new mt(zn,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 mt(zn,0,0),this.len=0),this};y.prototype.ldelim=function(){var e=this.head,r=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=e.next,this.tail=r,this.len+=n),this};y.prototype.finish=function(){for(var e=this.head.next,r=this.constructor.alloc(this.len),n=0;e;)e.fn(e.val,r,n),n+=e.len,e=e.next;return r};y._configure=function(t){Wn=t,y.create=ws(),Wn._configure()}});var Us=d((cm,Ds)=>{"use strict";Ds.exports=ie;var xs=Jn();(ie.prototype=Object.create(xs.prototype)).constructor=ie;var Le=be();function ie(){xs.call(this)}ie._configure=function(){ie.alloc=Le._Buffer_allocUnsafe,ie.writeBytesBuffer=Le.Buffer&&Le.Buffer.prototype instanceof Uint8Array&&Le.Buffer.prototype.set.name==="set"?function(e,r,n){r.set(e,n)}:function(e,r,n){if(e.copy)e.copy(r,n,0,e.length);else for(var o=0;o<e.length;)r[n++]=e[o++]}};ie.prototype.bytes=function(e){Le.isString(e)&&(e=Le._Buffer_from(e,"base64"));var r=e.length>>>0;return this.uint32(r),r&&this._push(ie.writeBytesBuffer,r,e),this};function ip(t,e,r){t.length<40?Le.utf8.write(t,e,r):e.utf8Write?e.utf8Write(t,r):e.write(t,r)}ie.prototype.string=function(e){var r=Le.Buffer.byteLength(e);return this.uint32(r),r&&this._push(ip,r,e),this};ie._configure()});var ri=d((lm,Fs)=>{"use strict";Fs.exports=N;var ee=be(),ti,Vs=ee.LongBits,op=ee.utf8;function te(t,e){return RangeError("index out of range: "+t.pos+" + "+(e||1)+" > "+t.len)}function N(t){this.buf=t,this.pos=0,this.len=t.length}var Bs=typeof Uint8Array<"u"?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new N(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new N(e);throw Error("illegal buffer")},Hs=function(){return ee.Buffer?function(r){return(N.create=function(o){return ee.Buffer.isBuffer(o)?new ti(o):Bs(o)})(r)}:Bs};N.create=Hs();N.prototype._slice=ee.Array.prototype.subarray||ee.Array.prototype.slice;N.prototype.uint32=function(){var e=4294967295;return function(){if(e=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(e=(e|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(e=(e|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(e=(e|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(e=(e|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return e;if((this.pos+=5)>this.len)throw this.pos=this.len,te(this,10);return e}}();N.prototype.int32=function(){return this.uint32()|0};N.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(e&1)|0};function ei(){var t=new Vs(0,0),e=0;if(this.len-this.pos>4){for(;e<4;++e)if(t.lo=(t.lo|(this.buf[this.pos]&127)<<e*7)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(this.buf[this.pos]&127)<<28)>>>0,t.hi=(t.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return t;e=0}else{for(;e<3;++e){if(this.pos>=this.len)throw te(this);if(t.lo=(t.lo|(this.buf[this.pos]&127)<<e*7)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(this.buf[this.pos++]&127)<<e*7)>>>0,t}if(this.len-this.pos>4){for(;e<5;++e)if(t.hi=(t.hi|(this.buf[this.pos]&127)<<e*7+3)>>>0,this.buf[this.pos++]<128)return t}else for(;e<5;++e){if(this.pos>=this.len)throw te(this);if(t.hi=(t.hi|(this.buf[this.pos]&127)<<e*7+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}N.prototype.bool=function(){return this.uint32()!==0};function Lr(t,e){return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0}N.prototype.fixed32=function(){if(this.pos+4>this.len)throw te(this,4);return Lr(this.buf,this.pos+=4)};N.prototype.sfixed32=function(){if(this.pos+4>this.len)throw te(this,4);return Lr(this.buf,this.pos+=4)|0};function Gs(){if(this.pos+8>this.len)throw te(this,8);return new Vs(Lr(this.buf,this.pos+=4),Lr(this.buf,this.pos+=4))}N.prototype.float=function(){if(this.pos+4>this.len)throw te(this,4);var e=ee.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e};N.prototype.double=function(){if(this.pos+8>this.len)throw te(this,4);var e=ee.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e};N.prototype.bytes=function(){var e=this.uint32(),r=this.pos,n=this.pos+e;if(n>this.len)throw te(this,e);if(this.pos+=e,Array.isArray(this.buf))return this.buf.slice(r,n);if(r===n){var o=ee.Buffer;return o?o.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,r,n)};N.prototype.string=function(){var e=this.bytes();return op.read(e,0,e.length)};N.prototype.skip=function(e){if(typeof e=="number"){if(this.pos+e>this.len)throw te(this,e);this.pos+=e}else do if(this.pos>=this.len)throw te(this);while(this.buf[this.pos++]&128);return this};N.prototype.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(t=this.uint32()&7)!==4;)this.skipType(t);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this};N._configure=function(t){ti=t,N.create=Hs(),ti._configure();var e=ee.Long?"toLong":"toNumber";ee.merge(N.prototype,{int64:function(){return ei.call(this)[e](!1)},uint64:function(){return ei.call(this)[e](!0)},sint64:function(){return ei.call(this).zzDecode()[e](!1)},fixed64:function(){return Gs.call(this)[e](!0)},sfixed64:function(){return Gs.call(this)[e](!1)}})}});var Xs=d((fm,qs)=>{"use strict";qs.exports=Ge;var ks=ri();(Ge.prototype=Object.create(ks.prototype)).constructor=Ge;var js=be();function Ge(t){ks.call(this,t)}Ge._configure=function(){js.Buffer&&(Ge.prototype._slice=js.Buffer.prototype.slice)};Ge.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))};Ge._configure()});var Ws=d((pm,Ks)=>{"use strict";Ks.exports=Tt;var ni=be();(Tt.prototype=Object.create(ni.EventEmitter.prototype)).constructor=Tt;function Tt(t,e,r){if(typeof t!="function")throw TypeError("rpcImpl must be a function");ni.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=!!e,this.responseDelimited=!!r}Tt.prototype.rpcCall=function t(e,r,n,o,i){if(!o)throw TypeError("request must be specified");var s=this;if(!i)return ni.asPromise(t,s,e,r,n,o);if(!s.rpcImpl){setTimeout(function(){i(Error("already ended"))},0);return}try{return s.rpcImpl(e,r[s.requestDelimited?"encodeDelimited":"encode"](o).finish(),function(c,a){if(c)return s.emit("error",c,e),i(c);if(a===null){s.end(!0);return}if(!(a instanceof n))try{a=n[s.responseDelimited?"decodeDelimited":"decode"](a)}catch(f){return s.emit("error",f,e),i(f)}return s.emit("data",a,e),i(null,a)})}catch(u){s.emit("error",u,e),setTimeout(function(){i(u)},0);return}};Tt.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var zs=d(Ys=>{"use strict";var ap=Ys;ap.Service=Ws()});var Qs=d((_m,$s)=>{"use strict";$s.exports={}});var eu=d(Js=>{"use strict";var j=Js;j.build="minimal";j.Writer=Jn();j.BufferWriter=Us();j.Reader=ri();j.BufferReader=Xs();j.util=be();j.rpc=zs();j.roots=Qs();j.configure=Zs;function Zs(){j.util._configure(),j.Writer._configure(j.BufferWriter),j.Reader._configure(j.BufferReader)}Zs()});var ru=d((Em,tu)=>{"use strict";tu.exports=eu()});E();var Ye=g(I());E();var L=g(I()),Te=g(me());var go="exception";var Rl=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},bl=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,i=[],s;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){s={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return i},yo=function(){function t(e,r,n,o,i,s,u,c,a,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=s,this.kind=i,this.links=u;var p=Date.now();this._performanceStartTime=L.otperformance.now(),this._performanceOffset=p-(this._performanceStartTime+(0,L.getTimeOrigin)()),this._startTimeProvided=c!=null,this.startTime=this._getTime(c??p),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this._spanLimits=e.getSpanLimits(),f!=null&&this.setAttributes(f),this._spanProcessor=e.getActiveSpanProcessor(),this._spanProcessor.onStart(this,r),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0}return t.prototype.spanContext=function(){return this._spanContext},t.prototype.setAttribute=function(e,r){return r==null||this._isSpanEnded()?this:e.length===0?(l.diag.warn("Invalid attribute key: "+e),this):(0,L.isAttributeValue)(r)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(r),this):(l.diag.warn("Invalid attribute value set for key: "+e),this)},t.prototype.setAttributes=function(e){var r,n;try{for(var o=Rl(Object.entries(e)),i=o.next();!i.done;i=o.next()){var s=bl(i.value,2),u=s[0],c=s[1];this.setAttribute(u,c)}}catch(a){r={error:a}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return this},t.prototype.addEvent=function(e,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,L.isTimeInput)(r)&&((0,L.isTimeInput)(n)||(n=r),r=void 0);var o=(0,L.sanitizeAttributes)(r);return this.events.push({name:e,attributes:o,time:this._getTime(n),droppedAttributesCount:0}),this},t.prototype.setStatus=function(e){return this._isSpanEnded()?this:(this.status=e,this)},t.prototype.updateName=function(e){return this._isSpanEnded()?this:(this.name=e,this)},t.prototype.end=function(e){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(e),this._duration=(0,L.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)},t.prototype._getTime=function(e){if(typeof e=="number"&&e<L.otperformance.now())return(0,L.hrTime)(e+this._performanceOffset);if(typeof e=="number")return(0,L.millisToHrTime)(e);if(e instanceof Date)return(0,L.millisToHrTime)(e.getTime());if((0,L.isTimeInputHrTime)(e))return e;if(this._startTimeProvided)return(0,L.millisToHrTime)(Date.now());var r=L.otperformance.now()-this._performanceStartTime;return(0,L.addHrTimes)(this.startTime,(0,L.millisToHrTime)(r))},t.prototype.isRecording=function(){return this._ended===!1},t.prototype.recordException=function(e,r){var n={};typeof e=="string"?n[Te.SemanticAttributes.EXCEPTION_MESSAGE]=e:e&&(e.code?n[Te.SemanticAttributes.EXCEPTION_TYPE]=e.code.toString():e.name&&(n[Te.SemanticAttributes.EXCEPTION_TYPE]=e.name),e.message&&(n[Te.SemanticAttributes.EXCEPTION_MESSAGE]=e.message),e.stack&&(n[Te.SemanticAttributes.EXCEPTION_STACKTRACE]=e.stack)),n[Te.SemanticAttributes.EXCEPTION_TYPE]||n[Te.SemanticAttributes.EXCEPTION_MESSAGE]?this.addEvent(go,n,r):l.diag.warn("Failed to record an exception "+e)},Object.defineProperty(t.prototype,"duration",{get:function(){return this._duration},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ended",{get:function(){return this._ended},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedAttributesCount",{get:function(){return this._droppedAttributesCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedEventsCount",{get:function(){return this._droppedEventsCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedLinksCount",{get:function(){return this._droppedLinksCount},enumerable:!1,configurable:!0}),t.prototype._isSpanEnded=function(){return this._ended&&l.diag.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},t.prototype._truncateToLimitUtil=function(e,r){return e.length<=r?e:e.substr(0,r)},t.prototype._truncateToSize=function(e){var r=this,n=this._attributeValueLengthLimit;return n<=0?(l.diag.warn("Attribute value limit must be positive, got "+n),e):typeof e=="string"?this._truncateToLimitUtil(e,n):Array.isArray(e)?e.map(function(o){return typeof o=="string"?r._truncateToLimitUtil(o,n):o}):e},t}();E();var M=g(I());var oe;(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(oe||(oe={}));var ae=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:oe.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t}();var X=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:oe.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t}();E();var vo=g(I());var Se=function(){function t(e){var r,n,o,i;this._root=e.root,this._root||((0,vo.globalErrorHandler)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new X),this._remoteParentSampled=(r=e.remoteParentSampled)!==null&&r!==void 0?r:new X,this._remoteParentNotSampled=(n=e.remoteParentNotSampled)!==null&&n!==void 0?n:new ae,this._localParentSampled=(o=e.localParentSampled)!==null&&o!==void 0?o:new X,this._localParentNotSampled=(i=e.localParentNotSampled)!==null&&i!==void 0?i:new ae}return t.prototype.shouldSample=function(e,r,n,o,i,s){var u=l.trace.getSpanContext(e);return!u||!(0,l.isSpanContextValid)(u)?this._root.shouldSample(e,r,n,o,i,s):u.isRemote?u.traceFlags&l.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(e,r,n,o,i,s):this._remoteParentNotSampled.shouldSample(e,r,n,o,i,s):u.traceFlags&l.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(e,r,n,o,i,s):this._localParentNotSampled.shouldSample(e,r,n,o,i,s)},t.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},t}();E();var Xe=function(){function t(e){e===void 0&&(e=0),this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}return t.prototype.shouldSample=function(e,r){return{decision:(0,l.isValidTraceId)(r)&&this._accumulate(r)<this._upperBound?oe.RECORD_AND_SAMPLED:oe.NOT_RECORD}},t.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},t.prototype._normalize=function(e){return typeof e!="number"||isNaN(e)?0:e>=1?1:e<=0?0:e},t.prototype._accumulate=function(e){for(var r=0,n=0;n<e.length/8;n++){var o=n*8,i=parseInt(e.slice(o,o+8),16);r=(r^i)>>>0}return r},t}();var Ll=(0,M.getEnv)(),Pl=M.TracesSamplerValues.AlwaysOn,Ke=1;function tr(){return{sampler:Tn(Ll),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:(0,M.getEnv)().OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,M.getEnv)().OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:(0,M.getEnv)().OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,M.getEnv)().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:(0,M.getEnv)().OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:(0,M.getEnv)().OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:(0,M.getEnv)().OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:(0,M.getEnv)().OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT}}}function Tn(t){switch(t===void 0&&(t=(0,M.getEnv)()),t.OTEL_TRACES_SAMPLER){case M.TracesSamplerValues.AlwaysOn:return new X;case M.TracesSamplerValues.AlwaysOff:return new ae;case M.TracesSamplerValues.ParentBasedAlwaysOn:return new Se({root:new X});case M.TracesSamplerValues.ParentBasedAlwaysOff:return new Se({root:new ae});case M.TracesSamplerValues.TraceIdRatio:return new Xe(Ao(t));case M.TracesSamplerValues.ParentBasedTraceIdRatio:return new Se({root:new Xe(Ao(t))});default:return l.diag.error('OTEL_TRACES_SAMPLER value "'+t.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+Pl+'".'),new X}}function Ao(t){if(t.OTEL_TRACES_SAMPLER_ARG===void 0||t.OTEL_TRACES_SAMPLER_ARG==="")return l.diag.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+Ke+"."),Ke;var e=Number(t.OTEL_TRACES_SAMPLER_ARG);return isNaN(e)?(l.diag.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+Ke+"."),Ke):e<0||e>1?(l.diag.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+Ke+"."),Ke):e}var We=g(I());function Oo(t){var e={sampler:Tn()},r=tr(),n=Object.assign({},r,e,t);return n.generalLimits=Object.assign({},r.generalLimits,t.generalLimits||{}),n.spanLimits=Object.assign({},r.spanLimits,t.spanLimits||{}),n}function Ro(t){var e,r,n,o,i,s,u,c,a,f,p,_,S=Object.assign({},t.spanLimits),x=(0,We.getEnvWithoutDefaults)();return S.attributeCountLimit=(s=(i=(o=(r=(e=t.spanLimits)===null||e===void 0?void 0:e.attributeCountLimit)!==null&&r!==void 0?r:(n=t.generalLimits)===null||n===void 0?void 0:n.attributeCountLimit)!==null&&o!==void 0?o:x.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&i!==void 0?i:x.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&s!==void 0?s:We.DEFAULT_ATTRIBUTE_COUNT_LIMIT,S.attributeValueLengthLimit=(_=(p=(f=(c=(u=t.spanLimits)===null||u===void 0?void 0:u.attributeValueLengthLimit)!==null&&c!==void 0?c:(a=t.generalLimits)===null||a===void 0?void 0:a.attributeValueLengthLimit)!==null&&f!==void 0?f:x.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&p!==void 0?p:x.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&_!==void 0?_:We.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,Object.assign({},t,{spanLimits:S})}E();var q=g(I()),bo=function(){function t(e,r){this._exporter=e,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var n=(0,q.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 q.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 t.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},t.prototype.onStart=function(e,r){},t.prototype.onEnd=function(e){this._shutdownOnce.isCalled||e.spanContext().traceFlags&l.TraceFlags.SAMPLED&&this._addToBuffer(e)},t.prototype.shutdown=function(){return this._shutdownOnce.call()},t.prototype._shutdown=function(){var e=this;return Promise.resolve().then(function(){return e.onShutdown()}).then(function(){return e._flushAll()}).then(function(){return e._exporter.shutdown()})},t.prototype._addToBuffer=function(e){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&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(e),this._maybeStartTimer()},t.prototype._flushAll=function(){var e=this;return new Promise(function(r,n){for(var o=[],i=Math.ceil(e._finishedSpans.length/e._maxExportBatchSize),s=0,u=i;s<u;s++)o.push(e._flushOneBatch());Promise.all(o).then(function(){r()}).catch(n)})},t.prototype._flushOneBatch=function(){var e=this;return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise(function(r,n){var o=setTimeout(function(){n(new Error("Timeout"))},e._exportTimeoutMillis);l.context.with((0,q.suppressTracing)(l.context.active()),function(){var i=e._finishedSpans.splice(0,e._maxExportBatchSize),s=function(){return e._exporter.export(i,function(c){var a;clearTimeout(o),c.code===q.ExportResultCode.SUCCESS?r():n((a=c.error)!==null&&a!==void 0?a:new Error("BatchSpanProcessor: span export failed"))})},u=i.map(function(c){return c.resource}).filter(function(c){return c.asyncAttributesPending});u.length===0?s():Promise.all(u.map(function(c){var a;return(a=c.waitForAsyncAttributes)===null||a===void 0?void 0:a.call(c)})).then(s,function(c){(0,q.globalErrorHandler)(c),n(c)})})})},t.prototype._maybeStartTimer=function(){var e=this;if(!this._isExporting){var r=function(){e._isExporting=!0,e._flushOneBatch().then(function(){e._isExporting=!1,e._finishedSpans.length>0&&(e._clearTimer(),e._maybeStartTimer())}).catch(function(n){e._isExporting=!1,(0,q.globalErrorHandler)(n)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return r();this._timer===void 0&&(this._timer=setTimeout(function(){return r()},this._scheduledDelayMillis),(0,q.unrefTimer)(this._timer))}},t.prototype._clearTimer=function(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)},t}();var Il=function(){var t=function(e,r){return t=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])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),De=function(t){Il(e,t);function e(r,n){var o=t.call(this,r,n)||this;return o.onInit(n),o}return e.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))},e.prototype.onShutdown=function(){typeof document<"u"&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))},e}(bo);var Cl=8,Nl=16,nr=function(){function t(){this.generateTraceId=Lo(Nl),this.generateSpanId=Lo(Cl)}return t}();var rr=Array(32);function Lo(t){return function(){for(var r=0;r<t*2;r++)rr[r]=Math.floor(Math.random()*16)+48,rr[r]>=58&&(rr[r]+=39);return String.fromCharCode.apply(null,rr.slice(0,t*2))}}var Po=function(){function t(e,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 nr,this.resource=n.resource,this.instrumentationLibrary=e}return t.prototype.startSpan=function(e,r,n){var o,i,s;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,Ye.isTracingSuppressed)(n)){l.diag.debug("Instrumentation suppressed, returning Noop Span");var c=l.trace.wrapSpanContext(l.INVALID_SPAN_CONTEXT);return c}var a=u?.spanContext(),f=this._idGenerator.generateSpanId(),p,_,S;!a||!l.trace.isSpanContextValid(a)?p=this._idGenerator.generateTraceId():(p=a.traceId,_=a.traceState,S=a.spanId);var x=(o=r.kind)!==null&&o!==void 0?o:l.SpanKind.INTERNAL,O=((i=r.links)!==null&&i!==void 0?i:[]).map(function(yt){return{context:yt.context,attributes:(0,Ye.sanitizeAttributes)(yt.attributes)}}),B=(0,Ye.sanitizeAttributes)(r.attributes),m=this._sampler.shouldSample(n,p,e,x,B,O);_=(s=m.traceState)!==null&&s!==void 0?s:_;var v=m.decision===l.SamplingDecision.RECORD_AND_SAMPLED?l.TraceFlags.SAMPLED:l.TraceFlags.NONE,Y={traceId:p,spanId:f,traceFlags:v,traceState:_};if(m.decision===l.SamplingDecision.NOT_RECORD){l.diag.debug("Recording is off, propagating context in a non-recording span");var c=l.trace.wrapSpanContext(Y);return c}var gt=(0,Ye.sanitizeAttributes)(Object.assign(B,m.attributes)),Mr=new yo(this,n,e,Y,x,S,O,r.startTime,void 0,gt);return Mr},t.prototype.startActiveSpan=function(e,r,n,o){var i,s,u;if(!(arguments.length<2)){arguments.length===2?u=r:arguments.length===3?(i=r,u=n):(i=r,s=n,u=o);var c=s??l.context.active(),a=this.startSpan(e,i,c),f=l.trace.setSpan(c,a);return l.context.with(f,u,void 0,a)}},t.prototype.getGeneralLimits=function(){return this._generalLimits},t.prototype.getSpanLimits=function(){return this._spanLimits},t.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},t}();E();var Q=g(I());E();var ge=g(me()),ir=g(I());function Io(){return"unknown_service"}var ye=function(){return ye=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},ye.apply(this,arguments)},wl=function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(s){s(i)})}return new(r||(r=Promise))(function(i,s){function u(f){try{a(n.next(f))}catch(p){s(p)}}function c(f){try{a(n.throw(f))}catch(p){s(p)}}function a(f){f.done?i(f.value):o(f.value).then(u,c)}a((n=n.apply(t,e||[])).next())})},Ml=function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(a){return function(f){return c([a,f])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=a[0]&2?o.return:a[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,a[1])).done)return i;switch(o=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,o=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){r.label=a[1];break}if(a[0]===6&&r.label<i[1]){r.label=i[1],i=a;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(a);break}i[2]&&r.ops.pop(),r.trys.pop();continue}a=e.call(t,r)}catch(f){a=[6,f],o=0}finally{n=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},xl=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,i=[],s;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){s={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return i},F=function(){function t(e,r){var n=this,o;this._attributes=e,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 t.empty=function(){return t.EMPTY},t.default=function(){var e;return new t((e={},e[ge.SemanticResourceAttributes.SERVICE_NAME]=Io(),e[ge.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]=ir.SDK_INFO[ge.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE],e[ge.SemanticResourceAttributes.TELEMETRY_SDK_NAME]=ir.SDK_INFO[ge.SemanticResourceAttributes.TELEMETRY_SDK_NAME],e[ge.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]=ir.SDK_INFO[ge.SemanticResourceAttributes.TELEMETRY_SDK_VERSION],e))},Object.defineProperty(t.prototype,"attributes",{get:function(){var e;return this.asyncAttributesPending&&l.diag.error("Accessing resource attributes before async attributes settled"),(e=this._attributes)!==null&&e!==void 0?e:{}},enumerable:!1,configurable:!0}),t.prototype.waitForAsyncAttributes=function(){return wl(this,void 0,void 0,function(){return Ml(this,function(e){switch(e.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}})})},t.prototype.merge=function(e){var r=this,n;if(!e)return this;var o=ye(ye({},this._syncAttributes),(n=e._syncAttributes)!==null&&n!==void 0?n:e.attributes);if(!this._asyncAttributesPromise&&!e._asyncAttributesPromise)return new t(o);var i=Promise.all([this._asyncAttributesPromise,e._asyncAttributesPromise]).then(function(s){var u,c=xl(s,2),a=c[0],f=c[1];return ye(ye(ye(ye({},r._syncAttributes),a),(u=e._syncAttributes)!==null&&u!==void 0?u:e.attributes),f)});return new t(o,i)},t.EMPTY=new t({}),t}();E();var Co=g(I()),No=g(me());var Dl=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ul=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,i=[],s;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){s={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return i},Bl=function(){function t(){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 t.prototype.detect=function(e){var r={},n=(0,Co.getEnv)(),o=n.OTEL_RESOURCE_ATTRIBUTES,i=n.OTEL_SERVICE_NAME;if(o)try{var s=this._parseResourceAttributes(o);Object.assign(r,s)}catch(u){l.diag.debug("EnvDetector failed: "+u.message)}return i&&(r[No.SemanticResourceAttributes.SERVICE_NAME]=i),new F(r)},t.prototype._parseResourceAttributes=function(e){var r,n;if(!e)return{};var o={},i=e.split(this._COMMA_SEPARATOR,-1);try{for(var s=Dl(i),u=s.next();!u.done;u=s.next()){var c=u.value,a=c.split(this._LABEL_KEY_VALUE_SPLITTER,-1);if(a.length===2){var f=Ul(a,2),p=f[0],_=f[1];if(p=p.trim(),_=_.trim().split(/^"|"$/).join(""),!this._isValidAndNotEmpty(p))throw new Error("Attribute key "+this._ERROR_MESSAGE_INVALID_CHARS);if(!this._isValid(_))throw new Error("Attribute value "+this._ERROR_MESSAGE_INVALID_VALUE);o[p]=decodeURIComponent(_)}}}catch(S){r={error:S}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return o},t.prototype._isValid=function(e){return e.length<=this._MAX_LENGTH&&this._isBaggageOctetString(e)},t.prototype._isBaggageOctetString=function(e){for(var r=0;r<e.length;r++){var n=e.charCodeAt(r);if(n<33||n===44||n===59||n===92||n>126)return!1}return!0},t.prototype._isValidAndNotEmpty=function(e){return e.length>0&&this._isValid(e)},t}(),wo=new Bl;E();var Mo=function(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"};var Gl=function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(s){s(i)})}return new(r||(r=Promise))(function(i,s){function u(f){try{a(n.next(f))}catch(p){s(p)}}function c(f){try{a(n.throw(f))}catch(p){s(p)}}function a(f){f.done?i(f.value):o(f.value).then(u,c)}a((n=n.apply(t,e||[])).next())})},Vl=function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(a){return function(f){return c([a,f])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=a[0]&2?o.return:a[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,a[1])).done)return i;switch(o=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,o=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){r.label=a[1];break}if(a[0]===6&&r.label<i[1]){r.label=i[1],i=a;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(a);break}i[2]&&r.ops.pop(),r.trys.pop();continue}a=e.call(t,r)}catch(f){a=[6,f],o=0}finally{n=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};var xo=function(t){var e;t===void 0&&(t={});var r=((e=t.detectors)!==null&&e!==void 0?e:[]).map(function(o){try{var i=o.detect(t),s;if(Mo(i)){var u=function(){return Gl(void 0,void 0,void 0,function(){var c;return Vl(this,function(a){switch(a.label){case 0:return[4,i];case 1:return c=a.sent(),[2,c.attributes]}})})};s=new F({},u())}else s=i;return s.waitForAsyncAttributes?s.waitForAsyncAttributes().then(function(){return l.diag.debug(o.constructor.name+" found resource.",s)}):l.diag.debug(o.constructor.name+" found resource.",s),s}catch(c){return l.diag.error(o.constructor.name+" failed: "+c.message),F.empty()}}),n=r.reduce(function(o,i){return o.merge(i)},F.empty());return n.waitForAsyncAttributes&&n.waitForAsyncAttributes().then(function(){Hl(r)}),n},Hl=function(t){t.forEach(function(e){if(Object.keys(e.attributes).length>0){var r=JSON.stringify(e.attributes,null,4);l.diag.verbose(r)}})};var Do=g(I()),or=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Uo=function(){function t(e){this._spanProcessors=e}return t.prototype.forceFlush=function(){var e,r,n=[];try{for(var o=or(this._spanProcessors),i=o.next();!i.done;i=o.next()){var s=i.value;n.push(s.forceFlush())}}catch(u){e={error:u}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.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()})})},t.prototype.onStart=function(e,r){var n,o;try{for(var i=or(this._spanProcessors),s=i.next();!s.done;s=i.next()){var u=s.value;u.onStart(e,r)}}catch(c){n={error:c}}finally{try{s&&!s.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}},t.prototype.onEnd=function(e){var r,n;try{for(var o=or(this._spanProcessors),i=o.next();!i.done;i=o.next()){var s=i.value;s.onEnd(e)}}catch(u){r={error:u}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},t.prototype.shutdown=function(){var e,r,n=[];try{for(var o=or(this._spanProcessors),i=o.next();!i.done;i=o.next()){var s=i.value;n.push(s.shutdown())}}catch(u){e={error:u}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return new Promise(function(u,c){Promise.all(n).then(function(){u()},c)})},t}();var Bo=function(){function t(){}return t.prototype.onStart=function(e,r){},t.prototype.onEnd=function(e){},t.prototype.shutdown=function(){return Promise.resolve()},t.prototype.forceFlush=function(){return Promise.resolve()},t}();var Ue;(function(t){t[t.resolved=0]="resolved",t[t.timeout=1]="timeout",t[t.error=2]="error",t[t.unresolved=3]="unresolved"})(Ue||(Ue={}));var Go=function(){function t(e){e===void 0&&(e={});var r;this._registeredSpanProcessors=[],this._tracers=new Map;var n=(0,Q.merge)({},tr(),Ro(e));this.resource=(r=n.resource)!==null&&r!==void 0?r:F.empty(),this.resource=F.default().merge(this.resource),this._config=Object.assign({},n,{resource:this.resource});var o=this._buildExporterFromEnv();if(o!==void 0){var i=new De(o);this.activeSpanProcessor=i}else this.activeSpanProcessor=new Bo}return t.prototype.getTracer=function(e,r,n){var o=e+"@"+(r||"")+":"+(n?.schemaUrl||"");return this._tracers.has(o)||this._tracers.set(o,new Po({name:e,version:r,schemaUrl:n?.schemaUrl},this._config,this)),this._tracers.get(o)},t.prototype.addSpanProcessor=function(e){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(e),this.activeSpanProcessor=new Uo(this._registeredSpanProcessors)},t.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},t.prototype.register=function(e){e===void 0&&(e={}),l.trace.setGlobalTracerProvider(this),e.propagator===void 0&&(e.propagator=this._buildPropagatorFromEnv()),e.contextManager&&l.context.setGlobalContextManager(e.contextManager),e.propagator&&l.propagation.setGlobalPropagator(e.propagator)},t.prototype.forceFlush=function(){var e=this._config.forceFlushTimeoutMillis,r=this._registeredSpanProcessors.map(function(n){return new Promise(function(o){var i,s=setTimeout(function(){o(new Error("Span processor did not completed within timeout period of "+e+" ms")),i=Ue.timeout},e);n.forceFlush().then(function(){clearTimeout(s),i!==Ue.timeout&&(i=Ue.resolved,o(i))}).catch(function(u){clearTimeout(s),i=Ue.error,o(u)})})});return new Promise(function(n,o){Promise.all(r).then(function(i){var s=i.filter(function(u){return u!==Ue.resolved});s.length>0?o(s):n()}).catch(function(i){return o([i])})})},t.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},t.prototype._getPropagator=function(e){var r;return(r=this.constructor._registeredPropagators.get(e))===null||r===void 0?void 0:r()},t.prototype._getSpanExporter=function(e){var r;return(r=this.constructor._registeredExporters.get(e))===null||r===void 0?void 0:r()},t.prototype._buildPropagatorFromEnv=function(){var e=this,r=Array.from(new Set((0,Q.getEnv)().OTEL_PROPAGATORS)),n=r.map(function(i){var s=e._getPropagator(i);return s||l.diag.warn('Propagator "'+i+'" requested through environment variable is unavailable.'),s}),o=n.reduce(function(i,s){return s&&i.push(s),i},[]);if(o.length!==0)return r.length===1?o[0]:new Q.CompositePropagator({propagators:o})},t.prototype._buildExporterFromEnv=function(){var e=(0,Q.getEnv)().OTEL_TRACES_EXPORTER;if(!(e==="none"||e==="")){var r=this._getSpanExporter(e);return r||l.diag.error('Exporter "'+e+'" requested through environment variable is unavailable.'),r}},t._registeredPropagators=new Map([["tracecontext",function(){return new Q.W3CTraceContextPropagator}],["baggage",function(){return new Q.W3CBaggagePropagator}]]),t._registeredExporters=new Map,t}();E();var se={};z(se,F_);import*as F_ from"@opentelemetry/api-logs";var gu=g(jo(),1);E();var sr=g(I());E();E();E();var ze=g(I()),ql=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Xl=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,i=[],s;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){s={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return i},ko=function(){function t(e,r,n){this.attributes={},this.totalAttributesCount=0,this._isReadonly=!1;var o=n.timestamp,i=n.observedTimestamp,s=n.severityNumber,u=n.severityText,c=n.body,a=n.attributes,f=a===void 0?{}:a,p=n.context,_=Date.now();if(this.hrTime=(0,ze.timeInputToHrTime)(o??_),this.hrTimeObserved=(0,ze.timeInputToHrTime)(i??_),p){var S=l.trace.getSpanContext(p);S&&l.isSpanContextValid(S)&&(this.spanContext=S)}this.severityNumber=s,this.severityText=u,this.body=c,this.resource=e.resource,this.instrumentationScope=r,this._logRecordLimits=e.logRecordLimits,this.setAttributes(f)}return Object.defineProperty(t.prototype,"severityText",{get:function(){return this._severityText},set:function(e){this._isLogRecordReadonly()||(this._severityText=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"severityNumber",{get:function(){return this._severityNumber},set:function(e){this._isLogRecordReadonly()||(this._severityNumber=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"body",{get:function(){return this._body},set:function(e){this._isLogRecordReadonly()||(this._body=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedAttributesCount",{get:function(){return this.totalAttributesCount-Object.keys(this.attributes).length},enumerable:!1,configurable:!0}),t.prototype.setAttribute=function(e,r){return this._isLogRecordReadonly()?this:r===null?this:e.length===0?(l.diag.warn("Invalid attribute key: "+e),this):!(0,ze.isAttributeValue)(r)&&!(typeof r=="object"&&!Array.isArray(r)&&Object.keys(r).length>0)?(l.diag.warn("Invalid attribute value set for key: "+e),this):(this.totalAttributesCount+=1,Object.keys(this.attributes).length>=this._logRecordLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?this:((0,ze.isAttributeValue)(r)?this.attributes[e]=this._truncateToSize(r):this.attributes[e]=r,this))},t.prototype.setAttributes=function(e){var r,n;try{for(var o=ql(Object.entries(e)),i=o.next();!i.done;i=o.next()){var s=Xl(i.value,2),u=s[0],c=s[1];this.setAttribute(u,c)}}catch(a){r={error:a}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return this},t.prototype.setBody=function(e){return this.body=e,this},t.prototype.setSeverityNumber=function(e){return this.severityNumber=e,this},t.prototype.setSeverityText=function(e){return this.severityText=e,this},t.prototype._makeReadonly=function(){this._isReadonly=!0},t.prototype._truncateToSize=function(e){var r=this,n=this._logRecordLimits.attributeValueLengthLimit;return n<=0?(l.diag.warn("Attribute value limit must be positive, got "+n),e):typeof e=="string"?this._truncateToLimitUtil(e,n):Array.isArray(e)?e.map(function(o){return typeof o=="string"?r._truncateToLimitUtil(o,n):o}):e},t.prototype._truncateToLimitUtil=function(e,r){return e.length<=r?e:e.substring(0,r)},t.prototype._isLogRecordReadonly=function(){return this._isReadonly&&l.diag.warn("Can not execute the operation on emitted log record"),this._isReadonly},t}();var gn=function(){return gn=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++){e=arguments[r];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t},gn.apply(this,arguments)},qo=function(){function t(e,r){this.instrumentationScope=e,this._sharedState=r}return t.prototype.emit=function(e){var r=e.context||l.context.active(),n=new ko(this._sharedState,this.instrumentationScope,gn({context:r},e));this._sharedState.activeProcessor.onEmit(n,r),n._makeReadonly()},t}();var ue=g(I());function Xo(){return{forceFlushTimeoutMillis:3e4,logRecordLimits:{attributeValueLengthLimit:(0,ue.getEnv)().OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,ue.getEnv)().OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT},includeTraceContext:!0}}function Ko(t){var e,r,n,o,i,s,u=(0,ue.getEnvWithoutDefaults)();return{attributeCountLimit:(n=(r=(e=t.attributeCountLimit)!==null&&e!==void 0?e:u.OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT)!==null&&r!==void 0?r:u.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&n!==void 0?n:ue.DEFAULT_ATTRIBUTE_COUNT_LIMIT,attributeValueLengthLimit:(s=(i=(o=t.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&&s!==void 0?s:ue.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT}}var zo=g(I()),Wo=function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(s){s(i)})}return new(r||(r=Promise))(function(i,s){function u(f){try{a(n.next(f))}catch(p){s(p)}}function c(f){try{a(n.throw(f))}catch(p){s(p)}}function a(f){f.done?i(f.value):o(f.value).then(u,c)}a((n=n.apply(t,e||[])).next())})},Yo=function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(a){return function(f){return c([a,f])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=a[0]&2?o.return:a[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,a[1])).done)return i;switch(o=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,o=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){r.label=a[1];break}if(a[0]===6&&r.label<i[1]){r.label=i[1],i=a;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(a);break}i[2]&&r.ops.pop(),r.trys.pop();continue}a=e.call(t,r)}catch(f){a=[6,f],o=0}finally{n=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},$o=function(){function t(e,r){this.processors=e,this.forceFlushTimeoutMillis=r}return t.prototype.forceFlush=function(){return Wo(this,void 0,void 0,function(){var e;return Yo(this,function(r){switch(r.label){case 0:return e=this.forceFlushTimeoutMillis,[4,Promise.all(this.processors.map(function(n){return(0,zo.callWithTimeout)(n.forceFlush(),e)}))];case 1:return r.sent(),[2]}})})},t.prototype.onEmit=function(e,r){this.processors.forEach(function(n){return n.onEmit(e,r)})},t.prototype.shutdown=function(){return Wo(this,void 0,void 0,function(){return Yo(this,function(e){switch(e.label){case 0:return[4,Promise.all(this.processors.map(function(r){return r.shutdown()}))];case 1:return e.sent(),[2]}})})},t}();var Qo=function(){function t(){}return t.prototype.forceFlush=function(){return Promise.resolve()},t.prototype.onEmit=function(e,r){},t.prototype.shutdown=function(){return Promise.resolve()},t}();var Zo=function(){function t(e,r,n){this.resource=e,this.forceFlushTimeoutMillis=r,this.logRecordLimits=n,this.loggers=new Map,this.registeredLogRecordProcessors=[],this.activeProcessor=new Qo}return t}();var Kl="unknown",yn=function(){function t(e){e===void 0&&(e={});var r=(0,sr.merge)({},Xo(),e),n=r.resource,o=n===void 0?F.default():n,i=r.logRecordLimits,s=r.forceFlushTimeoutMillis;this._sharedState=new Zo(o,s,Ko(i)),this._shutdownOnce=new sr.BindOnceFuture(this._shutdown,this)}return t.prototype.getLogger=function(e,r,n){if(this._shutdownOnce.isCalled)return l.diag.warn("A shutdown LoggerProvider cannot provide a Logger"),se.NOOP_LOGGER;e||l.diag.warn("Logger requested without instrumentation scope name.");var o=e||Kl,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)},t.prototype.addLogRecordProcessor=function(e){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(e),this._sharedState.activeProcessor=new $o(this._sharedState.registeredLogRecordProcessors,this._sharedState.forceFlushTimeoutMillis)},t.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()},t.prototype.shutdown=function(){return this._shutdownOnce.isCalled?(l.diag.warn("shutdown may only be called once per LoggerProvider"),this._shutdownOnce.promise):this._shutdownOnce.call()},t.prototype._shutdown=function(){return this._sharedState.activeProcessor.shutdown()},t}();var ur;(function(t){t[t.DELTA=0]="DELTA",t[t.CUMULATIVE=1]="CUMULATIVE"})(ur||(ur={}));var Wl=function(){var t=function(e,r){return t=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])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Jo=function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(s){s(i)})}return new(r||(r=Promise))(function(i,s){function u(f){try{a(n.next(f))}catch(p){s(p)}}function c(f){try{a(n.throw(f))}catch(p){s(p)}}function a(f){f.done?i(f.value):o(f.value).then(u,c)}a((n=n.apply(t,e||[])).next())})},ea=function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(a){return function(f){return c([a,f])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=a[0]&2?o.return:a[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,a[1])).done)return i;switch(o=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,o=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){r.label=a[1];break}if(a[0]===6&&r.label<i[1]){r.label=i[1],i=a;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(a);break}i[2]&&r.ops.pop(),r.trys.pop();continue}a=e.call(t,r)}catch(f){a=[6,f],o=0}finally{n=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};var Yl=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function ta(t){return t!=null}function ra(t){var e=Object.keys(t);return e.length===0?"":(e=e.sort(),JSON.stringify(e.map(function(r){return[r,t[r]]})))}function na(t){var e,r;return t.name+":"+((e=t.version)!==null&&e!==void 0?e:"")+":"+((r=t.schemaUrl)!==null&&r!==void 0?r:"")}var zl=function(t){Wl(e,t);function e(r){var n=t.call(this,r)||this;return Object.setPrototypeOf(n,e.prototype),n}return e}(Error);function vn(t,e){var r,n=new Promise(function(i,s){r=setTimeout(function(){s(new zl("Operation timed out."))},e)});return Promise.race([t,n]).then(function(o){return clearTimeout(r),o},function(o){throw clearTimeout(r),o})}function ia(t){return Jo(this,void 0,void 0,function(){var e=this;return ea(this,function(r){return[2,Promise.all(t.map(function(n){return Jo(e,void 0,void 0,function(){var o,i;return ea(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,n];case 1:return o=s.sent(),[2,{status:"fulfilled",value:o}];case 2:return i=s.sent(),[2,{status:"rejected",reason:i}];case 3:return[2]}})})}))]})})}function oa(t){return t.status==="rejected"}function aa(t,e){var r,n;if(t.size!==e.size)return!1;try{for(var o=Yl(t),i=o.next();!i.done;i=o.next()){var s=i.value;if(!e.has(s))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 sa(t,e){return t.toLowerCase()===e.toLowerCase()}E();var ce;(function(t){t.COUNTER="COUNTER",t.HISTOGRAM="HISTOGRAM",t.UP_DOWN_COUNTER="UP_DOWN_COUNTER",t.OBSERVABLE_COUNTER="OBSERVABLE_COUNTER",t.OBSERVABLE_GAUGE="OBSERVABLE_GAUGE",t.OBSERVABLE_UP_DOWN_COUNTER="OBSERVABLE_UP_DOWN_COUNTER"})(ce||(ce={}));function le(t,e,r){var n,o,i,s;return Ql(t)||l.diag.warn('Invalid metric name: "'+t+'". The metric name should be a ASCII string with a length no greater than 255 characters.'),{name:t,type:e,description:(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:(s=r?.advice)!==null&&s!==void 0?s:{}}}function ua(t,e){var r,n;return{name:(r=t.name)!==null&&r!==void 0?r:e.name,description:(n=t.description)!==null&&n!==void 0?n:e.description,type:e.type,unit:e.unit,valueType:e.valueType,advice:e.advice}}function ca(t,e){return sa(t.name,e.name)&&t.unit===e.unit&&t.type===e.type&&t.valueType===e.valueType}var $l=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function Ql(t){return t.match($l)!=null}E();var la=function(){function t(){this._registeredViews=[]}return t.prototype.addView=function(e){this._registeredViews.push(e)},t.prototype.findViews=function(e,r){var n=this,o=this._registeredViews.filter(function(i){return n._matchInstrument(i.instrumentSelector,e)&&n._matchMeter(i.meterSelector,r)});return o},t.prototype._matchInstrument=function(e,r){return(e.getType()===void 0||r.type===e.getType())&&e.getNameFilter().match(r.name)&&e.getUnitFilter().match(r.unit)},t.prototype._matchMeter=function(e,r){return e.getNameFilter().match(r.name)&&(r.version===void 0||e.getVersionFilter().match(r.version))&&(r.schemaUrl===void 0||e.getSchemaUrlFilter().match(r.schemaUrl))},t}();E();var fa=g(I()),$e=function(){var t=function(e,r){return t=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])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),An=function(){function t(e,r){this._writableMetricStorage=e,this._descriptor=r}return t.prototype._record=function(e,r,n){if(r===void 0&&(r={}),n===void 0&&(n=l.context.active()),typeof e!="number"){l.diag.warn("non-number value provided to metric "+this._descriptor.name+": "+e);return}this._descriptor.valueType===l.ValueType.INT&&!Number.isInteger(e)&&(l.diag.warn("INT value type cannot accept a floating-point value for "+this._descriptor.name+", ignoring the fractional digits."),e=Math.trunc(e),!Number.isInteger(e))||this._writableMetricStorage.record(e,r,n,(0,fa.millisToHrTime)(Date.now()))},t}();var pa=function(t){$e(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.add=function(r,n,o){this._record(r,n,o)},e}(An);var da=function(t){$e(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.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)},e}(An);var _a=function(t){$e(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.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)},e}(An);var cr=function(){function t(e,r,n){this._observableRegistry=n,this._descriptor=e,this._metricStorages=r}return t.prototype.addCallback=function(e){this._observableRegistry.addCallback(e,this)},t.prototype.removeCallback=function(e){this._observableRegistry.removeCallback(e,this)},t}();var ha=function(t){$e(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(cr);var Ea=function(t){$e(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(cr);var ma=function(t){$e(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(cr);function ft(t){return t instanceof cr}var Ta=function(){function t(e){this._meterSharedState=e}return t.prototype.createHistogram=function(e,r){var n=le(e,ce.HISTOGRAM,r),o=this._meterSharedState.registerMetricStorage(n);return new _a(o,n)},t.prototype.createCounter=function(e,r){var n=le(e,ce.COUNTER,r),o=this._meterSharedState.registerMetricStorage(n);return new da(o,n)},t.prototype.createUpDownCounter=function(e,r){var n=le(e,ce.UP_DOWN_COUNTER,r),o=this._meterSharedState.registerMetricStorage(n);return new pa(o,n)},t.prototype.createObservableGauge=function(e,r){var n=le(e,ce.OBSERVABLE_GAUGE,r),o=this._meterSharedState.registerAsyncMetricStorage(n);return new Ea(n,o,this._meterSharedState.observableRegistry)},t.prototype.createObservableCounter=function(e,r){var n=le(e,ce.OBSERVABLE_COUNTER,r),o=this._meterSharedState.registerAsyncMetricStorage(n);return new ha(n,o,this._meterSharedState.observableRegistry)},t.prototype.createObservableUpDownCounter=function(e,r){var n=le(e,ce.OBSERVABLE_UP_DOWN_COUNTER,r),o=this._meterSharedState.registerAsyncMetricStorage(n);return new ma(n,o,this._meterSharedState.observableRegistry)},t.prototype.addBatchObservableCallback=function(e,r){this._meterSharedState.observableRegistry.addBatchCallback(e,r)},t.prototype.removeBatchObservableCallback=function(e,r){this._meterSharedState.observableRegistry.removeBatchCallback(e,r)},t}();var lr=function(){function t(e){this._instrumentDescriptor=e}return t.prototype.getInstrumentDescriptor=function(){return this._instrumentDescriptor},t.prototype.updateDescription=function(e){this._instrumentDescriptor=le(this._instrumentDescriptor.name,this._instrumentDescriptor.type,{description:e,valueType:this._instrumentDescriptor.valueType,unit:this._instrumentDescriptor.unit,advice:this._instrumentDescriptor.advice})},t}();var Zl=function(){var t=function(e,r){return t=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])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Sa=function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(a){return function(f){return c([a,f])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=a[0]&2?o.return:a[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,a[1])).done)return i;switch(o=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,o=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){r.label=a[1];break}if(a[0]===6&&r.label<i[1]){r.label=i[1],i=a;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(a);break}i[2]&&r.ops.pop(),r.trys.pop();continue}a=e.call(t,r)}catch(f){a=[6,f],o=0}finally{n=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Jl=function(){function t(e){this._hash=e,this._valueMap=new Map,this._keyMap=new Map}return t.prototype.get=function(e,r){return r??(r=this._hash(e)),this._valueMap.get(r)},t.prototype.getOrDefault=function(e,r){var n=this._hash(e);if(this._valueMap.has(n))return this._valueMap.get(n);var o=r();return this._keyMap.has(n)||this._keyMap.set(n,e),this._valueMap.set(n,o),o},t.prototype.set=function(e,r,n){n??(n=this._hash(e)),this._keyMap.has(n)||this._keyMap.set(n,e),this._valueMap.set(n,r)},t.prototype.has=function(e,r){return r??(r=this._hash(e)),this._valueMap.has(r)},t.prototype.keys=function(){var e,r;return Sa(this,function(n){switch(n.label){case 0:e=this._keyMap.entries(),r=e.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=e.next(),[3,1];case 3:return[2]}})},t.prototype.entries=function(){var e,r;return Sa(this,function(n){switch(n.label){case 0:e=this._valueMap.entries(),r=e.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=e.next(),[3,1];case 3:return[2]}})},Object.defineProperty(t.prototype,"size",{get:function(){return this._valueMap.size},enumerable:!1,configurable:!0}),t}();var Z=function(t){Zl(e,t);function e(){return t.call(this,ra)||this}return e}(Jl);var ef=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,i=[],s;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){s={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return i},fr=function(){function t(e){this._aggregator=e,this._activeCollectionStorage=new Z,this._cumulativeMemoStorage=new Z}return t.prototype.record=function(e,r,n,o){var i=this,s=this._activeCollectionStorage.getOrDefault(r,function(){return i._aggregator.createAccumulation(o)});s?.record(e)},t.prototype.batchCumulate=function(e,r){var n=this;Array.from(e.entries()).forEach(function(o){var i=ef(o,3),s=i[0],u=i[1],c=i[2],a=n._aggregator.createAccumulation(r);a?.record(u);var f=a;if(n._cumulativeMemoStorage.has(s,c)){var p=n._cumulativeMemoStorage.get(s,c);f=n._aggregator.diff(p,a)}if(n._activeCollectionStorage.has(s,c)){var _=n._activeCollectionStorage.get(s,c);f=n._aggregator.merge(_,f)}n._cumulativeMemoStorage.set(s,a,c),n._activeCollectionStorage.set(s,f,c)})},t.prototype.collect=function(){var e=this._activeCollectionStorage;return this._activeCollectionStorage=new Z,e},t}();var On=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ga=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,i=[],s;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){s={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return i},pr=function(){function t(e,r){var n=this;this._aggregator=e,this._unreportedAccumulations=new Map,this._reportHistory=new Map,r.forEach(function(o){n._unreportedAccumulations.set(o,[])})}return t.prototype.buildMetrics=function(e,r,n,o){this._stashAccumulations(n);var i=this._getMergedUnreportedAccumulations(e),s=i,u;if(this._reportHistory.has(e)){var c=this._reportHistory.get(e),a=c.collectionTime;u=c.aggregationTemporality,u===ur.CUMULATIVE?s=t.merge(c.accumulations,i,this._aggregator):s=t.calibrateStartTime(c.accumulations,i,a)}else u=e.selectAggregationTemporality(r.type);this._reportHistory.set(e,{accumulations:s,collectionTime:o,aggregationTemporality:u});var f=tf(s);if(f.length!==0)return this._aggregator.toMetricData(r,u,f,o)},t.prototype._stashAccumulations=function(e){var r,n,o=this._unreportedAccumulations.keys();try{for(var i=On(o),s=i.next();!s.done;s=i.next()){var u=s.value,c=this._unreportedAccumulations.get(u);c===void 0&&(c=[],this._unreportedAccumulations.set(u,c)),c.push(e)}}catch(a){r={error:a}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},t.prototype._getMergedUnreportedAccumulations=function(e){var r,n,o=new Z,i=this._unreportedAccumulations.get(e);if(this._unreportedAccumulations.set(e,[]),i===void 0)return o;try{for(var s=On(i),u=s.next();!u.done;u=s.next()){var c=u.value;o=t.merge(o,c,this._aggregator)}}catch(a){r={error:a}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return o},t.merge=function(e,r,n){for(var o=e,i=r.entries(),s=i.next();s.done!==!0;){var u=ga(s.value,3),c=u[0],a=u[1],f=u[2];if(e.has(c,f)){var p=e.get(c,f),_=n.merge(p,a);o.set(c,_,f)}else o.set(c,a,f);s=i.next()}return o},t.calibrateStartTime=function(e,r,n){var o,i;try{for(var s=On(e.keys()),u=s.next();!u.done;u=s.next()){var c=ga(u.value,2),a=c[0],f=c[1],p=r.get(a,f);p?.setStartTime(n)}}catch(_){o={error:_}}finally{try{u&&!u.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}return r},t}();function tf(t){return Array.from(t.entries())}var rf=function(){var t=function(e,r){return t=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])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),nf=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,i=[],s;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){s={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return i},ya=function(t){rf(e,t);function e(r,n,o,i){var s=t.call(this,r)||this;return s._attributesProcessor=o,s._deltaMetricStorage=new fr(n),s._temporalMetricStorage=new pr(n,i),s}return e.prototype.record=function(r,n){var o=this,i=new Z;Array.from(r.entries()).forEach(function(s){var u=nf(s,2),c=u[0],a=u[1];i.set(o._attributesProcessor.process(c),a)}),this._deltaMetricStorage.batchCumulate(i,n)},e.prototype.collect=function(r,n){var o=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(r,this._instrumentDescriptor,o,n)},e}(lr);E();function Rn(t,e){var r="";return t.unit!==e.unit&&(r+=" - Unit '"+t.unit+"' does not match '"+e.unit+`'
|
|
5
|
-
`),
|
|
6
|
-
`),
|
|
7
|
-
`),
|
|
8
|
-
`),r}function
|
|
9
|
-
- OR - create a new view with the name `+
|
|
10
|
-
- OR - create a new view with the name `+
|
|
4
|
+
var Nu=Object.create;var xr=Object.defineProperty;var wu=Object.getOwnPropertyDescriptor;var Mu=Object.getOwnPropertyNames;var xu=Object.getPrototypeOf,Du=Object.prototype.hasOwnProperty;var ci=(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 Se=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Mu(t))!Du.call(e,o)&&o!==r&&xr(e,o,{get:()=>t[o],enumerable:!(n=wu(t,o))||n.enumerable});return e},Y=(e,t,r)=>(Se(e,t,"default"),r&&Se(r,t,"default")),v=(e,t,r)=>(r=e!=null?Nu(xu(e)):{},Se(t||!e||!e.__esModule?xr(r,"default",{value:e,enumerable:!0}):r,e)),w=e=>Se(xr({},"__esModule",{value:!0}),e);var l={};import*as ed from"@opentelemetry/api";var E=Dr(()=>{Y(l,ed)});var ie=_(ft=>{"use strict";Object.defineProperty(ft,"__esModule",{value:!0});ft.isTracingSuppressed=ft.unsuppressTracing=ft.suppressTracing=void 0;var Uu=(E(),w(l)),Ur=(0,Uu.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Bu(e){return e.setValue(Ur,!0)}ft.suppressTracing=Bu;function Gu(e){return e.deleteValue(Ur)}ft.unsuppressTracing=Gu;function Vu(e){return e.getValue(Ur)===!0}ft.isTracingSuppressed=Vu});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 Gr=_(rt=>{"use strict";Object.defineProperty(rt,"__esModule",{value:!0});rt.parseKeyPairsIntoRecord=rt.parsePairKeyValue=rt.getKeyPairs=rt.serializeKeyPairs=void 0;var Hu=(E(),w(l)),Lt=Br();function Fu(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},"")}rt.serializeKeyPairs=Fu;function ju(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})}rt.getKeyPairs=ju;function li(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()),s;return t.length>0&&(s=(0,Hu.baggageEntryMetadataFromString)(t.join(Lt.BAGGAGE_PROPERTIES_SEPARATOR))),{key:o,value:i,metadata:s}}rt.parsePairKeyValue=li;function ku(e){return typeof e!="string"||e.length===0?{}:e.split(Lt.BAGGAGE_ITEMS_SEPARATOR).map(t=>li(t)).filter(t=>t!==void 0&&t.value.length>0).reduce((t,r)=>(t[r.key]=r.value,t),{})}rt.parseKeyPairsIntoRecord=ku});var fi=_(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});ge.W3CBaggagePropagator=void 0;var Vr=(E(),w(l)),qu=ie(),Pt=Br(),Hr=Gr(),Fr=class{inject(t,r,n){let o=Vr.propagation.getBaggage(t);if(!o||(0,qu.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),s=(0,Hr.serializeKeyPairs)(i);s.length>0&&n.set(r,Pt.BAGGAGE_HEADER,s)}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 s={};return i.length===0||(i.split(Pt.BAGGAGE_ITEMS_SEPARATOR).forEach(c=>{let a=(0,Hr.parsePairKeyValue)(c);if(a){let f={value:a.value};a.metadata&&(f.metadata=a.metadata),s[a.key]=f}}),Object.entries(s).length===0)?t:Vr.propagation.setBaggage(t,Vr.propagation.createBaggage(s))}fields(){return[Pt.BAGGAGE_HEADER]}};ge.W3CBaggagePropagator=Fr});var pi=_(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.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}};ye.AnchoredClock=jr});var mi=_(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.isAttributeValue=pt.isAttributeKey=pt.sanitizeAttributes=void 0;var di=(E(),w(l));function Xu(e){let t={};if(typeof e!="object"||e==null)return t;for(let[r,n]of Object.entries(e)){if(!_i(r)){di.diag.warn(`Invalid attribute key: ${r}`);continue}if(!hi(n)){di.diag.warn(`Invalid attribute value set for key: ${r}`);continue}Array.isArray(n)?t[r]=n.slice():t[r]=n}return t}pt.sanitizeAttributes=Xu;function _i(e){return typeof e=="string"&&e.length>0}pt.isAttributeKey=_i;function hi(e){return e==null?!0:Array.isArray(e)?Ku(e):Ei(e)}pt.isAttributeValue=hi;function Ku(e){let t;for(let r of e)if(r!=null){if(!t){if(Ei(r)){t=typeof r;continue}return!1}if(typeof r!==t)return!1}return!0}function Ei(e){switch(typeof e){case"number":case"boolean":case"string":return!0}return!1}});var kr=_(ve=>{"use strict";Object.defineProperty(ve,"__esModule",{value:!0});ve.loggingErrorHandler=void 0;var Wu=(E(),w(l));function Yu(){return e=>{Wu.diag.error(zu(e))}}ve.loggingErrorHandler=Yu;function zu(e){return typeof e=="string"?e:JSON.stringify($u(e))}function $u(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=_(Vt=>{"use strict";Object.defineProperty(Vt,"__esModule",{value:!0});Vt.globalErrorHandler=Vt.setGlobalErrorHandler=void 0;var Qu=kr(),Ti=(0,Qu.loggingErrorHandler)();function Zu(e){Ti=e}Vt.setGlobalErrorHandler=Zu;function Ju(e){try{Ti(e)}catch{}}Vt.globalErrorHandler=Ju});var Xr=_(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.TracesSamplerValues=void 0;var tc;(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"})(tc=oe.TracesSamplerValues||(oe.TracesSamplerValues={}))});var Re=_(Ae=>{"use strict";Object.defineProperty(Ae,"__esModule",{value:!0});Ae._globalThis=void 0;Ae._globalThis=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});var Oe=_(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)),ec=Xr(),rc=Re(),nc=",",ic=["OTEL_SDK_DISABLED"];function oc(e){return ic.indexOf(e)>-1}var ac=["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 ac.indexOf(e)>-1}var uc=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function cc(e){return uc.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:ec.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 lc(e,t,r){if(typeof r[e]>"u")return;let n=String(r[e]);t[e]=n.toLowerCase()==="true"}function fc(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 pc(e,t,r,n=nc){let o=r[e];typeof o=="string"&&(t[e]=o.split(n).map(i=>i.trim()))}var dc={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 _c(e,t,r){let n=r[e];if(typeof n=="string"){let o=dc[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":_c(n,t,e);break;default:if(oc(n))lc(n,t,e);else if(sc(n))fc(n,t,e);else if(cc(n))pc(n,t,e);else{let o=e[n];typeof o<"u"&&o!==null&&(t[n]=String(o))}}}return t}L.parseEnvironment=Kr;function hc(){return typeof process<"u"&&process&&process.env?Kr(process.env):Kr(rc._globalThis)}L.getEnvWithoutDefaults=hc});var gi=_(be=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});be.getEnv=void 0;var Si=Oe(),Ec=Re();function mc(){let e=(0,Si.parseEnvironment)(Ec._globalThis);return Object.assign({},Si.DEFAULT_ENVIRONMENT,e)}be.getEnv=mc});var yi=_(Le=>{"use strict";Object.defineProperty(Le,"__esModule",{value:!0});Le.hexToBase64=void 0;function Tc(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)}Le.hexToBase64=Tc});var Ai=_(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.RandomIdGenerator=void 0;var Sc=8,gc=16,Wr=class{constructor(){this.generateTraceId=vi(gc),this.generateSpanId=vi(Sc)}};Ie.RandomIdGenerator=Wr;var Pe=Array(32);function vi(e){return function(){for(let r=0;r<e*2;r++)Pe[r]=Math.floor(Math.random()*16)+48,Pe[r]>=58&&(Pe[r]+=39);return String.fromCharCode.apply(null,Pe.slice(0,e*2))}}});var Ri=_(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.otperformance=void 0;Ce.otperformance=performance});var Yr=_(Ne=>{"use strict";Object.defineProperty(Ne,"__esModule",{value:!0});Ne.VERSION=void 0;Ne.VERSION="1.19.0"});var Oi=_(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 bi=_(It=>{"use strict";var yc=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]}),vc=It&&It.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&yc(t,e,r)};Object.defineProperty(It,"__esModule",{value:!0});vc(Oi(),It)});var Li=_(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 Pi=_(Ct=>{"use strict";var Ac=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]}),Rc=Ct&&Ct.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Ac(t,e,r)};Object.defineProperty(Ct,"__esModule",{value:!0});Rc(Li(),Ct)});var ae=_(_t=>{"use strict";var Oc=_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]}),Ii=_t&&_t.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Oc(t,e,r)};Object.defineProperty(_t,"__esModule",{value:!0});Ii(bi(),_t);Ii(Pi(),_t)});var Ci=_(we=>{"use strict";Object.defineProperty(we,"__esModule",{value:!0});we.SDK_INFO=void 0;var bc=Yr(),se=ae();we.SDK_INFO={[se.SemanticResourceAttributes.TELEMETRY_SDK_NAME]:"opentelemetry",[se.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]:"browser",[se.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]:se.TelemetrySdkLanguageValues.WEBJS,[se.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]:bc.VERSION}});var Ni=_(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.unrefTimer=void 0;function Lc(e){}Me.unrefTimer=Lc});var zr=_(j=>{"use strict";var Pc=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)&&Pc(t,e,r)};Object.defineProperty(j,"__esModule",{value:!0});Nt(gi(),j);Nt(Re(),j);Nt(yi(),j);Nt(Ai(),j);Nt(Ri(),j);Nt(Ci(),j);Nt(Ni(),j)});var Di=_(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(),wi=9,Ic=6,Cc=Math.pow(10,Ic),xe=Math.pow(10,wi);function ue(e){let t=e/1e3,r=Math.trunc(t),n=Math.round(e%1e3*Cc);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 Mi(e){let t=ue(Qr()),r=ue(typeof e=="number"?e:$r.otperformance.now());return xi(t,r)}O.hrTime=Mi;function Nc(e){if(Zr(e))return e;if(typeof e=="number")return e<Qr()?Mi(e):ue(e);if(e instanceof Date)return ue(e.getTime());throw TypeError("Invalid input type")}O.timeInputToHrTime=Nc;function wc(e,t){let r=t[0]-e[0],n=t[1]-e[1];return n<0&&(r-=1,n+=xe),[r,n]}O.hrTimeDuration=wc;function Mc(e){let t=wi,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=Mc;function xc(e){return e[0]*xe+e[1]}O.hrTimeToNanoseconds=xc;function Dc(e){return e[0]*1e3+e[1]/1e6}O.hrTimeToMilliseconds=Dc;function Uc(e){return e[0]*1e6+e[1]/1e3}O.hrTimeToMicroseconds=Uc;function Zr(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}O.isTimeInputHrTime=Zr;function Bc(e){return Zr(e)||typeof e=="number"||e instanceof Date}O.isTimeInput=Bc;function xi(e,t){let r=[e[0]+t[0],e[1]+t[1]];return r[1]>=xe&&(r[1]-=xe,r[0]+=1),r}O.addHrTimes=xi});var Bi=_(Ui=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0})});var Gi=_(ce=>{"use strict";Object.defineProperty(ce,"__esModule",{value:!0});ce.ExportResultCode=void 0;var Gc;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(Gc=ce.ExportResultCode||(ce.ExportResultCode={}))});var Hi=_(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.CompositePropagator=void 0;var Vi=(E(),w(l)),Jr=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){Vi.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(s){Vi.diag.warn(`Failed to inject with ${i.constructor.name}. Err: ${s.message}`)}return o},t)}fields(){return this._fields.slice()}};De.CompositePropagator=Jr});var Fi=_(Ht=>{"use strict";Object.defineProperty(Ht,"__esModule",{value:!0});Ht.validateValue=Ht.validateKey=void 0;var tn="[_0-9a-z-*/]",Vc=`[a-z]${tn}{0,255}`,Hc=`[a-z0-9]${tn}{0,240}@[a-z]${tn}{0,13}`,Fc=new RegExp(`^(?:${Vc}|${Hc})$`),jc=/^[ -~]{0,255}[!-~]$/,kc=/,|=/;function qc(e){return Fc.test(e)}Ht.validateKey=qc;function Xc(e){return jc.test(e)&&!kc.test(e)}Ht.validateValue=Xc});var rn=_(Ue=>{"use strict";Object.defineProperty(Ue,"__esModule",{value:!0});Ue.TraceState=void 0;var ji=Fi(),ki=32,Kc=512,qi=",",Xi="=",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+Xi+this.get(r)),t),[]).join(qi)}_parse(t){t.length>Kc||(this._internalState=t.split(qi).reverse().reduce((r,n)=>{let o=n.trim(),i=o.indexOf(Xi);if(i!==-1){let s=o.slice(0,i),u=o.slice(i+1,n.length);(0,ji.validateKey)(s)&&(0,ji.validateValue)(u)&&r.set(s,u)}return r},new Map),this._internalState.size>ki&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,ki))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}};Ue.TraceState=en});var Wi=_(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.W3CTraceContextPropagator=V.parseTraceParent=V.TRACE_STATE_HEADER=V.TRACE_PARENT_HEADER=void 0;var Be=(E(),w(l)),Wc=ie(),Yc=rn();V.TRACE_PARENT_HEADER="traceparent";V.TRACE_STATE_HEADER="tracestate";var zc="00",$c="(?!ff)[\\da-f]{2}",Qc="(?![0]{32})[\\da-f]{32}",Zc="(?![0]{16})[\\da-f]{16}",Jc="[\\da-f]{2}",tl=new RegExp(`^\\s?(${$c})-(${Qc})-(${Zc})-(${Jc})(-.*)?\\s?$`);function Ki(e){let t=tl.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}V.parseTraceParent=Ki;var nn=class{inject(t,r,n){let o=Be.trace.getSpanContext(t);if(!o||(0,Wc.isTracingSuppressed)(t)||!(0,Be.isSpanContextValid)(o))return;let i=`${zc}-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||Be.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 s=Ki(i);if(!s)return t;s.isRemote=!0;let u=n.get(r,V.TRACE_STATE_HEADER);if(u){let c=Array.isArray(u)?u.join(","):u;s.traceState=new Yc.TraceState(typeof c=="string"?c:void 0)}return Be.trace.setSpanContext(t,s)}fields(){return[V.TRACE_PARENT_HEADER,V.TRACE_STATE_HEADER]}};V.W3CTraceContextPropagator=nn});var zi=_(Yi=>{"use strict";Object.defineProperty(Yi,"__esModule",{value:!0})});var $i=_(z=>{"use strict";Object.defineProperty(z,"__esModule",{value:!0});z.getRPCMetadata=z.deleteRPCMetadata=z.setRPCMetadata=z.RPCType=void 0;var el=(E(),w(l)),on=(0,el.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),rl;(function(e){e.HTTP="http"})(rl=z.RPCType||(z.RPCType={}));function nl(e,t){return e.setValue(on,t)}z.setRPCMetadata=nl;function il(e){return e.deleteValue(on)}z.deleteRPCMetadata=il;function ol(e){return e.getValue(on)}z.getRPCMetadata=ol});var sn=_(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.AlwaysOffSampler=void 0;var al=(E(),w(l)),an=class{shouldSample(){return{decision:al.SamplingDecision.NOT_RECORD}}toString(){return"AlwaysOffSampler"}};Ge.AlwaysOffSampler=an});var cn=_(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.AlwaysOnSampler=void 0;var sl=(E(),w(l)),un=class{shouldSample(){return{decision:sl.SamplingDecision.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}};Ve.AlwaysOnSampler=un});var Zi=_(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.ParentBasedSampler=void 0;var He=(E(),w(l)),ul=qr(),Qi=sn(),ln=cn(),fn=class{constructor(t){var r,n,o,i;this._root=t.root,this._root||((0,ul.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 Qi.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 Qi.AlwaysOffSampler}shouldSample(t,r,n,o,i,s){let u=He.trace.getSpanContext(t);return!u||!(0,He.isSpanContextValid)(u)?this._root.shouldSample(t,r,n,o,i,s):u.isRemote?u.traceFlags&He.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(t,r,n,o,i,s):this._remoteParentNotSampled.shouldSample(t,r,n,o,i,s):u.traceFlags&He.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(t,r,n,o,i,s):this._localParentNotSampled.shouldSample(t,r,n,o,i,s)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}};Fe.ParentBasedSampler=fn});var Ji=_(je=>{"use strict";Object.defineProperty(je,"__esModule",{value:!0});je.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}};je.TraceIdRatioBasedSampler=dn});var io=_(ke=>{"use strict";Object.defineProperty(ke,"__esModule",{value:!0});ke.isPlainObject=void 0;var cl="[object Object]",ll="[object Null]",fl="[object Undefined]",pl=Function.prototype,to=pl.toString,dl=to.call(Object),_l=hl(Object.getPrototypeOf,Object),eo=Object.prototype,ro=eo.hasOwnProperty,wt=Symbol?Symbol.toStringTag:void 0,no=eo.toString;function hl(e,t){return function(r){return e(t(r))}}function El(e){if(!ml(e)||Tl(e)!==cl)return!1;let t=_l(e);if(t===null)return!0;let r=ro.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&to.call(r)===dl}ke.isPlainObject=El;function ml(e){return e!=null&&typeof e=="object"}function Tl(e){return e==null?e===void 0?fl:ll:wt&&wt in Object(e)?Sl(e):gl(e)}function Sl(e){let t=ro.call(e,wt),r=e[wt],n=!1;try{e[wt]=void 0,n=!0}catch{}let o=no.call(e);return n&&(t?e[wt]=r:delete e[wt]),o}function gl(e){return no.call(e)}});var co=_(Ke=>{"use strict";Object.defineProperty(Ke,"__esModule",{value:!0});Ke.merge=void 0;var oo=io(),yl=20;function vl(...e){let t=e.shift(),r=new WeakMap;for(;e.length>0;)t=so(t,e.shift(),0,r);return t}Ke.merge=vl;function _n(e){return Xe(e)?e.slice():e}function so(e,t,r=0,n){let o;if(!(r>yl)){if(r++,qe(e)||qe(t)||uo(t))o=_n(t);else if(Xe(e)){if(o=e.slice(),Xe(t))for(let i=0,s=t.length;i<s;i++)o.push(_n(t[i]));else if(le(t)){let i=Object.keys(t);for(let s=0,u=i.length;s<u;s++){let c=i[s];o[c]=_n(t[c])}}}else if(le(e))if(le(t)){if(!Al(e,t))return t;o=Object.assign({},e);let i=Object.keys(t);for(let s=0,u=i.length;s<u;s++){let c=i[s],a=t[c];if(qe(a))typeof a>"u"?delete o[c]:o[c]=a;else{let f=o[c],p=a;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]=so(o[c],a,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 s=n[o];if(s.key===t&&s.obj===e)return!0}return!1}function Xe(e){return Array.isArray(e)}function uo(e){return typeof e=="function"}function le(e){return!qe(e)&&!Xe(e)&&!uo(e)&&typeof e=="object"}function qe(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function Al(e,t){return!(!(0,oo.isPlainObject)(e)||!(0,oo.isPlainObject)(t))}});var lo=_(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});Ft.callWithTimeout=Ft.TimeoutError=void 0;var We=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};Ft.TimeoutError=We;function Rl(e,t){let r,n=new Promise(function(i,s){r=setTimeout(function(){s(new We("Operation timed out."))},t)});return Promise.race([e,n]).then(o=>(clearTimeout(r),o),o=>{throw clearTimeout(r),o})}Ft.callWithTimeout=Rl});var po=_(jt=>{"use strict";Object.defineProperty(jt,"__esModule",{value:!0});jt.isUrlIgnored=jt.urlMatches=void 0;function fo(e,t){return typeof t=="string"?e===t:!!e.match(t)}jt.urlMatches=fo;function Ol(e,t){if(!t)return!1;for(let r of t)if(fo(e,r))return!0;return!1}jt.isUrlIgnored=Ol});var _o=_(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.isWrapped=void 0;function bl(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}Ye.isWrapped=bl});var ho=_(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.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)}};ze.Deferred=hn});var Eo=_($e=>{"use strict";Object.defineProperty($e,"__esModule",{value:!0});$e.BindOnceFuture=void 0;var Ll=ho(),En=class{constructor(t,r){this._callback=t,this._that=r,this._isCalled=!1,this._deferred=new Ll.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}};$e.BindOnceFuture=En});var To=_(Qe=>{"use strict";Object.defineProperty(Qe,"__esModule",{value:!0});Qe._export=void 0;var mo=(E(),w(l)),Pl=ie();function Il(e,t){return new Promise(r=>{mo.context.with((0,Pl.suppressTracing)(mo.context.active()),()=>{e.export(t,n=>{r(n)})})})}Qe._export=Il});var P=_(S=>{"use strict";var Cl=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)&&Cl(t,e,r)};Object.defineProperty(S,"__esModule",{value:!0});S.internal=S.baggageUtils=void 0;R(fi(),S);R(pi(),S);R(mi(),S);R(qr(),S);R(kr(),S);R(Di(),S);R(Bi(),S);R(Gi(),S);S.baggageUtils=Gr();R(zr(),S);R(Hi(),S);R(Wi(),S);R(zi(),S);R($i(),S);R(sn(),S);R(cn(),S);R(Zi(),S);R(Ji(),S);R(ie(),S);R(rn(),S);R(Oe(),S);R(co(),S);R(Xr(),S);R(lo(),S);R(po(),S);R(_o(),S);R(Eo(),S);R(Yr(),S);var Nl=To();S.internal={_export:Nl._export}});var Vo=_(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 Yl(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=Yl;function zl(e){e.forEach(t=>t.disable())}St.disableInstrumentations=zl});var Fo=_(nr=>{"use strict";Object.defineProperty(nr,"__esModule",{value:!0});nr.registerInstrumentations=void 0;var Ho=(E(),w(l)),Tn=Vo();function $l(e){let{instrumentations:t}=(0,Tn.parseInstrumentationOptions)(e.instrumentations),r=e.tracerProvider||Ho.trace.getTracerProvider(),n=e.meterProvider||Ho.metrics.getMeterProvider();return(0,Tn.enableInstrumentations)(t,r,n),()=>{(0,Tn.disableInstrumentations)(t)}}nr.registerInstrumentations=$l});var pe={};import*as wE from"async_hooks";var Ua=Dr(()=>{Y(pe,wE)});var de={};import*as ME from"events";var Ba=Dr(()=>{Y(de,ME)});var Ga=_(dr=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});dr.AbstractAsyncHooksContextManager=void 0;var bf=(Ba(),w(de)),Lf=["addListener","on","once","prependListener","prependOnceListener"],Cn=class{constructor(){this._kOtListeners=Symbol("OtListeners"),this._wrapped=!1}bind(t,r){return r instanceof bf.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),Lf.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 s;let u=(s=n._getPatchMap(t))===null||s===void 0?void 0:s[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,s){if(o._wrapped)return r.call(this,i,s);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 a=o.bind(n,s);c.set(s,a),o._wrapped=!0;try{return r.call(this,i,a)}finally{o._wrapped=!1}}}_createPatchMap(t){let r=Object.create(null);return t[this._kOtListeners]=r,r}_getPatchMap(t){return t[this._kOtListeners]}};dr.AbstractAsyncHooksContextManager=Cn});var Va=_(_r=>{"use strict";Object.defineProperty(_r,"__esModule",{value:!0});_r.AsyncLocalStorageContextManager=void 0;var Pf=(E(),w(l)),If=(Ua(),w(pe)),Cf=Ga(),Nn=class extends Cf.AbstractAsyncHooksContextManager{constructor(){super(),this._asyncLocalStorage=new If.AsyncLocalStorage}active(){var t;return(t=this._asyncLocalStorage.getStore())!==null&&t!==void 0?t:Pf.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}};_r.AsyncLocalStorageContextManager=Nn});var Bn=_(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.toAnyValue=gt.toKeyValue=gt.toAttributes=void 0;function Uf(e){return Object.keys(e).map(t=>Dn(t,e[t]))}gt.toAttributes=Uf;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 Ja=_(yt=>{"use strict";Object.defineProperty(yt,"__esModule",{value:!0});yt.toOtlpSpanEvent=yt.toOtlpLink=yt.sdkSpanToOtlpSpan=void 0;var Gn=Bn();function Bf(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,Gn.toAttributes)(e.attributes),droppedAttributesCount:e.droppedAttributesCount,events:e.events.map(i=>Za(i,t)),droppedEventsCount:e.droppedEventsCount,status:{code:o.code,message:o.message},links:e.links.map(i=>Qa(i,t)),droppedLinksCount:e.droppedLinksCount}}yt.sdkSpanToOtlpSpan=Bf;function Qa(e,t){var r;return{attributes:e.attributes?(0,Gn.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=Qa;function Za(e,t){return{attributes:e.attributes?(0,Gn.toAttributes)(e.attributes):[],name:e.name,timeUnixNano:t.encodeHrTime(e.time),droppedAttributesCount:e.droppedAttributesCount||0}}yt.toOtlpSpanEvent=Za});var is=_(K=>{"use strict";Object.defineProperty(K,"__esModule",{value:!0});K.getOtlpEncoder=K.encodeAsString=K.encodeAsLongBits=K.toLongBits=K.hrTimeToNanos=void 0;var Tr=P(),Gf=BigInt(1e9);function Vn(e){return BigInt(e[0])*Gf+BigInt(e[1])}K.hrTimeToNanos=Vn;function es(e){let t=Number(BigInt.asUintN(32,e)),r=Number(BigInt.asUintN(32,e>>BigInt(32)));return{low:t,high:r}}K.toLongBits=es;function Hn(e){let t=Vn(e);return es(t)}K.encodeAsLongBits=Hn;function rs(e){return Vn(e).toString()}K.encodeAsString=rs;var Vf=typeof BigInt<"u"?rs:Tr.hrTimeToNanoseconds;function ts(e){return e}function ns(e){if(e!==void 0)return(0,Tr.hexToBase64)(e)}var Hf={encodeHrTime:Hn,encodeSpanContext:Tr.hexToBase64,encodeOptionalSpanContext:ns};function Ff(e){var t,r;if(e===void 0)return Hf;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:Vf,encodeSpanContext:o?ts:Tr.hexToBase64,encodeOptionalSpanContext:o?ts:ns}}K.getOtlpEncoder=Ff});var Fn=_(Sr=>{"use strict";Object.defineProperty(Sr,"__esModule",{value:!0});Sr.createExportTraceServiceRequest=void 0;var jf=Bn(),kf=Ja(),qf=is();function Xf(e,t){let r=(0,qf.getOtlpEncoder)(t);return{resourceSpans:Wf(e,r)}}Sr.createExportTraceServiceRequest=Xf;function Kf(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 Wf(e,t){let r=Kf(e),n=[],o=r.entries(),i=o.next();for(;!i.done;){let[s,u]=i.value,c=[],a=u.values(),f=a.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=a.next()}let p={resource:{attributes:(0,jf.toAttributes)(s.attributes),droppedAttributesCount:0},scopeSpans:c,schemaUrl:void 0};n.push(p),i=o.next()}return n}});var ss=_(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)),os=P(),as=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 Yf(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=Yf;function zf(e,t){return e.endsWith("/")||(e=e+"/"),e+t}I.appendResourcePathToUrl=zf;function $f(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=$f;function Qf(e){return typeof e=="number"?e<=0?kn(e,as):e:Zf()}I.configureExporterTimeout=Qf;function Zf(){var e;let t=Number((e=(0,os.getEnv)().OTEL_EXPORTER_OTLP_TRACES_TIMEOUT)!==null&&e!==void 0?e:(0,os.getEnv)().OTEL_EXPORTER_OTLP_TIMEOUT);return t<=0?kn(t,as):t}function kn(e,t){return jn.diag.warn("Timeout must be greater than 0",e),t}I.invalidTimeout=kn;function Jf(e){return[429,502,503,504].includes(e)}I.isExportRetryable=Jf;function tp(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=tp});var cs=_(gr=>{"use strict";Object.defineProperty(gr,"__esModule",{value:!0});gr.OTLPExporterBase=void 0;var us=(E(),w(l)),_e=P(),ep=ss(),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,ep.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{us.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 us.diag.debug("shutdown started"),this.onShutdown(),this.forceFlush()}};gr.OTLPExporterBase=qn});var ds=_((um,ps)=>{"use strict";ps.exports=ip;function ip(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(a){i&&(i=!1,c(a))}})}});var ms=_(Es=>{"use strict";var vr=Es;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 Zt=new Array(64),hs=new Array(123);for(Z=0;Z<64;)hs[Zt[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=[],s=0,u=0,c;r<n;){var a=t[r++];switch(u){case 0:i[s++]=Zt[a>>2],c=(a&3)<<4,u=1;break;case 1:i[s++]=Zt[c|a>>4],c=(a&15)<<2,u=2;break;case 2:i[s++]=Zt[c|a>>6],i[s++]=Zt[a&63],u=0;break}s>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,i)),s=0)}return u&&(i[s++]=Zt[c],i[s++]=61,u===1&&(i[s++]=61)),o?(s&&o.push(String.fromCharCode.apply(String,i.slice(0,s))),o.join("")):String.fromCharCode.apply(String,i.slice(0,s))};var _s="invalid encoding";vr.decode=function(t,r,n){for(var o=n,i=0,s,u=0;u<t.length;){var c=t.charCodeAt(u++);if(c===61&&i>1)break;if((c=hs[c])===void 0)throw Error(_s);switch(i){case 0:s=c,i=1;break;case 1:r[n++]=s<<2|(c&48)>>4,s=c,i=2;break;case 2:r[n++]=(s&15)<<4|(c&60)>>2,s=c,i=3;break;case 3:r[n++]=(s&3)<<6|c,i=0;break}}if(i===1)throw Error(_s);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 Ss=_((lm,Ts)=>{"use strict";Ts.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 bs=_((fm,Os)=>{"use strict";Os.exports=gs(gs);function gs(e){return typeof Float32Array<"u"?function(){var t=new Float32Array([-0]),r=new Uint8Array(t.buffer),n=r[3]===128;function o(c,a,f){t[0]=c,a[f]=r[0],a[f+1]=r[1],a[f+2]=r[2],a[f+3]=r[3]}function i(c,a,f){t[0]=c,a[f]=r[3],a[f+1]=r[2],a[f+2]=r[1],a[f+3]=r[0]}e.writeFloatLE=n?o:i,e.writeFloatBE=n?i:o;function s(c,a){return r[0]=c[a],r[1]=c[a+1],r[2]=c[a+2],r[3]=c[a+3],t[0]}function u(c,a){return r[3]=c[a],r[2]=c[a+1],r[1]=c[a+2],r[0]=c[a+3],t[0]}e.readFloatLE=n?s:u,e.readFloatBE=n?u:s}():function(){function t(n,o,i,s){var u=o<0?1:0;if(u&&(o=-o),o===0)n(1/o>0?0:2147483648,i,s);else if(isNaN(o))n(2143289344,i,s);else if(o>34028234663852886e22)n((u<<31|2139095040)>>>0,i,s);else if(o<11754943508222875e-54)n((u<<31|Math.round(o/1401298464324817e-60))>>>0,i,s);else{var c=Math.floor(Math.log(o)/Math.LN2),a=Math.round(o*Math.pow(2,-c)*8388608)&8388607;n((u<<31|c+127<<23|a)>>>0,i,s)}}e.writeFloatLE=t.bind(null,ys),e.writeFloatBE=t.bind(null,vs);function r(n,o,i){var s=n(o,i),u=(s>>31)*2+1,c=s>>>23&255,a=s&8388607;return c===255?a?NaN:u*(1/0):c===0?u*1401298464324817e-60*a:u*Math.pow(2,c-150)*(a+8388608)}e.readFloatLE=r.bind(null,As),e.readFloatBE=r.bind(null,Rs)}(),typeof Float64Array<"u"?function(){var t=new Float64Array([-0]),r=new Uint8Array(t.buffer),n=r[7]===128;function o(c,a,f){t[0]=c,a[f]=r[0],a[f+1]=r[1],a[f+2]=r[2],a[f+3]=r[3],a[f+4]=r[4],a[f+5]=r[5],a[f+6]=r[6],a[f+7]=r[7]}function i(c,a,f){t[0]=c,a[f]=r[7],a[f+1]=r[6],a[f+2]=r[5],a[f+3]=r[4],a[f+4]=r[3],a[f+5]=r[2],a[f+6]=r[1],a[f+7]=r[0]}e.writeDoubleLE=n?o:i,e.writeDoubleBE=n?i:o;function s(c,a){return r[0]=c[a],r[1]=c[a+1],r[2]=c[a+2],r[3]=c[a+3],r[4]=c[a+4],r[5]=c[a+5],r[6]=c[a+6],r[7]=c[a+7],t[0]}function u(c,a){return r[7]=c[a],r[6]=c[a+1],r[5]=c[a+2],r[4]=c[a+3],r[3]=c[a+4],r[2]=c[a+5],r[1]=c[a+6],r[0]=c[a+7],t[0]}e.readDoubleLE=n?s:u,e.readDoubleBE=n?u:s}():function(){function t(n,o,i,s,u,c){var a=s<0?1:0;if(a&&(s=-s),s===0)n(0,u,c+o),n(1/s>0?0:2147483648,u,c+i);else if(isNaN(s))n(0,u,c+o),n(2146959360,u,c+i);else if(s>17976931348623157e292)n(0,u,c+o),n((a<<31|2146435072)>>>0,u,c+i);else{var f;if(s<22250738585072014e-324)f=s/5e-324,n(f>>>0,u,c+o),n((a<<31|f/4294967296)>>>0,u,c+i);else{var p=Math.floor(Math.log(s)/Math.LN2);p===1024&&(p=1023),f=s*Math.pow(2,-p),n(f*4503599627370496>>>0,u,c+o),n((a<<31|p+1023<<20|f*1048576&1048575)>>>0,u,c+i)}}}e.writeDoubleLE=t.bind(null,ys,0,4),e.writeDoubleBE=t.bind(null,vs,4,0);function r(n,o,i,s,u){var c=n(s,u+o),a=n(s,u+i),f=(a>>31)*2+1,p=a>>>20&2047,d=4294967296*(a&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,As,0,4),e.readDoubleBE=r.bind(null,Rs,4,0)}(),e}function ys(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 vs(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 As(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function Rs(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}});var Ps=_((pm,Ls)=>{"use strict";Ls.exports=op;function op(e){return null}});var Cs=_(Is=>{"use strict";var Kn=Is;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,s=[],u=0,c;r<n;)c=t[r++],c<128?s[u++]=c:c>191&&c<224?s[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,s[u++]=55296+(c>>10),s[u++]=56320+(c&1023)):s[u++]=(c&15)<<12|(t[r++]&63)<<6|t[r++]&63,u>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,s)),u=0);return i?(u&&i.push(String.fromCharCode.apply(String,s.slice(0,u))),i.join("")):String.fromCharCode.apply(String,s.slice(0,u))};Kn.write=function(t,r,n){for(var o=n,i,s,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&&((s=t.charCodeAt(u+1))&64512)===56320?(i=65536+((i&1023)<<10)+(s&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 ws=_((_m,Ns)=>{"use strict";Ns.exports=ap;function ap(e,t,r){var n=r||8192,o=n>>>1,i=null,s=n;return function(c){if(c<1||c>o)return e(c);s+c>n&&(i=e(n),s=0);var a=t.call(i,s,s+=c);return s&7&&(s=(s|7)+1),a}}});var xs=_((hm,Ms)=>{"use strict";Ms.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=ds();h.base64=ms();h.EventEmitter=Ss();h.float=bs();h.inquire=Ps();h.utf8=Cs();h.pool=ws();h.LongBits=xs();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 Ds(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=Ds;h.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)};function Us(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&&Ds(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=Us;h.ProtocolError=Us("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=_((mm,Hs)=>{"use strict";Hs.exports=y;var W=At(),Yn,Rr=W.LongBits,Bs=W.base64,Gs=W.utf8;function Ee(e,t,r){this.fn=e,this.len=t,this.next=void 0,this.val=r}function $n(){}function up(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 Vs=function(){return W.Buffer?function(){return(y.create=function(){return new Yn})()}:function(){return new y}};y.create=Vs();y.alloc=function(t){return new W.Array(t)};W.Array!==Array&&(y.alloc=W.pool(y.alloc,W.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 cp(e,t,r){for(;e>127;)t[r++]=e&127|128,e>>>=7;t[r]=e}function Zn(e,t){this.len=e,this.next=void 0,this.val=t}Zn.prototype=Object.create(Ee.prototype);Zn.prototype.fn=cp;y.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new Zn((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(Jn,10,Rr.fromNumber(t)):this.uint32(t)};y.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)};function Jn(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(Jn,r.length(),r)};y.prototype.int64=y.prototype.uint64;y.prototype.sint64=function(t){var r=Rr.from(t).zzEncode();return this._push(Jn,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(W.float.writeFloatLE,4,t)};y.prototype.double=function(t){return this._push(W.float.writeDoubleLE,8,t)};var lp=W.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(W.isString(t)){var n=y.alloc(r=Bs.length(t));Bs.decode(t,n,0),t=n}return this.uint32(r)._push(lp,r,t)};y.prototype.string=function(t){var r=Gs.length(t);return r?this.uint32(r)._push(Gs.write,r,t):this._push(Qn,1,0)};y.prototype.fork=function(){return this.states=new up(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=Vs(),Yn._configure()}});var ks=_((Tm,js)=>{"use strict";js.exports=it;var Fs=ti();(it.prototype=Object.create(Fs.prototype)).constructor=it;var Rt=At();function it(){Fs.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 fp(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(fp,r,t),this};it._configure()});var ni=_((Sm,Ys)=>{"use strict";Ys.exports=N;var J=At(),ri,Ks=J.LongBits,pp=J.utf8;function tt(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 qs=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")},Ws=function(){return J.Buffer?function(r){return(N.create=function(o){return J.Buffer.isBuffer(o)?new ri(o):qs(o)})(r)}:qs};N.create=Ws();N.prototype._slice=J.Array.prototype.subarray||J.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,tt(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 Ks(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 tt(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 tt(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 tt(this,4);return Or(this.buf,this.pos+=4)};N.prototype.sfixed32=function(){if(this.pos+4>this.len)throw tt(this,4);return Or(this.buf,this.pos+=4)|0};function Xs(){if(this.pos+8>this.len)throw tt(this,8);return new Ks(Or(this.buf,this.pos+=4),Or(this.buf,this.pos+=4))}N.prototype.float=function(){if(this.pos+4>this.len)throw tt(this,4);var t=J.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t};N.prototype.double=function(){if(this.pos+8>this.len)throw tt(this,4);var t=J.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 tt(this,t);if(this.pos+=t,Array.isArray(this.buf))return this.buf.slice(r,n);if(r===n){var o=J.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 pp.read(t,0,t.length)};N.prototype.skip=function(t){if(typeof t=="number"){if(this.pos+t>this.len)throw tt(this,t);this.pos+=t}else do if(this.pos>=this.len)throw tt(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=Ws(),ri._configure();var t=J.Long?"toLong":"toNumber";J.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 Xs.call(this)[t](!0)},sfixed64:function(){return Xs.call(this)[t](!1)}})}});var Zs=_((gm,Qs)=>{"use strict";Qs.exports=Ut;var $s=ni();(Ut.prototype=Object.create($s.prototype)).constructor=Ut;var zs=At();function Ut(e){$s.call(this,e)}Ut._configure=function(){zs.Buffer&&(Ut.prototype._slice=zs.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 tu=_((ym,Js)=>{"use strict";Js.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 s=this;if(!i)return ii.asPromise(e,s,t,r,n,o);if(!s.rpcImpl){setTimeout(function(){i(Error("already ended"))},0);return}try{return s.rpcImpl(t,r[s.requestDelimited?"encodeDelimited":"encode"](o).finish(),function(c,a){if(c)return s.emit("error",c,t),i(c);if(a===null){s.end(!0);return}if(!(a instanceof n))try{a=n[s.responseDelimited?"decodeDelimited":"decode"](a)}catch(f){return s.emit("error",f,t),i(f)}return s.emit("data",a,t),i(null,a)})}catch(u){s.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 ru=_(eu=>{"use strict";var dp=eu;dp.Service=tu()});var iu=_((Am,nu)=>{"use strict";nu.exports={}});var su=_(au=>{"use strict";var F=au;F.build="minimal";F.Writer=ti();F.BufferWriter=ks();F.Reader=ni();F.BufferReader=Zs();F.util=At();F.rpc=ru();F.roots=iu();F.configure=ou;function ou(){F.util._configure(),F.Writer._configure(F.BufferWriter),F.Reader._configure(F.BufferReader)}ou()});var cu=_((Om,uu)=>{"use strict";uu.exports=su()});E();var Kt=v(P());E();var b=v(P()),ht=v(ae());var So="exception";var wl=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.")},Ml=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){s={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return i},go=function(){function e(t,r,n,o,i,s,u,c,a,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=s,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=wl(Object.entries(t)),i=o.next();!i.done;i=o.next()){var s=Ml(i.value,2),u=s[0],c=s[1];this.setAttribute(u,c)}}catch(a){r={error:a}}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(So,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 at=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 yo=v(P());var Et=function(){function e(t){var r,n,o,i;this._root=t.root,this._root||((0,yo.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 at,this._localParentSampled=(o=t.localParentSampled)!==null&&o!==void 0?o:new X,this._localParentNotSampled=(i=t.localParentNotSampled)!==null&&i!==void 0?i:new at}return e.prototype.shouldSample=function(t,r,n,o,i,s){var u=l.trace.getSpanContext(t);return!u||!(0,l.isSpanContextValid)(u)?this._root.shouldSample(t,r,n,o,i,s):u.isRemote?u.traceFlags&l.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(t,r,n,o,i,s):this._remoteParentNotSampled.shouldSample(t,r,n,o,i,s):u.traceFlags&l.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(t,r,n,o,i,s):this._localParentNotSampled.shouldSample(t,r,n,o,i,s)},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 xl=(0,x.getEnv)(),Dl=x.TracesSamplerValues.AlwaysOn,qt=1;function Ze(){return{sampler:mn(xl),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 at;case x.TracesSamplerValues.ParentBasedAlwaysOn:return new Et({root:new X});case x.TracesSamplerValues.ParentBasedAlwaysOff:return new Et({root:new at});case x.TracesSamplerValues.TraceIdRatio:return new kt(vo(e));case x.TracesSamplerValues.ParentBasedTraceIdRatio:return new Et({root:new kt(vo(e))});default:return l.diag.error('OTEL_TRACES_SAMPLER value "'+e.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+Dl+'".'),new X}}function vo(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 Ao(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 Ro(e){var t,r,n,o,i,s,u,c,a,f,p,d,m=Object.assign({},e.spanLimits),g=(0,Xt.getEnvWithoutDefaults)();return m.attributeCountLimit=(s=(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&&s!==void 0?s: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:(a=e.generalLimits)===null||a===void 0?void 0:a.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()),Oo=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),s=0,u=i;s<u;s++)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),s=function(){return t._exporter.export(i,function(c){var a;clearTimeout(o),c.code===k.ExportResultCode.SUCCESS?r():n((a=c.error)!==null&&a!==void 0?a:new Error("BatchSpanProcessor: span export failed"))})},u=i.map(function(c){return c.resource}).filter(function(c){return c.asyncAttributesPending});u.length===0?s():Promise.all(u.map(function(c){var a;return(a=c.waitForAsyncAttributes)===null||a===void 0?void 0:a.call(c)})).then(s,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 Ul=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){Ul(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}(Oo);var Bl=8,Gl=16,tr=function(){function e(){this.generateTraceId=bo(Gl),this.generateSpanId=bo(Bl)}return e}();var Je=Array(32);function bo(e){return function(){for(var r=0;r<e*2;r++)Je[r]=Math.floor(Math.random()*16)+48,Je[r]>=58&&(Je[r]+=39);return String.fromCharCode.apply(null,Je.slice(0,e*2))}}var Lo=function(){function e(t,r,n){this._tracerProvider=n;var o=Ao(r);this._sampler=o.sampler,this._generalLimits=o.generalLimits,this._spanLimits=o.spanLimits,this._idGenerator=r.idGenerator||new tr,this.resource=n.resource,this.instrumentationLibrary=t}return e.prototype.startSpan=function(t,r,n){var o,i,s;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 a=u?.spanContext(),f=this._idGenerator.generateSpanId(),p,d,m;!a||!l.trace.isSpanContextValid(a)?p=this._idGenerator.generateTraceId():(p=a.traceId,d=a.traceState,m=a.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=(s=T.traceState)!==null&&s!==void 0?s:d;var et=T.decision===l.SamplingDecision.RECORD_AND_SAMPLED?l.TraceFlags.SAMPLED:l.TraceFlags.NONE,q={traceId:p,spanId:f,traceFlags:et,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 go(this,n,t,q,g,m,C,r.startTime,void 0,U);return wr},e.prototype.startActiveSpan=function(t,r,n,o){var i,s,u;if(!(arguments.length<2)){arguments.length===2?u=r:arguments.length===3?(i=r,u=n):(i=r,s=n,u=o);var c=s??l.context.active(),a=this.startSpan(t,i,c),f=l.trace.setSpan(c,a);return l.context.with(f,u,void 0,a)}},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 $=v(P());E();var mt=v(ae()),er=v(P());function Po(){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)},Vl=function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(s){s(i)})}return new(r||(r=Promise))(function(i,s){function u(f){try{a(n.next(f))}catch(p){s(p)}}function c(f){try{a(n.throw(f))}catch(p){s(p)}}function a(f){f.done?i(f.value):o(f.value).then(u,c)}a((n=n.apply(e,t||[])).next())})},Hl=function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(a){return function(f){return c([a,f])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=a[0]&2?o.return:a[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,a[1])).done)return i;switch(o=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,o=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){r.label=a[1];break}if(a[0]===6&&r.label<i[1]){r.label=i[1],i=a;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(a);break}i[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(f){a=[6,f],o=0}finally{n=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Fl=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){s={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.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]=Po(),t[mt.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE]=er.SDK_INFO[mt.SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE],t[mt.SemanticResourceAttributes.TELEMETRY_SDK_NAME]=er.SDK_INFO[mt.SemanticResourceAttributes.TELEMETRY_SDK_NAME],t[mt.SemanticResourceAttributes.TELEMETRY_SDK_VERSION]=er.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 Vl(this,void 0,void 0,function(){return Hl(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(s){var u,c=Fl(s,2),a=c[0],f=c[1];return Tt(Tt(Tt(Tt({},r._syncAttributes),a),(u=t._syncAttributes)!==null&&u!==void 0?u:t.attributes),f)});return new e(o,i)},e.EMPTY=new e({}),e}();E();var Io=v(P()),Co=v(ae());var jl=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=[],s;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){s={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return i},ql=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,Io.getEnv)(),o=n.OTEL_RESOURCE_ATTRIBUTES,i=n.OTEL_SERVICE_NAME;if(o)try{var s=this._parseResourceAttributes(o);Object.assign(r,s)}catch(u){l.diag.debug("EnvDetector failed: "+u.message)}return i&&(r[Co.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 s=jl(i),u=s.next();!u.done;u=s.next()){var c=u.value,a=c.split(this._LABEL_KEY_VALUE_SPLITTER,-1);if(a.length===2){var f=kl(a,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=s.return)&&n.call(s)}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}(),No=new ql;E();var wo=function(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"};var Xl=function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(s){s(i)})}return new(r||(r=Promise))(function(i,s){function u(f){try{a(n.next(f))}catch(p){s(p)}}function c(f){try{a(n.throw(f))}catch(p){s(p)}}function a(f){f.done?i(f.value):o(f.value).then(u,c)}a((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,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(a){return function(f){return c([a,f])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=a[0]&2?o.return:a[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,a[1])).done)return i;switch(o=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,o=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){r.label=a[1];break}if(a[0]===6&&r.label<i[1]){r.label=i[1],i=a;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(a);break}i[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(f){a=[6,f],o=0}finally{n=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};var Mo=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),s;if(wo(i)){var u=function(){return Xl(void 0,void 0,void 0,function(){var c;return Kl(this,function(a){switch(a.label){case 0:return[4,i];case 1:return c=a.sent(),[2,c.attributes]}})})};s=new H({},u())}else s=i;return s.waitForAsyncAttributes?s.waitForAsyncAttributes().then(function(){return l.diag.debug(o.constructor.name+" found resource.",s)}):l.diag.debug(o.constructor.name+" found resource.",s),s}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(){Wl(r)}),n},Wl=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 xo=v(P()),rr=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.")},Do=function(){function e(t){this._spanProcessors=t}return e.prototype.forceFlush=function(){var t,r,n=[];try{for(var o=rr(this._spanProcessors),i=o.next();!i.done;i=o.next()){var s=i.value;n.push(s.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,xo.globalErrorHandler)(c||new Error("MultiSpanProcessor: forceFlush failed")),u()})})},e.prototype.onStart=function(t,r){var n,o;try{for(var i=rr(this._spanProcessors),s=i.next();!s.done;s=i.next()){var u=s.value;u.onStart(t,r)}}catch(c){n={error:c}}finally{try{s&&!s.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=rr(this._spanProcessors),i=o.next();!i.done;i=o.next()){var s=i.value;s.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=rr(this._spanProcessors),i=o.next();!i.done;i=o.next()){var s=i.value;n.push(s.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 Uo=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 Bo=function(){function e(t){t===void 0&&(t={});var r;this._registeredSpanProcessors=[],this._tracers=new Map;var n=(0,$.merge)({},Ze(),Ro(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 Uo}return e.prototype.getTracer=function(t,r,n){var o=t+"@"+(r||"")+":"+(n?.schemaUrl||"");return this._tracers.has(o)||this._tracers.set(o,new Lo({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 Do(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,s=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(s),i!==xt.timeout&&(i=xt.resolved,o(i))}).catch(function(u){clearTimeout(s),i=xt.error,o(u)})})});return new Promise(function(n,o){Promise.all(r).then(function(i){var s=i.filter(function(u){return u!==xt.resolved});s.length>0?o(s):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,$.getEnv)().OTEL_PROPAGATORS)),n=r.map(function(i){var s=t._getPropagator(i);return s||l.diag.warn('Propagator "'+i+'" requested through environment variable is unavailable.'),s}),o=n.reduce(function(i,s){return s&&i.push(s),i},[]);if(o.length!==0)return r.length===1?o[0]:new $.CompositePropagator({propagators:o})},e.prototype._buildExporterFromEnv=function(){var t=(0,$.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 $.W3CTraceContextPropagator}],["baggage",function(){return new $.W3CBaggagePropagator}]]),e._registeredExporters=new Map,e}();E();var st={};Y(st,$_);import*as $_ from"@opentelemetry/api-logs";var Pu=v(Fo(),1);E();var ir=v(P());E();E();E();var Wt=v(P()),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.")},Zl=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){s={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return i},jo=function(){function e(t,r,n){this.attributes={},this.totalAttributesCount=0,this._isReadonly=!1;var o=n.timestamp,i=n.observedTimestamp,s=n.severityNumber,u=n.severityText,c=n.body,a=n.attributes,f=a===void 0?{}:a,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=s,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=Ql(Object.entries(t)),i=o.next();!i.done;i=o.next()){var s=Zl(i.value,2),u=s[0],c=s[1];this.setAttribute(u,c)}}catch(a){r={error:a}}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)},ko=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 jo(this._sharedState,this.instrumentationScope,Sn({context:r},t));this._sharedState.activeProcessor.onEmit(n,r),n._makeReadonly()},e}();var ut=v(P());function qo(){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 Xo(e){var t,r,n,o,i,s,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:(s=(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&&s!==void 0?s:ut.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT}}var Yo=v(P()),Ko=function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(s){s(i)})}return new(r||(r=Promise))(function(i,s){function u(f){try{a(n.next(f))}catch(p){s(p)}}function c(f){try{a(n.throw(f))}catch(p){s(p)}}function a(f){f.done?i(f.value):o(f.value).then(u,c)}a((n=n.apply(e,t||[])).next())})},Wo=function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(a){return function(f){return c([a,f])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=a[0]&2?o.return:a[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,a[1])).done)return i;switch(o=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,o=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){r.label=a[1];break}if(a[0]===6&&r.label<i[1]){r.label=i[1],i=a;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(a);break}i[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(f){a=[6,f],o=0}finally{n=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},zo=function(){function e(t,r){this.processors=t,this.forceFlushTimeoutMillis=r}return e.prototype.forceFlush=function(){return Ko(this,void 0,void 0,function(){var t;return Wo(this,function(r){switch(r.label){case 0:return t=this.forceFlushTimeoutMillis,[4,Promise.all(this.processors.map(function(n){return(0,Yo.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 Ko(this,void 0,void 0,function(){return Wo(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 $o=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 Qo=function(){function e(t,r,n){this.resource=t,this.forceFlushTimeoutMillis=r,this.logRecordLimits=n,this.loggers=new Map,this.registeredLogRecordProcessors=[],this.activeProcessor=new $o}return e}();var Jl="unknown",gn=function(){function e(t){t===void 0&&(t={});var r=(0,ir.merge)({},qo(),t),n=r.resource,o=n===void 0?H.default():n,i=r.logRecordLimits,s=r.forceFlushTimeoutMillis;this._sharedState=new Qo(o,s,Xo(i)),this._shutdownOnce=new ir.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"),st.NOOP_LOGGER;t||l.diag.warn("Logger requested without instrumentation scope name.");var o=t||Jl,i=o+"@"+(r||"")+":"+(n?.schemaUrl||"");return this._sharedState.loggers.has(i)||this._sharedState.loggers.set(i,new ko({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 zo(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 or;(function(e){e[e.DELTA=0]="DELTA",e[e.CUMULATIVE=1]="CUMULATIVE"})(or||(or={}));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)}}(),Zo=function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(s){s(i)})}return new(r||(r=Promise))(function(i,s){function u(f){try{a(n.next(f))}catch(p){s(p)}}function c(f){try{a(n.throw(f))}catch(p){s(p)}}function a(f){f.done?i(f.value):o(f.value).then(u,c)}a((n=n.apply(e,t||[])).next())})},Jo=function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(a){return function(f){return c([a,f])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=a[0]&2?o.return:a[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,a[1])).done)return i;switch(o=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,o=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){r.label=a[1];break}if(a[0]===6&&r.label<i[1]){r.label=i[1],i=a;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(a);break}i[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(f){a=[6,f],o=0}finally{n=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};var ef=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 ta(e){return e!=null}function ea(e){var t=Object.keys(e);return t.length===0?"":(t=t.sort(),JSON.stringify(t.map(function(r){return[r,e[r]]})))}function ra(e){var t,r;return e.name+":"+((t=e.version)!==null&&t!==void 0?t:"")+":"+((r=e.schemaUrl)!==null&&r!==void 0?r:"")}var rf=function(e){tf(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,s){r=setTimeout(function(){s(new rf("Operation timed out."))},t)});return Promise.race([e,n]).then(function(o){return clearTimeout(r),o},function(o){throw clearTimeout(r),o})}function na(e){return Zo(this,void 0,void 0,function(){var t=this;return Jo(this,function(r){return[2,Promise.all(e.map(function(n){return Zo(t,void 0,void 0,function(){var o,i;return Jo(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,n];case 1:return o=s.sent(),[2,{status:"fulfilled",value:o}];case 2:return i=s.sent(),[2,{status:"rejected",reason:i}];case 3:return[2]}})})}))]})})}function ia(e){return e.status==="rejected"}function oa(e,t){var r,n;if(e.size!==t.size)return!1;try{for(var o=ef(e),i=o.next();!i.done;i=o.next()){var s=i.value;if(!t.has(s))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 aa(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,s;return of(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:(s=r?.advice)!==null&&s!==void 0?s:{}}}function sa(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 ua(e,t){return aa(e.name,t.name)&&e.unit===t.unit&&e.type===t.type&&e.valueType===t.valueType}var nf=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function of(e){return e.match(nf)!=null}E();var ca=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 la=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,la.millisToHrTime)(Date.now()))},e}();var fa=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 pa=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 da=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 _a=function(e){Yt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(ar);var ha=function(e){Yt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(ar);var Ea=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 ma=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 da(o,n)},e.prototype.createCounter=function(t,r){var n=lt(t,ct.COUNTER,r),o=this._meterSharedState.registerMetricStorage(n);return new pa(o,n)},e.prototype.createUpDownCounter=function(t,r){var n=lt(t,ct.UP_DOWN_COUNTER,r),o=this._meterSharedState.registerMetricStorage(n);return new fa(o,n)},e.prototype.createObservableGauge=function(t,r){var n=lt(t,ct.OBSERVABLE_GAUGE,r),o=this._meterSharedState.registerAsyncMetricStorage(n);return new ha(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 _a(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 Ea(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 sr=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 af=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)}}(),Ta=function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(a){return function(f){return c([a,f])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=a[0]&2?o.return:a[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,a[1])).done)return i;switch(o=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,o=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){r.label=a[1];break}if(a[0]===6&&r.label<i[1]){r.label=i[1],i=a;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(a);break}i[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(f){a=[6,f],o=0}finally{n=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[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 Ta(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 Ta(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 Q=function(e){af(t,e);function t(){return e.call(this,ea)||this}return t}(sf);var uf=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){s={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return i},ur=function(){function e(t){this._aggregator=t,this._activeCollectionStorage=new Q,this._cumulativeMemoStorage=new Q}return e.prototype.record=function(t,r,n,o){var i=this,s=this._activeCollectionStorage.getOrDefault(r,function(){return i._aggregator.createAccumulation(o)});s?.record(t)},e.prototype.batchCumulate=function(t,r){var n=this;Array.from(t.entries()).forEach(function(o){var i=uf(o,3),s=i[0],u=i[1],c=i[2],a=n._aggregator.createAccumulation(r);a?.record(u);var f=a;if(n._cumulativeMemoStorage.has(s,c)){var p=n._cumulativeMemoStorage.get(s,c);f=n._aggregator.diff(p,a)}if(n._activeCollectionStorage.has(s,c)){var d=n._activeCollectionStorage.get(s,c);f=n._aggregator.merge(d,f)}n._cumulativeMemoStorage.set(s,a,c),n._activeCollectionStorage.set(s,f,c)})},e.prototype.collect=function(){var t=this._activeCollectionStorage;return this._activeCollectionStorage=new Q,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.")},Sa=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){s={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return i},cr=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),s=i,u;if(this._reportHistory.has(t)){var c=this._reportHistory.get(t),a=c.collectionTime;u=c.aggregationTemporality,u===or.CUMULATIVE?s=e.merge(c.accumulations,i,this._aggregator):s=e.calibrateStartTime(c.accumulations,i,a)}else u=t.selectAggregationTemporality(r.type);this._reportHistory.set(t,{accumulations:s,collectionTime:o,aggregationTemporality:u});var f=cf(s);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),s=i.next();!s.done;s=i.next()){var u=s.value,c=this._unreportedAccumulations.get(u);c===void 0&&(c=[],this._unreportedAccumulations.set(u,c)),c.push(t)}}catch(a){r={error:a}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}},e.prototype._getMergedUnreportedAccumulations=function(t){var r,n,o=new Q,i=this._unreportedAccumulations.get(t);if(this._unreportedAccumulations.set(t,[]),i===void 0)return o;try{for(var s=An(i),u=s.next();!u.done;u=s.next()){var c=u.value;o=e.merge(o,c,this._aggregator)}}catch(a){r={error:a}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return o},e.merge=function(t,r,n){for(var o=t,i=r.entries(),s=i.next();s.done!==!0;){var u=Sa(s.value,3),c=u[0],a=u[1],f=u[2];if(t.has(c,f)){var p=t.get(c,f),d=n.merge(p,a);o.set(c,d,f)}else o.set(c,a,f);s=i.next()}return o},e.calibrateStartTime=function(t,r,n){var o,i;try{for(var s=An(t.keys()),u=s.next();!u.done;u=s.next()){var c=Sa(u.value,2),a=c[0],f=c[1],p=r.get(a,f);p?.setStartTime(n)}}catch(d){o={error:d}}finally{try{u&&!u.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}return r},e}();function cf(e){return Array.from(e.entries())}var lf=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)}}(),ff=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){s={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return i},ga=function(e){lf(t,e);function t(r,n,o,i){var s=e.call(this,r)||this;return s._attributesProcessor=o,s._deltaMetricStorage=new ur(n),s._temporalMetricStorage=new cr(n,i),s}return t.prototype.record=function(r,n){var o=this,i=new Q;Array.from(r.entries()).forEach(function(s){var u=ff(s,2),c=u[0],a=u[1];i.set(o._attributesProcessor.process(c),a)}),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}(sr);E();function Rn(e,t){var r="";return e.unit!==t.unit&&(r+=" - Unit '"+e.unit+"' does not match '"+t.unit+`'
|
|
5
|
+
`),e.type!==t.type&&(r+=" - Type '"+e.type+"' does not match '"+t.type+`'
|
|
6
|
+
`),e.valueType!==t.valueType&&(r+=" - Value Type '"+e.valueType+"' does not match '"+t.valueType+`'
|
|
7
|
+
`),e.description!==t.description&&(r+=" - Description '"+e.description+"' does not match '"+t.description+`'
|
|
8
|
+
`),r}function pf(e,t){return" - use valueType '"+e.valueType+"' on instrument creation or use an instrument name other than '"+t.name+"'"}function df(e,t){return" - use unit '"+e.unit+"' on instrument creation or use an instrument name other than '"+t.name+"'"}function _f(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 hf(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
|
+
- 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 On(e,t){return e.valueType!==t.valueType?pf(e,t):e.unit!==t.unit?df(e,t):e.type!==t.type?_f(e,t):e.description!==t.description?hf(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.")},ya=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,s=[];try{for(var u=bn(this._sharedRegistry.values()),c=u.next();!c.done;c=u.next()){var a=c.value;s=s.concat(a)}}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 a=d.value;s=s.concat(a)}}catch(m){o={error:m}}finally{try{d&&!d.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}return s},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 s=bn(r),u=s.next();!u.done;u=s.next()){var c=u.value,a=c.getInstrumentDescriptor();ua(a,t)?(a.description!==t.description&&(t.description.length>a.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
|
-
`,Rn(a,
|
|
13
|
-
To resolve the conflict:`,
|
|
12
|
+
`,Rn(a,t),`The longer description will be used.
|
|
13
|
+
To resolve the conflict:`,On(a,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
|
-
`,Rn(a,
|
|
16
|
-
`,bn(a,e))}}catch(f){n={error:f}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}return i},t}();var Aa=function(){function t(e){this._backingStorages=e}return t.prototype.record=function(e,r,n,o){this._backingStorages.forEach(function(i){i.record(e,r,n,o)})},t}();E();E();var Oa=function(){function t(e,r){this._instrumentName=e,this._valueType=r,this._buffer=new Z}return t.prototype.observe=function(e,r){if(r===void 0&&(r={}),typeof e!="number"){l.diag.warn("non-number value provided to metric "+this._instrumentName+": "+e);return}this._valueType===l.ValueType.INT&&!Number.isInteger(e)&&(l.diag.warn("INT value type cannot accept a floating-point value for "+this._instrumentName+", ignoring the fractional digits."),e=Math.trunc(e),!Number.isInteger(e))||this._buffer.set(r,e)},t}();var Ra=function(){function t(){this._buffer=new Map}return t.prototype.observe=function(e,r,n){if(n===void 0&&(n={}),!!ft(e)){var o=this._buffer.get(e);if(o==null&&(o=new Z,this._buffer.set(e,o)),typeof r!="number"){l.diag.warn("non-number value provided to metric "+e._descriptor.name+": "+r);return}e._descriptor.valueType===l.ValueType.INT&&!Number.isInteger(r)&&(l.diag.warn("INT value type cannot accept a floating-point value for "+e._descriptor.name+", ignoring the fractional digits."),r=Math.trunc(r),!Number.isInteger(r))||o.set(n,r)}},t}();var Pn=function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(s){s(i)})}return new(r||(r=Promise))(function(i,s){function u(f){try{a(n.next(f))}catch(p){s(p)}}function c(f){try{a(n.throw(f))}catch(p){s(p)}}function a(f){f.done?i(f.value):o(f.value).then(u,c)}a((n=n.apply(t,e||[])).next())})},In=function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(a){return function(f){return c([a,f])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=a[0]&2?o.return:a[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,a[1])).done)return i;switch(o=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,o=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){r.label=a[1];break}if(a[0]===6&&r.label<i[1]){r.label=i[1],i=a;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(a);break}i[2]&&r.ops.pop(),r.trys.pop();continue}a=e.call(t,r)}catch(f){a=[6,f],o=0}finally{n=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},ba=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,i=[],s;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){s={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return i},La=function(t,e,r){if(r||arguments.length===2)for(var n=0,o=e.length,i;n<o;n++)(i||!(n in e))&&(i||(i=Array.prototype.slice.call(e,0,n)),i[n]=e[n]);return t.concat(i||Array.prototype.slice.call(e))},Pa=function(){function t(){this._callbacks=[],this._batchCallbacks=[]}return t.prototype.addCallback=function(e,r){var n=this._findCallback(e,r);n>=0||this._callbacks.push({callback:e,instrument:r})},t.prototype.removeCallback=function(e,r){var n=this._findCallback(e,r);n<0||this._callbacks.splice(n,1)},t.prototype.addBatchCallback=function(e,r){var n=new Set(r.filter(ft));if(n.size===0){l.diag.error("BatchObservableCallback is not associated with valid instruments",r);return}var o=this._findBatchCallback(e,n);o>=0||this._batchCallbacks.push({callback:e,instruments:n})},t.prototype.removeBatchCallback=function(e,r){var n=new Set(r.filter(ft)),o=this._findBatchCallback(e,n);o<0||this._batchCallbacks.splice(o,1)},t.prototype.observe=function(e,r){return Pn(this,void 0,void 0,function(){var n,o,i,s;return In(this,function(u){switch(u.label){case 0:return n=this._observeCallbacks(e,r),o=this._observeBatchCallbacks(e,r),[4,ia(La(La([],ba(n),!1),ba(o),!1))];case 1:return i=u.sent(),s=i.filter(oa).map(function(c){return c.reason}),[2,s]}})})},t.prototype._observeCallbacks=function(e,r){var n=this;return this._callbacks.map(function(o){var i=o.callback,s=o.instrument;return Pn(n,void 0,void 0,function(){var u,c;return In(this,function(a){switch(a.label){case 0:return u=new Oa(s._descriptor.name,s._descriptor.valueType),c=Promise.resolve(i(u)),r!=null&&(c=vn(c,r)),[4,c];case 1:return a.sent(),s._metricStorages.forEach(function(f){f.record(u._buffer,e)}),[2]}})})})},t.prototype._observeBatchCallbacks=function(e,r){var n=this;return this._batchCallbacks.map(function(o){var i=o.callback,s=o.instruments;return Pn(n,void 0,void 0,function(){var u,c;return In(this,function(a){switch(a.label){case 0:return u=new Ra,c=Promise.resolve(i(u)),r!=null&&(c=vn(c,r)),[4,c];case 1:return a.sent(),s.forEach(function(f){var p=u._buffer.get(f);p!=null&&f._metricStorages.forEach(function(_){_.record(p,e)})}),[2]}})})})},t.prototype._findCallback=function(e,r){return this._callbacks.findIndex(function(n){return n.callback===e&&n.instrument===r})},t.prototype._findBatchCallback=function(e,r){return this._batchCallbacks.findIndex(function(n){return n.callback===e&&aa(n.instruments,r)})},t}();var cf=function(){var t=function(e,r){return t=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])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ia=function(t){cf(e,t);function e(r,n,o,i){var s=t.call(this,r)||this;return s._attributesProcessor=o,s._deltaMetricStorage=new fr(n),s._temporalMetricStorage=new pr(n,i),s}return e.prototype.record=function(r,n,o,i){n=this._attributesProcessor.process(n,o),this._deltaMetricStorage.record(r,n,o,i)},e.prototype.collect=function(r,n){var o=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(r,this._instrumentDescriptor,o,n)},e}(lr);var Ca=function(){var t=function(e,r){return t=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])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),dr=function(){function t(){}return t.Noop=function(){return ff},t}();var lf=function(t){Ca(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.process=function(r,n){return r},e}(dr);var Jh=function(t){Ca(e,t);function e(r){var n=t.call(this)||this;return n._allowedAttributeNames=r,n}return e.prototype.process=function(r,n){var o=this,i={};return Object.keys(r).filter(function(s){return o._allowedAttributeNames.includes(s)}).forEach(function(s){return i[s]=r[s]}),i},e}(dr);var ff=new lf;var pf=function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(s){s(i)})}return new(r||(r=Promise))(function(i,s){function u(f){try{a(n.next(f))}catch(p){s(p)}}function c(f){try{a(n.throw(f))}catch(p){s(p)}}function a(f){f.done?i(f.value):o(f.value).then(u,c)}a((n=n.apply(t,e||[])).next())})},df=function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(a){return function(f){return c([a,f])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=a[0]&2?o.return:a[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,a[1])).done)return i;switch(o=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,o=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){r.label=a[1];break}if(a[0]===6&&r.label<i[1]){r.label=i[1],i=a;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(a);break}i[2]&&r.ops.pop(),r.trys.pop();continue}a=e.call(t,r)}catch(f){a=[6,f],o=0}finally{n=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},_f=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,i=[],s;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){s={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return i},Na=function(){function t(e,r){this._meterProviderSharedState=e,this._instrumentationScope=r,this.metricStorageRegistry=new va,this.observableRegistry=new Pa,this.meter=new Ta(this)}return t.prototype.registerMetricStorage=function(e){var r=this._registerMetricStorage(e,Ia);return r.length===1?r[0]:new Aa(r)},t.prototype.registerAsyncMetricStorage=function(e){var r=this._registerMetricStorage(e,ya);return r},t.prototype.collect=function(e,r,n){return pf(this,void 0,void 0,function(){var o,i,s;return df(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(e),i.length===0?[2,null]:(s=i.map(function(c){return c.collect(e,r)}).filter(ta),s.length===0?[2,{errors:o}]:[2,{scopeMetrics:{scope:this._instrumentationScope,metrics:s},errors:o}])}})})},t.prototype._registerMetricStorage=function(e,r){var n=this,o=this._meterProviderSharedState.viewRegistry.findViews(e,this._instrumentationScope),i=o.map(function(c){var a=ua(c,e),f=n.metricStorageRegistry.findOrUpdateCompatibleStorage(a);if(f!=null)return f;var p=c.aggregation.createAggregator(a),_=new r(a,p,c.attributesProcessor,n._meterProviderSharedState.metricCollectors);return n.metricStorageRegistry.register(_),_});if(i.length===0){var s=this._meterProviderSharedState.selectAggregations(e.type),u=s.map(function(c){var a=_f(c,2),f=a[0],p=a[1],_=n.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(f,e);if(_!=null)return _;var S=p.createAggregator(e),x=new r(e,S,dr.Noop(),[f]);return n.metricStorageRegistry.registerForCollector(f,x),x});i=i.concat(u)}return i},t}();var hf=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},wa=function(){function t(e){this.resource=e,this.viewRegistry=new la,this.metricCollectors=[],this.meterSharedStates=new Map}return t.prototype.getMeterSharedState=function(e){var r=na(e),n=this.meterSharedStates.get(r);return n==null&&(n=new Na(this,e),this.meterSharedStates.set(r,n)),n},t.prototype.selectAggregations=function(e){var r,n,o=[];try{for(var i=hf(this.metricCollectors),s=i.next();!s.done;s=i.next()){var u=s.value;o.push([u,u.selectAggregation(e)])}}catch(c){r={error:c}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return o},t}();var Ma=g(I()),_r=function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(s){s(i)})}return new(r||(r=Promise))(function(i,s){function u(f){try{a(n.next(f))}catch(p){s(p)}}function c(f){try{a(n.throw(f))}catch(p){s(p)}}function a(f){f.done?i(f.value):o(f.value).then(u,c)}a((n=n.apply(t,e||[])).next())})},hr=function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(a){return function(f){return c([a,f])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=a[0]&2?o.return:a[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,a[1])).done)return i;switch(o=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,o=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){r.label=a[1];break}if(a[0]===6&&r.label<i[1]){r.label=i[1],i=a;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(a);break}i[2]&&r.ops.pop(),r.trys.pop();continue}a=e.call(t,r)}catch(f){a=[6,f],o=0}finally{n=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Ef=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,i=[],s;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){s={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return i},mf=function(t,e,r){if(r||arguments.length===2)for(var n=0,o=e.length,i;n<o;n++)(i||!(n in e))&&(i||(i=Array.prototype.slice.call(e,0,n)),i[n]=e[n]);return t.concat(i||Array.prototype.slice.call(e))},xa=function(){function t(e,r){this._sharedState=e,this._metricReader=r}return t.prototype.collect=function(e){return _r(this,void 0,void 0,function(){var r,n,o,i,s=this;return hr(this,function(u){switch(u.label){case 0:return r=(0,Ma.millisToHrTime)(Date.now()),n=[],o=[],i=Array.from(this._sharedState.meterSharedStates.values()).map(function(c){return _r(s,void 0,void 0,function(){var a;return hr(this,function(f){switch(f.label){case 0:return[4,c.collect(this,r,e)];case 1:return a=f.sent(),a?.scopeMetrics!=null&&n.push(a.scopeMetrics),a?.errors!=null&&o.push.apply(o,mf([],Ef(a.errors),!1)),[2]}})})}),[4,Promise.all(i)];case 1:return u.sent(),[2,{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:n},errors:o}]}})})},t.prototype.forceFlush=function(e){return _r(this,void 0,void 0,function(){return hr(this,function(r){switch(r.label){case 0:return[4,this._metricReader.forceFlush(e)];case 1:return r.sent(),[2]}})})},t.prototype.shutdown=function(e){return _r(this,void 0,void 0,function(){return hr(this,function(r){switch(r.label){case 0:return[4,this._metricReader.shutdown(e)];case 1:return r.sent(),[2]}})})},t.prototype.selectAggregationTemporality=function(e){return this._metricReader.selectAggregationTemporality(e)},t.prototype.selectAggregation=function(e){return this._metricReader.selectAggregation(e)},t}();var Da=function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(s){s(i)})}return new(r||(r=Promise))(function(i,s){function u(f){try{a(n.next(f))}catch(p){s(p)}}function c(f){try{a(n.throw(f))}catch(p){s(p)}}function a(f){f.done?i(f.value):o(f.value).then(u,c)}a((n=n.apply(t,e||[])).next())})},Ua=function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(a){return function(f){return c([a,f])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=a[0]&2?o.return:a[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,a[1])).done)return i;switch(o=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,o=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){r.label=a[1];break}if(a[0]===6&&r.label<i[1]){r.label=i[1],i=a;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(a);break}i[2]&&r.ops.pop(),r.trys.pop();continue}a=e.call(t,r)}catch(f){a=[6,f],o=0}finally{n=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Tf=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Cn=function(){function t(e){var r,n,o;this._shutdown=!1;var i=F.default().merge((o=e?.resource)!==null&&o!==void 0?o:F.empty());if(this._sharedState=new wa(i),e?.views!=null&&e.views.length>0)try{for(var s=Tf(e.views),u=s.next();!u.done;u=s.next()){var c=u.value;this._sharedState.viewRegistry.addView(c)}}catch(a){r={error:a}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}}return t.prototype.getMeter=function(e,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:e,version:r,schemaUrl:n.schemaUrl}).meter},t.prototype.addMetricReader=function(e){var r=new xa(this._sharedState,e);e.setMetricProducer(r),this._sharedState.metricCollectors.push(r)},t.prototype.shutdown=function(e){return Da(this,void 0,void 0,function(){return Ua(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(e)}))]);case 1:return r.sent(),[2]}})})},t.prototype.forceFlush=function(e){return Da(this,void 0,void 0,function(){return Ua(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(e)}))];case 1:return r.sent(),[2]}})})},t}();var ci=g(me(),1),wr=g(Pt(),1),yu=g(Ha(),1),Pe=g(I(),1);E();var Of=Symbol.for("@vercel/request-context");function ne(){return globalThis[Of]?.get()}var Mn=g(me(),1);function Tr(t){return Object.fromEntries(Object.entries(t).filter(([e,r])=>r!==void 0))}function Fa(t){return t?t.split("::").at(-1):void 0}function ja(t=ne(),e){if(!t)return;let r=e?bf(e,t.headers):void 0;return Tr({[Mn.SemanticAttributes.HTTP_HOST]:t.headers.host,[Mn.SemanticAttributes.HTTP_USER_AGENT]:t.headers["user-agent"],"http.referer":t.headers.referer,"vercel.request_id":Fa(t.headers["x-vercel-id"]),"vercel.matched_path":t.headers["x-matched-path"],"vercel.edge_region":process.env.VERCEL_REGION,...r})}var Rf={keys(t){return[]},get(t,e){return t[e.toLocaleLowerCase()]}};function bf(t,e){if(typeof t=="function")return t(e,Rf);let r={};for(let[n,o]of Object.entries(t)){let i=e[o.toLocaleLowerCase()];i!==void 0&&(r[n]=i)}return r}E();function _t(t){return(t&l.TraceFlags.SAMPLED)!==0}var Sr=class{constructor(e,r){this.processors=e;this.attributesFromHeaders=r;this.rootSpanIds=new Map;this.waitSpanEnd=new Map}forceFlush(){return Promise.all(this.processors.map(e=>e.forceFlush().catch(r=>{l.diag.error("@vercel/otel: forceFlush failed:",r)}))).then(()=>{})}shutdown(){return Promise.all(this.processors.map(e=>e.shutdown().catch(()=>{}))).then(()=>{})}onStart(e,r){let{traceId:n,spanId:o,traceFlags:i}=e.spanContext(),s=!e.parentSpanId||!this.rootSpanIds.has(n);if(s?this.rootSpanIds.set(n,{rootSpanId:o,open:[]}):this.rootSpanIds.get(n)?.open.push(e),s&&_t(i)){let u=ne(),c=ja(u,this.attributesFromHeaders);c&&e.setAttributes(c),u&&u.waitUntil(async()=>{if(this.rootSpanIds.has(n)){let a=new Promise(p=>{this.waitSpanEnd.set(n,p)}),f;await Promise.race([a,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(e,r)}onEnd(e){let{traceId:r,spanId:n,traceFlags:o}=e.spanContext(),i=_t(o),s=this.rootSpanIds.get(r),u=s?.rootSpanId===n;if(i){let c=Pf(e);c&&Object.assign(e.attributes,c)}if(u){if(this.rootSpanIds.delete(r),s.open.length>0){for(let c of s.open)if(!c.ended&&c.spanContext().spanId!==n)try{c.end()}catch(a){l.diag.error("@vercel/otel: onEnd failed:",a)}}}else if(s)for(let c=0;c<s.open.length;c++)s.open[c]?.spanContext().spanId===n&&s.open.splice(c,1);for(let c of this.processors)c.onEnd(e);if(u){let c=this.waitSpanEnd.get(r);c&&(this.waitSpanEnd.delete(r),c())}}},Lf={[l.SpanKind.INTERNAL]:"internal",[l.SpanKind.SERVER]:"server",[l.SpanKind.CLIENT]:"client",[l.SpanKind.PRODUCER]:"producer",[l.SpanKind.CONSUMER]:"consumer"};function Pf(t){let{kind:e,attributes:r}=t,{"operation.name":n,"resource.name":o,"span.type":i,"next.span_type":s,"http.method":u,"http.route":c}=r;if(n)return;let a=o??(u&&typeof u=="string"&&c&&typeof c=="string"?`${u} ${c}`:c);if(t.kind===l.SpanKind.SERVER&&u&&c&&typeof u=="string"&&typeof c=="string")return{"operation.name":"web.request","resource.name":a};let f=t.instrumentationLibrary.name,p=s??i;if(p&&typeof p=="string"){let _=ka(f,p);return c?{"operation.name":_,"resource.name":a}:{"operation.name":_}}return{"operation.name":ka(f,e===l.SpanKind.INTERNAL?"":Lf[e])}}function ka(t,e){if(!t)return e;let r=t.replace(/[ @./]/g,"_");return r.startsWith("_")&&(r=r.slice(1)),e?`${r}.${e}`:r}var is=g(Hn(),1);var ns=g(rs(),1);E();var Qe=class extends ns.OTLPExporterBase{constructor(e={}){super(e),e.headers&&(this._headers=e.headers)}onShutdown(){l.diag.debug("@vercel/otel/otlp: onShutdown")}onInit(){l.diag.debug("@vercel/otel/otlp: onInit")}send(e,r,n){if(this._shutdownOnce.isCalled){l.diag.debug("@vercel/otel/otlp: Shutdown already started. Cannot send objects");return}let o=this.convert(e),i,s,u;try{({body:i,contentType:s,headers:u}=this.toMessage(o))}catch(a){l.diag.warn("@vercel/otel/otlp: no proto",a);return}let c=fetch(this.url,{method:"POST",body:i,headers:{...this._headers,...u,"Content-Type":s,"User-Agent":"OTel-OTLP-Exporter-JavaScript/0.46.0"},next:{internal:!0}}).then(a=>{l.diag.debug("@vercel/otel/otlp: onSuccess",a.status,a.statusText),r(),a.arrayBuffer().catch(()=>{})}).catch(a=>{l.diag.error("@vercel/otel/otlp: onError",a),n(a)}).finally(()=>{let a=this._sendingPromises.indexOf(c);this._sendingPromises.splice(a,1)});this._sendingPromises.push(c)}getDefaultUrl(e){throw new Error("Method not implemented.")}};var zf="v1/traces",$f=`http://localhost:4318/${zf}`;function Ar(t){return typeof t.url=="string"?t.url:$f}var Ze=class{constructor(e={}){this.impl=new qn(e)}export(e,r){this.impl.export(e,r)}shutdown(){return this.impl.shutdown()}forceFlush(){return this.impl.forceFlush()}},qn=class extends Qe{convert(e){return(0,is.createExportTraceServiceRequest)(e,{useHex:!0,useLongBits:!1})}toMessage(e){return{body:JSON.stringify(e),contentType:"application/json"}}getDefaultUrl(e){return Ar(e)}};var au=g(Hn(),1);var nu=g(ru(),1);function iu(t){let e=new nu.Writer;return sp(t,e),e.finish()}function sp(t,e){if(t.resourceSpans!=null&&t.resourceSpans.length)for(let r=0;r<t.resourceSpans.length;++r)up(t.resourceSpans[r],e.uint32(10).fork()).ldelim();return e}function up(t,e){if(t.resource!=null&&cp(t.resource,e.uint32(10).fork()).ldelim(),t.scopeSpans!=null&&t.scopeSpans.length)for(let r=0;r<t.scopeSpans.length;++r)lp(t.scopeSpans[r],e.uint32(18).fork()).ldelim();return t.schemaUrl!=null&&e.uint32(26).string(t.schemaUrl),e}function cp(t,e){if(t.attributes!=null&&t.attributes.length)for(let r=0;r<t.attributes.length;++r)et(t.attributes[r],e.uint32(10).fork()).ldelim();return t.droppedAttributesCount!=null&&e.uint32(16).uint32(t.droppedAttributesCount),e}function lp(t,e){if(t.scope!=null&&dp(t.scope,e.uint32(10).fork()).ldelim(),t.spans!=null&&t.spans.length)for(let r=0;r<t.spans.length;++r)_p(t.spans[r],e.uint32(18).fork()).ldelim();return t.schemaUrl!=null&&e.uint32(26).string(t.schemaUrl),e}function et(t,e){return t.key!=null&&e.uint32(10).string(t.key),t.value!=null&&ou(t.value,e.uint32(18).fork()).ldelim(),e}function ou(t,e){return t.stringValue!=null&&e.uint32(10).string(t.stringValue),t.boolValue!=null&&e.uint32(16).bool(t.boolValue),t.intValue!=null&&e.uint32(24).int64(t.intValue),t.doubleValue!=null&&e.uint32(33).double(t.doubleValue),t.arrayValue!=null&&fp(t.arrayValue,e.uint32(42).fork()).ldelim(),t.kvlistValue!=null&&pp(t.kvlistValue,e.uint32(50).fork()).ldelim(),t.bytesValue!=null&&e.uint32(58).bytes(t.bytesValue),e}function fp(t,e){if(t.values!=null&&t.values.length)for(let r=0;r<t.values.length;++r)ou(t.values[r],e.uint32(10).fork()).ldelim();return e}function pp(t,e){if(t.values!=null&&t.values.length)for(let r=0;r<t.values.length;++r)et(t.values[r],e.uint32(10).fork()).ldelim();return e}function dp(t,e){if(t.name!=null&&e.uint32(10).string(t.name),t.version!=null&&e.uint32(18).string(t.version),t.attributes!=null&&t.attributes.length)for(let r=0;r<t.attributes.length;++r)et(t.attributes[r],e.uint32(26).fork()).ldelim();return t.droppedAttributesCount!=null&&e.uint32(32).uint32(t.droppedAttributesCount),e}function _p(t,e){if(t.traceId!=null&&e.uint32(10).bytes(t.traceId),t.spanId!=null&&e.uint32(18).bytes(t.spanId),t.traceState!=null&&e.uint32(26).string(t.traceState),t.parentSpanId!=null&&e.uint32(34).bytes(t.parentSpanId),t.name!=null&&e.uint32(42).string(t.name),t.kind!=null&&e.uint32(48).int32(t.kind),t.startTimeUnixNano!=null&&e.uint32(57).fixed64(t.startTimeUnixNano),t.endTimeUnixNano!=null&&e.uint32(65).fixed64(t.endTimeUnixNano),t.attributes!=null&&t.attributes.length)for(let r=0;r<t.attributes.length;++r)et(t.attributes[r],e.uint32(74).fork()).ldelim();if(t.droppedAttributesCount!=null&&e.uint32(80).uint32(t.droppedAttributesCount),t.events!=null&&t.events.length)for(let r=0;r<t.events.length;++r)Ep(t.events[r],e.uint32(90).fork()).ldelim();if(t.droppedEventsCount!=null&&e.uint32(96).uint32(t.droppedEventsCount),t.links!=null&&t.links.length)for(let r=0;r<t.links.length;++r)mp(t.links[r],e.uint32(106).fork()).ldelim();return t.droppedLinksCount!=null&&e.uint32(112).uint32(t.droppedLinksCount),t.status!=null&&hp(t.status,e.uint32(122).fork()).ldelim(),e}function hp(t,e){return t.message!=null&&e.uint32(18).string(t.message),t.code!=null&&e.uint32(24).int32(t.code),e}function Ep(t,e){if(t.timeUnixNano!=null&&e.uint32(9).fixed64(t.timeUnixNano),t.name!=null&&e.uint32(18).string(t.name),t.attributes!=null&&t.attributes.length)for(let r=0;r<t.attributes.length;++r)et(t.attributes[r],e.uint32(26).fork()).ldelim();return t.droppedAttributesCount!=null&&e.uint32(32).uint32(t.droppedAttributesCount),e}function mp(t,e){if(t.traceId!=null&&e.uint32(10).bytes(t.traceId),t.spanId!=null&&e.uint32(18).bytes(t.spanId),t.traceState!=null&&e.uint32(26).string(t.traceState),t.attributes!=null&&t.attributes.length)for(let r=0;r<t.attributes.length;++r)et(t.attributes[r],e.uint32(34).fork()).ldelim();return t.droppedAttributesCount!=null&&e.uint32(40).uint32(t.droppedAttributesCount),e}var Ve=class{constructor(e={}){this.impl=new ii(e)}export(e,r){this.impl.export(e,r)}shutdown(){return this.impl.shutdown()}forceFlush(){return this.impl.forceFlush()}},ii=class extends Qe{convert(e){return(0,au.createExportTraceServiceRequest)(e,void 0)}toMessage(e){return{body:iu(e),contentType:"application/x-protobuf",headers:{accept:"application/x-protobuf"}}}getDefaultUrl(e){return Ar(e)}};E();var fe=g(me(),1);function su(t,e){return t.replace(/\{(?<temp1>[^{}]+)\}/g,(r,n)=>{let o=e[n];return o!==void 0?String(o):r})}var tt=class{constructor(e={}){this.instrumentationName="@vercel/otel/fetch";this.instrumentationVersion="1.0.0";this.config=e}getConfig(){return this.config}setConfig(){}setTracerProvider(e){this.tracerProvider=e}setMeterProvider(){}enable(){this.disable();let{tracerProvider:e}=this;if(!e)return;let r=e.getTracer(this.instrumentationName,this.instrumentationVersion),n=this.config.ignoreUrls??[],o=(O,B)=>{if(B?.opentelemetry?.ignore!==void 0)return B.opentelemetry.ignore;if(n.length===0)return!1;let m=O.toString();return n.some(v=>typeof v=="string"?v==="*"?!0:m.startsWith(v):v.test(m))},i=process.env.VERCEL_URL||process.env.NEXT_PUBLIC_VERCEL_URL||null,s=process.env.VERCEL_BRANCH_URL||process.env.NEXT_PUBLIC_VERCEL_BRANCH_URL||null,u=this.config.propagateContextUrls??[],c=this.config.dontPropagateContextUrls??[],a=this.config.resourceNameTemplate,{attributesFromRequestHeaders:f,attributesFromResponseHeaders:p}=this.config,_=(O,B)=>{if(B?.opentelemetry?.propagateContext)return B.opentelemetry.propagateContext;let m=O.toString();return c.length>0&&c.some(v=>typeof v=="string"?v==="*"?!0:m.startsWith(v):v.test(m))?!1:i&&O.protocol==="https:"&&(O.host===i||O.host===s||O.host===ne()?.headers.host)||!i&&O.protocol==="http:"&&O.hostname==="localhost"?!0:u.some(v=>typeof v=="string"?v==="*"?!0:m.startsWith(v):v.test(m))};process.env.NEXT_OTEL_FETCH_DISABLED="1";let S=globalThis.fetch;this.originalFetch=S;let x=async(O,B)=>{let m=B;if(m?.next?.internal)return S(O,m);let v=new Request(O instanceof Request?O.clone():O,m),Y=new URL(v.url);if(o(Y,m))return S(O,m);let gt={[fe.SemanticAttributes.HTTP_METHOD]:v.method,[fe.SemanticAttributes.HTTP_URL]:v.url,[fe.SemanticAttributes.HTTP_HOST]:Y.host,[fe.SemanticAttributes.HTTP_SCHEME]:Y.protocol.replace(":",""),[fe.SemanticAttributes.NET_PEER_NAME]:Y.hostname,[fe.SemanticAttributes.NET_PEER_PORT]:Y.port},Mr=a?su(a,gt):Sp(v.url),yt=m?.opentelemetry?.spanName??`fetch ${v.method} ${v.url}`,li=l.context.active(),D=r.startSpan(yt,{kind:l.SpanKind.CLIENT,attributes:{...gt,"operation.name":`fetch.${v.method}`,"resource.name":Mr,...m?.opentelemetry?.attributes}},li);if(!D.isRecording()||!_t(D.spanContext().traceFlags))return D.end(),S(O,m);if(_(Y,m)){let He=l.trace.setSpan(li,D);l.propagation.inject(He,v.headers,Tp)}f&&uu(D,f,v.headers);try{let He=Date.now();m?.body&&m.body instanceof FormData&&v.headers.delete("content-type");let pe=await S(O,{...m,headers:v.headers}),Au=Date.now()-He;return D.setAttribute(fe.SemanticAttributes.HTTP_STATUS_CODE,pe.status),D.setAttribute("http.response_time",Au),p&&uu(D,p,pe.headers),pe.status>=500&&oi(D,`Status: ${pe.status} (${pe.statusText})`),pe.body?gp(pe).then(xr=>{D.isRecording()&&(D.setAttribute(fe.SemanticAttributes.HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED,xr),D.end())},xr=>{D.isRecording()&&(oi(D,xr),D.end())}):D.end(),pe}catch(He){throw oi(D,He),D.end(),He}};globalThis.fetch=x}disable(){this.originalFetch&&(globalThis.fetch=this.originalFetch)}},Tp={set(t,e,r){t.set(e,r)}};function Sp(t){let e=t.indexOf("?");return e===-1?t:t.substring(0,e)}function gp(t){let e=0,n=t.clone().body?.getReader();if(!n)return Promise.resolve(0);let o=()=>n.read().then(({done:i,value:s})=>{if(!i)return e+=s.byteLength,o()});return o().then(()=>e)}function oi(t,e){if(e instanceof Error)t.recordException(e),t.setStatus({code:l.SpanStatusCode.ERROR,message:e.message});else{let r=String(e);t.setStatus({code:l.SpanStatusCode.ERROR,message:r})}}function uu(t,e,r){for(let[n,o]of Object.entries(e)){let i=r.get(o);i!==null&&t.setAttribute(n,i)}}E();var cu=g(I(),1),yp="00",ai="traceparent",si="tracestate",St=class{fields(){return[ai,si]}inject(e,r,n){let o=l.trace.getSpanContext(e);if(!o||(0,cu.isTracingSuppressed)(e)||!(0,l.isSpanContextValid)(o))return;let i=`${yp}-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||0).toString(16)}`;n.set(r,ai,i),o.traceState&&n.set(r,si,o.traceState.serialize())}extract(e,r,n){let o=n.get(r,ai);if(!o)return e;let i=Array.isArray(o)?o[0]:o;if(typeof i!="string")return e;let s=vp(i);if(!s)return e;s.isRemote=!0;let u=n.get(r,si);if(u){let c=Array.isArray(u)?u.join(","):u;s.traceState=(0,l.createTraceState)(typeof c=="string"?c:void 0)}return l.trace.setSpanContext(e,s)}};function vp(t){let[e,r,n,o,i]=t.split("-");return!e||!r||!n||!o||e.length!==2||r.length!==32||n.length!==16||o.length!==2||e==="00"&&i?null:{traceId:r,spanId:n,traceFlags:parseInt(o,16)}}E();var Pr=class{fields(){return[]}inject(){}extract(e){let r=ne();if(!r?.telemetry)return l.diag.warn("@vercel/otel: Vercel telemetry extension not found."),e;let{rootSpanContext:n}=r.telemetry;return n?(l.diag.debug("@vercel/otel: Extracted root SpanContext from Vercel request context.",n),l.trace.setSpanContext(e,{...n,isRemote:!0,traceFlags:n.traceFlags||l.TraceFlags.SAMPLED})):e}};E();var Ir=g(I(),1);var rt=g(I()),Ap=BigInt(1e9);function fu(t){return BigInt(t[0])*Ap+BigInt(t[1])}function Op(t){var e=Number(BigInt.asUintN(32,t)),r=Number(BigInt.asUintN(32,t>>BigInt(32)));return{low:e,high:r}}function pu(t){var e=fu(t);return Op(e)}function Rp(t){var e=fu(t);return e.toString()}var bp=typeof BigInt<"u"?Rp:rt.hrTimeToNanoseconds;function lu(t){return t}function du(t){if(t!==void 0)return(0,rt.hexToBase64)(t)}var Lp={encodeHrTime:pu,encodeSpanContext:rt.hexToBase64,encodeOptionalSpanContext:du};function _u(t){var e,r;if(t===void 0)return Lp;var n=(e=t.useLongBits)!==null&&e!==void 0?e:!0,o=(r=t.useHex)!==null&&r!==void 0?r:!1;return{encodeHrTime:n?pu:bp,encodeSpanContext:o?lu:rt.hexToBase64,encodeOptionalSpanContext:o?lu:du}}var Pp=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,i=[],s;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){s={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return i};function nt(t){return Object.keys(t).map(function(e){return hu(e,t[e])})}function hu(t,e){return{key:t,value:Eu(e)}}function Eu(t){var e=typeof t;return e==="string"?{stringValue:t}:e==="number"?Number.isInteger(t)?{intValue:t}:{doubleValue:t}:e==="boolean"?{boolValue:t}:t instanceof Uint8Array?{bytesValue:t}:Array.isArray(t)?{arrayValue:{values:t.map(Eu)}}:e==="object"&&t!=null?{kvlistValue:{values:Object.entries(t).map(function(r){var n=Pp(r,2),o=n[0],i=n[1];return hu(o,i)})}}:{}}function mu(t,e){var r,n=t.spanContext(),o=t.status;return{traceId:e.encodeSpanContext(n.traceId),spanId:e.encodeSpanContext(n.spanId),parentSpanId:e.encodeOptionalSpanContext(t.parentSpanId),traceState:(r=n.traceState)===null||r===void 0?void 0:r.serialize(),name:t.name,kind:t.kind==null?0:t.kind+1,startTimeUnixNano:e.encodeHrTime(t.startTime),endTimeUnixNano:e.encodeHrTime(t.endTime),attributes:nt(t.attributes),droppedAttributesCount:t.droppedAttributesCount,events:t.events.map(function(i){return Cp(i,e)}),droppedEventsCount:t.droppedEventsCount,status:{code:o.code,message:o.message},links:t.links.map(function(i){return Ip(i,e)}),droppedLinksCount:t.droppedLinksCount}}function Ip(t,e){var r;return{attributes:t.attributes?nt(t.attributes):[],spanId:e.encodeSpanContext(t.context.spanId),traceId:e.encodeSpanContext(t.context.traceId),traceState:(r=t.context.traceState)===null||r===void 0?void 0:r.serialize(),droppedAttributesCount:t.droppedAttributesCount||0}}function Cp(t,e){return{attributes:t.attributes?nt(t.attributes):[],name:t.name,timeUnixNano:e.encodeHrTime(t.time),droppedAttributesCount:t.droppedAttributesCount||0}}var Np=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},wp=function(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),o,i=[],s;try{for(;(e===void 0||e-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){s={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return i};function ui(t,e){var r=_u(e);return{resourceSpans:xp(t,r)}}function Mp(t){var e,r,n=new Map;try{for(var o=Np(t),i=o.next();!i.done;i=o.next()){var s=i.value,u=n.get(s.resource);u||(u=new Map,n.set(s.resource,u));var c=s.instrumentationLibrary.name+"@"+(s.instrumentationLibrary.version||"")+":"+(s.instrumentationLibrary.schemaUrl||""),a=u.get(c);a||(a=[],u.set(c,a)),a.push(s)}}catch(f){e={error:f}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return n}function xp(t,e){for(var r=Mp(t),n=[],o=r.entries(),i=o.next();!i.done;){for(var s=wp(i.value,2),u=s[0],c=s[1],a=[],f=c.values(),p=f.next();!p.done;){var _=p.value;if(_.length>0){var S=_[0].instrumentationLibrary,x=S.name,O=S.version,B=S.schemaUrl,m=_.map(function(Y){return mu(Y,e)});a.push({scope:{name:x,version:O},spans:m,schemaUrl:B})}p=f.next()}var v={resource:{attributes:nt(u.attributes),droppedAttributesCount:0},scopeSpans:a,schemaUrl:void 0};n.push(v),i=o.next()}return n}var Cr=class{export(e,r){let n=ne();if(!n?.telemetry){l.diag.warn("@vercel/otel: no telemetry context found"),r({code:Ir.ExportResultCode.SUCCESS,error:void 0});return}try{let o=ui(e,{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()}};var Dp={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(e={}){this.configuration=e}start(){let e=Up(),r=this.configuration,n=process.env.NEXT_RUNTIME||"nodejs",o=!!e.OTEL_SDK_DISABLED;if(process.env.OTEL_LOG_LEVEL&&l.diag.setLogger(new l.DiagConsoleLogger,{logLevel:Dp[process.env.OTEL_LOG_LEVEL.toUpperCase()]}),o)return;let i=r.idGenerator??new nr,s=r.contextManager??new yu.AsyncLocalStorageContextManager;s.enable(),this.contextManager=s;let u=e.OTEL_SERVICE_NAME||r.serviceName||"app",c=new F(Tr({[ci.SemanticResourceAttributes.SERVICE_NAME]: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,[ci.SemanticResourceAttributes.SERVICE_VERSION]:process.env.VERCEL_DEPLOYMENT_ID,...r.attributes})),a=r.resourceDetectors??[wo];if(r.autoDetectResources??!0){let m={detectors:a};c=c.merge(xo(m))}let p=Gp(r.propagators,r,e),_=Vp(r.traceSampler,e),S=Hp(r.spanProcessors,r,e);S.length===0&&l.diag.warn("@vercel/otel: No span processors configured. No spans will be exported.");let x=r.spanLimits,O=new Go({resource:c,idGenerator:i,sampler:_,spanLimits:x});if(O.addSpanProcessor(new Sr(S,r.attributesFromHeaders)),O.register({contextManager:s,propagator:new Pe.CompositePropagator({propagators:p})}),this.tracerProvider=O,r.logRecordProcessor){let m=new yn({resource:c});this.loggerProvider=m,m.addLogRecordProcessor(r.logRecordProcessor),se.logs.setGlobalLoggerProvider(m)}if(r.metricReader||r.views){let m=new Cn({resource:c,views:r.views??[]});r.metricReader&&m.addMetricReader(r.metricReader),l.metrics.setGlobalMeterProvider(m),this.meterProvider=m}let B=Bp(r.instrumentations,r.instrumentationConfig);this.disableInstrumentations=(0,gu.registerInstrumentations)({instrumentations:B}),l.diag.info("@vercel/otel: started",u,n)}async shutdown(){let e=[];this.tracerProvider&&e.push(this.tracerProvider.shutdown()),this.loggerProvider&&e.push(this.loggerProvider.shutdown()),this.meterProvider&&e.push(this.meterProvider.shutdown()),l.diag.info("@vercel/otel: shutting down",e.length,process.env.NEXT_RUNTIME),await Promise.all(e),this.contextManager&&this.contextManager.disable();let{disableInstrumentations:r}=this;r&&r()}};function Up(){let t=(0,wr.parseEnvironment)(process.env);return{...wr.DEFAULT_ENVIRONMENT,...t}}function Bp(t,e){return(t??["auto"]).map(r=>r==="auto"?(l.diag.debug("@vercel/otel: Configure instrumentations: fetch",e?.fetch),[new tt(e?.fetch)]):r==="fetch"?(l.diag.debug("@vercel/otel: Configure instrumentations: fetch",e?.fetch),new tt(e?.fetch)):r).flat()}function Gp(t,e,r){let n=process.env.OTEL_PROPAGATORS&&r.OTEL_PROPAGATORS&&r.OTEL_PROPAGATORS.length>0?r.OTEL_PROPAGATORS:void 0;return(t??n??["auto"]).map(o=>{if(o==="none")return[];if(o==="auto"){let i=[];return i.push({name:"tracecontext",propagator:new St}),i.push({name:"baggage",propagator:new Pe.W3CBaggagePropagator}),i.push({name:"vercel-runtime",propagator:new Pr}),l.diag.debug(`@vercel/otel: Configure propagators: ${i.map(s=>s.name).join(", ")}`),i.map(s=>s.propagator)}if(o==="tracecontext")return l.diag.debug("@vercel/otel: Configure propagator: tracecontext"),new St;if(o==="baggage")return l.diag.debug("@vercel/otel: Configure propagator: baggage"),new Pe.W3CBaggagePropagator;if(typeof o=="string")throw new Error(`Unknown propagator: "${o}"`);return o}).flat()}var Tu="always_on",it=1;function Vp(t,e){if(t&&typeof t!="string")return t;let r=t&&t!=="auto"?t:e.OTEL_TRACES_SAMPLER||Tu;switch(l.diag.debug("@vercel/otel: Configure sampler: ",r),r){case"always_on":return new X;case"always_off":return new ae;case"parentbased_always_on":return new Se({root:new X});case"parentbased_always_off":return new Se({root:new ae});case"traceidratio":return new Xe(Su(e));case"parentbased_traceidratio":return new Se({root:new Xe(Su(e))});default:return l.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER value "${String(e.OTEL_TRACES_SAMPLER)} invalid, defaulting to ${Tu}".`),new X}}function Su(t){if(t.OTEL_TRACES_SAMPLER_ARG===void 0||t.OTEL_TRACES_SAMPLER_ARG==="")return l.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${it}.`),it;l.diag.debug("@vercel/otel: Configure sampler probability: ",t.OTEL_TRACES_SAMPLER_ARG);let e=Number(t.OTEL_TRACES_SAMPLER_ARG);return isNaN(e)?(l.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG=${t.OTEL_TRACES_SAMPLER_ARG} was given, but it is invalid, defaulting to ${it}.`),it):e<0||e>1?(l.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER_ARG=${t.OTEL_TRACES_SAMPLER_ARG} was given, but it is out of range ([0..1]), defaulting to ${it}.`),it):e}function Hp(t,e,r){return[...(t??["auto"]).flatMap(n=>{if(n==="auto"){let o=[new De(new Cr)];if(process.env.VERCEL_OTEL_ENDPOINTS){let i=process.env.VERCEL_OTEL_ENDPOINTS_PORT||"4318",s=process.env.VERCEL_OTEL_ENDPOINTS_PROTOCOL||"http/protobuf";l.diag.debug("@vercel/otel: Configure vercel otel collector on port: ",i,s);let u={url:`http://localhost:${i}/v1/traces`,headers:{}},c=s==="http/protobuf"?new Ve(u):new Ze(u);o.push(new De(c))}else if(!e.traceExporter||e.traceExporter==="auto"||r.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT||r.OTEL_EXPORTER_OTLP_ENDPOINT)return new De(Fp(r));return o}return n}).filter(qp),...e.traceExporter&&e.traceExporter!=="auto"?[new De(e.traceExporter)]:[]]}function Fp(t){let e=process.env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL??process.env.OTEL_EXPORTER_OTLP_PROTOCOL??"http/protobuf",r=kp(t),n={...Pe.baggageUtils.parseKeyPairsIntoRecord(t.OTEL_EXPORTER_OTLP_HEADERS),...Pe.baggageUtils.parseKeyPairsIntoRecord(t.OTEL_EXPORTER_OTLP_TRACES_HEADERS)};switch(l.diag.debug("@vercel/otel: Configure trace exporter: ",e,r,`headers: ${Object.keys(n).join(",")||"<none>"}`),e){case"http/json":return new Ze({url:r,headers:n});case"http/protobuf":return new Ve({url:r,headers:n});default:return l.diag.warn(`@vercel/otel: Unsupported OTLP traces protocol: ${e}. Using http/protobuf.`),new Ve}}var vu="v1/traces",jp=`http://localhost:4318/${vu}`;function kp(t){let e=t.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT;if(e&&typeof e=="string")return e;let r=t.OTEL_EXPORTER_OTLP_ENDPOINT;return r&&typeof r=="string"?`${r}/${vu}`:jp}function qp(t){return t!=null}function hT(t){let e;t?typeof t=="string"?e={serviceName:t}:e=t:e={},new Nr(e).start()}export{tt as FetchInstrumentation,Ze as OTLPHttpJsonTraceExporter,Ve as OTLPHttpProtoTraceExporter,hT as registerOTel};
|
|
15
|
+
`,Rn(a,t),`To resolve the conflict:
|
|
16
|
+
`,On(a,t))}}catch(f){n={error:f}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}return i},e}();var va=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 Aa=function(){function e(t,r){this._instrumentName=t,this._valueType=r,this._buffer=new Q}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 Ra=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 Q,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(s){s(i)})}return new(r||(r=Promise))(function(i,s){function u(f){try{a(n.next(f))}catch(p){s(p)}}function c(f){try{a(n.throw(f))}catch(p){s(p)}}function a(f){f.done?i(f.value):o(f.value).then(u,c)}a((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,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(a){return function(f){return c([a,f])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=a[0]&2?o.return:a[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,a[1])).done)return i;switch(o=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,o=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){r.label=a[1];break}if(a[0]===6&&r.label<i[1]){r.label=i[1],i=a;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(a);break}i[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(f){a=[6,f],o=0}finally{n=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Oa=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){s={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return i},ba=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))},La=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,s;return Pn(this,function(u){switch(u.label){case 0:return n=this._observeCallbacks(t,r),o=this._observeBatchCallbacks(t,r),[4,na(ba(ba([],Oa(n),!1),Oa(o),!1))];case 1:return i=u.sent(),s=i.filter(ia).map(function(c){return c.reason}),[2,s]}})})},e.prototype._observeCallbacks=function(t,r){var n=this;return this._callbacks.map(function(o){var i=o.callback,s=o.instrument;return Ln(n,void 0,void 0,function(){var u,c;return Pn(this,function(a){switch(a.label){case 0:return u=new Aa(s._descriptor.name,s._descriptor.valueType),c=Promise.resolve(i(u)),r!=null&&(c=yn(c,r)),[4,c];case 1:return a.sent(),s._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,s=o.instruments;return Ln(n,void 0,void 0,function(){var u,c;return Pn(this,function(a){switch(a.label){case 0:return u=new Ra,c=Promise.resolve(i(u)),r!=null&&(c=yn(c,r)),[4,c];case 1:return a.sent(),s.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&&oa(n.instruments,r)})},e}();var Ef=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)}}(),Pa=function(e){Ef(t,e);function t(r,n,o,i){var s=e.call(this,r)||this;return s._attributesProcessor=o,s._deltaMetricStorage=new ur(n),s._temporalMetricStorage=new cr(n,i),s}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}(sr);var Ia=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)}}(),lr=function(){function e(){}return e.Noop=function(){return Tf},e}();var mf=function(e){Ia(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.process=function(r,n){return r},t}(lr);var uE=function(e){Ia(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(s){return o._allowedAttributeNames.includes(s)}).forEach(function(s){return i[s]=r[s]}),i},t}(lr);var Tf=new mf;var Sf=function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(s){s(i)})}return new(r||(r=Promise))(function(i,s){function u(f){try{a(n.next(f))}catch(p){s(p)}}function c(f){try{a(n.throw(f))}catch(p){s(p)}}function a(f){f.done?i(f.value):o(f.value).then(u,c)}a((n=n.apply(e,t||[])).next())})},gf=function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(a){return function(f){return c([a,f])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=a[0]&2?o.return:a[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,a[1])).done)return i;switch(o=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,o=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){r.label=a[1];break}if(a[0]===6&&r.label<i[1]){r.label=i[1],i=a;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(a);break}i[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(f){a=[6,f],o=0}finally{n=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},yf=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){s={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return i},Ca=function(){function e(t,r){this._meterProviderSharedState=t,this._instrumentationScope=r,this.metricStorageRegistry=new ya,this.observableRegistry=new La,this.meter=new ma(this)}return e.prototype.registerMetricStorage=function(t){var r=this._registerMetricStorage(t,Pa);return r.length===1?r[0]:new va(r)},e.prototype.registerAsyncMetricStorage=function(t){var r=this._registerMetricStorage(t,ga);return r},e.prototype.collect=function(t,r,n){return Sf(this,void 0,void 0,function(){var o,i,s;return gf(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]:(s=i.map(function(c){return c.collect(t,r)}).filter(ta),s.length===0?[2,{errors:o}]:[2,{scopeMetrics:{scope:this._instrumentationScope,metrics:s},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 a=sa(c,t),f=n.metricStorageRegistry.findOrUpdateCompatibleStorage(a);if(f!=null)return f;var p=c.aggregation.createAggregator(a),d=new r(a,p,c.attributesProcessor,n._meterProviderSharedState.metricCollectors);return n.metricStorageRegistry.register(d),d});if(i.length===0){var s=this._meterProviderSharedState.selectAggregations(t.type),u=s.map(function(c){var a=yf(c,2),f=a[0],p=a[1],d=n.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(f,t);if(d!=null)return d;var m=p.createAggregator(t),g=new r(t,m,lr.Noop(),[f]);return n.metricStorageRegistry.registerForCollector(f,g),g});i=i.concat(u)}return i},e}();var vf=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.")},Na=function(){function e(t){this.resource=t,this.viewRegistry=new ca,this.metricCollectors=[],this.meterSharedStates=new Map}return e.prototype.getMeterSharedState=function(t){var r=ra(t),n=this.meterSharedStates.get(r);return n==null&&(n=new Ca(this,t),this.meterSharedStates.set(r,n)),n},e.prototype.selectAggregations=function(t){var r,n,o=[];try{for(var i=vf(this.metricCollectors),s=i.next();!s.done;s=i.next()){var u=s.value;o.push([u,u.selectAggregation(t)])}}catch(c){r={error:c}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return o},e}();var wa=v(P()),fr=function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(s){s(i)})}return new(r||(r=Promise))(function(i,s){function u(f){try{a(n.next(f))}catch(p){s(p)}}function c(f){try{a(n.throw(f))}catch(p){s(p)}}function a(f){f.done?i(f.value):o(f.value).then(u,c)}a((n=n.apply(e,t||[])).next())})},pr=function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(a){return function(f){return c([a,f])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=a[0]&2?o.return:a[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,a[1])).done)return i;switch(o=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,o=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){r.label=a[1];break}if(a[0]===6&&r.label<i[1]){r.label=i[1],i=a;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(a);break}i[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(f){a=[6,f],o=0}finally{n=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},Af=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){s={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return i},Rf=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))},Ma=function(){function e(t,r){this._sharedState=t,this._metricReader=r}return e.prototype.collect=function(t){return fr(this,void 0,void 0,function(){var r,n,o,i,s=this;return pr(this,function(u){switch(u.label){case 0:return r=(0,wa.millisToHrTime)(Date.now()),n=[],o=[],i=Array.from(this._sharedState.meterSharedStates.values()).map(function(c){return fr(s,void 0,void 0,function(){var a;return pr(this,function(f){switch(f.label){case 0:return[4,c.collect(this,r,t)];case 1:return a=f.sent(),a?.scopeMetrics!=null&&n.push(a.scopeMetrics),a?.errors!=null&&o.push.apply(o,Rf([],Af(a.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 fr(this,void 0,void 0,function(){return pr(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 fr(this,void 0,void 0,function(){return pr(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 xa=function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(s){s(i)})}return new(r||(r=Promise))(function(i,s){function u(f){try{a(n.next(f))}catch(p){s(p)}}function c(f){try{a(n.throw(f))}catch(p){s(p)}}function a(f){f.done?i(f.value):o(f.value).then(u,c)}a((n=n.apply(e,t||[])).next())})},Da=function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(a){return function(f){return c([a,f])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=a[0]&2?o.return:a[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,a[1])).done)return i;switch(o=0,i&&(a=[a[0]&2,i.value]),a[0]){case 0:case 1:i=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,o=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){r.label=a[1];break}if(a[0]===6&&r.label<i[1]){r.label=i[1],i=a;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(a);break}i[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(f){a=[6,f],o=0}finally{n=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},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.")},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 Na(i),t?.views!=null&&t.views.length>0)try{for(var s=Of(t.views),u=s.next();!u.done;u=s.next()){var c=u.value;this._sharedState.viewRegistry.addView(c)}}catch(a){r={error:a}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}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 Ma(this._sharedState,t);t.setMetricProducer(r),this._sharedState.metricCollectors.push(r)},e.prototype.shutdown=function(t){return xa(this,void 0,void 0,function(){return Da(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 xa(this,void 0,void 0,function(){return Da(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(Oe(),1),Iu=v(Va(),1),Ot=v(P(),1);var Ha="http.method",Fa="http.url",hr="http.host",ja="http.scheme",wn="http.status_code",ka="http.user_agent",Mn="http.response_content_length_uncompressed",qa="net.peer.port",Xa="net.peer.name";var Ka="service.name",Wa="service.version";E();var Nf=Symbol.for("@vercel/request-context");function nt(){return globalThis[Nf]?.get()}function Er(e){return Object.fromEntries(Object.entries(e).filter(([t,r])=>r!==void 0))}function Ya(e){return e?e.split("::").at(-1):void 0}function za(e=nt(),t){if(!e)return;let r=t?Mf(t,e.headers):void 0;return Er({[hr]:e.headers.host,[ka]:e.headers["user-agent"],"http.referer":e.headers.referer,"vercel.request_id":Ya(e.headers["x-vercel-id"]),"vercel.matched_path":e.headers["x-matched-path"],"vercel.edge_region":process.env.VERCEL_REGION,...r})}var wf={keys(e){return[]},get(e,t){return e[t.toLocaleLowerCase()]}};function Mf(e,t){if(typeof e=="function")return e(t,wf);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(),s=!t.parentSpanId||!this.rootSpanIds.has(n);if(s?this.rootSpanIds.set(n,{rootSpanId:o,open:[]}):this.rootSpanIds.get(n)?.open.push(t),s&&zt(i)){let u=nt(),c=za(u,this.attributesFromHeaders);c&&t.setAttributes(c),u&&u.waitUntil(async()=>{if(this.rootSpanIds.has(n)){let a=new Promise(p=>{this.waitSpanEnd.set(n,p)}),f;await Promise.race([a,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),s=this.rootSpanIds.get(r),u=s?.rootSpanId===n;if(i){let c=Df(t);c&&Object.assign(t.attributes,c)}if(u){if(this.rootSpanIds.delete(r),s.open.length>0){for(let c of s.open)if(!c.ended&&c.spanContext().spanId!==n)try{c.end()}catch(a){l.diag.error("@vercel/otel: onEnd failed:",a)}}}else if(s)for(let c=0;c<s.open.length;c++)s.open[c]?.spanContext().spanId===n&&s.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())}}},xf={[l.SpanKind.INTERNAL]:"internal",[l.SpanKind.SERVER]:"server",[l.SpanKind.CLIENT]:"client",[l.SpanKind.PRODUCER]:"producer",[l.SpanKind.CONSUMER]:"consumer"};function Df(e){let{kind:t,attributes:r}=e,{"operation.name":n,"resource.name":o,"span.type":i,"next.span_type":s,"http.method":u,"http.route":c}=r;if(n)return;let a=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":a};let f=e.instrumentationLibrary.name,p=s??i;if(p&&typeof p=="string"){let d=$a(f,p);return c?{"operation.name":d,"resource.name":a}:{"operation.name":d}}return{"operation.name":$a(f,t===l.SpanKind.INTERNAL?"":xf[t])}}function $a(e,t){if(!e)return t;let r=e.replace(/[ @./]/g,"_");return r.startsWith("_")&&(r=r.slice(1)),t?`${r}.${t}`:r}var fs=v(Fn(),1);var ls=v(cs(),1);E();var $t=class extends ls.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,s,u;try{({body:i,contentType:s,headers:u}=this.toMessage(o))}catch(a){l.diag.warn("@vercel/otel/otlp: no proto",a);return}let c=fetch(this.url,{method:"POST",body:i,headers:{...this._headers,...u,"Content-Type":s,"User-Agent":"OTel-OTLP-Exporter-JavaScript/0.46.0"},next:{internal:!0}}).then(a=>{l.diag.debug("@vercel/otel/otlp: onSuccess",a.status,a.statusText),r(),a.arrayBuffer().catch(()=>{})}).catch(a=>{l.diag.error("@vercel/otel/otlp: onError",a),n(a)}).finally(()=>{let a=this._sendingPromises.indexOf(c);this._sendingPromises.splice(a,1)});this._sendingPromises.push(c)}getDefaultUrl(t){throw new Error("Method not implemented.")}};var rp="v1/traces",np=`http://localhost:4318/${rp}`;function yr(e){return typeof e.url=="string"?e.url:np}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,fs.createExportTraceServiceRequest)(t,{useHex:!0,useLongBits:!1})}toMessage(t){return{body:JSON.stringify(t),contentType:"application/json"}}getDefaultUrl(t){return yr(t)}};var du=v(Fn(),1);var lu=v(cu(),1);function fu(e){let t=new lu.Writer;return _p(e,t),t.finish()}function _p(e,t){if(e.resourceSpans!=null&&e.resourceSpans.length)for(let r=0;r<e.resourceSpans.length;++r)hp(e.resourceSpans[r],t.uint32(10).fork()).ldelim();return t}function hp(e,t){if(e.resource!=null&&Ep(e.resource,t.uint32(10).fork()).ldelim(),e.scopeSpans!=null&&e.scopeSpans.length)for(let r=0;r<e.scopeSpans.length;++r)mp(e.scopeSpans[r],t.uint32(18).fork()).ldelim();return e.schemaUrl!=null&&t.uint32(26).string(e.schemaUrl),t}function Ep(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 mp(e,t){if(e.scope!=null&&gp(e.scope,t.uint32(10).fork()).ldelim(),e.spans!=null&&e.spans.length)for(let r=0;r<e.spans.length;++r)yp(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&&pu(e.value,t.uint32(18).fork()).ldelim(),t}function pu(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&&Tp(e.arrayValue,t.uint32(42).fork()).ldelim(),e.kvlistValue!=null&&Sp(e.kvlistValue,t.uint32(50).fork()).ldelim(),e.bytesValue!=null&&t.uint32(58).bytes(e.bytesValue),t}function Tp(e,t){if(e.values!=null&&e.values.length)for(let r=0;r<e.values.length;++r)pu(e.values[r],t.uint32(10).fork()).ldelim();return t}function Sp(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 gp(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 yp(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)Ap(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)Rp(e.links[r],t.uint32(106).fork()).ldelim();return e.droppedLinksCount!=null&&t.uint32(112).uint32(e.droppedLinksCount),e.status!=null&&vp(e.status,t.uint32(122).fork()).ldelim(),t}function vp(e,t){return e.message!=null&&t.uint32(18).string(e.message),e.code!=null&&t.uint32(24).int32(e.code),t}function Ap(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 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.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 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,du.createExportTraceServiceRequest)(t,void 0)}toMessage(t){return{body:fu(t),contentType:"application/x-protobuf",headers:{accept:"application/x-protobuf"}}}getDefaultUrl(t){return yr(t)}};E();function _u(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??[],s=this.config.dontPropagateContextUrls??[];if(r?.opentelemetry?.propagateContext)return r.opentelemetry.propagateContext;let u=t.toString();return s.length>0&&s.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===nt()?.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:s={}}){let u=this.config.resourceNameTemplate,c={[Ha]:o,[Fa]:r.toString(),[hr]:r.host,[ja]:r.protocol.replace(":",""),[Xa]:r.hostname,[qa]:r.port},a=u?_u(u,c):Lp(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":a,...s}},p)}instrumentHttp(t,r){let{tracerProvider:n}=this;if(!n)return;let o=n.getTracer(this.instrumentationName,this.instrumentationVersion),{attributesFromRequestHeaders:i,attributesFromResponseHeaders:s}=this.config,u=t.request,c=t.get,a=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=Ip(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 et=l.context.active(),q=l.trace.setSpan(et,T);l.propagation.inject(q,C.headers||{},bp)}i&&br(T,i,C.headers||{},Eu);try{let et=Date.now(),q=f.apply(this,[g,C,M]);return q.prependListener("response",U=>{let wr=Date.now()-et;T.setAttribute("http.response_time",wr),U.statusCode!==void 0?(T.setAttribute(wn,U.statusCode),U.statusCode>=500&&Gt(T,`Status: ${U.statusCode}`)):Gt(T,"Response status code is undefined"),s&&br(T,s,U.headers,Eu),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()&&(Gt(T,U),T.end())}),q.on("close",()=>{T.isRecording()&&T.end()}),q}catch(et){throw Gt(T,et),T.end(),et}};t.request=a(u),t.get=a(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 s=async(u,c)=>{let a=c;if(a?.next?.internal)return i(u,a);let f=new Request(u instanceof Request?u.clone():u,a),p=new URL(f.url);if(this.shouldIgnore(p,a))return i(u,a);let d=this.startSpan({tracer:r,url:p,fetchType:"fetch",method:f.method,name:a?.opentelemetry?.spanName,attributes:a?.opentelemetry?.attributes});if(!d.isRecording()||!zt(d.spanContext().traceFlags))return d.end(),i(u,a);if(this.shouldPropagate(p,a)){let m=l.context.active(),g=l.trace.setSpan(m,d);l.propagation.inject(g,f.headers,Op)}n&&br(d,n,f.headers,hu);try{let m=Date.now();a?.body&&a.body instanceof FormData&&f.headers.delete("content-type");let g=await i(u,{...a,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,hu),g.status>=500&&Gt(d,`Status: ${g.status} (${g.statusText})`),g.body?Pp(g).then(M=>{d.isRecording()&&(d.setAttribute(Mn,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=s}enable(){this.disable(),this.instrumentFetch();try{let t=ci("node:http"),r=ci("node:https");this.instrumentHttp(t,"http:"),this.instrumentHttp(r,"https:")}catch{}}disable(){this.originalFetch&&(globalThis.fetch=this.originalFetch)}},Op={set(e,t,r){e.set(t,r)}},hu={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}},bp={set(e,t,r){e[t.toLowerCase()]=r}},Eu={get(e,t){return e[t.toLowerCase()]},keys(e){return Object.keys(e)}};function Lp(e){let t=e.indexOf("?");return t===-1?e:e.substring(0,t)}function Pp(e){let t=0,n=e.clone().body?.getReader();if(!n)return Promise.resolve(0);let o=()=>n.read().then(({done:i,value:s})=>{if(!i)return t+=s.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 br(e,t,r,n){for(let[o,i]of Object.entries(t)){let s=n.get(r,i);s!==void 0&&e.setAttribute(o,s)}}function Ip(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 a=e.host.split(":");n=a[0];let f=a[1];if(a.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 a=parseInt(String(o),10);isNaN(a)?i=r==="https:"?443:80:i=a}else i=r==="https:"?443:80;let s=e.path||"/",u=`${r}//${n}:${i}`,c=new URL(s,u);if(e.auth){let a=e.auth.split(":");c.username=decodeURIComponent(a[0]||""),a.length>1&&(c.password=decodeURIComponent(a[1]||""))}return c}E();var mu=v(P(),1),Cp="00",ai="traceparent",si="tracestate",Te=class{fields(){return[ai,si]}inject(t,r,n){let o=l.trace.getSpanContext(t);if(!o||(0,mu.isTracingSuppressed)(t)||!(0,l.isSpanContextValid)(o))return;let i=`${Cp}-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||0).toString(16)}`;n.set(r,ai,i),o.traceState&&n.set(r,si,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 s=Np(i);if(!s)return t;s.isRemote=!0;let u=n.get(r,si);if(u){let c=Array.isArray(u)?u.join(","):u;s.traceState=(0,l.createTraceState)(typeof c=="string"?c:void 0)}return l.trace.setSpanContext(t,s)}};function Np(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=nt();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()),wp=BigInt(1e9);function Su(e){return BigInt(e[0])*wp+BigInt(e[1])}function Mp(e){var t=Number(BigInt.asUintN(32,e)),r=Number(BigInt.asUintN(32,e>>BigInt(32)));return{low:t,high:r}}function gu(e){var t=Su(e);return Mp(t)}function xp(e){var t=Su(e);return t.toString()}var Dp=typeof BigInt<"u"?xp:ee.hrTimeToNanoseconds;function Tu(e){return e}function yu(e){if(e!==void 0)return(0,ee.hexToBase64)(e)}var Up={encodeHrTime:gu,encodeSpanContext:ee.hexToBase64,encodeOptionalSpanContext:yu};function vu(e){var t,r;if(e===void 0)return Up;var n=(t=e.useLongBits)!==null&&t!==void 0?t:!0,o=(r=e.useHex)!==null&&r!==void 0?r:!1;return{encodeHrTime:n?gu:Dp,encodeSpanContext:o?Tu:ee.hexToBase64,encodeOptionalSpanContext:o?Tu:yu}}var Bp=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){s={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return i};function re(e){return Object.keys(e).map(function(t){return Au(t,e[t])})}function Au(e,t){return{key:e,value:Ru(t)}}function Ru(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(Ru)}}:t==="object"&&e!=null?{kvlistValue:{values:Object.entries(e).map(function(r){var n=Bp(r,2),o=n[0],i=n[1];return Au(o,i)})}}:{}}function Ou(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 Vp(i,t)}),droppedEventsCount:e.droppedEventsCount,status:{code:o.code,message:o.message},links:e.links.map(function(i){return Gp(i,t)}),droppedLinksCount:e.droppedLinksCount}}function Gp(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 Vp(e,t){return{attributes:e.attributes?re(e.attributes):[],name:e.name,timeUnixNano:t.encodeHrTime(e.time),droppedAttributesCount:e.droppedAttributesCount||0}}var Hp=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.")},Fp=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],s;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(u){s={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return i};function ui(e,t){var r=vu(t);return{resourceSpans:kp(e,r)}}function jp(e){var t,r,n=new Map;try{for(var o=Hp(e),i=o.next();!i.done;i=o.next()){var s=i.value,u=n.get(s.resource);u||(u=new Map,n.set(s.resource,u));var c=s.instrumentationLibrary.name+"@"+(s.instrumentationLibrary.version||"")+":"+(s.instrumentationLibrary.schemaUrl||""),a=u.get(c);a||(a=[],u.set(c,a)),a.push(s)}}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=jp(e),n=[],o=r.entries(),i=o.next();!i.done;){for(var s=Fp(i.value,2),u=s[0],c=s[1],a=[],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 Ou(q,t)});a.push({scope:{name:g,version:C},spans:T,schemaUrl:M})}p=f.next()}var et={resource:{attributes:re(u.attributes),droppedAttributesCount:0},scopeSpans:a,schemaUrl:void 0};n.push(et),i=o.next()}return n}var Ir=class{export(t,r){let n=nt();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()}};var qp={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=Xp(),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:qp[process.env.OTEL_LOG_LEVEL.toUpperCase()]}),o)return;let i=r.idGenerator??new tr,s=r.contextManager??new Iu.AsyncLocalStorageContextManager;s.enable(),this.contextManager=s;let u=t.OTEL_SERVICE_NAME||r.serviceName||"app",c=new H(Er({[Ka]: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,[Wa]:process.env.VERCEL_DEPLOYMENT_ID,...r.attributes})),a=r.resourceDetectors??[No];if(r.autoDetectResources??!0){let T={detectors:a};c=c.merge(Mo(T))}let p=Wp(r.propagators,r,t),d=Yp(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 Bo({resource:c,idGenerator:i,sampler:d,spanLimits:g});if(C.addSpanProcessor(new mr(m,r.attributesFromHeaders)),C.register({contextManager:s,propagator:new Ot.CompositePropagator({propagators:p})}),this.tracerProvider=C,r.logRecordProcessor){let T=new gn({resource:c});this.loggerProvider=T,T.addLogRecordProcessor(r.logRecordProcessor),st.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=Kp(r.instrumentations,r.instrumentationConfig);this.disableInstrumentations=(0,Pu.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 Xp(){let e=(0,Nr.parseEnvironment)(process.env);return{...Nr.DEFAULT_ENVIRONMENT,...e}}function Kp(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 Wp(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(s=>s.name).join(", ")}`),i.map(s=>s.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 bu="always_on",ne=1;function Yp(e,t){if(e&&typeof e!="string")return e;let r=e&&e!=="auto"?e:t.OTEL_TRACES_SAMPLER||bu;switch(l.diag.debug("@vercel/otel: Configure sampler: ",r),r){case"always_on":return new X;case"always_off":return new at;case"parentbased_always_on":return new Et({root:new X});case"parentbased_always_off":return new Et({root:new at});case"traceidratio":return new kt(Lu(t));case"parentbased_traceidratio":return new Et({root:new kt(Lu(t))});default:return l.diag.error(`@vercel/otel: OTEL_TRACES_SAMPLER value "${String(t.OTEL_TRACES_SAMPLER)} invalid, defaulting to ${bu}".`),new X}}function Lu(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 Ir)];if(process.env.VERCEL_OTEL_ENDPOINTS){let i=process.env.VERCEL_OTEL_ENDPOINTS_PORT||"4318",s=process.env.VERCEL_OTEL_ENDPOINTS_PROTOCOL||"http/protobuf";l.diag.debug("@vercel/otel: Configure vercel otel collector on port: ",i,s);let u={url:`http://localhost:${i}/v1/traces`,headers:{}},c=s==="http/protobuf"?new Bt(u):new Qt(u);o.push(new Mt(c))}else(!t.traceExporter||t.traceExporter==="auto"||r.OTEL_EXPORTER_OTLP_TRACES_ENDPOINT||r.OTEL_EXPORTER_OTLP_ENDPOINT)&&o.push(new Mt($p(r)));return o}return n}).filter(Jp),...t.traceExporter&&t.traceExporter!=="auto"?[new Mt(t.traceExporter)]:[]]}function $p(e){let t=process.env.OTEL_EXPORTER_OTLP_TRACES_PROTOCOL??process.env.OTEL_EXPORTER_OTLP_PROTOCOL??"http/protobuf",r=Zp(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 Cu="v1/traces",Qp=`http://localhost:4318/${Cu}`;function Zp(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}/${Cu}`:Qp}function Jp(e){return e!=null}function RT(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,RT as registerOTel};
|
|
17
17
|
//# sourceMappingURL=index.js.map
|