@sentio/runtime 2.52.0-rc.3 → 2.52.1-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -56,7 +56,7 @@ ${o}
56
56
  ${r}`.trim()}_serializeSingularDataPoint(e,n,i){let a="";e=_d(e,n);let{value:u,attributes:o}=i,r=(0,HI.hrTimeToMilliseconds)(i.endTime);return a+=Zs(e,o,u,this._appendTimestamp?r:void 0,void 0),a}_serializeHistogramDataPoint(e,n,i){let a="";e=_d(e,n);let u=i.attributes,o=i.value,r=(0,HI.hrTimeToMilliseconds)(i.endTime);for(let p of["count","sum"]){let _=o[p];_!=null&&(a+=Zs(e+"_"+p,u,_,this._appendTimestamp?r:void 0,void 0))}let s=0,l=o.buckets.counts.entries(),c=!1;for(let[p,_]of l){s+=_;let f=o.buckets.boundaries[p];if(f===void 0&&c)break;f===1/0&&(c=!0),a+=Zs(e+"_bucket",u,s,this._appendTimestamp?r:void 0,{le:f===void 0||f===1/0?"+Inf":String(f)})}return a}_serializeResource(e){let n="target_info",i=`# HELP ${n} Target metadata`,a=`# TYPE ${n} gauge`,u=Zs(n,e.attributes,1).trim();return`${i}
57
57
  ${a}
58
58
  ${u}
59
- `}};tl.PrometheusSerializer=hd});var YI=h(nl=>{"use strict";Object.defineProperty(nl,"__esModule",{value:!0});nl.PrometheusExporter=void 0;var mi=(M(),Y(Pe)),$z=(K(),Y(Uu)),vd=(In(),Y(ed)),Kz=L("http"),Wz=Td(),zz=L("url"),rl=class t extends vd.MetricReader{constructor(e={},n=()=>{}){super({aggregationSelector:i=>vd.Aggregation.Default(),aggregationTemporalitySelector:i=>vd.AggregationTemporality.CUMULATIVE,metricProducers:e.metricProducers}),this._requestHandler=(i,a)=>{i.url!=null&&new zz.URL(i.url,this._baseUrl).pathname===this._endpoint?this._exportMetrics(a):this._notFound(a)},this._exportMetrics=i=>{i.statusCode=200,i.setHeader("content-type","text/plain"),this.collect().then(a=>{let{resourceMetrics:u,errors:o}=a;o.length&&mi.diag.error("PrometheusExporter: metrics collection errors",...o),i.end(this._serializer.serialize(u))},a=>{i.end(`# failed to export metrics: ${a}`)})},this._notFound=i=>{i.statusCode=404,i.end()},this._host=e.host||process.env.OTEL_EXPORTER_PROMETHEUS_HOST||t.DEFAULT_OPTIONS.host,this._port=e.port||Number(process.env.OTEL_EXPORTER_PROMETHEUS_PORT)||t.DEFAULT_OPTIONS.port,this._prefix=e.prefix||t.DEFAULT_OPTIONS.prefix,this._appendTimestamp=typeof e.appendTimestamp=="boolean"?e.appendTimestamp:t.DEFAULT_OPTIONS.appendTimestamp,this._server=(0,Kz.createServer)(this._requestHandler).unref(),this._serializer=new Wz.PrometheusSerializer(this._prefix,this._appendTimestamp),this._baseUrl=`http://${this._host}:${this._port}/`,this._endpoint=(e.endpoint||t.DEFAULT_OPTIONS.endpoint).replace(/^([^/])/,"/$1"),e.preventServerStart!==!0?this.startServer().then(n,i=>{mi.diag.error(i),n(i)}):n&&queueMicrotask(n)}async onForceFlush(){}onShutdown(){return this.stopServer()}stopServer(){return this._server?new Promise(e=>{this._server.close(n=>{n?n.code!=="ERR_SERVER_NOT_RUNNING"&&(0,$z.globalErrorHandler)(n):mi.diag.debug("Prometheus exporter was stopped"),e()})}):(mi.diag.debug("Prometheus stopServer() was called but server was never started."),Promise.resolve())}startServer(){var e;return(e=this._startServerPromise)!==null&&e!==void 0||(this._startServerPromise=new Promise((n,i)=>{this._server.once("error",i),this._server.listen({port:this._port,host:this._host},()=>{mi.diag.debug(`Prometheus exporter server started: ${this._host}:${this._port}/${this._endpoint}`),n()})})),this._startServerPromise}getMetricsRequestHandler(e,n){this._exportMetrics(n)}};nl.PrometheusExporter=rl;rl.DEFAULT_OPTIONS={host:void 0,port:9464,endpoint:"/metrics",prefix:"",appendTimestamp:!1}});var qI=h(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.PrometheusSerializer=kn.PrometheusExporter=void 0;var Xz=YI();Object.defineProperty(kn,"PrometheusExporter",{enumerable:!0,get:function(){return Xz.PrometheusExporter}});var Jz=Td();Object.defineProperty(kn,"PrometheusSerializer",{enumerable:!0,get:function(){return Jz.PrometheusSerializer}})});var yd=h(ol=>{"use strict";Object.defineProperty(ol,"__esModule",{value:!0});ol.AbstractAsyncHooksContextManager=void 0;var Qz=L("events"),Zz=["addListener","on","once","prependListener","prependOnceListener"],md=class{constructor(){this._kOtListeners=Symbol("OtListeners"),this._wrapped=!1}bind(e,n){return n instanceof Qz.EventEmitter?this._bindEventEmitter(e,n):typeof n=="function"?this._bindFunction(e,n):n}_bindFunction(e,n){let i=this,a=function(...u){return i.with(e,()=>n.apply(this,u))};return Object.defineProperty(a,"length",{enumerable:!1,configurable:!0,writable:!1,value:n.length}),a}_bindEventEmitter(e,n){return this._getPatchMap(n)!==void 0||(this._createPatchMap(n),Zz.forEach(a=>{n[a]!==void 0&&(n[a]=this._patchAddListener(n,n[a],e))}),typeof n.removeListener=="function"&&(n.removeListener=this._patchRemoveListener(n,n.removeListener)),typeof n.off=="function"&&(n.off=this._patchRemoveListener(n,n.off)),typeof n.removeAllListeners=="function"&&(n.removeAllListeners=this._patchRemoveAllListeners(n,n.removeAllListeners))),n}_patchRemoveListener(e,n){let i=this;return function(a,u){var o;let r=(o=i._getPatchMap(e))===null||o===void 0?void 0:o[a];if(r===void 0)return n.call(this,a,u);let s=r.get(u);return n.call(this,a,s||u)}}_patchRemoveAllListeners(e,n){let i=this;return function(a){let u=i._getPatchMap(e);return u!==void 0&&(arguments.length===0?i._createPatchMap(e):u[a]!==void 0&&delete u[a]),n.apply(this,arguments)}}_patchAddListener(e,n,i){let a=this;return function(u,o){if(a._wrapped)return n.call(this,u,o);let r=a._getPatchMap(e);r===void 0&&(r=a._createPatchMap(e));let s=r[u];s===void 0&&(s=new WeakMap,r[u]=s);let l=a.bind(i,o);s.set(o,l),a._wrapped=!0;try{return n.call(this,u,l)}finally{a._wrapped=!1}}}_createPatchMap(e){let n=Object.create(null);return e[this._kOtListeners]=n,n}_getPatchMap(e){return e[this._kOtListeners]}};ol.AbstractAsyncHooksContextManager=md});var jI=h(il=>{"use strict";Object.defineProperty(il,"__esModule",{value:!0});il.AsyncHooksContextManager=void 0;var eX=(M(),Y(Pe)),tX=L("async_hooks"),rX=yd(),Ad=class extends rX.AbstractAsyncHooksContextManager{constructor(){super(),this._contexts=new Map,this._stack=[],this._asyncHook=tX.createHook({init:this._init.bind(this),before:this._before.bind(this),after:this._after.bind(this),destroy:this._destroy.bind(this),promiseResolve:this._destroy.bind(this)})}active(){var e;return(e=this._stack[this._stack.length-1])!==null&&e!==void 0?e:eX.ROOT_CONTEXT}with(e,n,i,...a){this._enterContext(e);try{return n.call(i,...a)}finally{this._exitContext()}}enable(){return this._asyncHook.enable(),this}disable(){return this._asyncHook.disable(),this._contexts.clear(),this._stack=[],this}_init(e,n){if(n==="TIMERWRAP")return;let i=this._stack[this._stack.length-1];i!==void 0&&this._contexts.set(e,i)}_destroy(e){this._contexts.delete(e)}_before(e){let n=this._contexts.get(e);n!==void 0&&this._enterContext(n)}_after(){this._exitContext()}_enterContext(e){this._stack.push(e)}_exitContext(){this._stack.pop()}};il.AsyncHooksContextManager=Ad});var $I=h(al=>{"use strict";Object.defineProperty(al,"__esModule",{value:!0});al.AsyncLocalStorageContextManager=void 0;var nX=(M(),Y(Pe)),oX=L("async_hooks"),iX=yd(),Od=class extends iX.AbstractAsyncHooksContextManager{constructor(){super(),this._asyncLocalStorage=new oX.AsyncLocalStorage}active(){var e;return(e=this._asyncLocalStorage.getStore())!==null&&e!==void 0?e:nX.ROOT_CONTEXT}with(e,n,i,...a){let u=i==null?n:n.bind(i);return this._asyncLocalStorage.run(e,u,...a)}enable(){return this}disable(){return this._asyncLocalStorage.disable(),this}};al.AsyncLocalStorageContextManager=Od});var KI=h(Hn=>{"use strict";Object.defineProperty(Hn,"__esModule",{value:!0});Hn.AsyncLocalStorageContextManager=Hn.AsyncHooksContextManager=void 0;var aX=jI();Object.defineProperty(Hn,"AsyncHooksContextManager",{enumerable:!0,get:function(){return aX.AsyncHooksContextManager}});var uX=$I();Object.defineProperty(Hn,"AsyncLocalStorageContextManager",{enumerable:!0,get:function(){return uX.AsyncLocalStorageContextManager}})});var Fn,gd=m(()=>{"use strict";M();Fn=Kr("OpenTelemetry Context Key B3 Debug Flag")});var dr,Yn,qn,jn,ul,$n,yi=m(()=>{"use strict";dr="b3",Yn="x-b3-traceid",qn="x-b3-spanid",jn="x-b3-sampled",ul="x-b3-parentspanid",$n="x-b3-flags"});function cX(t){return t===Q.SAMPLED||t===Q.NONE}function fX(t){return Array.isArray(t)?t[0]:t}function sl(t,e,n){var i=e.get(t,n);return fX(i)}function pX(t,e){var n=sl(t,e,Yn);return typeof n=="string"?n.padStart(32,"0"):""}function dX(t,e){var n=sl(t,e,qn);return typeof n=="string"?n:""}function WI(t,e){var n=sl(t,e,$n);return n==="1"?"1":void 0}function EX(t,e){var n=sl(t,e,jn),i=WI(t,e);if(i==="1"||sX.has(n))return Q.SAMPLED;if(n===void 0||lX.has(n))return Q.NONE}var sX,lX,zI,XI=m(()=>{"use strict";M();K();gd();yi();sX=new Set([!0,"true","True","1",1]),lX=new Set([!1,"false","False","0",0]);zI=function(){function t(){}return t.prototype.inject=function(e,n,i){var a=J.getSpanContext(e);if(!(!a||!_t(a)||xe(e))){var u=e.getValue(Fn);i.set(n,Yn,a.traceId),i.set(n,qn,a.spanId),u==="1"?i.set(n,$n,u):a.traceFlags!==void 0&&i.set(n,jn,(Q.SAMPLED&a.traceFlags)===Q.SAMPLED?"1":"0")}},t.prototype.extract=function(e,n,i){var a=pX(n,i),u=dX(n,i),o=EX(n,i),r=WI(n,i);return Gt(a)&&Ii(u)&&cX(o)?(e=e.setValue(Fn,r),J.setSpanContext(e,{traceId:a,spanId:u,isRemote:!0,traceFlags:o})):e},t.prototype.fields=function(){return[Yn,qn,$n,jn,ul]},t}()});function mX(t){return t.length===32?t:""+hX+t}function yX(t){return t&&TX.has(t)?Q.SAMPLED:Q.NONE}var _X,SX,hX,TX,vX,JI,QI=m(()=>{"use strict";M();K();gd();yi();_X=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),a,u=[],o;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)u.push(a.value)}catch(r){o={error:r}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return u},SX=/((?:[0-9a-f]{16}){1,2})-([0-9a-f]{16})(?:-([01d](?![0-9a-f])))?(?:-([0-9a-f]{16}))?/,hX="0".repeat(16),TX=new Set(["d","1"]),vX="d";JI=function(){function t(){}return t.prototype.inject=function(e,n,i){var a=J.getSpanContext(e);if(!(!a||!_t(a)||xe(e))){var u=e.getValue(Fn)||a.traceFlags&1,o=a.traceId+"-"+a.spanId+"-"+u;i.set(n,dr,o)}},t.prototype.extract=function(e,n,i){var a=i.get(n,dr),u=Array.isArray(a)?a[0]:a;if(typeof u!="string")return e;var o=u.match(SX);if(!o)return e;var r=_X(o,4),s=r[1],l=r[2],c=r[3],p=mX(s);if(!Gt(p)||!Ii(l))return e;var _=yX(c);return c===vX&&(e=e.setValue(Fn,c)),J.setSpanContext(e,{traceId:p,spanId:l,isRemote:!0,traceFlags:_})},t.prototype.fields=function(){return[dr]},t}()});var Kn,Nd=m(()=>{"use strict";(function(t){t[t.SINGLE_HEADER=0]="SINGLE_HEADER",t[t.MULTI_HEADER=1]="MULTI_HEADER"})(Kn||(Kn={}))});var ZI,eC=m(()=>{"use strict";K();XI();QI();yi();Nd();ZI=function(){function t(e){e===void 0&&(e={}),this._b3MultiPropagator=new zI,this._b3SinglePropagator=new JI,e.injectEncoding===Kn.MULTI_HEADER?(this._inject=this._b3MultiPropagator.inject,this._fields=this._b3MultiPropagator.fields()):(this._inject=this._b3SinglePropagator.inject,this._fields=this._b3SinglePropagator.fields())}return t.prototype.inject=function(e,n,i){xe(e)||this._inject(e,n,i)},t.prototype.extract=function(e,n,i){var a=i.get(n,dr),u=Array.isArray(a)?a[0]:a;return u?this._b3SinglePropagator.extract(e,n,i):this._b3MultiPropagator.extract(e,n,i)},t.prototype.fields=function(){return this._fields},t}()});var tC={};Je(tC,{B3InjectEncoding:()=>Kn,B3Propagator:()=>ZI,B3_CONTEXT_HEADER:()=>dr,X_B3_FLAGS:()=>$n,X_B3_PARENT_SPAN_ID:()=>ul,X_B3_SAMPLED:()=>jn,X_B3_SPAN_ID:()=>qn,X_B3_TRACE_ID:()=>Yn});var rC=m(()=>{"use strict";eC();yi();Nd()});var nC,oC=m(()=>{"use strict";nC="exception"});var Rd,AX,iC,OX,ll,Pd=m(()=>{"use strict";M();K();Ko();oC();Rd=function(){return Rd=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a])}return t},Rd.apply(this,arguments)},AX=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},iC=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),a,u=[],o;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)u.push(a.value)}catch(r){o={error:r}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return u},OX=function(t,e,n){if(n||arguments.length===2)for(var i=0,a=e.length,u;i<a;i++)(u||!(i in e))&&(u||(u=Array.prototype.slice.call(e,0,i)),u[i]=e[i]);return t.concat(u||Array.prototype.slice.call(e))},ll=function(){function t(e,n,i,a,u,o,r,s,l,c){r===void 0&&(r=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:_E.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=i,this._spanContext=a,this.parentSpanId=o,this.kind=u,this.links=r;var p=Date.now();this._performanceStartTime=et.now(),this._performanceOffset=p-(this._performanceStartTime+An()),this._startTimeProvided=s!=null,this.startTime=this._getTime(s??p),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this._spanLimits=e.getSpanLimits(),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,c!=null&&this.setAttributes(c),this._spanProcessor=e.getActiveSpanProcessor(),this._spanProcessor.onStart(this,n)}return t.prototype.spanContext=function(){return this._spanContext},t.prototype.setAttribute=function(e,n){return n==null||this._isSpanEnded()?this:e.length===0?(g.warn("Invalid attribute key: "+e),this):Xo(n)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(n),this):(g.warn("Invalid attribute value set for key: "+e),this)},t.prototype.setAttributes=function(e){var n,i;try{for(var a=AX(Object.entries(e)),u=a.next();!u.done;u=a.next()){var o=iC(u.value,2),r=o[0],s=o[1];this.setAttribute(r,s)}}catch(l){n={error:l}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return this},t.prototype.addEvent=function(e,n,i){if(this._isSpanEnded())return this;if(this._spanLimits.eventCountLimit===0)return g.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(this._droppedEventsCount===0&&g.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),ei(n)&&(ei(i)||(i=n),n=void 0);var a=or(n);return this.events.push({name:e,attributes:a,time:this._getTime(i),droppedAttributesCount:0}),this},t.prototype.addLink=function(e){return this.links.push(e),this},t.prototype.addLinks=function(e){var n;return(n=this.links).push.apply(n,OX([],iC(e),!1)),this},t.prototype.setStatus=function(e){return this._isSpanEnded()?this:(this.status=Rd({},e),this.status.message!=null&&typeof e.message!="string"&&(g.warn("Dropping invalid status.message of type '"+typeof e.message+"', expected 'string'"),delete this.status.message),this)},t.prototype.updateName=function(e){return this._isSpanEnded()?this:(this.name=e,this)},t.prototype.end=function(e){if(this._isSpanEnded()){g.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=Pu(this.startTime,this.endTime),this._duration[0]<0&&(g.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._droppedEventsCount>0&&g.warn("Dropped "+this._droppedEventsCount+" events because eventCountLimit reached"),this._spanProcessor.onEnd(this)},t.prototype._getTime=function(e){if(typeof e=="number"&&e<=et.now())return Zo(e+this._performanceOffset);if(typeof e=="number")return ge(e);if(e instanceof Date)return ge(e.getTime());if(On(e))return e;if(this._startTimeProvided)return ge(Date.now());var n=et.now()-this._performanceStartTime;return ti(this.startTime,ge(n))},t.prototype.isRecording=function(){return this._ended===!1},t.prototype.recordException=function(e,n){var i={};typeof e=="string"?i[du]=e:e&&(e.code?i[pu]=e.code.toString():e.name&&(i[pu]=e.name),e.message&&(i[du]=e.message),e.stack&&(i[d0]=e.stack)),i[pu]||i[du]?this.addEvent(nC,i,n):g.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&&g.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},t.prototype._truncateToLimitUtil=function(e,n){return e.length<=n?e:e.substring(0,n)},t.prototype._truncateToSize=function(e){var n=this,i=this._attributeValueLengthLimit;return i<=0?(g.warn("Attribute value limit must be positive, got "+i),e):typeof e=="string"?this._truncateToLimitUtil(e,i):Array.isArray(e)?e.map(function(a){return typeof a=="string"?n._truncateToLimitUtil(a,i):a}):e},t}()});var dt,Ai=m(()=>{"use strict";(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(dt||(dt={}))});var Er,cl=m(()=>{"use strict";Ai();Er=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:dt.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t}()});var bt,fl=m(()=>{"use strict";Ai();bt=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:dt.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t}()});var Wn,bd=m(()=>{"use strict";M();K();cl();fl();Wn=function(){function t(e){var n,i,a,u;this._root=e.root,this._root||(Te(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new bt),this._remoteParentSampled=(n=e.remoteParentSampled)!==null&&n!==void 0?n:new bt,this._remoteParentNotSampled=(i=e.remoteParentNotSampled)!==null&&i!==void 0?i:new Er,this._localParentSampled=(a=e.localParentSampled)!==null&&a!==void 0?a:new bt,this._localParentNotSampled=(u=e.localParentNotSampled)!==null&&u!==void 0?u:new Er}return t.prototype.shouldSample=function(e,n,i,a,u,o){var r=J.getSpanContext(e);return!r||!_t(r)?this._root.shouldSample(e,n,i,a,u,o):r.isRemote?r.traceFlags&Q.SAMPLED?this._remoteParentSampled.shouldSample(e,n,i,a,u,o):this._remoteParentNotSampled.shouldSample(e,n,i,a,u,o):r.traceFlags&Q.SAMPLED?this._localParentSampled.shouldSample(e,n,i,a,u,o):this._localParentNotSampled.shouldSample(e,n,i,a,u,o)},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}()});var Oi,xd=m(()=>{"use strict";M();Ai();Oi=function(){function t(e){e===void 0&&(e=0),this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}return t.prototype.shouldSample=function(e,n){return{decision:Gt(n)&&this._accumulate(n)<this._upperBound?dt.RECORD_AND_SAMPLED:dt.NOT_RECORD}},t.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},t.prototype._normalize=function(e){return typeof e!="number"||isNaN(e)?0:e>=1?1:e<=0?0:e},t.prototype._accumulate=function(e){for(var n=0,i=0;i<e.length/8;i++){var a=i*8,u=parseInt(e.slice(a,a+8),16);n=(n^u)>>>0}return n},t}()});function pl(){var t=Oe();return{sampler:Md(gX),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:t.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:t.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:t.OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:t.OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT},mergeResourceWithDefaults:!0}}function Md(t){switch(t===void 0&&(t=Oe()),t.OTEL_TRACES_SAMPLER){case Ke.AlwaysOn:return new bt;case Ke.AlwaysOff:return new Er;case Ke.ParentBasedAlwaysOn:return new Wn({root:new bt});case Ke.ParentBasedAlwaysOff:return new Wn({root:new Er});case Ke.TraceIdRatio:return new Oi(aC(t));case Ke.ParentBasedTraceIdRatio:return new Wn({root:new Oi(aC(t))});default:return g.error('OTEL_TRACES_SAMPLER value "'+t.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+NX+'".'),new bt}}function aC(t){if(t.OTEL_TRACES_SAMPLER_ARG===void 0||t.OTEL_TRACES_SAMPLER_ARG==="")return g.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+zn+"."),zn;var e=Number(t.OTEL_TRACES_SAMPLER_ARG);return isNaN(e)?(g.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+zn+"."),zn):e<0||e>1?(g.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+zn+"."),zn):e}var gX,NX,zn,Ld=m(()=>{"use strict";M();K();cl();fl();bd();xd();gX=Oe(),NX=Ke.AlwaysOn,zn=1});function uC(t){var e={sampler:Md()},n=pl(),i=Object.assign({},n,e,t);return i.generalLimits=Object.assign({},n.generalLimits,t.generalLimits||{}),i.spanLimits=Object.assign({},n.spanLimits,t.spanLimits||{}),i}function sC(t){var e,n,i,a,u,o,r,s,l,c,p,_,f=Object.assign({},t.spanLimits),S=mn();return f.attributeCountLimit=(o=(u=(a=(n=(e=t.spanLimits)===null||e===void 0?void 0:e.attributeCountLimit)!==null&&n!==void 0?n:(i=t.generalLimits)===null||i===void 0?void 0:i.attributeCountLimit)!==null&&a!==void 0?a:S.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&u!==void 0?u:S.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&o!==void 0?o:wr,f.attributeValueLengthLimit=(_=(p=(c=(s=(r=t.spanLimits)===null||r===void 0?void 0:r.attributeValueLengthLimit)!==null&&s!==void 0?s:(l=t.generalLimits)===null||l===void 0?void 0:l.attributeValueLengthLimit)!==null&&c!==void 0?c:S.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&p!==void 0?p:S.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&_!==void 0?_:Cr,Object.assign({},t,{spanLimits:f})}var Id=m(()=>{"use strict";Ld();K()});var lC,cC=m(()=>{"use strict";M();K();lC=function(){function t(e,n){this._exporter=e,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var i=Oe();this._maxExportBatchSize=typeof n?.maxExportBatchSize=="number"?n.maxExportBatchSize:i.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=typeof n?.maxQueueSize=="number"?n.maxQueueSize:i.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=typeof n?.scheduledDelayMillis=="number"?n.scheduledDelayMillis:i.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis=typeof n?.exportTimeoutMillis=="number"?n.exportTimeoutMillis:i.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new Nn(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(g.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return t.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},t.prototype.onStart=function(e,n){},t.prototype.onEnd=function(e){this._shutdownOnce.isCalled||e.spanContext().traceFlags&Q.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&&g.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(g.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer()},t.prototype._flushAll=function(){var e=this;return new Promise(function(n,i){for(var a=[],u=Math.ceil(e._finishedSpans.length/e._maxExportBatchSize),o=0,r=u;o<r;o++)a.push(e._flushOneBatch());Promise.all(a).then(function(){n()}).catch(i)})},t.prototype._flushOneBatch=function(){var e=this;return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise(function(n,i){var a=setTimeout(function(){i(new Error("Timeout"))},e._exportTimeoutMillis);Ye.with(Tn(Ye.active()),function(){var u;e._finishedSpans.length<=e._maxExportBatchSize?(u=e._finishedSpans,e._finishedSpans=[]):u=e._finishedSpans.splice(0,e._maxExportBatchSize);for(var o=function(){return e._exporter.export(u,function(p){var _;clearTimeout(a),p.code===W.SUCCESS?n():i((_=p.error)!==null&&_!==void 0?_:new Error("BatchSpanProcessor: span export failed"))})},r=null,s=0,l=u.length;s<l;s++){var c=u[s];c.resource.asyncAttributesPending&&c.resource.waitForAsyncAttributes&&(r??(r=[]),r.push(c.resource.waitForAsyncAttributes()))}r===null?o():Promise.all(r).then(o,function(p){Te(p),i(p)})})})},t.prototype._maybeStartTimer=function(){var e=this;if(!this._isExporting){var n=function(){e._isExporting=!0,e._flushOneBatch().finally(function(){e._isExporting=!1,e._finishedSpans.length>0&&(e._clearTimer(),e._maybeStartTimer())}).catch(function(i){e._isExporting=!1,Te(i)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return n();this._timer===void 0&&(this._timer=setTimeout(function(){return n()},this._scheduledDelayMillis),ur(this._timer))}},t.prototype._clearTimer=function(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)},t}()});var RX,_r,fC=m(()=>{"use strict";cC();RX=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,a){i.__proto__=a}||function(i,a){for(var u in a)Object.prototype.hasOwnProperty.call(a,u)&&(i[u]=a[u])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function i(){this.constructor=e}e.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}}(),_r=function(t){RX(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.onShutdown=function(){},e}(lC)});function pC(t){return function(){for(var n=0;n<t/4;n++)dl.writeUInt32BE(Math.random()*Math.pow(2,32)>>>0,n*4);for(var n=0;n<t&&!(dl[n]>0);n++)n===t-1&&(dl[t-1]=1);return dl.toString("hex",0,t)}}var PX,dC,Xn,dl,EC=m(()=>{"use strict";PX=8,dC=16,Xn=function(){function t(){this.generateTraceId=pC(dC),this.generateSpanId=pC(PX)}return t}(),dl=Buffer.allocUnsafe(dC)});var _C=m(()=>{"use strict";fC();EC()});var El=m(()=>{"use strict";_C()});var _l,SC=m(()=>{"use strict";M();K();Pd();Id();El();_l=function(){function t(e,n,i){this._tracerProvider=i;var a=uC(n);this._sampler=a.sampler,this._generalLimits=a.generalLimits,this._spanLimits=a.spanLimits,this._idGenerator=n.idGenerator||new Xn,this.resource=i.resource,this.instrumentationLibrary=e}return t.prototype.startSpan=function(e,n,i){var a,u,o;n===void 0&&(n={}),i===void 0&&(i=Ye.active()),n.root&&(i=J.deleteSpan(i));var r=J.getSpan(i);if(xe(i)){g.debug("Instrumentation suppressed, returning Noop Span");var s=J.wrapSpanContext(pE);return s}var l=r?.spanContext(),c=this._idGenerator.generateSpanId(),p,_,f;!l||!J.isSpanContextValid(l)?p=this._idGenerator.generateTraceId():(p=l.traceId,_=l.traceState,f=l.spanId);var S=(a=n.kind)!==null&&a!==void 0?a:EE.INTERNAL,v=((u=n.links)!==null&&u!==void 0?u:[]).map(function(F){return{context:F.context,attributes:or(F.attributes)}}),T=or(n.attributes),A=this._sampler.shouldSample(i,p,e,S,T,v);_=(o=A.traceState)!==null&&o!==void 0?o:_;var O=A.decision===St.RECORD_AND_SAMPLED?Q.SAMPLED:Q.NONE,N={traceId:p,spanId:c,traceFlags:O,traceState:_};if(A.decision===St.NOT_RECORD){g.debug("Recording is off, propagating context in a non-recording span");var s=J.wrapSpanContext(N);return s}var U=or(Object.assign(T,A.attributes)),G=new ll(this,i,e,N,S,f,v,n.startTime,void 0,U);return G},t.prototype.startActiveSpan=function(e,n,i,a){var u,o,r;if(!(arguments.length<2)){arguments.length===2?r=n:arguments.length===3?(u=n,r=i):(u=n,o=i,r=a);var s=o??Ye.active(),l=this.startSpan(e,u,s),c=J.setSpan(s,l);return Ye.with(c,r,void 0,l)}},t.prototype.getGeneralLimits=function(){return this._generalLimits},t.prototype.getSpanLimits=function(){return this._spanLimits},t.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},t}()});var Sl,Cd,hC=m(()=>{"use strict";K();Sl=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Cd=function(){function t(e){this._spanProcessors=e}return t.prototype.forceFlush=function(){var e,n,i=[];try{for(var a=Sl(this._spanProcessors),u=a.next();!u.done;u=a.next()){var o=u.value;i.push(o.forceFlush())}}catch(r){e={error:r}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return new Promise(function(r){Promise.all(i).then(function(){r()}).catch(function(s){Te(s||new Error("MultiSpanProcessor: forceFlush failed")),r()})})},t.prototype.onStart=function(e,n){var i,a;try{for(var u=Sl(this._spanProcessors),o=u.next();!o.done;o=u.next()){var r=o.value;r.onStart(e,n)}}catch(s){i={error:s}}finally{try{o&&!o.done&&(a=u.return)&&a.call(u)}finally{if(i)throw i.error}}},t.prototype.onEnd=function(e){var n,i;try{for(var a=Sl(this._spanProcessors),u=a.next();!u.done;u=a.next()){var o=u.value;o.onEnd(e)}}catch(r){n={error:r}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}},t.prototype.shutdown=function(){var e,n,i=[];try{for(var a=Sl(this._spanProcessors),u=a.next();!u.done;u=a.next()){var o=u.value;i.push(o.shutdown())}}catch(r){e={error:r}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return new Promise(function(r,s){Promise.all(i).then(function(){r()},s)})},t}()});var hl,wd=m(()=>{"use strict";hl=function(){function t(){}return t.prototype.onStart=function(e,n){},t.prototype.onEnd=function(e){},t.prototype.shutdown=function(){return Promise.resolve()},t.prototype.forceFlush=function(){return Promise.resolve()},t}()});var bX,xX,Vt,TC,vC=m(()=>{"use strict";M();K();Gu();gi();Ld();hC();wd();El();Id();bX=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),a,u=[],o;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)u.push(a.value)}catch(r){o={error:r}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return u},xX=function(t,e,n){if(n||arguments.length===2)for(var i=0,a=e.length,u;i<a;i++)(u||!(i in e))&&(u||(u=Array.prototype.slice.call(e,0,i)),u[i]=e[i]);return t.concat(u||Array.prototype.slice.call(e))};(function(t){t[t.resolved=0]="resolved",t[t.timeout=1]="timeout",t[t.error=2]="error",t[t.unresolved=3]="unresolved"})(Vt||(Vt={}));TC=function(){function t(e){e===void 0&&(e={});var n,i;this._registeredSpanProcessors=[],this._tracers=new Map;var a=Du({},pl(),sC(e));if(this.resource=(n=a.resource)!==null&&n!==void 0?n:Dt.empty(),a.mergeResourceWithDefaults&&(this.resource=Dt.default().merge(this.resource)),this._config=Object.assign({},a,{resource:this.resource}),!((i=e.spanProcessors)===null||i===void 0)&&i.length)this._registeredSpanProcessors=xX([],bX(e.spanProcessors),!1),this.activeSpanProcessor=new Cd(this._registeredSpanProcessors);else{var u=this._buildExporterFromEnv();if(u!==void 0){var o=new _r(u);this.activeSpanProcessor=o}else this.activeSpanProcessor=new hl}}return t.prototype.getTracer=function(e,n,i){var a=e+"@"+(n||"")+":"+(i?.schemaUrl||"");return this._tracers.has(a)||this._tracers.set(a,new _l({name:e,version:n,schemaUrl:i?.schemaUrl},this._config,this)),this._tracers.get(a)},t.prototype.addSpanProcessor=function(e){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(function(n){return g.error("Error while trying to shutdown current span processor",n)}),this._registeredSpanProcessors.push(e),this.activeSpanProcessor=new Cd(this._registeredSpanProcessors)},t.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},t.prototype.register=function(e){e===void 0&&(e={}),J.setGlobalTracerProvider(this),e.propagator===void 0&&(e.propagator=this._buildPropagatorFromEnv()),e.contextManager&&Ye.setGlobalContextManager(e.contextManager),e.propagator&&at.setGlobalPropagator(e.propagator)},t.prototype.forceFlush=function(){var e=this._config.forceFlushTimeoutMillis,n=this._registeredSpanProcessors.map(function(i){return new Promise(function(a){var u,o=setTimeout(function(){a(new Error("Span processor did not completed within timeout period of "+e+" ms")),u=Vt.timeout},e);i.forceFlush().then(function(){clearTimeout(o),u!==Vt.timeout&&(u=Vt.resolved,a(u))}).catch(function(r){clearTimeout(o),u=Vt.error,a(r)})})});return new Promise(function(i,a){Promise.all(n).then(function(u){var o=u.filter(function(r){return r!==Vt.resolved});o.length>0?a(o):i()}).catch(function(u){return a([u])})})},t.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},t.prototype._getPropagator=function(e){var n;return(n=this.constructor._registeredPropagators.get(e))===null||n===void 0?void 0:n()},t.prototype._getSpanExporter=function(e){var n;return(n=this.constructor._registeredExporters.get(e))===null||n===void 0?void 0:n()},t.prototype._buildPropagatorFromEnv=function(){var e=this,n=Array.from(new Set(Oe().OTEL_PROPAGATORS)),i=n.map(function(u){var o=e._getPropagator(u);return o||g.warn('Propagator "'+u+'" requested through environment variable is unavailable.'),o}),a=i.reduce(function(u,o){return o&&u.push(o),u},[]);if(a.length!==0)return n.length===1?a[0]:new xu({propagators:a})},t.prototype._buildExporterFromEnv=function(){var e=Oe().OTEL_TRACES_EXPORTER;if(!(e==="none"||e==="")){var n=this._getSpanExporter(e);return n||g.error('Exporter "'+e+'" requested through environment variable is unavailable.'),n}},t._registeredPropagators=new Map([["tracecontext",function(){return new Lu}],["baggage",function(){return new vu}]]),t._registeredExporters=new Map,t}()});var MX,mC,yC=m(()=>{"use strict";K();MX=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},mC=function(){function t(){}return t.prototype.export=function(e,n){return this._sendSpans(e,n)},t.prototype.shutdown=function(){return this._sendSpans([]),this.forceFlush()},t.prototype.forceFlush=function(){return Promise.resolve()},t.prototype._exportInfo=function(e){var n;return{resource:{attributes:e.resource.attributes},instrumentationScope:e.instrumentationLibrary,traceId:e.spanContext().traceId,parentId:e.parentSpanId,traceState:(n=e.spanContext().traceState)===null||n===void 0?void 0:n.serialize(),name:e.name,id:e.spanContext().spanId,kind:e.kind,timestamp:Nt(e.startTime),duration:Nt(e.duration),attributes:e.attributes,status:e.status,events:e.events,links:e.links}},t.prototype._sendSpans=function(e,n){var i,a;try{for(var u=MX(e),o=u.next();!o.done;o=u.next()){var r=o.value;console.dir(this._exportInfo(r),{depth:3})}}catch(s){i={error:s}}finally{try{o&&!o.done&&(a=u.return)&&a.call(u)}finally{if(i)throw i.error}}if(n)return n({code:W.SUCCESS})},t}()});var LX,IX,AC,OC=m(()=>{"use strict";K();LX=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),a,u=[],o;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)u.push(a.value)}catch(r){o={error:r}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return u},IX=function(t,e,n){if(n||arguments.length===2)for(var i=0,a=e.length,u;i<a;i++)(u||!(i in e))&&(u||(u=Array.prototype.slice.call(e,0,i)),u[i]=e[i]);return t.concat(u||Array.prototype.slice.call(e))},AC=function(){function t(){this._finishedSpans=[],this._stopped=!1}return t.prototype.export=function(e,n){var i;if(this._stopped)return n({code:W.FAILED,error:new Error("Exporter has been stopped")});(i=this._finishedSpans).push.apply(i,IX([],LX(e),!1)),setTimeout(function(){return n({code:W.SUCCESS})},0)},t.prototype.shutdown=function(){return this._stopped=!0,this._finishedSpans=[],this.forceFlush()},t.prototype.forceFlush=function(){return Promise.resolve()},t.prototype.reset=function(){this._finishedSpans=[]},t.prototype.getFinishedSpans=function(){return this._finishedSpans},t}()});var CX,wX,gC,NC=m(()=>{"use strict";M();K();CX=function(t,e,n,i){function a(u){return u instanceof n?u:new n(function(o){o(u)})}return new(n||(n=Promise))(function(u,o){function r(c){try{l(i.next(c))}catch(p){o(p)}}function s(c){try{l(i.throw(c))}catch(p){o(p)}}function l(c){c.done?u(c.value):a(c.value).then(r,s)}l((i=i.apply(t,e||[])).next())})},wX=function(t,e){var n={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},i,a,u,o;return o={next:r(0),throw:r(1),return:r(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function r(l){return function(c){return s([l,c])}}function s(l){if(i)throw new TypeError("Generator is already executing.");for(;n;)try{if(i=1,a&&(u=l[0]&2?a.return:l[0]?a.throw||((u=a.return)&&u.call(a),0):a.next)&&!(u=u.call(a,l[1])).done)return u;switch(a=0,u&&(l=[l[0]&2,u.value]),l[0]){case 0:case 1:u=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,a=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(u=n.trys,!(u=u.length>0&&u[u.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!u||l[1]>u[0]&&l[1]<u[3])){n.label=l[1];break}if(l[0]===6&&n.label<u[1]){n.label=u[1],u=l;break}if(u&&n.label<u[2]){n.label=u[2],n.ops.push(l);break}u[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(c){l=[6,c],a=0}finally{i=u=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},gC=function(){function t(e){this._exporter=e,this._shutdownOnce=new Nn(this._shutdown,this),this._unresolvedExports=new Set}return t.prototype.forceFlush=function(){return CX(this,void 0,void 0,function(){return wX(this,function(e){switch(e.label){case 0:return[4,Promise.all(Array.from(this._unresolvedExports))];case 1:return e.sent(),this._exporter.forceFlush?[4,this._exporter.forceFlush()]:[3,3];case 2:e.sent(),e.label=3;case 3:return[2]}})})},t.prototype.onStart=function(e,n){},t.prototype.onEnd=function(e){var n=this,i,a;if(!this._shutdownOnce.isCalled&&e.spanContext().traceFlags&Q.SAMPLED){var u=function(){return ai._export(n._exporter,[e]).then(function(r){var s;r.code!==W.SUCCESS&&Te((s=r.error)!==null&&s!==void 0?s:new Error("SimpleSpanProcessor: span export failed (status "+r+")"))}).catch(function(r){Te(r)})};if(e.resource.asyncAttributesPending){var o=(a=(i=e.resource).waitForAsyncAttributes)===null||a===void 0?void 0:a.call(i).then(function(){return o!=null&&n._unresolvedExports.delete(o),u()},function(r){return Te(r)});o!=null&&this._unresolvedExports.add(o)}else u()}},t.prototype.shutdown=function(){return this._shutdownOnce.call()},t.prototype._shutdown=function(){return this._exporter.shutdown()},t}()});var Dd={};Je(Dd,{AlwaysOffSampler:()=>Er,AlwaysOnSampler:()=>bt,BasicTracerProvider:()=>TC,BatchSpanProcessor:()=>_r,ConsoleSpanExporter:()=>mC,ForceFlushState:()=>Vt,InMemorySpanExporter:()=>AC,NoopSpanProcessor:()=>hl,ParentBasedSampler:()=>Wn,RandomIdGenerator:()=>Xn,SamplingDecision:()=>dt,SimpleSpanProcessor:()=>gC,Span:()=>ll,TraceIdRatioBasedSampler:()=>Oi,Tracer:()=>_l});var gi=m(()=>{"use strict";SC();vC();El();yC();OC();NC();wd();cl();fl();bd();xd();Ai();Pd()});var Ni=h((Hfe,RC)=>{"use strict";var DX="2.0.0",UX=Number.MAX_SAFE_INTEGER||9007199254740991,VX=16,BX=250,GX=["major","premajor","minor","preminor","patch","prepatch","prerelease"];RC.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:VX,MAX_SAFE_BUILD_LENGTH:BX,MAX_SAFE_INTEGER:UX,RELEASE_TYPES:GX,SEMVER_SPEC_VERSION:DX,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Ri=h((Ffe,PC)=>{"use strict";var kX=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};PC.exports=kX});var Jn=h((Bt,bC)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:Ud,MAX_SAFE_BUILD_LENGTH:HX,MAX_LENGTH:FX}=Ni(),YX=Ri();Bt=bC.exports={};var qX=Bt.re=[],jX=Bt.safeRe=[],R=Bt.src=[],P=Bt.t={},$X=0,Vd="[a-zA-Z0-9-]",KX=[["\\s",1],["\\d",FX],[Vd,HX]],WX=t=>{for(let[e,n]of KX)t=t.split(`${e}*`).join(`${e}{0,${n}}`).split(`${e}+`).join(`${e}{1,${n}}`);return t},D=(t,e,n)=>{let i=WX(e),a=$X++;YX(t,a,e),P[t]=a,R[a]=e,qX[a]=new RegExp(e,n?"g":void 0),jX[a]=new RegExp(i,n?"g":void 0)};D("NUMERICIDENTIFIER","0|[1-9]\\d*");D("NUMERICIDENTIFIERLOOSE","\\d+");D("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Vd}*`);D("MAINVERSION",`(${R[P.NUMERICIDENTIFIER]})\\.(${R[P.NUMERICIDENTIFIER]})\\.(${R[P.NUMERICIDENTIFIER]})`);D("MAINVERSIONLOOSE",`(${R[P.NUMERICIDENTIFIERLOOSE]})\\.(${R[P.NUMERICIDENTIFIERLOOSE]})\\.(${R[P.NUMERICIDENTIFIERLOOSE]})`);D("PRERELEASEIDENTIFIER",`(?:${R[P.NUMERICIDENTIFIER]}|${R[P.NONNUMERICIDENTIFIER]})`);D("PRERELEASEIDENTIFIERLOOSE",`(?:${R[P.NUMERICIDENTIFIERLOOSE]}|${R[P.NONNUMERICIDENTIFIER]})`);D("PRERELEASE",`(?:-(${R[P.PRERELEASEIDENTIFIER]}(?:\\.${R[P.PRERELEASEIDENTIFIER]})*))`);D("PRERELEASELOOSE",`(?:-?(${R[P.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${R[P.PRERELEASEIDENTIFIERLOOSE]})*))`);D("BUILDIDENTIFIER",`${Vd}+`);D("BUILD",`(?:\\+(${R[P.BUILDIDENTIFIER]}(?:\\.${R[P.BUILDIDENTIFIER]})*))`);D("FULLPLAIN",`v?${R[P.MAINVERSION]}${R[P.PRERELEASE]}?${R[P.BUILD]}?`);D("FULL",`^${R[P.FULLPLAIN]}$`);D("LOOSEPLAIN",`[v=\\s]*${R[P.MAINVERSIONLOOSE]}${R[P.PRERELEASELOOSE]}?${R[P.BUILD]}?`);D("LOOSE",`^${R[P.LOOSEPLAIN]}$`);D("GTLT","((?:<|>)?=?)");D("XRANGEIDENTIFIERLOOSE",`${R[P.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);D("XRANGEIDENTIFIER",`${R[P.NUMERICIDENTIFIER]}|x|X|\\*`);D("XRANGEPLAIN",`[v=\\s]*(${R[P.XRANGEIDENTIFIER]})(?:\\.(${R[P.XRANGEIDENTIFIER]})(?:\\.(${R[P.XRANGEIDENTIFIER]})(?:${R[P.PRERELEASE]})?${R[P.BUILD]}?)?)?`);D("XRANGEPLAINLOOSE",`[v=\\s]*(${R[P.XRANGEIDENTIFIERLOOSE]})(?:\\.(${R[P.XRANGEIDENTIFIERLOOSE]})(?:\\.(${R[P.XRANGEIDENTIFIERLOOSE]})(?:${R[P.PRERELEASELOOSE]})?${R[P.BUILD]}?)?)?`);D("XRANGE",`^${R[P.GTLT]}\\s*${R[P.XRANGEPLAIN]}$`);D("XRANGELOOSE",`^${R[P.GTLT]}\\s*${R[P.XRANGEPLAINLOOSE]}$`);D("COERCEPLAIN",`(^|[^\\d])(\\d{1,${Ud}})(?:\\.(\\d{1,${Ud}}))?(?:\\.(\\d{1,${Ud}}))?`);D("COERCE",`${R[P.COERCEPLAIN]}(?:$|[^\\d])`);D("COERCEFULL",R[P.COERCEPLAIN]+`(?:${R[P.PRERELEASE]})?(?:${R[P.BUILD]})?(?:$|[^\\d])`);D("COERCERTL",R[P.COERCE],!0);D("COERCERTLFULL",R[P.COERCEFULL],!0);D("LONETILDE","(?:~>?)");D("TILDETRIM",`(\\s*)${R[P.LONETILDE]}\\s+`,!0);Bt.tildeTrimReplace="$1~";D("TILDE",`^${R[P.LONETILDE]}${R[P.XRANGEPLAIN]}$`);D("TILDELOOSE",`^${R[P.LONETILDE]}${R[P.XRANGEPLAINLOOSE]}$`);D("LONECARET","(?:\\^)");D("CARETTRIM",`(\\s*)${R[P.LONECARET]}\\s+`,!0);Bt.caretTrimReplace="$1^";D("CARET",`^${R[P.LONECARET]}${R[P.XRANGEPLAIN]}$`);D("CARETLOOSE",`^${R[P.LONECARET]}${R[P.XRANGEPLAINLOOSE]}$`);D("COMPARATORLOOSE",`^${R[P.GTLT]}\\s*(${R[P.LOOSEPLAIN]})$|^$`);D("COMPARATOR",`^${R[P.GTLT]}\\s*(${R[P.FULLPLAIN]})$|^$`);D("COMPARATORTRIM",`(\\s*)${R[P.GTLT]}\\s*(${R[P.LOOSEPLAIN]}|${R[P.XRANGEPLAIN]})`,!0);Bt.comparatorTrimReplace="$1$2$3";D("HYPHENRANGE",`^\\s*(${R[P.XRANGEPLAIN]})\\s+-\\s+(${R[P.XRANGEPLAIN]})\\s*$`);D("HYPHENRANGELOOSE",`^\\s*(${R[P.XRANGEPLAINLOOSE]})\\s+-\\s+(${R[P.XRANGEPLAINLOOSE]})\\s*$`);D("STAR","(<|>)?=?\\s*\\*");D("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");D("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Tl=h((Yfe,xC)=>{"use strict";var zX=Object.freeze({loose:!0}),XX=Object.freeze({}),JX=t=>t?typeof t!="object"?zX:t:XX;xC.exports=JX});var Bd=h((qfe,IC)=>{"use strict";var MC=/^[0-9]+$/,LC=(t,e)=>{let n=MC.test(t),i=MC.test(e);return n&&i&&(t=+t,e=+e),t===e?0:n&&!i?-1:i&&!n?1:t<e?-1:1},QX=(t,e)=>LC(e,t);IC.exports={compareIdentifiers:LC,rcompareIdentifiers:QX}});var Me=h((jfe,UC)=>{"use strict";var vl=Ri(),{MAX_LENGTH:CC,MAX_SAFE_INTEGER:ml}=Ni(),{safeRe:wC,t:DC}=Jn(),ZX=Tl(),{compareIdentifiers:Qn}=Bd(),Gd=class t{constructor(e,n){if(n=ZX(n),e instanceof t){if(e.loose===!!n.loose&&e.includePrerelease===!!n.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>CC)throw new TypeError(`version is longer than ${CC} characters`);vl("SemVer",e,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let i=e.trim().match(n.loose?wC[DC.LOOSE]:wC[DC.FULL]);if(!i)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>ml||this.major<0)throw new TypeError("Invalid major version");if(this.minor>ml||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>ml||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(a=>{if(/^[0-9]+$/.test(a)){let u=+a;if(u>=0&&u<ml)return u}return a}):this.prerelease=[],this.build=i[5]?i[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(vl("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),Qn(this.major,e.major)||Qn(this.minor,e.minor)||Qn(this.patch,e.patch)}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let n=0;do{let i=this.prerelease[n],a=e.prerelease[n];if(vl("prerelease compare",n,i,a),i===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(i===void 0)return-1;if(i===a)continue;return Qn(i,a)}while(++n)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let n=0;do{let i=this.build[n],a=e.build[n];if(vl("build compare",n,i,a),i===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(i===void 0)return-1;if(i===a)continue;return Qn(i,a)}while(++n)}inc(e,n,i){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,i);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,i);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,i),this.inc("pre",n,i);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,i),this.inc("pre",n,i);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let a=Number(i)?1:0;if(!n&&i===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[a];else{let u=this.prerelease.length;for(;--u>=0;)typeof this.prerelease[u]=="number"&&(this.prerelease[u]++,u=-2);if(u===-1){if(n===this.prerelease.join(".")&&i===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(a)}}if(n){let u=[n,a];i===!1&&(u=[n]),Qn(this.prerelease[0],n)===0?isNaN(this.prerelease[1])&&(this.prerelease=u):this.prerelease=u}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};UC.exports=Gd});var qr=h(($fe,BC)=>{"use strict";var VC=Me(),eJ=(t,e,n=!1)=>{if(t instanceof VC)return t;try{return new VC(t,e)}catch(i){if(!n)return null;throw i}};BC.exports=eJ});var kC=h((Kfe,GC)=>{"use strict";var tJ=qr(),rJ=(t,e)=>{let n=tJ(t,e);return n?n.version:null};GC.exports=rJ});var FC=h((Wfe,HC)=>{"use strict";var nJ=qr(),oJ=(t,e)=>{let n=nJ(t.trim().replace(/^[=v]+/,""),e);return n?n.version:null};HC.exports=oJ});var jC=h((zfe,qC)=>{"use strict";var YC=Me(),iJ=(t,e,n,i,a)=>{typeof n=="string"&&(a=i,i=n,n=void 0);try{return new YC(t instanceof YC?t.version:t,n).inc(e,i,a).version}catch{return null}};qC.exports=iJ});var WC=h((Xfe,KC)=>{"use strict";var $C=qr(),aJ=(t,e)=>{let n=$C(t,null,!0),i=$C(e,null,!0),a=n.compare(i);if(a===0)return null;let u=a>0,o=u?n:i,r=u?i:n,s=!!o.prerelease.length;if(!!r.prerelease.length&&!s)return!r.patch&&!r.minor?"major":o.patch?"patch":o.minor?"minor":"major";let c=s?"pre":"";return n.major!==i.major?c+"major":n.minor!==i.minor?c+"minor":n.patch!==i.patch?c+"patch":"prerelease"};KC.exports=aJ});var XC=h((Jfe,zC)=>{"use strict";var uJ=Me(),sJ=(t,e)=>new uJ(t,e).major;zC.exports=sJ});var QC=h((Qfe,JC)=>{"use strict";var lJ=Me(),cJ=(t,e)=>new lJ(t,e).minor;JC.exports=cJ});var ew=h((Zfe,ZC)=>{"use strict";var fJ=Me(),pJ=(t,e)=>new fJ(t,e).patch;ZC.exports=pJ});var rw=h((epe,tw)=>{"use strict";var dJ=qr(),EJ=(t,e)=>{let n=dJ(t,e);return n&&n.prerelease.length?n.prerelease:null};tw.exports=EJ});var nt=h((tpe,ow)=>{"use strict";var nw=Me(),_J=(t,e,n)=>new nw(t,n).compare(new nw(e,n));ow.exports=_J});var aw=h((rpe,iw)=>{"use strict";var SJ=nt(),hJ=(t,e,n)=>SJ(e,t,n);iw.exports=hJ});var sw=h((npe,uw)=>{"use strict";var TJ=nt(),vJ=(t,e)=>TJ(t,e,!0);uw.exports=vJ});var yl=h((ope,cw)=>{"use strict";var lw=Me(),mJ=(t,e,n)=>{let i=new lw(t,n),a=new lw(e,n);return i.compare(a)||i.compareBuild(a)};cw.exports=mJ});var pw=h((ipe,fw)=>{"use strict";var yJ=yl(),AJ=(t,e)=>t.sort((n,i)=>yJ(n,i,e));fw.exports=AJ});var Ew=h((ape,dw)=>{"use strict";var OJ=yl(),gJ=(t,e)=>t.sort((n,i)=>OJ(i,n,e));dw.exports=gJ});var Pi=h((upe,_w)=>{"use strict";var NJ=nt(),RJ=(t,e,n)=>NJ(t,e,n)>0;_w.exports=RJ});var Al=h((spe,Sw)=>{"use strict";var PJ=nt(),bJ=(t,e,n)=>PJ(t,e,n)<0;Sw.exports=bJ});var kd=h((lpe,hw)=>{"use strict";var xJ=nt(),MJ=(t,e,n)=>xJ(t,e,n)===0;hw.exports=MJ});var Hd=h((cpe,Tw)=>{"use strict";var LJ=nt(),IJ=(t,e,n)=>LJ(t,e,n)!==0;Tw.exports=IJ});var Ol=h((fpe,vw)=>{"use strict";var CJ=nt(),wJ=(t,e,n)=>CJ(t,e,n)>=0;vw.exports=wJ});var gl=h((ppe,mw)=>{"use strict";var DJ=nt(),UJ=(t,e,n)=>DJ(t,e,n)<=0;mw.exports=UJ});var Fd=h((dpe,yw)=>{"use strict";var VJ=kd(),BJ=Hd(),GJ=Pi(),kJ=Ol(),HJ=Al(),FJ=gl(),YJ=(t,e,n,i)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t===n;case"!==":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t!==n;case"":case"=":case"==":return VJ(t,n,i);case"!=":return BJ(t,n,i);case">":return GJ(t,n,i);case">=":return kJ(t,n,i);case"<":return HJ(t,n,i);case"<=":return FJ(t,n,i);default:throw new TypeError(`Invalid operator: ${e}`)}};yw.exports=YJ});var Ow=h((Epe,Aw)=>{"use strict";var qJ=Me(),jJ=qr(),{safeRe:Nl,t:Rl}=Jn(),$J=(t,e)=>{if(t instanceof qJ)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let n=null;if(!e.rtl)n=t.match(e.includePrerelease?Nl[Rl.COERCEFULL]:Nl[Rl.COERCE]);else{let s=e.includePrerelease?Nl[Rl.COERCERTLFULL]:Nl[Rl.COERCERTL],l;for(;(l=s.exec(t))&&(!n||n.index+n[0].length!==t.length);)(!n||l.index+l[0].length!==n.index+n[0].length)&&(n=l),s.lastIndex=l.index+l[1].length+l[2].length;s.lastIndex=-1}if(n===null)return null;let i=n[2],a=n[3]||"0",u=n[4]||"0",o=e.includePrerelease&&n[5]?`-${n[5]}`:"",r=e.includePrerelease&&n[6]?`+${n[6]}`:"";return jJ(`${i}.${a}.${u}${o}${r}`,e)};Aw.exports=$J});var Nw=h((_pe,gw)=>{"use strict";var Yd=class{constructor(){this.max=1e3,this.map=new Map}get(e){let n=this.map.get(e);if(n!==void 0)return this.map.delete(e),this.map.set(e,n),n}delete(e){return this.map.delete(e)}set(e,n){if(!this.delete(e)&&n!==void 0){if(this.map.size>=this.max){let a=this.map.keys().next().value;this.delete(a)}this.map.set(e,n)}return this}};gw.exports=Yd});var ot=h((Spe,xw)=>{"use strict";var KJ=/\s+/g,qd=class t{constructor(e,n){if(n=zJ(n),e instanceof t)return e.loose===!!n.loose&&e.includePrerelease===!!n.includePrerelease?e:new t(e.raw,n);if(e instanceof jd)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=e.trim().replace(KJ," "),this.set=this.raw.split("||").map(i=>this.parseRange(i.trim())).filter(i=>i.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let i=this.set[0];if(this.set=this.set.filter(a=>!Pw(a[0])),this.set.length===0)this.set=[i];else if(this.set.length>1){for(let a of this.set)if(a.length===1&&r9(a[0])){this.set=[a];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let n=this.set[e];for(let i=0;i<n.length;i++)i>0&&(this.formatted+=" "),this.formatted+=n[i].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let i=((this.options.includePrerelease&&e9)|(this.options.loose&&t9))+":"+e,a=Rw.get(i);if(a)return a;let u=this.options.loose,o=u?We[Be.HYPHENRANGELOOSE]:We[Be.HYPHENRANGE];e=e.replace(o,p9(this.options.includePrerelease)),te("hyphen replace",e),e=e.replace(We[Be.COMPARATORTRIM],JJ),te("comparator trim",e),e=e.replace(We[Be.TILDETRIM],QJ),te("tilde trim",e),e=e.replace(We[Be.CARETTRIM],ZJ),te("caret trim",e);let r=e.split(" ").map(p=>n9(p,this.options)).join(" ").split(/\s+/).map(p=>f9(p,this.options));u&&(r=r.filter(p=>(te("loose invalid filter",p,this.options),!!p.match(We[Be.COMPARATORLOOSE])))),te("range list",r);let s=new Map,l=r.map(p=>new jd(p,this.options));for(let p of l){if(Pw(p))return[p];s.set(p.value,p)}s.size>1&&s.has("")&&s.delete("");let c=[...s.values()];return Rw.set(i,c),c}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(i=>bw(i,n)&&e.set.some(a=>bw(a,n)&&i.every(u=>a.every(o=>u.intersects(o,n)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new XJ(e,this.options)}catch{return!1}for(let n=0;n<this.set.length;n++)if(d9(this.set[n],e,this.options))return!0;return!1}};xw.exports=qd;var WJ=Nw(),Rw=new WJ,zJ=Tl(),jd=bi(),te=Ri(),XJ=Me(),{safeRe:We,t:Be,comparatorTrimReplace:JJ,tildeTrimReplace:QJ,caretTrimReplace:ZJ}=Jn(),{FLAG_INCLUDE_PRERELEASE:e9,FLAG_LOOSE:t9}=Ni(),Pw=t=>t.value==="<0.0.0-0",r9=t=>t.value==="",bw=(t,e)=>{let n=!0,i=t.slice(),a=i.pop();for(;n&&i.length;)n=i.every(u=>a.intersects(u,e)),a=i.pop();return n},n9=(t,e)=>(te("comp",t,e),t=a9(t,e),te("caret",t),t=o9(t,e),te("tildes",t),t=s9(t,e),te("xrange",t),t=c9(t,e),te("stars",t),t),Ge=t=>!t||t.toLowerCase()==="x"||t==="*",o9=(t,e)=>t.trim().split(/\s+/).map(n=>i9(n,e)).join(" "),i9=(t,e)=>{let n=e.loose?We[Be.TILDELOOSE]:We[Be.TILDE];return t.replace(n,(i,a,u,o,r)=>{te("tilde",t,i,a,u,o,r);let s;return Ge(a)?s="":Ge(u)?s=`>=${a}.0.0 <${+a+1}.0.0-0`:Ge(o)?s=`>=${a}.${u}.0 <${a}.${+u+1}.0-0`:r?(te("replaceTilde pr",r),s=`>=${a}.${u}.${o}-${r} <${a}.${+u+1}.0-0`):s=`>=${a}.${u}.${o} <${a}.${+u+1}.0-0`,te("tilde return",s),s})},a9=(t,e)=>t.trim().split(/\s+/).map(n=>u9(n,e)).join(" "),u9=(t,e)=>{te("caret",t,e);let n=e.loose?We[Be.CARETLOOSE]:We[Be.CARET],i=e.includePrerelease?"-0":"";return t.replace(n,(a,u,o,r,s)=>{te("caret",t,a,u,o,r,s);let l;return Ge(u)?l="":Ge(o)?l=`>=${u}.0.0${i} <${+u+1}.0.0-0`:Ge(r)?u==="0"?l=`>=${u}.${o}.0${i} <${u}.${+o+1}.0-0`:l=`>=${u}.${o}.0${i} <${+u+1}.0.0-0`:s?(te("replaceCaret pr",s),u==="0"?o==="0"?l=`>=${u}.${o}.${r}-${s} <${u}.${o}.${+r+1}-0`:l=`>=${u}.${o}.${r}-${s} <${u}.${+o+1}.0-0`:l=`>=${u}.${o}.${r}-${s} <${+u+1}.0.0-0`):(te("no pr"),u==="0"?o==="0"?l=`>=${u}.${o}.${r}${i} <${u}.${o}.${+r+1}-0`:l=`>=${u}.${o}.${r}${i} <${u}.${+o+1}.0-0`:l=`>=${u}.${o}.${r} <${+u+1}.0.0-0`),te("caret return",l),l})},s9=(t,e)=>(te("replaceXRanges",t,e),t.split(/\s+/).map(n=>l9(n,e)).join(" ")),l9=(t,e)=>{t=t.trim();let n=e.loose?We[Be.XRANGELOOSE]:We[Be.XRANGE];return t.replace(n,(i,a,u,o,r,s)=>{te("xRange",t,i,a,u,o,r,s);let l=Ge(u),c=l||Ge(o),p=c||Ge(r),_=p;return a==="="&&_&&(a=""),s=e.includePrerelease?"-0":"",l?a===">"||a==="<"?i="<0.0.0-0":i="*":a&&_?(c&&(o=0),r=0,a===">"?(a=">=",c?(u=+u+1,o=0,r=0):(o=+o+1,r=0)):a==="<="&&(a="<",c?u=+u+1:o=+o+1),a==="<"&&(s="-0"),i=`${a+u}.${o}.${r}${s}`):c?i=`>=${u}.0.0${s} <${+u+1}.0.0-0`:p&&(i=`>=${u}.${o}.0${s} <${u}.${+o+1}.0-0`),te("xRange return",i),i})},c9=(t,e)=>(te("replaceStars",t,e),t.trim().replace(We[Be.STAR],"")),f9=(t,e)=>(te("replaceGTE0",t,e),t.trim().replace(We[e.includePrerelease?Be.GTE0PRE:Be.GTE0],"")),p9=t=>(e,n,i,a,u,o,r,s,l,c,p,_)=>(Ge(i)?n="":Ge(a)?n=`>=${i}.0.0${t?"-0":""}`:Ge(u)?n=`>=${i}.${a}.0${t?"-0":""}`:o?n=`>=${n}`:n=`>=${n}${t?"-0":""}`,Ge(l)?s="":Ge(c)?s=`<${+l+1}.0.0-0`:Ge(p)?s=`<${l}.${+c+1}.0-0`:_?s=`<=${l}.${c}.${p}-${_}`:t?s=`<${l}.${c}.${+p+1}-0`:s=`<=${s}`,`${n} ${s}`.trim()),d9=(t,e,n)=>{for(let i=0;i<t.length;i++)if(!t[i].test(e))return!1;if(e.prerelease.length&&!n.includePrerelease){for(let i=0;i<t.length;i++)if(te(t[i].semver),t[i].semver!==jd.ANY&&t[i].semver.prerelease.length>0){let a=t[i].semver;if(a.major===e.major&&a.minor===e.minor&&a.patch===e.patch)return!0}return!1}return!0}});var bi=h((hpe,Dw)=>{"use strict";var xi=Symbol("SemVer ANY"),Wd=class t{static get ANY(){return xi}constructor(e,n){if(n=Mw(n),e instanceof t){if(e.loose===!!n.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),Kd("comparator",e,n),this.options=n,this.loose=!!n.loose,this.parse(e),this.semver===xi?this.value="":this.value=this.operator+this.semver.version,Kd("comp",this)}parse(e){let n=this.options.loose?Lw[Iw.COMPARATORLOOSE]:Lw[Iw.COMPARATOR],i=e.match(n);if(!i)throw new TypeError(`Invalid comparator: ${e}`);this.operator=i[1]!==void 0?i[1]:"",this.operator==="="&&(this.operator=""),i[2]?this.semver=new Cw(i[2],this.options.loose):this.semver=xi}toString(){return this.value}test(e){if(Kd("Comparator.test",e,this.options.loose),this.semver===xi||e===xi)return!0;if(typeof e=="string")try{e=new Cw(e,this.options)}catch{return!1}return $d(e,this.operator,this.semver,this.options)}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new ww(e.value,n).test(this.value):e.operator===""?e.value===""?!0:new ww(this.value,n).test(e.semver):(n=Mw(n),n.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!n.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||$d(this.semver,"<",e.semver,n)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||$d(this.semver,">",e.semver,n)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};Dw.exports=Wd;var Mw=Tl(),{safeRe:Lw,t:Iw}=Jn(),$d=Fd(),Kd=Ri(),Cw=Me(),ww=ot()});var Mi=h((Tpe,Uw)=>{"use strict";var E9=ot(),_9=(t,e,n)=>{try{e=new E9(e,n)}catch{return!1}return e.test(t)};Uw.exports=_9});var Bw=h((vpe,Vw)=>{"use strict";var S9=ot(),h9=(t,e)=>new S9(t,e).set.map(n=>n.map(i=>i.value).join(" ").trim().split(" "));Vw.exports=h9});var kw=h((mpe,Gw)=>{"use strict";var T9=Me(),v9=ot(),m9=(t,e,n)=>{let i=null,a=null,u=null;try{u=new v9(e,n)}catch{return null}return t.forEach(o=>{u.test(o)&&(!i||a.compare(o)===-1)&&(i=o,a=new T9(i,n))}),i};Gw.exports=m9});var Fw=h((ype,Hw)=>{"use strict";var y9=Me(),A9=ot(),O9=(t,e,n)=>{let i=null,a=null,u=null;try{u=new A9(e,n)}catch{return null}return t.forEach(o=>{u.test(o)&&(!i||a.compare(o)===1)&&(i=o,a=new y9(i,n))}),i};Hw.exports=O9});var jw=h((Ape,qw)=>{"use strict";var zd=Me(),g9=ot(),Yw=Pi(),N9=(t,e)=>{t=new g9(t,e);let n=new zd("0.0.0");if(t.test(n)||(n=new zd("0.0.0-0"),t.test(n)))return n;n=null;for(let i=0;i<t.set.length;++i){let a=t.set[i],u=null;a.forEach(o=>{let r=new zd(o.semver.version);switch(o.operator){case">":r.prerelease.length===0?r.patch++:r.prerelease.push(0),r.raw=r.format();case"":case">=":(!u||Yw(r,u))&&(u=r);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),u&&(!n||Yw(n,u))&&(n=u)}return n&&t.test(n)?n:null};qw.exports=N9});var Kw=h((Ope,$w)=>{"use strict";var R9=ot(),P9=(t,e)=>{try{return new R9(t,e).range||"*"}catch{return null}};$w.exports=P9});var Pl=h((gpe,Jw)=>{"use strict";var b9=Me(),Xw=bi(),{ANY:x9}=Xw,M9=ot(),L9=Mi(),Ww=Pi(),zw=Al(),I9=gl(),C9=Ol(),w9=(t,e,n,i)=>{t=new b9(t,i),e=new M9(e,i);let a,u,o,r,s;switch(n){case">":a=Ww,u=I9,o=zw,r=">",s=">=";break;case"<":a=zw,u=C9,o=Ww,r="<",s="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(L9(t,e,i))return!1;for(let l=0;l<e.set.length;++l){let c=e.set[l],p=null,_=null;if(c.forEach(f=>{f.semver===x9&&(f=new Xw(">=0.0.0")),p=p||f,_=_||f,a(f.semver,p.semver,i)?p=f:o(f.semver,_.semver,i)&&(_=f)}),p.operator===r||p.operator===s||(!_.operator||_.operator===r)&&u(t,_.semver))return!1;if(_.operator===s&&o(t,_.semver))return!1}return!0};Jw.exports=w9});var Zw=h((Npe,Qw)=>{"use strict";var D9=Pl(),U9=(t,e,n)=>D9(t,e,">",n);Qw.exports=U9});var tD=h((Rpe,eD)=>{"use strict";var V9=Pl(),B9=(t,e,n)=>V9(t,e,"<",n);eD.exports=B9});var oD=h((Ppe,nD)=>{"use strict";var rD=ot(),G9=(t,e,n)=>(t=new rD(t,n),e=new rD(e,n),t.intersects(e,n));nD.exports=G9});var aD=h((bpe,iD)=>{"use strict";var k9=Mi(),H9=nt();iD.exports=(t,e,n)=>{let i=[],a=null,u=null,o=t.sort((c,p)=>H9(c,p,n));for(let c of o)k9(c,e,n)?(u=c,a||(a=c)):(u&&i.push([a,u]),u=null,a=null);a&&i.push([a,null]);let r=[];for(let[c,p]of i)c===p?r.push(c):!p&&c===o[0]?r.push("*"):p?c===o[0]?r.push(`<=${p}`):r.push(`${c} - ${p}`):r.push(`>=${c}`);let s=r.join(" || "),l=typeof e.raw=="string"?e.raw:String(e);return s.length<l.length?s:e}});var pD=h((xpe,fD)=>{"use strict";var uD=ot(),Jd=bi(),{ANY:Xd}=Jd,Li=Mi(),Qd=nt(),F9=(t,e,n={})=>{if(t===e)return!0;t=new uD(t,n),e=new uD(e,n);let i=!1;e:for(let a of t.set){for(let u of e.set){let o=q9(a,u,n);if(i=i||o!==null,o)continue e}if(i)return!1}return!0},Y9=[new Jd(">=0.0.0-0")],sD=[new Jd(">=0.0.0")],q9=(t,e,n)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===Xd){if(e.length===1&&e[0].semver===Xd)return!0;n.includePrerelease?t=Y9:t=sD}if(e.length===1&&e[0].semver===Xd){if(n.includePrerelease)return!0;e=sD}let i=new Set,a,u;for(let f of t)f.operator===">"||f.operator===">="?a=lD(a,f,n):f.operator==="<"||f.operator==="<="?u=cD(u,f,n):i.add(f.semver);if(i.size>1)return null;let o;if(a&&u){if(o=Qd(a.semver,u.semver,n),o>0)return null;if(o===0&&(a.operator!==">="||u.operator!=="<="))return null}for(let f of i){if(a&&!Li(f,String(a),n)||u&&!Li(f,String(u),n))return null;for(let S of e)if(!Li(f,String(S),n))return!1;return!0}let r,s,l,c,p=u&&!n.includePrerelease&&u.semver.prerelease.length?u.semver:!1,_=a&&!n.includePrerelease&&a.semver.prerelease.length?a.semver:!1;p&&p.prerelease.length===1&&u.operator==="<"&&p.prerelease[0]===0&&(p=!1);for(let f of e){if(c=c||f.operator===">"||f.operator===">=",l=l||f.operator==="<"||f.operator==="<=",a){if(_&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===_.major&&f.semver.minor===_.minor&&f.semver.patch===_.patch&&(_=!1),f.operator===">"||f.operator===">="){if(r=lD(a,f,n),r===f&&r!==a)return!1}else if(a.operator===">="&&!Li(a.semver,String(f),n))return!1}if(u){if(p&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===p.major&&f.semver.minor===p.minor&&f.semver.patch===p.patch&&(p=!1),f.operator==="<"||f.operator==="<="){if(s=cD(u,f,n),s===f&&s!==u)return!1}else if(u.operator==="<="&&!Li(u.semver,String(f),n))return!1}if(!f.operator&&(u||a)&&o!==0)return!1}return!(a&&l&&!u&&o!==0||u&&c&&!a&&o!==0||_||p)},lD=(t,e,n)=>{if(!t)return e;let i=Qd(t.semver,e.semver,n);return i>0?t:i<0||e.operator===">"&&t.operator===">="?e:t},cD=(t,e,n)=>{if(!t)return e;let i=Qd(t.semver,e.semver,n);return i<0?t:i>0||e.operator==="<"&&t.operator==="<="?e:t};fD.exports=F9});var SD=h((Mpe,_D)=>{"use strict";var Zd=Jn(),dD=Ni(),j9=Me(),ED=Bd(),$9=qr(),K9=kC(),W9=FC(),z9=jC(),X9=WC(),J9=XC(),Q9=QC(),Z9=ew(),e7=rw(),t7=nt(),r7=aw(),n7=sw(),o7=yl(),i7=pw(),a7=Ew(),u7=Pi(),s7=Al(),l7=kd(),c7=Hd(),f7=Ol(),p7=gl(),d7=Fd(),E7=Ow(),_7=bi(),S7=ot(),h7=Mi(),T7=Bw(),v7=kw(),m7=Fw(),y7=jw(),A7=Kw(),O7=Pl(),g7=Zw(),N7=tD(),R7=oD(),P7=aD(),b7=pD();_D.exports={parse:$9,valid:K9,clean:W9,inc:z9,diff:X9,major:J9,minor:Q9,patch:Z9,prerelease:e7,compare:t7,rcompare:r7,compareLoose:n7,compareBuild:o7,sort:i7,rsort:a7,gt:u7,lt:s7,eq:l7,neq:c7,gte:f7,lte:p7,cmp:d7,coerce:E7,Comparator:_7,Range:S7,satisfies:h7,toComparators:T7,maxSatisfying:v7,minSatisfying:m7,minVersion:y7,validRange:A7,outside:O7,gtr:g7,ltr:N7,intersects:R7,simplifyRange:P7,subset:b7,SemVer:j9,re:Zd.re,src:Zd.src,tokens:Zd.t,SEMVER_SPEC_VERSION:dD.SEMVER_SPEC_VERSION,RELEASE_TYPES:dD.RELEASE_TYPES,compareIdentifiers:ED.compareIdentifiers,rcompareIdentifiers:ED.rcompareIdentifiers}});function M7(t){var e=decodeURIComponent(t).split(":");if(e.length!==4)return null;var n=TD(e,4),i=n[0],a=n[1],u=n[3],o=i.padStart(32,"0"),r=a.padStart(16,"0"),s=x7.test(u)?parseInt(u,16)&1:1;return{traceId:o,spanId:r,isRemote:!0,traceFlags:s}}var hD,TD,eE,bl,vD,x7,mD=m(()=>{"use strict";M();K();hD=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},TD=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),a,u=[],o;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)u.push(a.value)}catch(r){o={error:r}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return u},eE="uber-trace-id",bl="uberctx",vD=function(){function t(e){typeof e=="string"?(this._jaegerTraceHeader=e,this._jaegerBaggageHeaderPrefix=bl):(this._jaegerTraceHeader=e?.customTraceHeader||eE,this._jaegerBaggageHeaderPrefix=e?.customBaggageHeaderPrefix||bl)}return t.prototype.inject=function(e,n,i){var a,u,o=J.getSpanContext(e),r=at.getBaggage(e);if(o&&xe(e)===!1){var s="0"+(o.traceFlags||Q.NONE).toString(16);i.set(n,this._jaegerTraceHeader,o.traceId+":"+o.spanId+":0:"+s)}if(r)try{for(var l=hD(r.getAllEntries()),c=l.next();!c.done;c=l.next()){var p=TD(c.value,2),_=p[0],f=p[1];i.set(n,this._jaegerBaggageHeaderPrefix+"-"+_,encodeURIComponent(f.value))}}catch(S){a={error:S}}finally{try{c&&!c.done&&(u=l.return)&&u.call(l)}finally{if(a)throw a.error}}},t.prototype.extract=function(e,n,i){var a,u,o=this,r,s=i.get(n,this._jaegerTraceHeader),l=Array.isArray(s)?s[0]:s,c=i.keys(n).filter(function(A){return A.startsWith(o._jaegerBaggageHeaderPrefix+"-")}).map(function(A){var O=i.get(n,A);return{key:A.substring(o._jaegerBaggageHeaderPrefix.length+1),value:Array.isArray(O)?O[0]:O}}),p=e;if(typeof l=="string"){var _=M7(l);_&&(p=J.setSpanContext(p,_))}if(c.length===0)return p;var f=(r=at.getBaggage(e))!==null&&r!==void 0?r:at.createBaggage();try{for(var S=hD(c),v=S.next();!v.done;v=S.next()){var T=v.value;T.value!==void 0&&(f=f.setEntry(T.key,{value:decodeURIComponent(T.value)}))}}catch(A){a={error:A}}finally{try{v&&!v.done&&(u=S.return)&&u.call(S)}finally{if(a)throw a.error}}return p=at.setBaggage(p,f),p},t.prototype.fields=function(){return[this._jaegerTraceHeader]},t}(),x7=/^[0-9a-f]{1,2}$/i});var yD={};Je(yD,{JaegerPropagator:()=>vD,UBER_BAGGAGE_HEADER_PREFIX:()=>bl,UBER_TRACE_ID_HEADER:()=>eE});var AD=m(()=>{"use strict";mD()});var ND=h(Ll=>{"use strict";Object.defineProperty(Ll,"__esModule",{value:!0});Ll.NodeTracerProvider=void 0;var OD=KI(),xl=(rC(),Y(tC)),gD=(gi(),Y(Dd)),L7=SD(),I7=(AD(),Y(yD)),Ml=class extends gD.BasicTracerProvider{constructor(e={}){super(e)}register(e={}){if(e.contextManager===void 0){let n=L7.gte(process.version,"14.8.0")?OD.AsyncLocalStorageContextManager:OD.AsyncHooksContextManager;e.contextManager=new n,e.contextManager.enable()}super.register(e)}};Ll.NodeTracerProvider=Ml;Ml._registeredPropagators=new Map([...gD.BasicTracerProvider._registeredPropagators,["b3",()=>new xl.B3Propagator({injectEncoding:xl.B3InjectEncoding.SINGLE_HEADER})],["b3multi",()=>new xl.B3Propagator({injectEncoding:xl.B3InjectEncoding.MULTI_HEADER})],["jaeger",()=>new I7.JaegerPropagator]])});var RD=h(q=>{"use strict";Object.defineProperty(q,"__esModule",{value:!0});q.Tracer=q.TraceIdRatioBasedSampler=q.Span=q.SimpleSpanProcessor=q.SamplingDecision=q.RandomIdGenerator=q.ParentBasedSampler=q.NoopSpanProcessor=q.InMemorySpanExporter=q.ForceFlushState=q.ConsoleSpanExporter=q.BatchSpanProcessor=q.BasicTracerProvider=q.AlwaysOnSampler=q.AlwaysOffSampler=q.NodeTracerProvider=void 0;var C7=ND();Object.defineProperty(q,"NodeTracerProvider",{enumerable:!0,get:function(){return C7.NodeTracerProvider}});var ke=(gi(),Y(Dd));Object.defineProperty(q,"AlwaysOffSampler",{enumerable:!0,get:function(){return ke.AlwaysOffSampler}});Object.defineProperty(q,"AlwaysOnSampler",{enumerable:!0,get:function(){return ke.AlwaysOnSampler}});Object.defineProperty(q,"BasicTracerProvider",{enumerable:!0,get:function(){return ke.BasicTracerProvider}});Object.defineProperty(q,"BatchSpanProcessor",{enumerable:!0,get:function(){return ke.BatchSpanProcessor}});Object.defineProperty(q,"ConsoleSpanExporter",{enumerable:!0,get:function(){return ke.ConsoleSpanExporter}});Object.defineProperty(q,"ForceFlushState",{enumerable:!0,get:function(){return ke.ForceFlushState}});Object.defineProperty(q,"InMemorySpanExporter",{enumerable:!0,get:function(){return ke.InMemorySpanExporter}});Object.defineProperty(q,"NoopSpanProcessor",{enumerable:!0,get:function(){return ke.NoopSpanProcessor}});Object.defineProperty(q,"ParentBasedSampler",{enumerable:!0,get:function(){return ke.ParentBasedSampler}});Object.defineProperty(q,"RandomIdGenerator",{enumerable:!0,get:function(){return ke.RandomIdGenerator}});Object.defineProperty(q,"SamplingDecision",{enumerable:!0,get:function(){return ke.SamplingDecision}});Object.defineProperty(q,"SimpleSpanProcessor",{enumerable:!0,get:function(){return ke.SimpleSpanProcessor}});Object.defineProperty(q,"Span",{enumerable:!0,get:function(){return ke.Span}});Object.defineProperty(q,"TraceIdRatioBasedSampler",{enumerable:!0,get:function(){return ke.TraceIdRatioBasedSampler}});Object.defineProperty(q,"Tracer",{enumerable:!0,get:function(){return ke.Tracer}})});var bD=h(Il=>{"use strict";Object.defineProperty(Il,"__esModule",{value:!0});Il.OTLPTraceExporter=void 0;var PD=dd(),w7=(Vs(),Y(ud)),D7=(Ei(),Y(Os)),tE=class extends D7.OTLPExporterBase{constructor(e={}){super((0,PD.createOtlpGrpcExportDelegate)((0,PD.convertLegacyOtlpGrpcOptions)(e,"TRACES"),w7.ProtobufTraceSerializer,"TraceExportService","/opentelemetry.proto.collector.trace.v1.TraceService/Export"))}};Il.OTLPTraceExporter=tE});var xD=h(jr=>{"use strict";var U7=jr&&jr.__createBinding||(Object.create?function(t,e,n,i){i===void 0&&(i=n),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]}),V7=jr&&jr.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&U7(e,t,n)};Object.defineProperty(jr,"__esModule",{value:!0});V7(bD(),jr)});var DD=Fe(Jl(),1),UD=Fe(eo(),1);import G7 from"path";function j1(t){return typeof t=="object"&&t!==null}function $1(t){return j1(t)&&typeof t.length=="number"}function K1(t){return Array.isArray(t)?t:t===void 0?[]:$1(t)||t instanceof Set?Array.from(t):[t]}var Lt=K1;function W1(t,e,...n){let i=[];if(!Array.isArray(t))throw new Error("Input must be an array");for(let[a,u]of t.entries()){let o=[];n.forEach(r=>{typeof r=="function"?o=o.concat(r(u)):o.push(r)}),e(u)&&i.push({index:a,replaceWithValue:o})}for(let a of i.reverse()){let u=[a.index,1].concat(a.replaceWithValue);t.splice.apply(t,u)}return t}var qi=W1;var ce={short:/^-([^\d-])$/,long:/^--(\S+)/,combinedShort:/^-[^\d-]{2,}$/,optEquals:/^(--\S+?)=(.*)/},ji=class extends Array{load(e){if(this.clear(),e&&e!==process.argv)e=Lt(e);else{e=process.argv.slice(0);let n=process.execArgv.some(J1)?1:2;e.splice(0,n)}e.forEach(n=>this.push(String(n)))}clear(){this.length=0}expandOptionEqualsNotation(){if(this.some(e=>ce.optEquals.test(e))){let e=[];this.forEach(n=>{let i=n.match(ce.optEquals);i?e.push(i[1],i[2]):e.push(n)}),this.clear(),this.load(e)}}expandGetoptNotation(){this.hasCombinedShortOptions()&&qi(this,ce.combinedShort,z1)}hasCombinedShortOptions(){return this.some(e=>ce.combinedShort.test(e))}static from(e){let n=new this;return n.load(e),n}};function z1(t){return t=t.slice(1),t.split("").map(e=>"-"+e)}function $i(t){return ce.optEquals.test(t)}function so(t){return(ce.short.test(t)||ce.long.test(t))&&!ce.optEquals.test(t)}function X1(t){return ce.long.test(t)&&!$i(t)}function Ql(t){return ce.short.test(t)?t.match(ce.short)[1]:X1(t)?t.match(ce.long)[1]:$i(t)?t.match(ce.optEquals)[1].replace(/^--/,""):null}function cS(t){return!(so(t)||ce.combinedShort.test(t)||ce.optEquals.test(t))}function J1(t){return["--eval","-e"].indexOf(t)>-1||t.startsWith("--eval=")}function Q1(t){return!isNaN(parseFloat(t))}function Z1(t){return!isNaN(parseFloat(t))&&isFinite(t)}function eV(t){return t!==null&&typeof t=="object"&&t.constructor===Object}function tV(t){return pS(t)&&typeof t.length=="number"}function pS(t){return typeof t=="object"&&t!==null}function lo(t){return typeof t<"u"}function rV(t){return!lo(t)}function dS(t){return t===null}function nV(t){return lo(t)&&!dS(t)&&!Number.isNaN(t)}function oV(t){return typeof t=="function"?/^class /.test(Function.prototype.toString.call(t)):!1}function iV(t){if(t===null)return!0;switch(typeof t){case"string":case"number":case"symbol":case"undefined":case"boolean":return!0;default:return!1}}function aV(t){if(t){let e=lo(Promise)&&t instanceof Promise,n=t.then&&typeof t.then=="function";return!!(e||n)}else return!1}function uV(t){return t===null||!lo(t)?!1:typeof t[Symbol.iterator]=="function"||typeof t[Symbol.asyncIterator]=="function"}function sV(t){return typeof t=="string"}function lV(t){return typeof t=="function"}function cV(t){return typeof t=="function"&&t.constructor.name==="AsyncFunction"}var Se={isNumber:Q1,isFiniteNumber:Z1,isPlainObject:eV,isArrayLike:tV,isObject:pS,isDefined:lo,isUndefined:rV,isNull:dS,isDefinedValue:nV,isClass:oV,isPrimitive:iV,isPromise:aV,isIterable:uV,isString:sV,isFunction:lV,isAsyncFunction:cV};var Zl=class{constructor(e){this.name=e.name,this.type=e.type||String,this.alias=e.alias,this.multiple=e.multiple,this.lazyMultiple=e.lazyMultiple,this.defaultOption=e.defaultOption,this.defaultValue=e.defaultValue,this.group=e.group;for(let n in e)this[n]||(this[n]=e[n])}isBoolean(){return this.type===Boolean||Se.isFunction(this.type)&&this.type.name==="Boolean"}isMultiple(){return this.multiple||this.lazyMultiple}static create(e){return new this(e)}},co=Zl;var ec=class extends Array{validate(e){this.some(_=>!_.name)&&It("INVALID_DEFINITIONS","Invalid option definitions: the `name` property is required on each definition"),this.some(_=>_.type&&typeof _.type!="function")&&It("INVALID_DEFINITIONS","Invalid option definitions: the `type` property must be a setter fuction (default: `Boolean`)");let a;this.some(_=>(a=_,Se.isDefined(_.alias)&&Se.isNumber(_.alias)))&&It("INVALID_DEFINITIONS","Invalid option definition: to avoid ambiguity an alias cannot be numeric [--"+a.name+" alias is -"+a.alias+"]"),this.some(_=>(a=_,Se.isDefined(_.alias)&&_.alias.length!==1))&&It("INVALID_DEFINITIONS","Invalid option definition: an alias must be a single character"),this.some(_=>(a=_,_.alias==="-"))&&It("INVALID_DEFINITIONS",'Invalid option definition: an alias cannot be "-"'),_S(this.map(_=>e?_.name.toLowerCase():_.name))&&It("INVALID_DEFINITIONS","Two or more option definitions have the same name"),_S(this.map(_=>e&&Se.isDefined(_.alias)?_.alias.toLowerCase():_.alias))&&It("INVALID_DEFINITIONS","Two or more option definitions have the same alias"),this.filter(_=>_.defaultOption===!0).length>1&&It("INVALID_DEFINITIONS","Only one option definition can be the defaultOption"),this.some(_=>(a=_,_.isBoolean()&&_.defaultOption))&&It("INVALID_DEFINITIONS",`A boolean option ["${a.name}"] can not also be the defaultOption.`)}get(e,n){if(so(e))if(ce.short.test(e)){let i=Ql(e);if(n){let a=i.toLowerCase();return this.find(u=>Se.isDefined(u.alias)&&u.alias.toLowerCase()===a)}else return this.find(a=>a.alias===i)}else{let i=Ql(e);if(n){let a=i.toLowerCase();return this.find(u=>u.name.toLowerCase()===a)}else return this.find(a=>a.name===i)}else return this.find(i=>i.name===e)}getDefault(){return this.find(e=>e.defaultOption===!0)}isGrouped(){return this.some(e=>e.group)}whereGrouped(){return this.filter(ES)}whereNotGrouped(){return this.filter(e=>!ES(e))}whereDefaultValueSet(){return this.filter(e=>Se.isDefined(e.defaultValue))}static from(e,n){if(e instanceof this)return e;let i=super.from(Lt(e),a=>co.create(a));return i.validate(n),i}};function It(t,e){let n=new Error(e);throw n.name=t,n}function ES(t){return Lt(t.group).some(e=>e)}function _S(t){let e={};for(let n=0;n<t.length;n++){let i=t[n];if(e[i])return!0;Se.isDefined(i)&&(e[i]=!0)}}var Zr=ec;var tc=class{constructor(e,n){this.options=Object.assign({},n),this.definitions=Zr.from(e,this.options.caseInsensitive),this.argv=ji.from(this.options.argv),this.argv.hasCombinedShortOptions()&&qi(this.argv,ce.combinedShort.test.bind(ce.combinedShort),i=>(i=i.slice(1),i.split("").map(a=>({origArg:`-${i}`,arg:"-"+a}))))}*[Symbol.iterator](){let e=this.definitions,n,i,a,u,o=!1,r=!1,s;for(let l of this.argv){if(Se.isPlainObject(l)&&(s=l.origArg,l=l.arg),r&&this.options.stopAtFirstUnknown){yield{event:"unknown_value",arg:l,name:"_unknown",value:void 0};continue}if(so(l))n=e.get(l,this.options.caseInsensitive),i=void 0,n?(i=n.isBoolean()?!0:null,u="set"):u="unknown_option";else if($i(l)){let p=l.match(ce.optEquals);n=e.get(p[1],this.options.caseInsensitive),n?n.isBoolean()?(yield{event:"unknown_value",arg:l,name:"_unknown",value:i,def:n},u="set",i=!0):(u="set",i=p[2]):u="unknown_option"}else cS(l)&&(n?(i=l,u="set"):(n=this.definitions.getDefault(),n&&!o?(i=l,u="set"):(u="unknown_value",n=void 0)));a=n?n.name:"_unknown";let c={event:u,arg:l,name:a,value:i,def:n};s&&(c.subArg=l,c.arg=s),yield c,a==="_unknown"&&(r=!0),n&&n.defaultOption&&!n.isMultiple()&&u==="set"&&(o=!0),n&&n.isBoolean()&&(n=void 0),n&&!n.multiple&&Se.isDefined(i)&&i!==null&&(n=void 0),i=void 0,u=void 0,a=void 0,s=void 0}}},SS=tc;var vr=new WeakMap,Ki=class{constructor(e){this.definition=new co(e),this.state=null,this.resetToDefault()}get(){return vr.get(this)}set(e){this._set(e,"set")}_set(e,n){let i=this.definition;if(i.isMultiple()){if(e!=null){let a=this.get();this.state==="default"&&(a.length=0),a.push(i.type(e)),this.state=n}}else if(!i.isMultiple()&&this.state==="set"){let a=new Error(`Singular option already set [${this.definition.name}=${this.get()}]`);throw a.name="ALREADY_SET",a.value=e,a.optionName=i.name,a}else e==null?vr.set(this,e):(vr.set(this,i.type(e)),this.state=n)}resetToDefault(){Se.isDefined(this.definition.defaultValue)?this.definition.isMultiple()?vr.set(this,Lt(this.definition.defaultValue).slice()):vr.set(this,this.definition.defaultValue):this.definition.isMultiple()?vr.set(this,[]):vr.set(this,null),this.state="default"}static create(e){return e=new co(e),e.isBoolean()?rc.create(e):new this(e)}},rc=class extends Ki{set(e){super.set(!0)}static create(e){return new this(e)}},fo=Ki;var hS=Fe(aE(),1),nc=class extends Map{constructor(e){super(),this.definitions=Zr.from(e),this.set("_unknown",fo.create({name:"_unknown",multiple:!0}));for(let n of this.definitions.whereDefaultValueSet())this.set(n.name,fo.create(n))}toObject(e){e=e||{};let n={};for(let i of this){let a=e.camelCase&&i[0]!=="_unknown"?(0,hS.default)(i[0]):i[0],u=i[1];a==="_unknown"&&!u.get().length||(n[a]=u.get())}return e.skipUnknown&&delete n._unknown,n}},Wi=nc;var oc=Fe(aE(),1),ic=class extends Wi{toObject(e){let n=super.toObject({skipUnknown:e.skipUnknown}),i=super.toObject(e),a=i._unknown;delete i._unknown;let u={_all:i};return a&&a.length&&(u._unknown=a),this.definitions.whereGrouped().forEach(o=>{let r=e.camelCase?(0,oc.default)(o.name):o.name,s=n[o.name];for(let l of Lt(o.group))u[l]=u[l]||{},Se.isDefined(s)&&(u[l][r]=s)}),this.definitions.whereNotGrouped().forEach(o=>{let r=e.camelCase?(0,oc.default)(o.name):o.name,s=n[o.name];Se.isDefined(s)&&(u._none||(u._none={}),u._none[r]=s)}),u}},TS=ic;function fV(t,e){e=e||{},e.stopAtFirstUnknown&&(e.partial=!0),t=Zr.from(t,e.caseInsensitive);let n=new SS(t,{argv:e.argv,stopAtFirstUnknown:e.stopAtFirstUnknown,caseInsensitive:e.caseInsensitive}),i=t.isGrouped()?TS:Wi,a=new i(t);for(let u of n){let o=u.subArg||u.arg;if(!e.partial){if(u.event==="unknown_value"){let s=new Error(`Unknown value: ${o}`);throw s.name="UNKNOWN_VALUE",s.value=o,s}else if(u.event==="unknown_option"){let s=new Error(`Unknown option: ${o}`);throw s.name="UNKNOWN_OPTION",s.optionName=o,s}}let r;a.has(u.name)?r=a.get(u.name):(r=fo.create(u.def),a.set(u.name,r)),u.name==="_unknown"?r.set(o):r.set(u.value)}return a.toObject({skipUnknown:!e.partial,camelCase:e.camelCase})}var vS=fV;var VD=Fe(FD(),1),BD=Fe(YD(),1),GD=Fe(KO(),1);import k7 from"http";import{Session as H7}from"node:inspector/promises";import{createRequire as dY}from"module";var Ec=Fe(Jl(),1);import ra from"path";import dc from"os";var EY=dY(import.meta.url);function WO(t){let e=EY.resolve(t),n=ra.dirname(e);for(;!Ec.default.existsSync(ra.join(n,"package.json"));)n=ra.dirname(n);let i=Ec.default.readFileSync(ra.join(n,"package.json"),"utf-8");return JSON.parse(i)}var na=class{constructor(e){this.instance=e;let n=WO("@sentio/sdk"),i=WO("@sentio/runtime");console.log("Runtime version:",i.version,"SDK version:",n.version);let a=n.version.split(".");this.sdkMinorVersion=parseInt(a[1])}instance;sdkMinorVersion;async getConfig(e,n){let i=await this.instance.getConfig(e,n);if(i.executionConfig=oE.fromPartial(Ul.execution),i.contractConfigs)for(let a of i.contractConfigs)a.aptosCallConfigs&&(a.moveCallConfigs=a.aptosCallConfigs),a.aptosEventConfigs&&(a.moveEventConfigs=a.aptosEventConfigs);return i}async start(e,n){return await this.instance.start(e,n)}async stop(e,n){return await this.instance.stop(e,n)}async processBindings(e,n){Ul.execution.sequential&&(e.bindings=e.bindings.sort(_Y));for(let i of e.bindings)this.adjustDataBinding(i);try{let i=await this.instance.processBindings(e,n);return this.adjustResult(i.result),!i.configUpdated&&i.result?.states?.configUpdated&&(i.configUpdated=i.result?.states?.configUpdated),i}catch(i){throw this.sdkMinorVersion<=16&&(i.code===dc.constants.errno.ECONNRESET||i.code===dc.constants.errno.ECONNREFUSED||i.code===dc.constants.errno.ECONNABORTED)&&process.exit(1),i}}async*adjustBindingsStream(e){for await(let n of e)this.adjustDataBinding(n.binding),yield n}async*processBindingsStream(e,n){yield*this.instance.processBindingsStream(this.adjustBindingsStream(e),n)}async*preprocessBindingsStream(e,n){yield*this.instance.preprocessBindingsStream(this.adjustBindingsStream(e),n)}adjustResult(e){}adjustDataBinding(e){if(e)switch(e.handlerType){case 6:e.data?.aptEvent&&e.data.aptEvent.rawTransaction&&!e.data.aptEvent.transaction&&(e.data.aptEvent.transaction=JSON.parse(e.data.aptEvent.rawTransaction));break;case 7:e.data?.aptCall&&e.data.aptCall.rawTransaction&&!e.data.aptCall.transaction&&(e.data.aptCall.transaction=JSON.parse(e.data.aptCall.rawTransaction));break;case 8:e.data?.aptResource?.resources&&e.data.aptResource.rawResources&&e.data.aptResource.rawResources.length>0&&(e.data.aptResource.resources=e.data.aptResource.rawResources.map(n=>JSON.parse(n)));break;case 0:e.data?.ethBlock&&e.data.raw.length===0&&(e.data.raw=new TextEncoder().encode(JSON.stringify(e.data.ethBlock.block)));break;default:break}}};function _Y(t,e){let n=zO(t)||new Date(0),i=zO(e)||new Date(0),a=n.getTime()-i.getTime();return a!==0?a:XO(t)-XO(e)}function zO(t){return t.data?.ethLog?.timestamp||t.data?.ethTransaction?.timestamp||(t.data?.ethBlock?.block?.timestamp?new Date(Number(t.data.ethBlock.block.timestamp)*1e3):void 0)||t.data?.ethTrace?.timestamp||(t.data?.aptCall?.transaction?new Date(Number(t.data.aptCall.transaction.timestamp)/1e3):void 0)||(t.data?.aptEvent?.transaction?new Date(Number(t.data.aptEvent.transaction.timestamp)/1e3):void 0)||(t.data?.aptResource?.timestampMicros?new Date(Number(t.data.aptResource.timestampMicros)/1e3):void 0)||t.data?.fuelCall?.timestamp}function XO(t){return t.data?.ethLog?.log?.logIndex||t.data?.ethTransaction?.transaction?.transactionIndex||t.data?.ethBlock?.block?.number||t.data?.ethTrace?.trace?.transactionPosition}import("node:process").then(t=>t.stdout.write(""));var gt=Fe(c0(),1);function f0(t){let e=[],n=JSON.stringify(t,function(i,a){if(typeof a=="object"&&a!==null){if(e.indexOf(a)!==-1)return;e.push(a)}return a});return e=[],n}function p0(t,e){let n={transform:a=>{let u=[];typeof a.message=="object"?u.push(f0(a.message)):u.push(a.message);let o=a[Symbol.for("splat")];if(o)for(let r in o){let s=o[r];typeof s=="object"?u.push(f0(s)):u.push(s)}return a.message=u.join(" "),a}},i=(0,gt.createLogger)({format:gt.format.combine(gt.format.timestamp({format:"YYYY-MM-DDTHH:mm:ss.SSSZ"}),n,gt.format.errors({stack:!0}),t?gt.format.json():gt.format.simple()),level:e?"debug":"info",transports:[new gt.transports.Console]});console.log=(...a)=>i.info.call(i,...a),console.info=(...a)=>i.info.call(i,...a),console.warn=(...a)=>i.warn.call(i,...a),console.error=(...a)=>i.error.call(i,...a),console.debug=(...a)=>i.debug.call(i,...a)}import("node:process").then(t=>t.stdout.write(""));Gu();In();var MD=Fe(kI(),1),LD=Fe(qI(),1),rE=Fe(RD(),1),ID=Fe(xD(),1);gi();M();async function CD(t){t&&g.setLogger(new cE,it.DEBUG);let e=await Bu.detect(),n=new pi({resource:e,readers:[new os({exporter:new MD.OTLPMetricExporter}),new LD.PrometheusExporter({host:"0.0.0.0",port:4041})]}),i=new rE.NodeTracerProvider({resource:e}),a=new ID.OTLPTraceExporter,u=new _r(a);i.addSpanProcessor(u),Ci.setGlobalMeterProvider(n),J.setGlobalTracerProvider(i),["SIGINT","SIGTERM"].forEach(o=>{process.on(o,()=>B7())}),Ci.getMeter("processor").createGauge("up").record(1)}async function B7(){let t=J.getTracerProvider();if(t instanceof dE){let n=t.getDelegate();n instanceof rE.NodeTracerProvider&&n.shutdown().catch(console.error)}let e=Ci.getMeterProvider();e instanceof pi&&e.shutdown().catch(console.error)}import("node:process").then(t=>t.stdout.write(""));var Cl=class{constructor(e){this.loader=e}async listen(e){let n=wl.INSTANCE;await this.loader(),await n.configure(nE.create()),console.log("Starting Action Server at:",e),await n.startServer(e)}forceShutdown(){wl.INSTANCE.shutdown()}};import("node:process").then(t=>t.stdout.write(""));var F7=[{name:"target",type:String,defaultOption:!0},{name:"port",alias:"p",type:String,defaultValue:"4000"},{name:"concurrency",type:Number,defaultValue:4},{name:"batch-count",type:Number,defaultValue:1},{name:"chains-config",alias:"c",type:String,defaultValue:"chains-config.json"},{name:"chainquery-server",type:String,defaultValue:""},{name:"pricefeed-server",type:String,defaultValue:""},{name:"log-format",type:String,defaultValue:"console"},{name:"debug",type:Boolean,defaultValue:!1},{name:"start-action-server",type:Boolean,defaultValue:!1}],He=vS(F7,{partial:!0}),Y7=process.env.LOG_LEVEL?.toUpperCase();p0(He["log-format"]==="json",Y7==="debug"?!0:He.debug);console.debug("Starting with",He.target);await CD(He.debug);Error.stackTraceLimit=20;var q7=G7.resolve(He["chains-config"]),j7=DD.default.readJsonSync(q7),$7=process.env.OVERRIDE_CONCURRENCY?parseInt(process.env.OVERRIDE_CONCURRENCY):void 0,K7=process.env.OVERRIDE_BATCH_COUNT?parseInt(process.env.OVERRIDE_BATCH_COUNT):void 0;Sr.INSTANCE.concurrency=$7??He.concurrency;Sr.INSTANCE.batchCount=K7??He["batch-count"];Sr.INSTANCE.chainQueryAPI=He["chainquery-server"];Sr.INSTANCE.priceFeedAPI=He["pricefeed-server"];for(let[t,e]of Object.entries(j7)){let n=e;if(n.ChainServer)Sr.INSTANCE.chainServer.set(t,n.ChainServer);else{let i=n.Https?.[0];i?Sr.INSTANCE.chainServer.set(t,i):console.error("not valid config for chain",t)}}console.debug("Starting Server",He);var $r,Zn,wD=async()=>{let t=await import(He.target);return console.debug("Module loaded",t),t};if(He["start-action-server"])$r=new Cl(wD),$r.listen(He.port);else{$r=(0,VD.createServer)({"grpc.max_send_message_length":384*1024*1024,"grpc.max_receive_message_length":384*1024*1024,"grpc.default_compression_algorithm":UD.compressionAlgorithms.gzip}).use((0,GD.openTelemetryServerMiddleware)()).use(BD.errorDetailsServerMiddleware),Zn=new SE(wD,$r.shutdown);let t=new na(Zn);$r.add(iE,t),$r.listen("0.0.0.0:"+He.port),console.log("Processor Server Started at:",He.port)}var kD=4040,W7=k7.createServer(async function(t,e){if(t.url){let n=new URL(t.url,`http://${t.headers.host}`),i=n.searchParams;switch(n.pathname){case"/profile":{try{let a=parseInt(i.get("t")||"1000",10)||1e3,u=new H7;u.connect(),await u.post("Profiler.enable"),await u.post("Profiler.start"),await new Promise(r=>setTimeout(r,a));let{profile:o}=await u.post("Profiler.stop");e.writeHead(200,{"Content-Type":"application/json"}),e.write(JSON.stringify(o)),u.disconnect()}catch{e.writeHead(500)}break}default:e.writeHead(404)}}else e.writeHead(404);e.end()}).listen(kD);console.log("Metric Server Started at:",kD);process.on("SIGINT",function(){z7(0)}).on("uncaughtException",t=>{console.error("Uncaught Exception, please checking if await is properly used",t),Zn&&(Zn.unhandled=t)}).on("unhandledRejection",(t,e)=>{t?.message.startsWith('invalid ENS name (disallowed character: "*"')||(console.error("Unhandled Rejection, please checking if await is properly",t),Zn&&(Zn.unhandled=t))});function z7(t){$r?.forceShutdown(),console.log("RPC server shut down"),W7.close(function(){console.log("Http server shut down"),process.exit(t)})}import("node:process").then(t=>t.stdout.write(""));
59
+ `}};tl.PrometheusSerializer=hd});var YI=h(nl=>{"use strict";Object.defineProperty(nl,"__esModule",{value:!0});nl.PrometheusExporter=void 0;var mi=(M(),Y(Pe)),$z=(K(),Y(Uu)),vd=(In(),Y(ed)),Kz=L("http"),Wz=Td(),zz=L("url"),rl=class t extends vd.MetricReader{constructor(e={},n=()=>{}){super({aggregationSelector:i=>vd.Aggregation.Default(),aggregationTemporalitySelector:i=>vd.AggregationTemporality.CUMULATIVE,metricProducers:e.metricProducers}),this._requestHandler=(i,a)=>{i.url!=null&&new zz.URL(i.url,this._baseUrl).pathname===this._endpoint?this._exportMetrics(a):this._notFound(a)},this._exportMetrics=i=>{i.statusCode=200,i.setHeader("content-type","text/plain"),this.collect().then(a=>{let{resourceMetrics:u,errors:o}=a;o.length&&mi.diag.error("PrometheusExporter: metrics collection errors",...o),i.end(this._serializer.serialize(u))},a=>{i.end(`# failed to export metrics: ${a}`)})},this._notFound=i=>{i.statusCode=404,i.end()},this._host=e.host||process.env.OTEL_EXPORTER_PROMETHEUS_HOST||t.DEFAULT_OPTIONS.host,this._port=e.port||Number(process.env.OTEL_EXPORTER_PROMETHEUS_PORT)||t.DEFAULT_OPTIONS.port,this._prefix=e.prefix||t.DEFAULT_OPTIONS.prefix,this._appendTimestamp=typeof e.appendTimestamp=="boolean"?e.appendTimestamp:t.DEFAULT_OPTIONS.appendTimestamp,this._server=(0,Kz.createServer)(this._requestHandler).unref(),this._serializer=new Wz.PrometheusSerializer(this._prefix,this._appendTimestamp),this._baseUrl=`http://${this._host}:${this._port}/`,this._endpoint=(e.endpoint||t.DEFAULT_OPTIONS.endpoint).replace(/^([^/])/,"/$1"),e.preventServerStart!==!0?this.startServer().then(n,i=>{mi.diag.error(i),n(i)}):n&&queueMicrotask(n)}async onForceFlush(){}onShutdown(){return this.stopServer()}stopServer(){return this._server?new Promise(e=>{this._server.close(n=>{n?n.code!=="ERR_SERVER_NOT_RUNNING"&&(0,$z.globalErrorHandler)(n):mi.diag.debug("Prometheus exporter was stopped"),e()})}):(mi.diag.debug("Prometheus stopServer() was called but server was never started."),Promise.resolve())}startServer(){var e;return(e=this._startServerPromise)!==null&&e!==void 0||(this._startServerPromise=new Promise((n,i)=>{this._server.once("error",i),this._server.listen({port:this._port,host:this._host},()=>{mi.diag.debug(`Prometheus exporter server started: ${this._host}:${this._port}/${this._endpoint}`),n()})})),this._startServerPromise}getMetricsRequestHandler(e,n){this._exportMetrics(n)}};nl.PrometheusExporter=rl;rl.DEFAULT_OPTIONS={host:void 0,port:9464,endpoint:"/metrics",prefix:"",appendTimestamp:!1}});var qI=h(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.PrometheusSerializer=kn.PrometheusExporter=void 0;var Xz=YI();Object.defineProperty(kn,"PrometheusExporter",{enumerable:!0,get:function(){return Xz.PrometheusExporter}});var Jz=Td();Object.defineProperty(kn,"PrometheusSerializer",{enumerable:!0,get:function(){return Jz.PrometheusSerializer}})});var yd=h(ol=>{"use strict";Object.defineProperty(ol,"__esModule",{value:!0});ol.AbstractAsyncHooksContextManager=void 0;var Qz=L("events"),Zz=["addListener","on","once","prependListener","prependOnceListener"],md=class{constructor(){this._kOtListeners=Symbol("OtListeners"),this._wrapped=!1}bind(e,n){return n instanceof Qz.EventEmitter?this._bindEventEmitter(e,n):typeof n=="function"?this._bindFunction(e,n):n}_bindFunction(e,n){let i=this,a=function(...u){return i.with(e,()=>n.apply(this,u))};return Object.defineProperty(a,"length",{enumerable:!1,configurable:!0,writable:!1,value:n.length}),a}_bindEventEmitter(e,n){return this._getPatchMap(n)!==void 0||(this._createPatchMap(n),Zz.forEach(a=>{n[a]!==void 0&&(n[a]=this._patchAddListener(n,n[a],e))}),typeof n.removeListener=="function"&&(n.removeListener=this._patchRemoveListener(n,n.removeListener)),typeof n.off=="function"&&(n.off=this._patchRemoveListener(n,n.off)),typeof n.removeAllListeners=="function"&&(n.removeAllListeners=this._patchRemoveAllListeners(n,n.removeAllListeners))),n}_patchRemoveListener(e,n){let i=this;return function(a,u){var o;let r=(o=i._getPatchMap(e))===null||o===void 0?void 0:o[a];if(r===void 0)return n.call(this,a,u);let s=r.get(u);return n.call(this,a,s||u)}}_patchRemoveAllListeners(e,n){let i=this;return function(a){let u=i._getPatchMap(e);return u!==void 0&&(arguments.length===0?i._createPatchMap(e):u[a]!==void 0&&delete u[a]),n.apply(this,arguments)}}_patchAddListener(e,n,i){let a=this;return function(u,o){if(a._wrapped)return n.call(this,u,o);let r=a._getPatchMap(e);r===void 0&&(r=a._createPatchMap(e));let s=r[u];s===void 0&&(s=new WeakMap,r[u]=s);let l=a.bind(i,o);s.set(o,l),a._wrapped=!0;try{return n.call(this,u,l)}finally{a._wrapped=!1}}}_createPatchMap(e){let n=Object.create(null);return e[this._kOtListeners]=n,n}_getPatchMap(e){return e[this._kOtListeners]}};ol.AbstractAsyncHooksContextManager=md});var jI=h(il=>{"use strict";Object.defineProperty(il,"__esModule",{value:!0});il.AsyncHooksContextManager=void 0;var eX=(M(),Y(Pe)),tX=L("async_hooks"),rX=yd(),Ad=class extends rX.AbstractAsyncHooksContextManager{constructor(){super(),this._contexts=new Map,this._stack=[],this._asyncHook=tX.createHook({init:this._init.bind(this),before:this._before.bind(this),after:this._after.bind(this),destroy:this._destroy.bind(this),promiseResolve:this._destroy.bind(this)})}active(){var e;return(e=this._stack[this._stack.length-1])!==null&&e!==void 0?e:eX.ROOT_CONTEXT}with(e,n,i,...a){this._enterContext(e);try{return n.call(i,...a)}finally{this._exitContext()}}enable(){return this._asyncHook.enable(),this}disable(){return this._asyncHook.disable(),this._contexts.clear(),this._stack=[],this}_init(e,n){if(n==="TIMERWRAP")return;let i=this._stack[this._stack.length-1];i!==void 0&&this._contexts.set(e,i)}_destroy(e){this._contexts.delete(e)}_before(e){let n=this._contexts.get(e);n!==void 0&&this._enterContext(n)}_after(){this._exitContext()}_enterContext(e){this._stack.push(e)}_exitContext(){this._stack.pop()}};il.AsyncHooksContextManager=Ad});var $I=h(al=>{"use strict";Object.defineProperty(al,"__esModule",{value:!0});al.AsyncLocalStorageContextManager=void 0;var nX=(M(),Y(Pe)),oX=L("async_hooks"),iX=yd(),Od=class extends iX.AbstractAsyncHooksContextManager{constructor(){super(),this._asyncLocalStorage=new oX.AsyncLocalStorage}active(){var e;return(e=this._asyncLocalStorage.getStore())!==null&&e!==void 0?e:nX.ROOT_CONTEXT}with(e,n,i,...a){let u=i==null?n:n.bind(i);return this._asyncLocalStorage.run(e,u,...a)}enable(){return this}disable(){return this._asyncLocalStorage.disable(),this}};al.AsyncLocalStorageContextManager=Od});var KI=h(Hn=>{"use strict";Object.defineProperty(Hn,"__esModule",{value:!0});Hn.AsyncLocalStorageContextManager=Hn.AsyncHooksContextManager=void 0;var aX=jI();Object.defineProperty(Hn,"AsyncHooksContextManager",{enumerable:!0,get:function(){return aX.AsyncHooksContextManager}});var uX=$I();Object.defineProperty(Hn,"AsyncLocalStorageContextManager",{enumerable:!0,get:function(){return uX.AsyncLocalStorageContextManager}})});var Fn,gd=m(()=>{"use strict";M();Fn=Kr("OpenTelemetry Context Key B3 Debug Flag")});var dr,Yn,qn,jn,ul,$n,yi=m(()=>{"use strict";dr="b3",Yn="x-b3-traceid",qn="x-b3-spanid",jn="x-b3-sampled",ul="x-b3-parentspanid",$n="x-b3-flags"});function cX(t){return t===Q.SAMPLED||t===Q.NONE}function fX(t){return Array.isArray(t)?t[0]:t}function sl(t,e,n){var i=e.get(t,n);return fX(i)}function pX(t,e){var n=sl(t,e,Yn);return typeof n=="string"?n.padStart(32,"0"):""}function dX(t,e){var n=sl(t,e,qn);return typeof n=="string"?n:""}function WI(t,e){var n=sl(t,e,$n);return n==="1"?"1":void 0}function EX(t,e){var n=sl(t,e,jn),i=WI(t,e);if(i==="1"||sX.has(n))return Q.SAMPLED;if(n===void 0||lX.has(n))return Q.NONE}var sX,lX,zI,XI=m(()=>{"use strict";M();K();gd();yi();sX=new Set([!0,"true","True","1",1]),lX=new Set([!1,"false","False","0",0]);zI=function(){function t(){}return t.prototype.inject=function(e,n,i){var a=J.getSpanContext(e);if(!(!a||!_t(a)||xe(e))){var u=e.getValue(Fn);i.set(n,Yn,a.traceId),i.set(n,qn,a.spanId),u==="1"?i.set(n,$n,u):a.traceFlags!==void 0&&i.set(n,jn,(Q.SAMPLED&a.traceFlags)===Q.SAMPLED?"1":"0")}},t.prototype.extract=function(e,n,i){var a=pX(n,i),u=dX(n,i),o=EX(n,i),r=WI(n,i);return Gt(a)&&Ii(u)&&cX(o)?(e=e.setValue(Fn,r),J.setSpanContext(e,{traceId:a,spanId:u,isRemote:!0,traceFlags:o})):e},t.prototype.fields=function(){return[Yn,qn,$n,jn,ul]},t}()});function mX(t){return t.length===32?t:""+hX+t}function yX(t){return t&&TX.has(t)?Q.SAMPLED:Q.NONE}var _X,SX,hX,TX,vX,JI,QI=m(()=>{"use strict";M();K();gd();yi();_X=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),a,u=[],o;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)u.push(a.value)}catch(r){o={error:r}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return u},SX=/((?:[0-9a-f]{16}){1,2})-([0-9a-f]{16})(?:-([01d](?![0-9a-f])))?(?:-([0-9a-f]{16}))?/,hX="0".repeat(16),TX=new Set(["d","1"]),vX="d";JI=function(){function t(){}return t.prototype.inject=function(e,n,i){var a=J.getSpanContext(e);if(!(!a||!_t(a)||xe(e))){var u=e.getValue(Fn)||a.traceFlags&1,o=a.traceId+"-"+a.spanId+"-"+u;i.set(n,dr,o)}},t.prototype.extract=function(e,n,i){var a=i.get(n,dr),u=Array.isArray(a)?a[0]:a;if(typeof u!="string")return e;var o=u.match(SX);if(!o)return e;var r=_X(o,4),s=r[1],l=r[2],c=r[3],p=mX(s);if(!Gt(p)||!Ii(l))return e;var _=yX(c);return c===vX&&(e=e.setValue(Fn,c)),J.setSpanContext(e,{traceId:p,spanId:l,isRemote:!0,traceFlags:_})},t.prototype.fields=function(){return[dr]},t}()});var Kn,Nd=m(()=>{"use strict";(function(t){t[t.SINGLE_HEADER=0]="SINGLE_HEADER",t[t.MULTI_HEADER=1]="MULTI_HEADER"})(Kn||(Kn={}))});var ZI,eC=m(()=>{"use strict";K();XI();QI();yi();Nd();ZI=function(){function t(e){e===void 0&&(e={}),this._b3MultiPropagator=new zI,this._b3SinglePropagator=new JI,e.injectEncoding===Kn.MULTI_HEADER?(this._inject=this._b3MultiPropagator.inject,this._fields=this._b3MultiPropagator.fields()):(this._inject=this._b3SinglePropagator.inject,this._fields=this._b3SinglePropagator.fields())}return t.prototype.inject=function(e,n,i){xe(e)||this._inject(e,n,i)},t.prototype.extract=function(e,n,i){var a=i.get(n,dr),u=Array.isArray(a)?a[0]:a;return u?this._b3SinglePropagator.extract(e,n,i):this._b3MultiPropagator.extract(e,n,i)},t.prototype.fields=function(){return this._fields},t}()});var tC={};Je(tC,{B3InjectEncoding:()=>Kn,B3Propagator:()=>ZI,B3_CONTEXT_HEADER:()=>dr,X_B3_FLAGS:()=>$n,X_B3_PARENT_SPAN_ID:()=>ul,X_B3_SAMPLED:()=>jn,X_B3_SPAN_ID:()=>qn,X_B3_TRACE_ID:()=>Yn});var rC=m(()=>{"use strict";eC();yi();Nd()});var nC,oC=m(()=>{"use strict";nC="exception"});var Rd,AX,iC,OX,ll,Pd=m(()=>{"use strict";M();K();Ko();oC();Rd=function(){return Rd=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++){e=arguments[n];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a])}return t},Rd.apply(this,arguments)},AX=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},iC=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),a,u=[],o;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)u.push(a.value)}catch(r){o={error:r}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return u},OX=function(t,e,n){if(n||arguments.length===2)for(var i=0,a=e.length,u;i<a;i++)(u||!(i in e))&&(u||(u=Array.prototype.slice.call(e,0,i)),u[i]=e[i]);return t.concat(u||Array.prototype.slice.call(e))},ll=function(){function t(e,n,i,a,u,o,r,s,l,c){r===void 0&&(r=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:_E.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=i,this._spanContext=a,this.parentSpanId=o,this.kind=u,this.links=r;var p=Date.now();this._performanceStartTime=et.now(),this._performanceOffset=p-(this._performanceStartTime+An()),this._startTimeProvided=s!=null,this.startTime=this._getTime(s??p),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this._spanLimits=e.getSpanLimits(),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,c!=null&&this.setAttributes(c),this._spanProcessor=e.getActiveSpanProcessor(),this._spanProcessor.onStart(this,n)}return t.prototype.spanContext=function(){return this._spanContext},t.prototype.setAttribute=function(e,n){return n==null||this._isSpanEnded()?this:e.length===0?(g.warn("Invalid attribute key: "+e),this):Xo(n)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(n),this):(g.warn("Invalid attribute value set for key: "+e),this)},t.prototype.setAttributes=function(e){var n,i;try{for(var a=AX(Object.entries(e)),u=a.next();!u.done;u=a.next()){var o=iC(u.value,2),r=o[0],s=o[1];this.setAttribute(r,s)}}catch(l){n={error:l}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return this},t.prototype.addEvent=function(e,n,i){if(this._isSpanEnded())return this;if(this._spanLimits.eventCountLimit===0)return g.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(this._droppedEventsCount===0&&g.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),ei(n)&&(ei(i)||(i=n),n=void 0);var a=or(n);return this.events.push({name:e,attributes:a,time:this._getTime(i),droppedAttributesCount:0}),this},t.prototype.addLink=function(e){return this.links.push(e),this},t.prototype.addLinks=function(e){var n;return(n=this.links).push.apply(n,OX([],iC(e),!1)),this},t.prototype.setStatus=function(e){return this._isSpanEnded()?this:(this.status=Rd({},e),this.status.message!=null&&typeof e.message!="string"&&(g.warn("Dropping invalid status.message of type '"+typeof e.message+"', expected 'string'"),delete this.status.message),this)},t.prototype.updateName=function(e){return this._isSpanEnded()?this:(this.name=e,this)},t.prototype.end=function(e){if(this._isSpanEnded()){g.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=Pu(this.startTime,this.endTime),this._duration[0]<0&&(g.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._droppedEventsCount>0&&g.warn("Dropped "+this._droppedEventsCount+" events because eventCountLimit reached"),this._spanProcessor.onEnd(this)},t.prototype._getTime=function(e){if(typeof e=="number"&&e<=et.now())return Zo(e+this._performanceOffset);if(typeof e=="number")return ge(e);if(e instanceof Date)return ge(e.getTime());if(On(e))return e;if(this._startTimeProvided)return ge(Date.now());var n=et.now()-this._performanceStartTime;return ti(this.startTime,ge(n))},t.prototype.isRecording=function(){return this._ended===!1},t.prototype.recordException=function(e,n){var i={};typeof e=="string"?i[du]=e:e&&(e.code?i[pu]=e.code.toString():e.name&&(i[pu]=e.name),e.message&&(i[du]=e.message),e.stack&&(i[d0]=e.stack)),i[pu]||i[du]?this.addEvent(nC,i,n):g.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&&g.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},t.prototype._truncateToLimitUtil=function(e,n){return e.length<=n?e:e.substring(0,n)},t.prototype._truncateToSize=function(e){var n=this,i=this._attributeValueLengthLimit;return i<=0?(g.warn("Attribute value limit must be positive, got "+i),e):typeof e=="string"?this._truncateToLimitUtil(e,i):Array.isArray(e)?e.map(function(a){return typeof a=="string"?n._truncateToLimitUtil(a,i):a}):e},t}()});var dt,Ai=m(()=>{"use strict";(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(dt||(dt={}))});var Er,cl=m(()=>{"use strict";Ai();Er=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:dt.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t}()});var bt,fl=m(()=>{"use strict";Ai();bt=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:dt.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t}()});var Wn,bd=m(()=>{"use strict";M();K();cl();fl();Wn=function(){function t(e){var n,i,a,u;this._root=e.root,this._root||(Te(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new bt),this._remoteParentSampled=(n=e.remoteParentSampled)!==null&&n!==void 0?n:new bt,this._remoteParentNotSampled=(i=e.remoteParentNotSampled)!==null&&i!==void 0?i:new Er,this._localParentSampled=(a=e.localParentSampled)!==null&&a!==void 0?a:new bt,this._localParentNotSampled=(u=e.localParentNotSampled)!==null&&u!==void 0?u:new Er}return t.prototype.shouldSample=function(e,n,i,a,u,o){var r=J.getSpanContext(e);return!r||!_t(r)?this._root.shouldSample(e,n,i,a,u,o):r.isRemote?r.traceFlags&Q.SAMPLED?this._remoteParentSampled.shouldSample(e,n,i,a,u,o):this._remoteParentNotSampled.shouldSample(e,n,i,a,u,o):r.traceFlags&Q.SAMPLED?this._localParentSampled.shouldSample(e,n,i,a,u,o):this._localParentNotSampled.shouldSample(e,n,i,a,u,o)},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}()});var Oi,xd=m(()=>{"use strict";M();Ai();Oi=function(){function t(e){e===void 0&&(e=0),this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}return t.prototype.shouldSample=function(e,n){return{decision:Gt(n)&&this._accumulate(n)<this._upperBound?dt.RECORD_AND_SAMPLED:dt.NOT_RECORD}},t.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},t.prototype._normalize=function(e){return typeof e!="number"||isNaN(e)?0:e>=1?1:e<=0?0:e},t.prototype._accumulate=function(e){for(var n=0,i=0;i<e.length/8;i++){var a=i*8,u=parseInt(e.slice(a,a+8),16);n=(n^u)>>>0}return n},t}()});function pl(){var t=Oe();return{sampler:Md(gX),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:t.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:t.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:t.OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:t.OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT},mergeResourceWithDefaults:!0}}function Md(t){switch(t===void 0&&(t=Oe()),t.OTEL_TRACES_SAMPLER){case Ke.AlwaysOn:return new bt;case Ke.AlwaysOff:return new Er;case Ke.ParentBasedAlwaysOn:return new Wn({root:new bt});case Ke.ParentBasedAlwaysOff:return new Wn({root:new Er});case Ke.TraceIdRatio:return new Oi(aC(t));case Ke.ParentBasedTraceIdRatio:return new Wn({root:new Oi(aC(t))});default:return g.error('OTEL_TRACES_SAMPLER value "'+t.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+NX+'".'),new bt}}function aC(t){if(t.OTEL_TRACES_SAMPLER_ARG===void 0||t.OTEL_TRACES_SAMPLER_ARG==="")return g.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+zn+"."),zn;var e=Number(t.OTEL_TRACES_SAMPLER_ARG);return isNaN(e)?(g.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+zn+"."),zn):e<0||e>1?(g.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+zn+"."),zn):e}var gX,NX,zn,Ld=m(()=>{"use strict";M();K();cl();fl();bd();xd();gX=Oe(),NX=Ke.AlwaysOn,zn=1});function uC(t){var e={sampler:Md()},n=pl(),i=Object.assign({},n,e,t);return i.generalLimits=Object.assign({},n.generalLimits,t.generalLimits||{}),i.spanLimits=Object.assign({},n.spanLimits,t.spanLimits||{}),i}function sC(t){var e,n,i,a,u,o,r,s,l,c,p,_,f=Object.assign({},t.spanLimits),S=mn();return f.attributeCountLimit=(o=(u=(a=(n=(e=t.spanLimits)===null||e===void 0?void 0:e.attributeCountLimit)!==null&&n!==void 0?n:(i=t.generalLimits)===null||i===void 0?void 0:i.attributeCountLimit)!==null&&a!==void 0?a:S.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&u!==void 0?u:S.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&o!==void 0?o:wr,f.attributeValueLengthLimit=(_=(p=(c=(s=(r=t.spanLimits)===null||r===void 0?void 0:r.attributeValueLengthLimit)!==null&&s!==void 0?s:(l=t.generalLimits)===null||l===void 0?void 0:l.attributeValueLengthLimit)!==null&&c!==void 0?c:S.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&p!==void 0?p:S.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&_!==void 0?_:Cr,Object.assign({},t,{spanLimits:f})}var Id=m(()=>{"use strict";Ld();K()});var lC,cC=m(()=>{"use strict";M();K();lC=function(){function t(e,n){this._exporter=e,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var i=Oe();this._maxExportBatchSize=typeof n?.maxExportBatchSize=="number"?n.maxExportBatchSize:i.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=typeof n?.maxQueueSize=="number"?n.maxQueueSize:i.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=typeof n?.scheduledDelayMillis=="number"?n.scheduledDelayMillis:i.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis=typeof n?.exportTimeoutMillis=="number"?n.exportTimeoutMillis:i.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new Nn(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(g.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return t.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},t.prototype.onStart=function(e,n){},t.prototype.onEnd=function(e){this._shutdownOnce.isCalled||e.spanContext().traceFlags&Q.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&&g.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(g.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer()},t.prototype._flushAll=function(){var e=this;return new Promise(function(n,i){for(var a=[],u=Math.ceil(e._finishedSpans.length/e._maxExportBatchSize),o=0,r=u;o<r;o++)a.push(e._flushOneBatch());Promise.all(a).then(function(){n()}).catch(i)})},t.prototype._flushOneBatch=function(){var e=this;return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise(function(n,i){var a=setTimeout(function(){i(new Error("Timeout"))},e._exportTimeoutMillis);Ye.with(Tn(Ye.active()),function(){var u;e._finishedSpans.length<=e._maxExportBatchSize?(u=e._finishedSpans,e._finishedSpans=[]):u=e._finishedSpans.splice(0,e._maxExportBatchSize);for(var o=function(){return e._exporter.export(u,function(p){var _;clearTimeout(a),p.code===W.SUCCESS?n():i((_=p.error)!==null&&_!==void 0?_:new Error("BatchSpanProcessor: span export failed"))})},r=null,s=0,l=u.length;s<l;s++){var c=u[s];c.resource.asyncAttributesPending&&c.resource.waitForAsyncAttributes&&(r??(r=[]),r.push(c.resource.waitForAsyncAttributes()))}r===null?o():Promise.all(r).then(o,function(p){Te(p),i(p)})})})},t.prototype._maybeStartTimer=function(){var e=this;if(!this._isExporting){var n=function(){e._isExporting=!0,e._flushOneBatch().finally(function(){e._isExporting=!1,e._finishedSpans.length>0&&(e._clearTimer(),e._maybeStartTimer())}).catch(function(i){e._isExporting=!1,Te(i)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return n();this._timer===void 0&&(this._timer=setTimeout(function(){return n()},this._scheduledDelayMillis),ur(this._timer))}},t.prototype._clearTimer=function(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)},t}()});var RX,_r,fC=m(()=>{"use strict";cC();RX=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,a){i.__proto__=a}||function(i,a){for(var u in a)Object.prototype.hasOwnProperty.call(a,u)&&(i[u]=a[u])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function i(){this.constructor=e}e.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}}(),_r=function(t){RX(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.onShutdown=function(){},e}(lC)});function pC(t){return function(){for(var n=0;n<t/4;n++)dl.writeUInt32BE(Math.random()*Math.pow(2,32)>>>0,n*4);for(var n=0;n<t&&!(dl[n]>0);n++)n===t-1&&(dl[t-1]=1);return dl.toString("hex",0,t)}}var PX,dC,Xn,dl,EC=m(()=>{"use strict";PX=8,dC=16,Xn=function(){function t(){this.generateTraceId=pC(dC),this.generateSpanId=pC(PX)}return t}(),dl=Buffer.allocUnsafe(dC)});var _C=m(()=>{"use strict";fC();EC()});var El=m(()=>{"use strict";_C()});var _l,SC=m(()=>{"use strict";M();K();Pd();Id();El();_l=function(){function t(e,n,i){this._tracerProvider=i;var a=uC(n);this._sampler=a.sampler,this._generalLimits=a.generalLimits,this._spanLimits=a.spanLimits,this._idGenerator=n.idGenerator||new Xn,this.resource=i.resource,this.instrumentationLibrary=e}return t.prototype.startSpan=function(e,n,i){var a,u,o;n===void 0&&(n={}),i===void 0&&(i=Ye.active()),n.root&&(i=J.deleteSpan(i));var r=J.getSpan(i);if(xe(i)){g.debug("Instrumentation suppressed, returning Noop Span");var s=J.wrapSpanContext(pE);return s}var l=r?.spanContext(),c=this._idGenerator.generateSpanId(),p,_,f;!l||!J.isSpanContextValid(l)?p=this._idGenerator.generateTraceId():(p=l.traceId,_=l.traceState,f=l.spanId);var S=(a=n.kind)!==null&&a!==void 0?a:EE.INTERNAL,v=((u=n.links)!==null&&u!==void 0?u:[]).map(function(F){return{context:F.context,attributes:or(F.attributes)}}),T=or(n.attributes),A=this._sampler.shouldSample(i,p,e,S,T,v);_=(o=A.traceState)!==null&&o!==void 0?o:_;var O=A.decision===St.RECORD_AND_SAMPLED?Q.SAMPLED:Q.NONE,N={traceId:p,spanId:c,traceFlags:O,traceState:_};if(A.decision===St.NOT_RECORD){g.debug("Recording is off, propagating context in a non-recording span");var s=J.wrapSpanContext(N);return s}var U=or(Object.assign(T,A.attributes)),G=new ll(this,i,e,N,S,f,v,n.startTime,void 0,U);return G},t.prototype.startActiveSpan=function(e,n,i,a){var u,o,r;if(!(arguments.length<2)){arguments.length===2?r=n:arguments.length===3?(u=n,r=i):(u=n,o=i,r=a);var s=o??Ye.active(),l=this.startSpan(e,u,s),c=J.setSpan(s,l);return Ye.with(c,r,void 0,l)}},t.prototype.getGeneralLimits=function(){return this._generalLimits},t.prototype.getSpanLimits=function(){return this._spanLimits},t.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},t}()});var Sl,Cd,hC=m(()=>{"use strict";K();Sl=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Cd=function(){function t(e){this._spanProcessors=e}return t.prototype.forceFlush=function(){var e,n,i=[];try{for(var a=Sl(this._spanProcessors),u=a.next();!u.done;u=a.next()){var o=u.value;i.push(o.forceFlush())}}catch(r){e={error:r}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return new Promise(function(r){Promise.all(i).then(function(){r()}).catch(function(s){Te(s||new Error("MultiSpanProcessor: forceFlush failed")),r()})})},t.prototype.onStart=function(e,n){var i,a;try{for(var u=Sl(this._spanProcessors),o=u.next();!o.done;o=u.next()){var r=o.value;r.onStart(e,n)}}catch(s){i={error:s}}finally{try{o&&!o.done&&(a=u.return)&&a.call(u)}finally{if(i)throw i.error}}},t.prototype.onEnd=function(e){var n,i;try{for(var a=Sl(this._spanProcessors),u=a.next();!u.done;u=a.next()){var o=u.value;o.onEnd(e)}}catch(r){n={error:r}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}},t.prototype.shutdown=function(){var e,n,i=[];try{for(var a=Sl(this._spanProcessors),u=a.next();!u.done;u=a.next()){var o=u.value;i.push(o.shutdown())}}catch(r){e={error:r}}finally{try{u&&!u.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return new Promise(function(r,s){Promise.all(i).then(function(){r()},s)})},t}()});var hl,wd=m(()=>{"use strict";hl=function(){function t(){}return t.prototype.onStart=function(e,n){},t.prototype.onEnd=function(e){},t.prototype.shutdown=function(){return Promise.resolve()},t.prototype.forceFlush=function(){return Promise.resolve()},t}()});var bX,xX,Vt,TC,vC=m(()=>{"use strict";M();K();Gu();gi();Ld();hC();wd();El();Id();bX=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),a,u=[],o;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)u.push(a.value)}catch(r){o={error:r}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return u},xX=function(t,e,n){if(n||arguments.length===2)for(var i=0,a=e.length,u;i<a;i++)(u||!(i in e))&&(u||(u=Array.prototype.slice.call(e,0,i)),u[i]=e[i]);return t.concat(u||Array.prototype.slice.call(e))};(function(t){t[t.resolved=0]="resolved",t[t.timeout=1]="timeout",t[t.error=2]="error",t[t.unresolved=3]="unresolved"})(Vt||(Vt={}));TC=function(){function t(e){e===void 0&&(e={});var n,i;this._registeredSpanProcessors=[],this._tracers=new Map;var a=Du({},pl(),sC(e));if(this.resource=(n=a.resource)!==null&&n!==void 0?n:Dt.empty(),a.mergeResourceWithDefaults&&(this.resource=Dt.default().merge(this.resource)),this._config=Object.assign({},a,{resource:this.resource}),!((i=e.spanProcessors)===null||i===void 0)&&i.length)this._registeredSpanProcessors=xX([],bX(e.spanProcessors),!1),this.activeSpanProcessor=new Cd(this._registeredSpanProcessors);else{var u=this._buildExporterFromEnv();if(u!==void 0){var o=new _r(u);this.activeSpanProcessor=o}else this.activeSpanProcessor=new hl}}return t.prototype.getTracer=function(e,n,i){var a=e+"@"+(n||"")+":"+(i?.schemaUrl||"");return this._tracers.has(a)||this._tracers.set(a,new _l({name:e,version:n,schemaUrl:i?.schemaUrl},this._config,this)),this._tracers.get(a)},t.prototype.addSpanProcessor=function(e){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(function(n){return g.error("Error while trying to shutdown current span processor",n)}),this._registeredSpanProcessors.push(e),this.activeSpanProcessor=new Cd(this._registeredSpanProcessors)},t.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},t.prototype.register=function(e){e===void 0&&(e={}),J.setGlobalTracerProvider(this),e.propagator===void 0&&(e.propagator=this._buildPropagatorFromEnv()),e.contextManager&&Ye.setGlobalContextManager(e.contextManager),e.propagator&&at.setGlobalPropagator(e.propagator)},t.prototype.forceFlush=function(){var e=this._config.forceFlushTimeoutMillis,n=this._registeredSpanProcessors.map(function(i){return new Promise(function(a){var u,o=setTimeout(function(){a(new Error("Span processor did not completed within timeout period of "+e+" ms")),u=Vt.timeout},e);i.forceFlush().then(function(){clearTimeout(o),u!==Vt.timeout&&(u=Vt.resolved,a(u))}).catch(function(r){clearTimeout(o),u=Vt.error,a(r)})})});return new Promise(function(i,a){Promise.all(n).then(function(u){var o=u.filter(function(r){return r!==Vt.resolved});o.length>0?a(o):i()}).catch(function(u){return a([u])})})},t.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},t.prototype._getPropagator=function(e){var n;return(n=this.constructor._registeredPropagators.get(e))===null||n===void 0?void 0:n()},t.prototype._getSpanExporter=function(e){var n;return(n=this.constructor._registeredExporters.get(e))===null||n===void 0?void 0:n()},t.prototype._buildPropagatorFromEnv=function(){var e=this,n=Array.from(new Set(Oe().OTEL_PROPAGATORS)),i=n.map(function(u){var o=e._getPropagator(u);return o||g.warn('Propagator "'+u+'" requested through environment variable is unavailable.'),o}),a=i.reduce(function(u,o){return o&&u.push(o),u},[]);if(a.length!==0)return n.length===1?a[0]:new xu({propagators:a})},t.prototype._buildExporterFromEnv=function(){var e=Oe().OTEL_TRACES_EXPORTER;if(!(e==="none"||e==="")){var n=this._getSpanExporter(e);return n||g.error('Exporter "'+e+'" requested through environment variable is unavailable.'),n}},t._registeredPropagators=new Map([["tracecontext",function(){return new Lu}],["baggage",function(){return new vu}]]),t._registeredExporters=new Map,t}()});var MX,mC,yC=m(()=>{"use strict";K();MX=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},mC=function(){function t(){}return t.prototype.export=function(e,n){return this._sendSpans(e,n)},t.prototype.shutdown=function(){return this._sendSpans([]),this.forceFlush()},t.prototype.forceFlush=function(){return Promise.resolve()},t.prototype._exportInfo=function(e){var n;return{resource:{attributes:e.resource.attributes},instrumentationScope:e.instrumentationLibrary,traceId:e.spanContext().traceId,parentId:e.parentSpanId,traceState:(n=e.spanContext().traceState)===null||n===void 0?void 0:n.serialize(),name:e.name,id:e.spanContext().spanId,kind:e.kind,timestamp:Nt(e.startTime),duration:Nt(e.duration),attributes:e.attributes,status:e.status,events:e.events,links:e.links}},t.prototype._sendSpans=function(e,n){var i,a;try{for(var u=MX(e),o=u.next();!o.done;o=u.next()){var r=o.value;console.dir(this._exportInfo(r),{depth:3})}}catch(s){i={error:s}}finally{try{o&&!o.done&&(a=u.return)&&a.call(u)}finally{if(i)throw i.error}}if(n)return n({code:W.SUCCESS})},t}()});var LX,IX,AC,OC=m(()=>{"use strict";K();LX=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),a,u=[],o;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)u.push(a.value)}catch(r){o={error:r}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return u},IX=function(t,e,n){if(n||arguments.length===2)for(var i=0,a=e.length,u;i<a;i++)(u||!(i in e))&&(u||(u=Array.prototype.slice.call(e,0,i)),u[i]=e[i]);return t.concat(u||Array.prototype.slice.call(e))},AC=function(){function t(){this._finishedSpans=[],this._stopped=!1}return t.prototype.export=function(e,n){var i;if(this._stopped)return n({code:W.FAILED,error:new Error("Exporter has been stopped")});(i=this._finishedSpans).push.apply(i,IX([],LX(e),!1)),setTimeout(function(){return n({code:W.SUCCESS})},0)},t.prototype.shutdown=function(){return this._stopped=!0,this._finishedSpans=[],this.forceFlush()},t.prototype.forceFlush=function(){return Promise.resolve()},t.prototype.reset=function(){this._finishedSpans=[]},t.prototype.getFinishedSpans=function(){return this._finishedSpans},t}()});var CX,wX,gC,NC=m(()=>{"use strict";M();K();CX=function(t,e,n,i){function a(u){return u instanceof n?u:new n(function(o){o(u)})}return new(n||(n=Promise))(function(u,o){function r(c){try{l(i.next(c))}catch(p){o(p)}}function s(c){try{l(i.throw(c))}catch(p){o(p)}}function l(c){c.done?u(c.value):a(c.value).then(r,s)}l((i=i.apply(t,e||[])).next())})},wX=function(t,e){var n={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},i,a,u,o;return o={next:r(0),throw:r(1),return:r(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function r(l){return function(c){return s([l,c])}}function s(l){if(i)throw new TypeError("Generator is already executing.");for(;n;)try{if(i=1,a&&(u=l[0]&2?a.return:l[0]?a.throw||((u=a.return)&&u.call(a),0):a.next)&&!(u=u.call(a,l[1])).done)return u;switch(a=0,u&&(l=[l[0]&2,u.value]),l[0]){case 0:case 1:u=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,a=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(u=n.trys,!(u=u.length>0&&u[u.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!u||l[1]>u[0]&&l[1]<u[3])){n.label=l[1];break}if(l[0]===6&&n.label<u[1]){n.label=u[1],u=l;break}if(u&&n.label<u[2]){n.label=u[2],n.ops.push(l);break}u[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(c){l=[6,c],a=0}finally{i=u=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},gC=function(){function t(e){this._exporter=e,this._shutdownOnce=new Nn(this._shutdown,this),this._unresolvedExports=new Set}return t.prototype.forceFlush=function(){return CX(this,void 0,void 0,function(){return wX(this,function(e){switch(e.label){case 0:return[4,Promise.all(Array.from(this._unresolvedExports))];case 1:return e.sent(),this._exporter.forceFlush?[4,this._exporter.forceFlush()]:[3,3];case 2:e.sent(),e.label=3;case 3:return[2]}})})},t.prototype.onStart=function(e,n){},t.prototype.onEnd=function(e){var n=this,i,a;if(!this._shutdownOnce.isCalled&&e.spanContext().traceFlags&Q.SAMPLED){var u=function(){return ai._export(n._exporter,[e]).then(function(r){var s;r.code!==W.SUCCESS&&Te((s=r.error)!==null&&s!==void 0?s:new Error("SimpleSpanProcessor: span export failed (status "+r+")"))}).catch(function(r){Te(r)})};if(e.resource.asyncAttributesPending){var o=(a=(i=e.resource).waitForAsyncAttributes)===null||a===void 0?void 0:a.call(i).then(function(){return o!=null&&n._unresolvedExports.delete(o),u()},function(r){return Te(r)});o!=null&&this._unresolvedExports.add(o)}else u()}},t.prototype.shutdown=function(){return this._shutdownOnce.call()},t.prototype._shutdown=function(){return this._exporter.shutdown()},t}()});var Dd={};Je(Dd,{AlwaysOffSampler:()=>Er,AlwaysOnSampler:()=>bt,BasicTracerProvider:()=>TC,BatchSpanProcessor:()=>_r,ConsoleSpanExporter:()=>mC,ForceFlushState:()=>Vt,InMemorySpanExporter:()=>AC,NoopSpanProcessor:()=>hl,ParentBasedSampler:()=>Wn,RandomIdGenerator:()=>Xn,SamplingDecision:()=>dt,SimpleSpanProcessor:()=>gC,Span:()=>ll,TraceIdRatioBasedSampler:()=>Oi,Tracer:()=>_l});var gi=m(()=>{"use strict";SC();vC();El();yC();OC();NC();wd();cl();fl();bd();xd();Ai();Pd()});var Ni=h((Hfe,RC)=>{"use strict";var DX="2.0.0",UX=Number.MAX_SAFE_INTEGER||9007199254740991,VX=16,BX=250,GX=["major","premajor","minor","preminor","patch","prepatch","prerelease"];RC.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:VX,MAX_SAFE_BUILD_LENGTH:BX,MAX_SAFE_INTEGER:UX,RELEASE_TYPES:GX,SEMVER_SPEC_VERSION:DX,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Ri=h((Ffe,PC)=>{"use strict";var kX=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};PC.exports=kX});var Jn=h((Bt,bC)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:Ud,MAX_SAFE_BUILD_LENGTH:HX,MAX_LENGTH:FX}=Ni(),YX=Ri();Bt=bC.exports={};var qX=Bt.re=[],jX=Bt.safeRe=[],R=Bt.src=[],P=Bt.t={},$X=0,Vd="[a-zA-Z0-9-]",KX=[["\\s",1],["\\d",FX],[Vd,HX]],WX=t=>{for(let[e,n]of KX)t=t.split(`${e}*`).join(`${e}{0,${n}}`).split(`${e}+`).join(`${e}{1,${n}}`);return t},D=(t,e,n)=>{let i=WX(e),a=$X++;YX(t,a,e),P[t]=a,R[a]=e,qX[a]=new RegExp(e,n?"g":void 0),jX[a]=new RegExp(i,n?"g":void 0)};D("NUMERICIDENTIFIER","0|[1-9]\\d*");D("NUMERICIDENTIFIERLOOSE","\\d+");D("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Vd}*`);D("MAINVERSION",`(${R[P.NUMERICIDENTIFIER]})\\.(${R[P.NUMERICIDENTIFIER]})\\.(${R[P.NUMERICIDENTIFIER]})`);D("MAINVERSIONLOOSE",`(${R[P.NUMERICIDENTIFIERLOOSE]})\\.(${R[P.NUMERICIDENTIFIERLOOSE]})\\.(${R[P.NUMERICIDENTIFIERLOOSE]})`);D("PRERELEASEIDENTIFIER",`(?:${R[P.NUMERICIDENTIFIER]}|${R[P.NONNUMERICIDENTIFIER]})`);D("PRERELEASEIDENTIFIERLOOSE",`(?:${R[P.NUMERICIDENTIFIERLOOSE]}|${R[P.NONNUMERICIDENTIFIER]})`);D("PRERELEASE",`(?:-(${R[P.PRERELEASEIDENTIFIER]}(?:\\.${R[P.PRERELEASEIDENTIFIER]})*))`);D("PRERELEASELOOSE",`(?:-?(${R[P.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${R[P.PRERELEASEIDENTIFIERLOOSE]})*))`);D("BUILDIDENTIFIER",`${Vd}+`);D("BUILD",`(?:\\+(${R[P.BUILDIDENTIFIER]}(?:\\.${R[P.BUILDIDENTIFIER]})*))`);D("FULLPLAIN",`v?${R[P.MAINVERSION]}${R[P.PRERELEASE]}?${R[P.BUILD]}?`);D("FULL",`^${R[P.FULLPLAIN]}$`);D("LOOSEPLAIN",`[v=\\s]*${R[P.MAINVERSIONLOOSE]}${R[P.PRERELEASELOOSE]}?${R[P.BUILD]}?`);D("LOOSE",`^${R[P.LOOSEPLAIN]}$`);D("GTLT","((?:<|>)?=?)");D("XRANGEIDENTIFIERLOOSE",`${R[P.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);D("XRANGEIDENTIFIER",`${R[P.NUMERICIDENTIFIER]}|x|X|\\*`);D("XRANGEPLAIN",`[v=\\s]*(${R[P.XRANGEIDENTIFIER]})(?:\\.(${R[P.XRANGEIDENTIFIER]})(?:\\.(${R[P.XRANGEIDENTIFIER]})(?:${R[P.PRERELEASE]})?${R[P.BUILD]}?)?)?`);D("XRANGEPLAINLOOSE",`[v=\\s]*(${R[P.XRANGEIDENTIFIERLOOSE]})(?:\\.(${R[P.XRANGEIDENTIFIERLOOSE]})(?:\\.(${R[P.XRANGEIDENTIFIERLOOSE]})(?:${R[P.PRERELEASELOOSE]})?${R[P.BUILD]}?)?)?`);D("XRANGE",`^${R[P.GTLT]}\\s*${R[P.XRANGEPLAIN]}$`);D("XRANGELOOSE",`^${R[P.GTLT]}\\s*${R[P.XRANGEPLAINLOOSE]}$`);D("COERCEPLAIN",`(^|[^\\d])(\\d{1,${Ud}})(?:\\.(\\d{1,${Ud}}))?(?:\\.(\\d{1,${Ud}}))?`);D("COERCE",`${R[P.COERCEPLAIN]}(?:$|[^\\d])`);D("COERCEFULL",R[P.COERCEPLAIN]+`(?:${R[P.PRERELEASE]})?(?:${R[P.BUILD]})?(?:$|[^\\d])`);D("COERCERTL",R[P.COERCE],!0);D("COERCERTLFULL",R[P.COERCEFULL],!0);D("LONETILDE","(?:~>?)");D("TILDETRIM",`(\\s*)${R[P.LONETILDE]}\\s+`,!0);Bt.tildeTrimReplace="$1~";D("TILDE",`^${R[P.LONETILDE]}${R[P.XRANGEPLAIN]}$`);D("TILDELOOSE",`^${R[P.LONETILDE]}${R[P.XRANGEPLAINLOOSE]}$`);D("LONECARET","(?:\\^)");D("CARETTRIM",`(\\s*)${R[P.LONECARET]}\\s+`,!0);Bt.caretTrimReplace="$1^";D("CARET",`^${R[P.LONECARET]}${R[P.XRANGEPLAIN]}$`);D("CARETLOOSE",`^${R[P.LONECARET]}${R[P.XRANGEPLAINLOOSE]}$`);D("COMPARATORLOOSE",`^${R[P.GTLT]}\\s*(${R[P.LOOSEPLAIN]})$|^$`);D("COMPARATOR",`^${R[P.GTLT]}\\s*(${R[P.FULLPLAIN]})$|^$`);D("COMPARATORTRIM",`(\\s*)${R[P.GTLT]}\\s*(${R[P.LOOSEPLAIN]}|${R[P.XRANGEPLAIN]})`,!0);Bt.comparatorTrimReplace="$1$2$3";D("HYPHENRANGE",`^\\s*(${R[P.XRANGEPLAIN]})\\s+-\\s+(${R[P.XRANGEPLAIN]})\\s*$`);D("HYPHENRANGELOOSE",`^\\s*(${R[P.XRANGEPLAINLOOSE]})\\s+-\\s+(${R[P.XRANGEPLAINLOOSE]})\\s*$`);D("STAR","(<|>)?=?\\s*\\*");D("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");D("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Tl=h((Yfe,xC)=>{"use strict";var zX=Object.freeze({loose:!0}),XX=Object.freeze({}),JX=t=>t?typeof t!="object"?zX:t:XX;xC.exports=JX});var Bd=h((qfe,IC)=>{"use strict";var MC=/^[0-9]+$/,LC=(t,e)=>{let n=MC.test(t),i=MC.test(e);return n&&i&&(t=+t,e=+e),t===e?0:n&&!i?-1:i&&!n?1:t<e?-1:1},QX=(t,e)=>LC(e,t);IC.exports={compareIdentifiers:LC,rcompareIdentifiers:QX}});var Me=h((jfe,UC)=>{"use strict";var vl=Ri(),{MAX_LENGTH:CC,MAX_SAFE_INTEGER:ml}=Ni(),{safeRe:wC,t:DC}=Jn(),ZX=Tl(),{compareIdentifiers:Qn}=Bd(),Gd=class t{constructor(e,n){if(n=ZX(n),e instanceof t){if(e.loose===!!n.loose&&e.includePrerelease===!!n.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>CC)throw new TypeError(`version is longer than ${CC} characters`);vl("SemVer",e,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let i=e.trim().match(n.loose?wC[DC.LOOSE]:wC[DC.FULL]);if(!i)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>ml||this.major<0)throw new TypeError("Invalid major version");if(this.minor>ml||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>ml||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(a=>{if(/^[0-9]+$/.test(a)){let u=+a;if(u>=0&&u<ml)return u}return a}):this.prerelease=[],this.build=i[5]?i[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(vl("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),Qn(this.major,e.major)||Qn(this.minor,e.minor)||Qn(this.patch,e.patch)}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let n=0;do{let i=this.prerelease[n],a=e.prerelease[n];if(vl("prerelease compare",n,i,a),i===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(i===void 0)return-1;if(i===a)continue;return Qn(i,a)}while(++n)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let n=0;do{let i=this.build[n],a=e.build[n];if(vl("build compare",n,i,a),i===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(i===void 0)return-1;if(i===a)continue;return Qn(i,a)}while(++n)}inc(e,n,i){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,i);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,i);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,i),this.inc("pre",n,i);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,i),this.inc("pre",n,i);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let a=Number(i)?1:0;if(!n&&i===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[a];else{let u=this.prerelease.length;for(;--u>=0;)typeof this.prerelease[u]=="number"&&(this.prerelease[u]++,u=-2);if(u===-1){if(n===this.prerelease.join(".")&&i===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(a)}}if(n){let u=[n,a];i===!1&&(u=[n]),Qn(this.prerelease[0],n)===0?isNaN(this.prerelease[1])&&(this.prerelease=u):this.prerelease=u}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};UC.exports=Gd});var qr=h(($fe,BC)=>{"use strict";var VC=Me(),eJ=(t,e,n=!1)=>{if(t instanceof VC)return t;try{return new VC(t,e)}catch(i){if(!n)return null;throw i}};BC.exports=eJ});var kC=h((Kfe,GC)=>{"use strict";var tJ=qr(),rJ=(t,e)=>{let n=tJ(t,e);return n?n.version:null};GC.exports=rJ});var FC=h((Wfe,HC)=>{"use strict";var nJ=qr(),oJ=(t,e)=>{let n=nJ(t.trim().replace(/^[=v]+/,""),e);return n?n.version:null};HC.exports=oJ});var jC=h((zfe,qC)=>{"use strict";var YC=Me(),iJ=(t,e,n,i,a)=>{typeof n=="string"&&(a=i,i=n,n=void 0);try{return new YC(t instanceof YC?t.version:t,n).inc(e,i,a).version}catch{return null}};qC.exports=iJ});var WC=h((Xfe,KC)=>{"use strict";var $C=qr(),aJ=(t,e)=>{let n=$C(t,null,!0),i=$C(e,null,!0),a=n.compare(i);if(a===0)return null;let u=a>0,o=u?n:i,r=u?i:n,s=!!o.prerelease.length;if(!!r.prerelease.length&&!s)return!r.patch&&!r.minor?"major":o.patch?"patch":o.minor?"minor":"major";let c=s?"pre":"";return n.major!==i.major?c+"major":n.minor!==i.minor?c+"minor":n.patch!==i.patch?c+"patch":"prerelease"};KC.exports=aJ});var XC=h((Jfe,zC)=>{"use strict";var uJ=Me(),sJ=(t,e)=>new uJ(t,e).major;zC.exports=sJ});var QC=h((Qfe,JC)=>{"use strict";var lJ=Me(),cJ=(t,e)=>new lJ(t,e).minor;JC.exports=cJ});var ew=h((Zfe,ZC)=>{"use strict";var fJ=Me(),pJ=(t,e)=>new fJ(t,e).patch;ZC.exports=pJ});var rw=h((epe,tw)=>{"use strict";var dJ=qr(),EJ=(t,e)=>{let n=dJ(t,e);return n&&n.prerelease.length?n.prerelease:null};tw.exports=EJ});var nt=h((tpe,ow)=>{"use strict";var nw=Me(),_J=(t,e,n)=>new nw(t,n).compare(new nw(e,n));ow.exports=_J});var aw=h((rpe,iw)=>{"use strict";var SJ=nt(),hJ=(t,e,n)=>SJ(e,t,n);iw.exports=hJ});var sw=h((npe,uw)=>{"use strict";var TJ=nt(),vJ=(t,e)=>TJ(t,e,!0);uw.exports=vJ});var yl=h((ope,cw)=>{"use strict";var lw=Me(),mJ=(t,e,n)=>{let i=new lw(t,n),a=new lw(e,n);return i.compare(a)||i.compareBuild(a)};cw.exports=mJ});var pw=h((ipe,fw)=>{"use strict";var yJ=yl(),AJ=(t,e)=>t.sort((n,i)=>yJ(n,i,e));fw.exports=AJ});var Ew=h((ape,dw)=>{"use strict";var OJ=yl(),gJ=(t,e)=>t.sort((n,i)=>OJ(i,n,e));dw.exports=gJ});var Pi=h((upe,_w)=>{"use strict";var NJ=nt(),RJ=(t,e,n)=>NJ(t,e,n)>0;_w.exports=RJ});var Al=h((spe,Sw)=>{"use strict";var PJ=nt(),bJ=(t,e,n)=>PJ(t,e,n)<0;Sw.exports=bJ});var kd=h((lpe,hw)=>{"use strict";var xJ=nt(),MJ=(t,e,n)=>xJ(t,e,n)===0;hw.exports=MJ});var Hd=h((cpe,Tw)=>{"use strict";var LJ=nt(),IJ=(t,e,n)=>LJ(t,e,n)!==0;Tw.exports=IJ});var Ol=h((fpe,vw)=>{"use strict";var CJ=nt(),wJ=(t,e,n)=>CJ(t,e,n)>=0;vw.exports=wJ});var gl=h((ppe,mw)=>{"use strict";var DJ=nt(),UJ=(t,e,n)=>DJ(t,e,n)<=0;mw.exports=UJ});var Fd=h((dpe,yw)=>{"use strict";var VJ=kd(),BJ=Hd(),GJ=Pi(),kJ=Ol(),HJ=Al(),FJ=gl(),YJ=(t,e,n,i)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t===n;case"!==":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t!==n;case"":case"=":case"==":return VJ(t,n,i);case"!=":return BJ(t,n,i);case">":return GJ(t,n,i);case">=":return kJ(t,n,i);case"<":return HJ(t,n,i);case"<=":return FJ(t,n,i);default:throw new TypeError(`Invalid operator: ${e}`)}};yw.exports=YJ});var Ow=h((Epe,Aw)=>{"use strict";var qJ=Me(),jJ=qr(),{safeRe:Nl,t:Rl}=Jn(),$J=(t,e)=>{if(t instanceof qJ)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let n=null;if(!e.rtl)n=t.match(e.includePrerelease?Nl[Rl.COERCEFULL]:Nl[Rl.COERCE]);else{let s=e.includePrerelease?Nl[Rl.COERCERTLFULL]:Nl[Rl.COERCERTL],l;for(;(l=s.exec(t))&&(!n||n.index+n[0].length!==t.length);)(!n||l.index+l[0].length!==n.index+n[0].length)&&(n=l),s.lastIndex=l.index+l[1].length+l[2].length;s.lastIndex=-1}if(n===null)return null;let i=n[2],a=n[3]||"0",u=n[4]||"0",o=e.includePrerelease&&n[5]?`-${n[5]}`:"",r=e.includePrerelease&&n[6]?`+${n[6]}`:"";return jJ(`${i}.${a}.${u}${o}${r}`,e)};Aw.exports=$J});var Nw=h((_pe,gw)=>{"use strict";var Yd=class{constructor(){this.max=1e3,this.map=new Map}get(e){let n=this.map.get(e);if(n!==void 0)return this.map.delete(e),this.map.set(e,n),n}delete(e){return this.map.delete(e)}set(e,n){if(!this.delete(e)&&n!==void 0){if(this.map.size>=this.max){let a=this.map.keys().next().value;this.delete(a)}this.map.set(e,n)}return this}};gw.exports=Yd});var ot=h((Spe,xw)=>{"use strict";var KJ=/\s+/g,qd=class t{constructor(e,n){if(n=zJ(n),e instanceof t)return e.loose===!!n.loose&&e.includePrerelease===!!n.includePrerelease?e:new t(e.raw,n);if(e instanceof jd)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=e.trim().replace(KJ," "),this.set=this.raw.split("||").map(i=>this.parseRange(i.trim())).filter(i=>i.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let i=this.set[0];if(this.set=this.set.filter(a=>!Pw(a[0])),this.set.length===0)this.set=[i];else if(this.set.length>1){for(let a of this.set)if(a.length===1&&r9(a[0])){this.set=[a];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let n=this.set[e];for(let i=0;i<n.length;i++)i>0&&(this.formatted+=" "),this.formatted+=n[i].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let i=((this.options.includePrerelease&&e9)|(this.options.loose&&t9))+":"+e,a=Rw.get(i);if(a)return a;let u=this.options.loose,o=u?We[Be.HYPHENRANGELOOSE]:We[Be.HYPHENRANGE];e=e.replace(o,p9(this.options.includePrerelease)),te("hyphen replace",e),e=e.replace(We[Be.COMPARATORTRIM],JJ),te("comparator trim",e),e=e.replace(We[Be.TILDETRIM],QJ),te("tilde trim",e),e=e.replace(We[Be.CARETTRIM],ZJ),te("caret trim",e);let r=e.split(" ").map(p=>n9(p,this.options)).join(" ").split(/\s+/).map(p=>f9(p,this.options));u&&(r=r.filter(p=>(te("loose invalid filter",p,this.options),!!p.match(We[Be.COMPARATORLOOSE])))),te("range list",r);let s=new Map,l=r.map(p=>new jd(p,this.options));for(let p of l){if(Pw(p))return[p];s.set(p.value,p)}s.size>1&&s.has("")&&s.delete("");let c=[...s.values()];return Rw.set(i,c),c}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(i=>bw(i,n)&&e.set.some(a=>bw(a,n)&&i.every(u=>a.every(o=>u.intersects(o,n)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new XJ(e,this.options)}catch{return!1}for(let n=0;n<this.set.length;n++)if(d9(this.set[n],e,this.options))return!0;return!1}};xw.exports=qd;var WJ=Nw(),Rw=new WJ,zJ=Tl(),jd=bi(),te=Ri(),XJ=Me(),{safeRe:We,t:Be,comparatorTrimReplace:JJ,tildeTrimReplace:QJ,caretTrimReplace:ZJ}=Jn(),{FLAG_INCLUDE_PRERELEASE:e9,FLAG_LOOSE:t9}=Ni(),Pw=t=>t.value==="<0.0.0-0",r9=t=>t.value==="",bw=(t,e)=>{let n=!0,i=t.slice(),a=i.pop();for(;n&&i.length;)n=i.every(u=>a.intersects(u,e)),a=i.pop();return n},n9=(t,e)=>(te("comp",t,e),t=a9(t,e),te("caret",t),t=o9(t,e),te("tildes",t),t=s9(t,e),te("xrange",t),t=c9(t,e),te("stars",t),t),Ge=t=>!t||t.toLowerCase()==="x"||t==="*",o9=(t,e)=>t.trim().split(/\s+/).map(n=>i9(n,e)).join(" "),i9=(t,e)=>{let n=e.loose?We[Be.TILDELOOSE]:We[Be.TILDE];return t.replace(n,(i,a,u,o,r)=>{te("tilde",t,i,a,u,o,r);let s;return Ge(a)?s="":Ge(u)?s=`>=${a}.0.0 <${+a+1}.0.0-0`:Ge(o)?s=`>=${a}.${u}.0 <${a}.${+u+1}.0-0`:r?(te("replaceTilde pr",r),s=`>=${a}.${u}.${o}-${r} <${a}.${+u+1}.0-0`):s=`>=${a}.${u}.${o} <${a}.${+u+1}.0-0`,te("tilde return",s),s})},a9=(t,e)=>t.trim().split(/\s+/).map(n=>u9(n,e)).join(" "),u9=(t,e)=>{te("caret",t,e);let n=e.loose?We[Be.CARETLOOSE]:We[Be.CARET],i=e.includePrerelease?"-0":"";return t.replace(n,(a,u,o,r,s)=>{te("caret",t,a,u,o,r,s);let l;return Ge(u)?l="":Ge(o)?l=`>=${u}.0.0${i} <${+u+1}.0.0-0`:Ge(r)?u==="0"?l=`>=${u}.${o}.0${i} <${u}.${+o+1}.0-0`:l=`>=${u}.${o}.0${i} <${+u+1}.0.0-0`:s?(te("replaceCaret pr",s),u==="0"?o==="0"?l=`>=${u}.${o}.${r}-${s} <${u}.${o}.${+r+1}-0`:l=`>=${u}.${o}.${r}-${s} <${u}.${+o+1}.0-0`:l=`>=${u}.${o}.${r}-${s} <${+u+1}.0.0-0`):(te("no pr"),u==="0"?o==="0"?l=`>=${u}.${o}.${r}${i} <${u}.${o}.${+r+1}-0`:l=`>=${u}.${o}.${r}${i} <${u}.${+o+1}.0-0`:l=`>=${u}.${o}.${r} <${+u+1}.0.0-0`),te("caret return",l),l})},s9=(t,e)=>(te("replaceXRanges",t,e),t.split(/\s+/).map(n=>l9(n,e)).join(" ")),l9=(t,e)=>{t=t.trim();let n=e.loose?We[Be.XRANGELOOSE]:We[Be.XRANGE];return t.replace(n,(i,a,u,o,r,s)=>{te("xRange",t,i,a,u,o,r,s);let l=Ge(u),c=l||Ge(o),p=c||Ge(r),_=p;return a==="="&&_&&(a=""),s=e.includePrerelease?"-0":"",l?a===">"||a==="<"?i="<0.0.0-0":i="*":a&&_?(c&&(o=0),r=0,a===">"?(a=">=",c?(u=+u+1,o=0,r=0):(o=+o+1,r=0)):a==="<="&&(a="<",c?u=+u+1:o=+o+1),a==="<"&&(s="-0"),i=`${a+u}.${o}.${r}${s}`):c?i=`>=${u}.0.0${s} <${+u+1}.0.0-0`:p&&(i=`>=${u}.${o}.0${s} <${u}.${+o+1}.0-0`),te("xRange return",i),i})},c9=(t,e)=>(te("replaceStars",t,e),t.trim().replace(We[Be.STAR],"")),f9=(t,e)=>(te("replaceGTE0",t,e),t.trim().replace(We[e.includePrerelease?Be.GTE0PRE:Be.GTE0],"")),p9=t=>(e,n,i,a,u,o,r,s,l,c,p,_)=>(Ge(i)?n="":Ge(a)?n=`>=${i}.0.0${t?"-0":""}`:Ge(u)?n=`>=${i}.${a}.0${t?"-0":""}`:o?n=`>=${n}`:n=`>=${n}${t?"-0":""}`,Ge(l)?s="":Ge(c)?s=`<${+l+1}.0.0-0`:Ge(p)?s=`<${l}.${+c+1}.0-0`:_?s=`<=${l}.${c}.${p}-${_}`:t?s=`<${l}.${c}.${+p+1}-0`:s=`<=${s}`,`${n} ${s}`.trim()),d9=(t,e,n)=>{for(let i=0;i<t.length;i++)if(!t[i].test(e))return!1;if(e.prerelease.length&&!n.includePrerelease){for(let i=0;i<t.length;i++)if(te(t[i].semver),t[i].semver!==jd.ANY&&t[i].semver.prerelease.length>0){let a=t[i].semver;if(a.major===e.major&&a.minor===e.minor&&a.patch===e.patch)return!0}return!1}return!0}});var bi=h((hpe,Dw)=>{"use strict";var xi=Symbol("SemVer ANY"),Wd=class t{static get ANY(){return xi}constructor(e,n){if(n=Mw(n),e instanceof t){if(e.loose===!!n.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),Kd("comparator",e,n),this.options=n,this.loose=!!n.loose,this.parse(e),this.semver===xi?this.value="":this.value=this.operator+this.semver.version,Kd("comp",this)}parse(e){let n=this.options.loose?Lw[Iw.COMPARATORLOOSE]:Lw[Iw.COMPARATOR],i=e.match(n);if(!i)throw new TypeError(`Invalid comparator: ${e}`);this.operator=i[1]!==void 0?i[1]:"",this.operator==="="&&(this.operator=""),i[2]?this.semver=new Cw(i[2],this.options.loose):this.semver=xi}toString(){return this.value}test(e){if(Kd("Comparator.test",e,this.options.loose),this.semver===xi||e===xi)return!0;if(typeof e=="string")try{e=new Cw(e,this.options)}catch{return!1}return $d(e,this.operator,this.semver,this.options)}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new ww(e.value,n).test(this.value):e.operator===""?e.value===""?!0:new ww(this.value,n).test(e.semver):(n=Mw(n),n.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!n.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||$d(this.semver,"<",e.semver,n)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||$d(this.semver,">",e.semver,n)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};Dw.exports=Wd;var Mw=Tl(),{safeRe:Lw,t:Iw}=Jn(),$d=Fd(),Kd=Ri(),Cw=Me(),ww=ot()});var Mi=h((Tpe,Uw)=>{"use strict";var E9=ot(),_9=(t,e,n)=>{try{e=new E9(e,n)}catch{return!1}return e.test(t)};Uw.exports=_9});var Bw=h((vpe,Vw)=>{"use strict";var S9=ot(),h9=(t,e)=>new S9(t,e).set.map(n=>n.map(i=>i.value).join(" ").trim().split(" "));Vw.exports=h9});var kw=h((mpe,Gw)=>{"use strict";var T9=Me(),v9=ot(),m9=(t,e,n)=>{let i=null,a=null,u=null;try{u=new v9(e,n)}catch{return null}return t.forEach(o=>{u.test(o)&&(!i||a.compare(o)===-1)&&(i=o,a=new T9(i,n))}),i};Gw.exports=m9});var Fw=h((ype,Hw)=>{"use strict";var y9=Me(),A9=ot(),O9=(t,e,n)=>{let i=null,a=null,u=null;try{u=new A9(e,n)}catch{return null}return t.forEach(o=>{u.test(o)&&(!i||a.compare(o)===1)&&(i=o,a=new y9(i,n))}),i};Hw.exports=O9});var jw=h((Ape,qw)=>{"use strict";var zd=Me(),g9=ot(),Yw=Pi(),N9=(t,e)=>{t=new g9(t,e);let n=new zd("0.0.0");if(t.test(n)||(n=new zd("0.0.0-0"),t.test(n)))return n;n=null;for(let i=0;i<t.set.length;++i){let a=t.set[i],u=null;a.forEach(o=>{let r=new zd(o.semver.version);switch(o.operator){case">":r.prerelease.length===0?r.patch++:r.prerelease.push(0),r.raw=r.format();case"":case">=":(!u||Yw(r,u))&&(u=r);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),u&&(!n||Yw(n,u))&&(n=u)}return n&&t.test(n)?n:null};qw.exports=N9});var Kw=h((Ope,$w)=>{"use strict";var R9=ot(),P9=(t,e)=>{try{return new R9(t,e).range||"*"}catch{return null}};$w.exports=P9});var Pl=h((gpe,Jw)=>{"use strict";var b9=Me(),Xw=bi(),{ANY:x9}=Xw,M9=ot(),L9=Mi(),Ww=Pi(),zw=Al(),I9=gl(),C9=Ol(),w9=(t,e,n,i)=>{t=new b9(t,i),e=new M9(e,i);let a,u,o,r,s;switch(n){case">":a=Ww,u=I9,o=zw,r=">",s=">=";break;case"<":a=zw,u=C9,o=Ww,r="<",s="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(L9(t,e,i))return!1;for(let l=0;l<e.set.length;++l){let c=e.set[l],p=null,_=null;if(c.forEach(f=>{f.semver===x9&&(f=new Xw(">=0.0.0")),p=p||f,_=_||f,a(f.semver,p.semver,i)?p=f:o(f.semver,_.semver,i)&&(_=f)}),p.operator===r||p.operator===s||(!_.operator||_.operator===r)&&u(t,_.semver))return!1;if(_.operator===s&&o(t,_.semver))return!1}return!0};Jw.exports=w9});var Zw=h((Npe,Qw)=>{"use strict";var D9=Pl(),U9=(t,e,n)=>D9(t,e,">",n);Qw.exports=U9});var tD=h((Rpe,eD)=>{"use strict";var V9=Pl(),B9=(t,e,n)=>V9(t,e,"<",n);eD.exports=B9});var oD=h((Ppe,nD)=>{"use strict";var rD=ot(),G9=(t,e,n)=>(t=new rD(t,n),e=new rD(e,n),t.intersects(e,n));nD.exports=G9});var aD=h((bpe,iD)=>{"use strict";var k9=Mi(),H9=nt();iD.exports=(t,e,n)=>{let i=[],a=null,u=null,o=t.sort((c,p)=>H9(c,p,n));for(let c of o)k9(c,e,n)?(u=c,a||(a=c)):(u&&i.push([a,u]),u=null,a=null);a&&i.push([a,null]);let r=[];for(let[c,p]of i)c===p?r.push(c):!p&&c===o[0]?r.push("*"):p?c===o[0]?r.push(`<=${p}`):r.push(`${c} - ${p}`):r.push(`>=${c}`);let s=r.join(" || "),l=typeof e.raw=="string"?e.raw:String(e);return s.length<l.length?s:e}});var pD=h((xpe,fD)=>{"use strict";var uD=ot(),Jd=bi(),{ANY:Xd}=Jd,Li=Mi(),Qd=nt(),F9=(t,e,n={})=>{if(t===e)return!0;t=new uD(t,n),e=new uD(e,n);let i=!1;e:for(let a of t.set){for(let u of e.set){let o=q9(a,u,n);if(i=i||o!==null,o)continue e}if(i)return!1}return!0},Y9=[new Jd(">=0.0.0-0")],sD=[new Jd(">=0.0.0")],q9=(t,e,n)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===Xd){if(e.length===1&&e[0].semver===Xd)return!0;n.includePrerelease?t=Y9:t=sD}if(e.length===1&&e[0].semver===Xd){if(n.includePrerelease)return!0;e=sD}let i=new Set,a,u;for(let f of t)f.operator===">"||f.operator===">="?a=lD(a,f,n):f.operator==="<"||f.operator==="<="?u=cD(u,f,n):i.add(f.semver);if(i.size>1)return null;let o;if(a&&u){if(o=Qd(a.semver,u.semver,n),o>0)return null;if(o===0&&(a.operator!==">="||u.operator!=="<="))return null}for(let f of i){if(a&&!Li(f,String(a),n)||u&&!Li(f,String(u),n))return null;for(let S of e)if(!Li(f,String(S),n))return!1;return!0}let r,s,l,c,p=u&&!n.includePrerelease&&u.semver.prerelease.length?u.semver:!1,_=a&&!n.includePrerelease&&a.semver.prerelease.length?a.semver:!1;p&&p.prerelease.length===1&&u.operator==="<"&&p.prerelease[0]===0&&(p=!1);for(let f of e){if(c=c||f.operator===">"||f.operator===">=",l=l||f.operator==="<"||f.operator==="<=",a){if(_&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===_.major&&f.semver.minor===_.minor&&f.semver.patch===_.patch&&(_=!1),f.operator===">"||f.operator===">="){if(r=lD(a,f,n),r===f&&r!==a)return!1}else if(a.operator===">="&&!Li(a.semver,String(f),n))return!1}if(u){if(p&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===p.major&&f.semver.minor===p.minor&&f.semver.patch===p.patch&&(p=!1),f.operator==="<"||f.operator==="<="){if(s=cD(u,f,n),s===f&&s!==u)return!1}else if(u.operator==="<="&&!Li(u.semver,String(f),n))return!1}if(!f.operator&&(u||a)&&o!==0)return!1}return!(a&&l&&!u&&o!==0||u&&c&&!a&&o!==0||_||p)},lD=(t,e,n)=>{if(!t)return e;let i=Qd(t.semver,e.semver,n);return i>0?t:i<0||e.operator===">"&&t.operator===">="?e:t},cD=(t,e,n)=>{if(!t)return e;let i=Qd(t.semver,e.semver,n);return i<0?t:i>0||e.operator==="<"&&t.operator==="<="?e:t};fD.exports=F9});var SD=h((Mpe,_D)=>{"use strict";var Zd=Jn(),dD=Ni(),j9=Me(),ED=Bd(),$9=qr(),K9=kC(),W9=FC(),z9=jC(),X9=WC(),J9=XC(),Q9=QC(),Z9=ew(),e7=rw(),t7=nt(),r7=aw(),n7=sw(),o7=yl(),i7=pw(),a7=Ew(),u7=Pi(),s7=Al(),l7=kd(),c7=Hd(),f7=Ol(),p7=gl(),d7=Fd(),E7=Ow(),_7=bi(),S7=ot(),h7=Mi(),T7=Bw(),v7=kw(),m7=Fw(),y7=jw(),A7=Kw(),O7=Pl(),g7=Zw(),N7=tD(),R7=oD(),P7=aD(),b7=pD();_D.exports={parse:$9,valid:K9,clean:W9,inc:z9,diff:X9,major:J9,minor:Q9,patch:Z9,prerelease:e7,compare:t7,rcompare:r7,compareLoose:n7,compareBuild:o7,sort:i7,rsort:a7,gt:u7,lt:s7,eq:l7,neq:c7,gte:f7,lte:p7,cmp:d7,coerce:E7,Comparator:_7,Range:S7,satisfies:h7,toComparators:T7,maxSatisfying:v7,minSatisfying:m7,minVersion:y7,validRange:A7,outside:O7,gtr:g7,ltr:N7,intersects:R7,simplifyRange:P7,subset:b7,SemVer:j9,re:Zd.re,src:Zd.src,tokens:Zd.t,SEMVER_SPEC_VERSION:dD.SEMVER_SPEC_VERSION,RELEASE_TYPES:dD.RELEASE_TYPES,compareIdentifiers:ED.compareIdentifiers,rcompareIdentifiers:ED.rcompareIdentifiers}});function M7(t){var e=decodeURIComponent(t).split(":");if(e.length!==4)return null;var n=TD(e,4),i=n[0],a=n[1],u=n[3],o=i.padStart(32,"0"),r=a.padStart(16,"0"),s=x7.test(u)?parseInt(u,16)&1:1;return{traceId:o,spanId:r,isRemote:!0,traceFlags:s}}var hD,TD,eE,bl,vD,x7,mD=m(()=>{"use strict";M();K();hD=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},TD=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),a,u=[],o;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)u.push(a.value)}catch(r){o={error:r}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return u},eE="uber-trace-id",bl="uberctx",vD=function(){function t(e){typeof e=="string"?(this._jaegerTraceHeader=e,this._jaegerBaggageHeaderPrefix=bl):(this._jaegerTraceHeader=e?.customTraceHeader||eE,this._jaegerBaggageHeaderPrefix=e?.customBaggageHeaderPrefix||bl)}return t.prototype.inject=function(e,n,i){var a,u,o=J.getSpanContext(e),r=at.getBaggage(e);if(o&&xe(e)===!1){var s="0"+(o.traceFlags||Q.NONE).toString(16);i.set(n,this._jaegerTraceHeader,o.traceId+":"+o.spanId+":0:"+s)}if(r)try{for(var l=hD(r.getAllEntries()),c=l.next();!c.done;c=l.next()){var p=TD(c.value,2),_=p[0],f=p[1];i.set(n,this._jaegerBaggageHeaderPrefix+"-"+_,encodeURIComponent(f.value))}}catch(S){a={error:S}}finally{try{c&&!c.done&&(u=l.return)&&u.call(l)}finally{if(a)throw a.error}}},t.prototype.extract=function(e,n,i){var a,u,o=this,r,s=i.get(n,this._jaegerTraceHeader),l=Array.isArray(s)?s[0]:s,c=i.keys(n).filter(function(A){return A.startsWith(o._jaegerBaggageHeaderPrefix+"-")}).map(function(A){var O=i.get(n,A);return{key:A.substring(o._jaegerBaggageHeaderPrefix.length+1),value:Array.isArray(O)?O[0]:O}}),p=e;if(typeof l=="string"){var _=M7(l);_&&(p=J.setSpanContext(p,_))}if(c.length===0)return p;var f=(r=at.getBaggage(e))!==null&&r!==void 0?r:at.createBaggage();try{for(var S=hD(c),v=S.next();!v.done;v=S.next()){var T=v.value;T.value!==void 0&&(f=f.setEntry(T.key,{value:decodeURIComponent(T.value)}))}}catch(A){a={error:A}}finally{try{v&&!v.done&&(u=S.return)&&u.call(S)}finally{if(a)throw a.error}}return p=at.setBaggage(p,f),p},t.prototype.fields=function(){return[this._jaegerTraceHeader]},t}(),x7=/^[0-9a-f]{1,2}$/i});var yD={};Je(yD,{JaegerPropagator:()=>vD,UBER_BAGGAGE_HEADER_PREFIX:()=>bl,UBER_TRACE_ID_HEADER:()=>eE});var AD=m(()=>{"use strict";mD()});var ND=h(Ll=>{"use strict";Object.defineProperty(Ll,"__esModule",{value:!0});Ll.NodeTracerProvider=void 0;var OD=KI(),xl=(rC(),Y(tC)),gD=(gi(),Y(Dd)),L7=SD(),I7=(AD(),Y(yD)),Ml=class extends gD.BasicTracerProvider{constructor(e={}){super(e)}register(e={}){if(e.contextManager===void 0){let n=L7.gte(process.version,"14.8.0")?OD.AsyncLocalStorageContextManager:OD.AsyncHooksContextManager;e.contextManager=new n,e.contextManager.enable()}super.register(e)}};Ll.NodeTracerProvider=Ml;Ml._registeredPropagators=new Map([...gD.BasicTracerProvider._registeredPropagators,["b3",()=>new xl.B3Propagator({injectEncoding:xl.B3InjectEncoding.SINGLE_HEADER})],["b3multi",()=>new xl.B3Propagator({injectEncoding:xl.B3InjectEncoding.MULTI_HEADER})],["jaeger",()=>new I7.JaegerPropagator]])});var RD=h(q=>{"use strict";Object.defineProperty(q,"__esModule",{value:!0});q.Tracer=q.TraceIdRatioBasedSampler=q.Span=q.SimpleSpanProcessor=q.SamplingDecision=q.RandomIdGenerator=q.ParentBasedSampler=q.NoopSpanProcessor=q.InMemorySpanExporter=q.ForceFlushState=q.ConsoleSpanExporter=q.BatchSpanProcessor=q.BasicTracerProvider=q.AlwaysOnSampler=q.AlwaysOffSampler=q.NodeTracerProvider=void 0;var C7=ND();Object.defineProperty(q,"NodeTracerProvider",{enumerable:!0,get:function(){return C7.NodeTracerProvider}});var ke=(gi(),Y(Dd));Object.defineProperty(q,"AlwaysOffSampler",{enumerable:!0,get:function(){return ke.AlwaysOffSampler}});Object.defineProperty(q,"AlwaysOnSampler",{enumerable:!0,get:function(){return ke.AlwaysOnSampler}});Object.defineProperty(q,"BasicTracerProvider",{enumerable:!0,get:function(){return ke.BasicTracerProvider}});Object.defineProperty(q,"BatchSpanProcessor",{enumerable:!0,get:function(){return ke.BatchSpanProcessor}});Object.defineProperty(q,"ConsoleSpanExporter",{enumerable:!0,get:function(){return ke.ConsoleSpanExporter}});Object.defineProperty(q,"ForceFlushState",{enumerable:!0,get:function(){return ke.ForceFlushState}});Object.defineProperty(q,"InMemorySpanExporter",{enumerable:!0,get:function(){return ke.InMemorySpanExporter}});Object.defineProperty(q,"NoopSpanProcessor",{enumerable:!0,get:function(){return ke.NoopSpanProcessor}});Object.defineProperty(q,"ParentBasedSampler",{enumerable:!0,get:function(){return ke.ParentBasedSampler}});Object.defineProperty(q,"RandomIdGenerator",{enumerable:!0,get:function(){return ke.RandomIdGenerator}});Object.defineProperty(q,"SamplingDecision",{enumerable:!0,get:function(){return ke.SamplingDecision}});Object.defineProperty(q,"SimpleSpanProcessor",{enumerable:!0,get:function(){return ke.SimpleSpanProcessor}});Object.defineProperty(q,"Span",{enumerable:!0,get:function(){return ke.Span}});Object.defineProperty(q,"TraceIdRatioBasedSampler",{enumerable:!0,get:function(){return ke.TraceIdRatioBasedSampler}});Object.defineProperty(q,"Tracer",{enumerable:!0,get:function(){return ke.Tracer}})});var bD=h(Il=>{"use strict";Object.defineProperty(Il,"__esModule",{value:!0});Il.OTLPTraceExporter=void 0;var PD=dd(),w7=(Vs(),Y(ud)),D7=(Ei(),Y(Os)),tE=class extends D7.OTLPExporterBase{constructor(e={}){super((0,PD.createOtlpGrpcExportDelegate)((0,PD.convertLegacyOtlpGrpcOptions)(e,"TRACES"),w7.ProtobufTraceSerializer,"TraceExportService","/opentelemetry.proto.collector.trace.v1.TraceService/Export"))}};Il.OTLPTraceExporter=tE});var xD=h(jr=>{"use strict";var U7=jr&&jr.__createBinding||(Object.create?function(t,e,n,i){i===void 0&&(i=n),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]}),V7=jr&&jr.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&U7(e,t,n)};Object.defineProperty(jr,"__esModule",{value:!0});V7(bD(),jr)});var DD=Fe(Jl(),1),UD=Fe(eo(),1);import G7 from"path";function j1(t){return typeof t=="object"&&t!==null}function $1(t){return j1(t)&&typeof t.length=="number"}function K1(t){return Array.isArray(t)?t:t===void 0?[]:$1(t)||t instanceof Set?Array.from(t):[t]}var Lt=K1;function W1(t,e,...n){let i=[];if(!Array.isArray(t))throw new Error("Input must be an array");for(let[a,u]of t.entries()){let o=[];n.forEach(r=>{typeof r=="function"?o=o.concat(r(u)):o.push(r)}),e(u)&&i.push({index:a,replaceWithValue:o})}for(let a of i.reverse()){let u=[a.index,1].concat(a.replaceWithValue);t.splice.apply(t,u)}return t}var qi=W1;var ce={short:/^-([^\d-])$/,long:/^--(\S+)/,combinedShort:/^-[^\d-]{2,}$/,optEquals:/^(--\S+?)=(.*)/},ji=class extends Array{load(e){if(this.clear(),e&&e!==process.argv)e=Lt(e);else{e=process.argv.slice(0);let n=process.execArgv.some(J1)?1:2;e.splice(0,n)}e.forEach(n=>this.push(String(n)))}clear(){this.length=0}expandOptionEqualsNotation(){if(this.some(e=>ce.optEquals.test(e))){let e=[];this.forEach(n=>{let i=n.match(ce.optEquals);i?e.push(i[1],i[2]):e.push(n)}),this.clear(),this.load(e)}}expandGetoptNotation(){this.hasCombinedShortOptions()&&qi(this,ce.combinedShort,z1)}hasCombinedShortOptions(){return this.some(e=>ce.combinedShort.test(e))}static from(e){let n=new this;return n.load(e),n}};function z1(t){return t=t.slice(1),t.split("").map(e=>"-"+e)}function $i(t){return ce.optEquals.test(t)}function so(t){return(ce.short.test(t)||ce.long.test(t))&&!ce.optEquals.test(t)}function X1(t){return ce.long.test(t)&&!$i(t)}function Ql(t){return ce.short.test(t)?t.match(ce.short)[1]:X1(t)?t.match(ce.long)[1]:$i(t)?t.match(ce.optEquals)[1].replace(/^--/,""):null}function cS(t){return!(so(t)||ce.combinedShort.test(t)||ce.optEquals.test(t))}function J1(t){return["--eval","-e"].indexOf(t)>-1||t.startsWith("--eval=")}function Q1(t){return!isNaN(parseFloat(t))}function Z1(t){return!isNaN(parseFloat(t))&&isFinite(t)}function eV(t){return t!==null&&typeof t=="object"&&t.constructor===Object}function tV(t){return pS(t)&&typeof t.length=="number"}function pS(t){return typeof t=="object"&&t!==null}function lo(t){return typeof t<"u"}function rV(t){return!lo(t)}function dS(t){return t===null}function nV(t){return lo(t)&&!dS(t)&&!Number.isNaN(t)}function oV(t){return typeof t=="function"?/^class /.test(Function.prototype.toString.call(t)):!1}function iV(t){if(t===null)return!0;switch(typeof t){case"string":case"number":case"symbol":case"undefined":case"boolean":return!0;default:return!1}}function aV(t){if(t){let e=lo(Promise)&&t instanceof Promise,n=t.then&&typeof t.then=="function";return!!(e||n)}else return!1}function uV(t){return t===null||!lo(t)?!1:typeof t[Symbol.iterator]=="function"||typeof t[Symbol.asyncIterator]=="function"}function sV(t){return typeof t=="string"}function lV(t){return typeof t=="function"}function cV(t){return typeof t=="function"&&t.constructor.name==="AsyncFunction"}var Se={isNumber:Q1,isFiniteNumber:Z1,isPlainObject:eV,isArrayLike:tV,isObject:pS,isDefined:lo,isUndefined:rV,isNull:dS,isDefinedValue:nV,isClass:oV,isPrimitive:iV,isPromise:aV,isIterable:uV,isString:sV,isFunction:lV,isAsyncFunction:cV};var Zl=class{constructor(e){this.name=e.name,this.type=e.type||String,this.alias=e.alias,this.multiple=e.multiple,this.lazyMultiple=e.lazyMultiple,this.defaultOption=e.defaultOption,this.defaultValue=e.defaultValue,this.group=e.group;for(let n in e)this[n]||(this[n]=e[n])}isBoolean(){return this.type===Boolean||Se.isFunction(this.type)&&this.type.name==="Boolean"}isMultiple(){return this.multiple||this.lazyMultiple}static create(e){return new this(e)}},co=Zl;var ec=class extends Array{validate(e){this.some(_=>!_.name)&&It("INVALID_DEFINITIONS","Invalid option definitions: the `name` property is required on each definition"),this.some(_=>_.type&&typeof _.type!="function")&&It("INVALID_DEFINITIONS","Invalid option definitions: the `type` property must be a setter fuction (default: `Boolean`)");let a;this.some(_=>(a=_,Se.isDefined(_.alias)&&Se.isNumber(_.alias)))&&It("INVALID_DEFINITIONS","Invalid option definition: to avoid ambiguity an alias cannot be numeric [--"+a.name+" alias is -"+a.alias+"]"),this.some(_=>(a=_,Se.isDefined(_.alias)&&_.alias.length!==1))&&It("INVALID_DEFINITIONS","Invalid option definition: an alias must be a single character"),this.some(_=>(a=_,_.alias==="-"))&&It("INVALID_DEFINITIONS",'Invalid option definition: an alias cannot be "-"'),_S(this.map(_=>e?_.name.toLowerCase():_.name))&&It("INVALID_DEFINITIONS","Two or more option definitions have the same name"),_S(this.map(_=>e&&Se.isDefined(_.alias)?_.alias.toLowerCase():_.alias))&&It("INVALID_DEFINITIONS","Two or more option definitions have the same alias"),this.filter(_=>_.defaultOption===!0).length>1&&It("INVALID_DEFINITIONS","Only one option definition can be the defaultOption"),this.some(_=>(a=_,_.isBoolean()&&_.defaultOption))&&It("INVALID_DEFINITIONS",`A boolean option ["${a.name}"] can not also be the defaultOption.`)}get(e,n){if(so(e))if(ce.short.test(e)){let i=Ql(e);if(n){let a=i.toLowerCase();return this.find(u=>Se.isDefined(u.alias)&&u.alias.toLowerCase()===a)}else return this.find(a=>a.alias===i)}else{let i=Ql(e);if(n){let a=i.toLowerCase();return this.find(u=>u.name.toLowerCase()===a)}else return this.find(a=>a.name===i)}else return this.find(i=>i.name===e)}getDefault(){return this.find(e=>e.defaultOption===!0)}isGrouped(){return this.some(e=>e.group)}whereGrouped(){return this.filter(ES)}whereNotGrouped(){return this.filter(e=>!ES(e))}whereDefaultValueSet(){return this.filter(e=>Se.isDefined(e.defaultValue))}static from(e,n){if(e instanceof this)return e;let i=super.from(Lt(e),a=>co.create(a));return i.validate(n),i}};function It(t,e){let n=new Error(e);throw n.name=t,n}function ES(t){return Lt(t.group).some(e=>e)}function _S(t){let e={};for(let n=0;n<t.length;n++){let i=t[n];if(e[i])return!0;Se.isDefined(i)&&(e[i]=!0)}}var Zr=ec;var tc=class{constructor(e,n){this.options=Object.assign({},n),this.definitions=Zr.from(e,this.options.caseInsensitive),this.argv=ji.from(this.options.argv),this.argv.hasCombinedShortOptions()&&qi(this.argv,ce.combinedShort.test.bind(ce.combinedShort),i=>(i=i.slice(1),i.split("").map(a=>({origArg:`-${i}`,arg:"-"+a}))))}*[Symbol.iterator](){let e=this.definitions,n,i,a,u,o=!1,r=!1,s;for(let l of this.argv){if(Se.isPlainObject(l)&&(s=l.origArg,l=l.arg),r&&this.options.stopAtFirstUnknown){yield{event:"unknown_value",arg:l,name:"_unknown",value:void 0};continue}if(so(l))n=e.get(l,this.options.caseInsensitive),i=void 0,n?(i=n.isBoolean()?!0:null,u="set"):u="unknown_option";else if($i(l)){let p=l.match(ce.optEquals);n=e.get(p[1],this.options.caseInsensitive),n?n.isBoolean()?(yield{event:"unknown_value",arg:l,name:"_unknown",value:i,def:n},u="set",i=!0):(u="set",i=p[2]):u="unknown_option"}else cS(l)&&(n?(i=l,u="set"):(n=this.definitions.getDefault(),n&&!o?(i=l,u="set"):(u="unknown_value",n=void 0)));a=n?n.name:"_unknown";let c={event:u,arg:l,name:a,value:i,def:n};s&&(c.subArg=l,c.arg=s),yield c,a==="_unknown"&&(r=!0),n&&n.defaultOption&&!n.isMultiple()&&u==="set"&&(o=!0),n&&n.isBoolean()&&(n=void 0),n&&!n.multiple&&Se.isDefined(i)&&i!==null&&(n=void 0),i=void 0,u=void 0,a=void 0,s=void 0}}},SS=tc;var vr=new WeakMap,Ki=class{constructor(e){this.definition=new co(e),this.state=null,this.resetToDefault()}get(){return vr.get(this)}set(e){this._set(e,"set")}_set(e,n){let i=this.definition;if(i.isMultiple()){if(e!=null){let a=this.get();this.state==="default"&&(a.length=0),a.push(i.type(e)),this.state=n}}else if(!i.isMultiple()&&this.state==="set"){let a=new Error(`Singular option already set [${this.definition.name}=${this.get()}]`);throw a.name="ALREADY_SET",a.value=e,a.optionName=i.name,a}else e==null?vr.set(this,e):(vr.set(this,i.type(e)),this.state=n)}resetToDefault(){Se.isDefined(this.definition.defaultValue)?this.definition.isMultiple()?vr.set(this,Lt(this.definition.defaultValue).slice()):vr.set(this,this.definition.defaultValue):this.definition.isMultiple()?vr.set(this,[]):vr.set(this,null),this.state="default"}static create(e){return e=new co(e),e.isBoolean()?rc.create(e):new this(e)}},rc=class extends Ki{set(e){super.set(!0)}static create(e){return new this(e)}},fo=Ki;var hS=Fe(aE(),1),nc=class extends Map{constructor(e){super(),this.definitions=Zr.from(e),this.set("_unknown",fo.create({name:"_unknown",multiple:!0}));for(let n of this.definitions.whereDefaultValueSet())this.set(n.name,fo.create(n))}toObject(e){e=e||{};let n={};for(let i of this){let a=e.camelCase&&i[0]!=="_unknown"?(0,hS.default)(i[0]):i[0],u=i[1];a==="_unknown"&&!u.get().length||(n[a]=u.get())}return e.skipUnknown&&delete n._unknown,n}},Wi=nc;var oc=Fe(aE(),1),ic=class extends Wi{toObject(e){let n=super.toObject({skipUnknown:e.skipUnknown}),i=super.toObject(e),a=i._unknown;delete i._unknown;let u={_all:i};return a&&a.length&&(u._unknown=a),this.definitions.whereGrouped().forEach(o=>{let r=e.camelCase?(0,oc.default)(o.name):o.name,s=n[o.name];for(let l of Lt(o.group))u[l]=u[l]||{},Se.isDefined(s)&&(u[l][r]=s)}),this.definitions.whereNotGrouped().forEach(o=>{let r=e.camelCase?(0,oc.default)(o.name):o.name,s=n[o.name];Se.isDefined(s)&&(u._none||(u._none={}),u._none[r]=s)}),u}},TS=ic;function fV(t,e){e=e||{},e.stopAtFirstUnknown&&(e.partial=!0),t=Zr.from(t,e.caseInsensitive);let n=new SS(t,{argv:e.argv,stopAtFirstUnknown:e.stopAtFirstUnknown,caseInsensitive:e.caseInsensitive}),i=t.isGrouped()?TS:Wi,a=new i(t);for(let u of n){let o=u.subArg||u.arg;if(!e.partial){if(u.event==="unknown_value"){let s=new Error(`Unknown value: ${o}`);throw s.name="UNKNOWN_VALUE",s.value=o,s}else if(u.event==="unknown_option"){let s=new Error(`Unknown option: ${o}`);throw s.name="UNKNOWN_OPTION",s.optionName=o,s}}let r;a.has(u.name)?r=a.get(u.name):(r=fo.create(u.def),a.set(u.name,r)),u.name==="_unknown"?r.set(o):r.set(u.value)}return a.toObject({skipUnknown:!e.partial,camelCase:e.camelCase})}var vS=fV;var VD=Fe(FD(),1),BD=Fe(YD(),1),GD=Fe(KO(),1);import k7 from"http";import{Session as H7}from"node:inspector/promises";import{createRequire as dY}from"module";var Ec=Fe(Jl(),1);import ra from"path";import dc from"os";var EY=dY(import.meta.url);function WO(t){let e=EY.resolve(t),n=ra.dirname(e);for(;!Ec.default.existsSync(ra.join(n,"package.json"));)n=ra.dirname(n);let i=Ec.default.readFileSync(ra.join(n,"package.json"),"utf-8");return JSON.parse(i)}var na=class{constructor(e){this.instance=e;let n=WO("@sentio/sdk"),i=WO("@sentio/runtime");console.log("Runtime version:",i.version,"SDK version:",n.version);let a=n.version.split(".");this.sdkMinorVersion=parseInt(a[1])}instance;sdkMinorVersion;async getConfig(e,n){let i=await this.instance.getConfig(e,n);if(i.executionConfig=oE.fromPartial(Ul.execution),i.contractConfigs)for(let a of i.contractConfigs)a.aptosCallConfigs&&(a.moveCallConfigs=a.aptosCallConfigs),a.aptosEventConfigs&&(a.moveEventConfigs=a.aptosEventConfigs);return i}async start(e,n){return await this.instance.start(e,n)}async stop(e,n){return await this.instance.stop(e,n)}async processBindings(e,n){Ul.execution.sequential&&(e.bindings=e.bindings.sort(_Y));for(let i of e.bindings)this.adjustDataBinding(i);try{let i=await this.instance.processBindings(e,n);return this.adjustResult(i.result),!i.configUpdated&&i.result?.states?.configUpdated&&(i.configUpdated=i.result?.states?.configUpdated),i}catch(i){throw this.sdkMinorVersion<=16&&(i.code===dc.constants.errno.ECONNRESET||i.code===dc.constants.errno.ECONNREFUSED||i.code===dc.constants.errno.ECONNABORTED)&&process.exit(1),i}}async*adjustBindingsStream(e){for await(let n of e)this.adjustDataBinding(n.binding),yield n}async*processBindingsStream(e,n){yield*this.instance.processBindingsStream(this.adjustBindingsStream(e),n)}async*preprocessBindingsStream(e,n){yield*this.instance.preprocessBindingsStream(this.adjustBindingsStream(e),n)}adjustResult(e){}adjustDataBinding(e){if(e)switch(e.handlerType){case 6:e.data?.aptEvent&&e.data.aptEvent.rawTransaction&&!e.data.aptEvent.transaction&&(e.data.aptEvent.transaction=JSON.parse(e.data.aptEvent.rawTransaction));break;case 7:e.data?.aptCall&&e.data.aptCall.rawTransaction&&!e.data.aptCall.transaction&&(e.data.aptCall.transaction=JSON.parse(e.data.aptCall.rawTransaction));break;case 8:e.data?.aptResource?.resources&&e.data.aptResource.rawResources&&e.data.aptResource.rawResources.length>0&&(e.data.aptResource.resources=e.data.aptResource.rawResources.map(n=>JSON.parse(n)));break;case 0:e.data?.ethBlock&&e.data.raw.length===0&&(e.data.raw=new TextEncoder().encode(JSON.stringify(e.data.ethBlock.block)));break;default:break}}};function _Y(t,e){let n=zO(t)||new Date(0),i=zO(e)||new Date(0),a=n.getTime()-i.getTime();return a!==0?a:XO(t)-XO(e)}function zO(t){return t.data?.ethLog?.timestamp||t.data?.ethTransaction?.timestamp||(t.data?.ethBlock?.block?.timestamp?new Date(Number(t.data.ethBlock.block.timestamp)*1e3):void 0)||t.data?.ethTrace?.timestamp||(t.data?.aptCall?.transaction?new Date(Number(t.data.aptCall.transaction.timestamp)/1e3):void 0)||(t.data?.aptEvent?.transaction?new Date(Number(t.data.aptEvent.transaction.timestamp)/1e3):void 0)||(t.data?.aptResource?.timestampMicros?new Date(Number(t.data.aptResource.timestampMicros)/1e3):void 0)||t.data?.fuelCall?.timestamp}function XO(t){return t.data?.ethLog?.log?.logIndex||t.data?.ethTransaction?.transaction?.transactionIndex||t.data?.ethBlock?.block?.number||t.data?.ethTrace?.trace?.transactionPosition}import("node:process").then(t=>t.stdout.write(""));var gt=Fe(c0(),1);function f0(t){let e=[],n=JSON.stringify(t,function(i,a){if(typeof a=="object"&&a!==null){if(e.indexOf(a)!==-1)return;e.push(a)}return a});return e=[],n}function p0(t,e){let n={transform:a=>{let u=[];typeof a.message=="object"?u.push(f0(a.message)):u.push(a.message);let o=a[Symbol.for("splat")];if(o)for(let r in o){let s=o[r];typeof s=="object"?u.push(f0(s)):u.push(s)}return a.message=u.join(" "),a}},i=(0,gt.createLogger)({format:gt.format.combine(gt.format.timestamp({format:"YYYY-MM-DDTHH:mm:ss.SSSZ"}),n,gt.format.errors({stack:!0}),t?gt.format.json():gt.format.simple()),level:e?"debug":"info",transports:[new gt.transports.Console]});console.log=(...a)=>i.info.call(i,...a),console.info=(...a)=>i.info.call(i,...a),console.warn=(...a)=>i.warn.call(i,...a),console.error=(...a)=>i.error.call(i,...a),console.debug=(...a)=>i.debug.call(i,...a)}import("node:process").then(t=>t.stdout.write(""));Gu();In();var MD=Fe(kI(),1),LD=Fe(qI(),1),rE=Fe(RD(),1),ID=Fe(xD(),1);gi();M();async function CD(t){t&&g.setLogger(new cE,it.DEBUG);let e=await Bu.detect(),n=new pi({resource:e,readers:[new os({exporter:new MD.OTLPMetricExporter}),new LD.PrometheusExporter({host:"0.0.0.0",port:4041})]}),i=new rE.NodeTracerProvider({resource:e}),a=new ID.OTLPTraceExporter,u=new _r(a);i.addSpanProcessor(u),Ci.setGlobalMeterProvider(n),J.setGlobalTracerProvider(i),["SIGINT","SIGTERM"].forEach(o=>{process.on(o,()=>B7())}),Ci.getMeter("processor").createGauge("up").record(1)}async function B7(){let t=J.getTracerProvider();if(t instanceof dE){let n=t.getDelegate();n instanceof rE.NodeTracerProvider&&n.shutdown().catch(console.error)}let e=Ci.getMeterProvider();e instanceof pi&&e.shutdown().catch(console.error)}import("node:process").then(t=>t.stdout.write(""));var Cl=class{constructor(e){this.loader=e}async listen(e){let n=wl.INSTANCE;await this.loader(),await n.configure(nE.create()),console.log("Starting Action Server at:",e),await n.startServer(e)}forceShutdown(){wl.INSTANCE.shutdown()}};import("node:process").then(t=>t.stdout.write(""));var F7=[{name:"target",type:String,defaultOption:!0},{name:"port",alias:"p",type:String,defaultValue:"4000"},{name:"concurrency",type:Number,defaultValue:4},{name:"batch-count",type:Number,defaultValue:1},{name:"chains-config",alias:"c",type:String,defaultValue:"chains-config.json"},{name:"chainquery-server",type:String,defaultValue:""},{name:"pricefeed-server",type:String,defaultValue:""},{name:"log-format",type:String,defaultValue:"console"},{name:"debug",type:Boolean,defaultValue:!1},{name:"start-action-server",type:Boolean,defaultValue:!1}],He=vS(F7,{partial:!0}),Y7=process.env.LOG_LEVEL?.toUpperCase();p0(He["log-format"]==="json",Y7==="debug"?!0:He.debug);console.debug("Starting with",He.target);await CD(He.debug);Error.stackTraceLimit=20;var q7=G7.resolve(He["chains-config"]),j7=DD.default.readJsonSync(q7),$7=process.env.OVERRIDE_CONCURRENCY?parseInt(process.env.OVERRIDE_CONCURRENCY):void 0,K7=process.env.OVERRIDE_BATCH_COUNT?parseInt(process.env.OVERRIDE_BATCH_COUNT):void 0;Sr.INSTANCE.concurrency=$7??He.concurrency;Sr.INSTANCE.batchCount=K7??He["batch-count"];Sr.INSTANCE.chainQueryAPI=He["chainquery-server"];Sr.INSTANCE.priceFeedAPI=He["pricefeed-server"];for(let[t,e]of Object.entries(j7)){let n=e;if(n.ChainServer)Sr.INSTANCE.chainServer.set(t,n.ChainServer);else{let i=n.Https?.[0];i?Sr.INSTANCE.chainServer.set(t,i):console.error("not valid config for chain",t)}}console.debug("Starting Server",He);var $r,Zn,wD=async()=>{let t=await import(He.target);return console.debug("Module loaded",t),t};if(He["start-action-server"])$r=new Cl(wD),$r.listen(He.port);else{$r=(0,VD.createServer)({"grpc.max_send_message_length":768*1024*1024,"grpc.max_receive_message_length":768*1024*1024,"grpc.default_compression_algorithm":UD.compressionAlgorithms.gzip}).use((0,GD.openTelemetryServerMiddleware)()).use(BD.errorDetailsServerMiddleware),Zn=new SE(wD,$r.shutdown);let t=new na(Zn);$r.add(iE,t),$r.listen("0.0.0.0:"+He.port),console.log("Processor Server Started at:",He.port)}var kD=4040,W7=k7.createServer(async function(t,e){if(t.url){let n=new URL(t.url,`http://${t.headers.host}`),i=n.searchParams;switch(n.pathname){case"/profile":{try{let a=parseInt(i.get("t")||"1000",10)||1e3,u=new H7;u.connect(),await u.post("Profiler.enable"),await u.post("Profiler.start"),await new Promise(r=>setTimeout(r,a));let{profile:o}=await u.post("Profiler.stop");e.writeHead(200,{"Content-Type":"application/json"}),e.write(JSON.stringify(o)),u.disconnect()}catch{e.writeHead(500)}break}default:e.writeHead(404)}}else e.writeHead(404);e.end()}).listen(kD);console.log("Metric Server Started at:",kD);process.on("SIGINT",function(){z7(0)}).on("uncaughtException",t=>{console.error("Uncaught Exception, please checking if await is properly used",t),Zn&&(Zn.unhandled=t)}).on("unhandledRejection",(t,e)=>{t?.message.startsWith('invalid ENS name (disallowed character: "*"')||(console.error("Unhandled Rejection, please checking if await is properly",t),Zn&&(Zn.unhandled=t))});function z7(t){$r?.forceShutdown(),console.log("RPC server shut down"),W7.close(function(){console.log("Http server shut down"),process.exit(t)})}import("node:process").then(t=>t.stdout.write(""));
60
60
  /*! Bundled license information:
61
61
 
62
62
  safe-buffer/index.js: