@sentio/runtime 2.55.1-rc.1 → 2.55.2-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.
package/lib/processor-runner.js
CHANGED
@@ -56,7 +56,7 @@ ${o}
|
|
56
56
|
${r}`.trim()}_serializeSingularDataPoint(e,n,i){let a="";e=vd(e,n);let{value:s,attributes:o}=i,r=(0,WI.hrTimeToMilliseconds)(i.endTime);return a+=Wu(e,o,s,this._appendTimestamp?r:void 0,void 0),a}_serializeHistogramDataPoint(e,n,i){let a="";e=vd(e,n);let s=i.attributes,o=i.value,r=(0,WI.hrTimeToMilliseconds)(i.endTime);for(let f of["count","sum"]){let _=o[f];_!=null&&(a+=Wu(e+"_"+f,s,_,this._appendTimestamp?r:void 0,void 0))}let u=0,l=o.buckets.counts.entries(),c=!1;for(let[f,_]of l){u+=_;let p=o.buckets.boundaries[f];if(p===void 0&&c)break;p===1/0&&(c=!0),a+=Wu(e+"_bucket",s,u,this._appendTimestamp?r:void 0,{le:p===void 0||p===1/0?"+Inf":String(p)})}return a}_serializeResource(e){let n="target_info",i=`# HELP ${n} Target metadata`,a=`# TYPE ${n} gauge`,s=Wu(n,e.attributes,1).trim();return`${i}
|
57
57
|
${a}
|
58
58
|
${s}
|
59
|
-
`}};Xu.PrometheusSerializer=yd});var XI=h(Qu=>{"use strict";Object.defineProperty(Qu,"__esModule",{value:!0});Qu.PrometheusExporter=void 0;var hi=(M(),Y(Pe)),nX=(K(),Y(Cs)),Od=(Mn(),Y(zp)),oX=L("http"),iX=Ad(),aX=L("url"),Ju=class t extends Od.MetricReader{constructor(e={},n=()=>{}){super({aggregationSelector:i=>Od.Aggregation.Default(),aggregationTemporalitySelector:i=>Od.AggregationTemporality.CUMULATIVE,metricProducers:e.metricProducers}),this._requestHandler=(i,a)=>{i.url!=null&&new aX.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:s,errors:o}=a;o.length&&hi.diag.error("PrometheusExporter: metrics collection errors",...o),i.end(this._serializer.serialize(s))},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,oX.createServer)(this._requestHandler).unref(),this._serializer=new iX.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=>{hi.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,nX.globalErrorHandler)(n):hi.diag.debug("Prometheus exporter was stopped"),e()})}):(hi.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},()=>{hi.diag.debug(`Prometheus exporter server started: ${this._host}:${this._port}/${this._endpoint}`),n()})})),this._startServerPromise}getMetricsRequestHandler(e,n){this._exportMetrics(n)}};Qu.PrometheusExporter=Ju;Ju.DEFAULT_OPTIONS={host:void 0,port:9464,endpoint:"/metrics",prefix:"",appendTimestamp:!1}});var JI=h(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});Un.PrometheusSerializer=Un.PrometheusExporter=void 0;var sX=XI();Object.defineProperty(Un,"PrometheusExporter",{enumerable:!0,get:function(){return sX.PrometheusExporter}});var uX=Ad();Object.defineProperty(Un,"PrometheusSerializer",{enumerable:!0,get:function(){return uX.PrometheusSerializer}})});var Nd=h(Zu=>{"use strict";Object.defineProperty(Zu,"__esModule",{value:!0});Zu.AbstractAsyncHooksContextManager=void 0;var lX=L("events"),cX=["addListener","on","once","prependListener","prependOnceListener"],gd=class{constructor(){this._kOtListeners=Symbol("OtListeners"),this._wrapped=!1}bind(e,n){return n instanceof lX.EventEmitter?this._bindEventEmitter(e,n):typeof n=="function"?this._bindFunction(e,n):n}_bindFunction(e,n){let i=this,a=function(...s){return i.with(e,()=>n.apply(this,s))};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),cX.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,s){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,s);let u=r.get(s);return n.call(this,a,u||s)}}_patchRemoveAllListeners(e,n){let i=this;return function(a){let s=i._getPatchMap(e);return s!==void 0&&(arguments.length===0?i._createPatchMap(e):s[a]!==void 0&&delete s[a]),n.apply(this,arguments)}}_patchAddListener(e,n,i){let a=this;return function(s,o){if(a._wrapped)return n.call(this,s,o);let r=a._getPatchMap(e);r===void 0&&(r=a._createPatchMap(e));let u=r[s];u===void 0&&(u=new WeakMap,r[s]=u);let l=a.bind(i,o);u.set(o,l),a._wrapped=!0;try{return n.call(this,s,l)}finally{a._wrapped=!1}}}_createPatchMap(e){let n=Object.create(null);return e[this._kOtListeners]=n,n}_getPatchMap(e){return e[this._kOtListeners]}};Zu.AbstractAsyncHooksContextManager=gd});var QI=h(el=>{"use strict";Object.defineProperty(el,"__esModule",{value:!0});el.AsyncHooksContextManager=void 0;var fX=(M(),Y(Pe)),pX=L("async_hooks"),dX=Nd(),Rd=class extends dX.AbstractAsyncHooksContextManager{constructor(){super(),this._contexts=new Map,this._stack=[],this._asyncHook=pX.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:fX.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()}};el.AsyncHooksContextManager=Rd});var ZI=h(tl=>{"use strict";Object.defineProperty(tl,"__esModule",{value:!0});tl.AsyncLocalStorageContextManager=void 0;var EX=(M(),Y(Pe)),_X=L("async_hooks"),SX=Nd(),Pd=class extends SX.AbstractAsyncHooksContextManager{constructor(){super(),this._asyncLocalStorage=new _X.AsyncLocalStorage}active(){var e;return(e=this._asyncLocalStorage.getStore())!==null&&e!==void 0?e:EX.ROOT_CONTEXT}with(e,n,i,...a){let s=i==null?n:n.bind(i);return this._asyncLocalStorage.run(e,s,...a)}enable(){return this}disable(){return this._asyncLocalStorage.disable(),this}};tl.AsyncLocalStorageContextManager=Pd});var eC=h(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn.AsyncLocalStorageContextManager=Dn.AsyncHooksContextManager=void 0;var hX=QI();Object.defineProperty(Dn,"AsyncHooksContextManager",{enumerable:!0,get:function(){return hX.AsyncHooksContextManager}});var TX=ZI();Object.defineProperty(Dn,"AsyncLocalStorageContextManager",{enumerable:!0,get:function(){return TX.AsyncLocalStorageContextManager}})});var Vn,bd=m(()=>{"use strict";M();Vn=jr("OpenTelemetry Context Key B3 Debug Flag")});var pr,Bn,Gn,kn,rl,Hn,Ti=m(()=>{"use strict";pr="b3",Bn="x-b3-traceid",Gn="x-b3-spanid",kn="x-b3-sampled",rl="x-b3-parentspanid",Hn="x-b3-flags"});function yX(t){return t===Q.SAMPLED||t===Q.NONE}function AX(t){return Array.isArray(t)?t[0]:t}function nl(t,e,n){var i=e.get(t,n);return AX(i)}function OX(t,e){var n=nl(t,e,Bn);return typeof n=="string"?n.padStart(32,"0"):""}function gX(t,e){var n=nl(t,e,Gn);return typeof n=="string"?n:""}function tC(t,e){var n=nl(t,e,Hn);return n==="1"?"1":void 0}function NX(t,e){var n=nl(t,e,kn),i=tC(t,e);if(i==="1"||vX.has(n))return Q.SAMPLED;if(n===void 0||mX.has(n))return Q.NONE}var vX,mX,rC,nC=m(()=>{"use strict";M();K();bd();Ti();vX=new Set([!0,"true","True","1",1]),mX=new Set([!1,"false","False","0",0]);rC=function(){function t(){}return t.prototype.inject=function(e,n,i){var a=J.getSpanContext(e);if(!(!a||!_t(a)||xe(e))){var s=e.getValue(Vn);i.set(n,Bn,a.traceId),i.set(n,Gn,a.spanId),s==="1"?i.set(n,Hn,s):a.traceFlags!==void 0&&i.set(n,kn,(Q.SAMPLED&a.traceFlags)===Q.SAMPLED?"1":"0")}},t.prototype.extract=function(e,n,i){var a=OX(n,i),s=gX(n,i),o=NX(n,i),r=tC(n,i);return Gt(a)&&bi(s)&&yX(o)?(e=e.setValue(Vn,r),J.setSpanContext(e,{traceId:a,spanId:s,isRemote:!0,traceFlags:o})):e},t.prototype.fields=function(){return[Bn,Gn,Hn,kn,rl]},t}()});function LX(t){return t.length===32?t:""+bX+t}function IX(t){return t&&xX.has(t)?Q.SAMPLED:Q.NONE}var RX,PX,bX,xX,MX,oC,iC=m(()=>{"use strict";M();K();bd();Ti();RX=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),a,s=[],o;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)s.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 s},PX=/((?:[0-9a-f]{16}){1,2})-([0-9a-f]{16})(?:-([01d](?![0-9a-f])))?(?:-([0-9a-f]{16}))?/,bX="0".repeat(16),xX=new Set(["d","1"]),MX="d";oC=function(){function t(){}return t.prototype.inject=function(e,n,i){var a=J.getSpanContext(e);if(!(!a||!_t(a)||xe(e))){var s=e.getValue(Vn)||a.traceFlags&1,o=a.traceId+"-"+a.spanId+"-"+s;i.set(n,pr,o)}},t.prototype.extract=function(e,n,i){var a=i.get(n,pr),s=Array.isArray(a)?a[0]:a;if(typeof s!="string")return e;var o=s.match(PX);if(!o)return e;var r=RX(o,4),u=r[1],l=r[2],c=r[3],f=LX(u);if(!Gt(f)||!bi(l))return e;var _=IX(c);return c===MX&&(e=e.setValue(Vn,c)),J.setSpanContext(e,{traceId:f,spanId:l,isRemote:!0,traceFlags:_})},t.prototype.fields=function(){return[pr]},t}()});var Fn,xd=m(()=>{"use strict";(function(t){t[t.SINGLE_HEADER=0]="SINGLE_HEADER",t[t.MULTI_HEADER=1]="MULTI_HEADER"})(Fn||(Fn={}))});var aC,sC=m(()=>{"use strict";K();nC();iC();Ti();xd();aC=function(){function t(e){e===void 0&&(e={}),this._b3MultiPropagator=new rC,this._b3SinglePropagator=new oC,e.injectEncoding===Fn.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,pr),s=Array.isArray(a)?a[0]:a;return s?this._b3SinglePropagator.extract(e,n,i):this._b3MultiPropagator.extract(e,n,i)},t.prototype.fields=function(){return this._fields},t}()});var uC={};Je(uC,{B3InjectEncoding:()=>Fn,B3Propagator:()=>aC,B3_CONTEXT_HEADER:()=>pr,X_B3_FLAGS:()=>Hn,X_B3_PARENT_SPAN_ID:()=>rl,X_B3_SAMPLED:()=>kn,X_B3_SPAN_ID:()=>Gn,X_B3_TRACE_ID:()=>Bn});var lC=m(()=>{"use strict";sC();Ti();xd()});var cC,fC=m(()=>{"use strict";cC="exception"});var Md,CX,pC,wX,ol,Ld=m(()=>{"use strict";M();K();qo();fC();Md=function(){return Md=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},Md.apply(this,arguments)},CX=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.")},pC=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),a,s=[],o;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)s.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 s},wX=function(t,e,n){if(n||arguments.length===2)for(var i=0,a=e.length,s;i<a;i++)(s||!(i in e))&&(s||(s=Array.prototype.slice.call(e,0,i)),s[i]=e[i]);return t.concat(s||Array.prototype.slice.call(e))},ol=function(){function t(e,n,i,a,s,o,r,u,l,c){r===void 0&&(r=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:yE.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=i,this._spanContext=a,this.parentSpanId=o,this.kind=s,this.links=r;var f=Date.now();this._performanceStartTime=et.now(),this._performanceOffset=f-(this._performanceStartTime+mn()),this._startTimeProvided=u!=null,this.startTime=this._getTime(u??f),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):Ko(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=CX(Object.entries(e)),s=a.next();!s.done;s=a.next()){var o=pC(s.value,2),r=o[0],u=o[1];this.setAttribute(r,u)}}catch(l){n={error:l}}finally{try{s&&!s.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++),Jo(n)&&(Jo(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,wX([],pC(e),!1)),this},t.prototype.setStatus=function(e){return this._isSpanEnded()?this:(this.status=Md({},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=gs(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 Xo(e+this._performanceOffset);if(typeof e=="number")return Oe(e);if(e instanceof Date)return Oe(e.getTime());if(yn(e))return e;if(this._startTimeProvided)return Oe(Date.now());var n=et.now()-this._performanceStartTime;return Qo(this.startTime,Oe(n))},t.prototype.isRecording=function(){return this._ended===!1},t.prototype.recordException=function(e,n){var i={};typeof e=="string"?i[cs]=e:e&&(e.code?i[ls]=e.code.toString():e.name&&(i[ls]=e.name),e.message&&(i[cs]=e.message),e.stack&&(i[v0]=e.stack)),i[ls]||i[cs]?this.addEvent(cC,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,vi=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 dr,il=m(()=>{"use strict";vi();dr=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:dt.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t}()});var Pt,al=m(()=>{"use strict";vi();Pt=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:dt.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t}()});var Yn,Id=m(()=>{"use strict";M();K();il();al();Yn=function(){function t(e){var n,i,a,s;this._root=e.root,this._root||(Te(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new Pt),this._remoteParentSampled=(n=e.remoteParentSampled)!==null&&n!==void 0?n:new Pt,this._remoteParentNotSampled=(i=e.remoteParentNotSampled)!==null&&i!==void 0?i:new dr,this._localParentSampled=(a=e.localParentSampled)!==null&&a!==void 0?a:new Pt,this._localParentNotSampled=(s=e.localParentNotSampled)!==null&&s!==void 0?s:new dr}return t.prototype.shouldSample=function(e,n,i,a,s,o){var r=J.getSpanContext(e);return!r||!_t(r)?this._root.shouldSample(e,n,i,a,s,o):r.isRemote?r.traceFlags&Q.SAMPLED?this._remoteParentSampled.shouldSample(e,n,i,a,s,o):this._remoteParentNotSampled.shouldSample(e,n,i,a,s,o):r.traceFlags&Q.SAMPLED?this._localParentSampled.shouldSample(e,n,i,a,s,o):this._localParentNotSampled.shouldSample(e,n,i,a,s,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 mi,Cd=m(()=>{"use strict";M();vi();mi=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,s=parseInt(e.slice(a,a+8),16);n=(n^s)>>>0}return n},t}()});function sl(){var t=Me();return{sampler:wd(t),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:t.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:t.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:t.OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:t.OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT},mergeResourceWithDefaults:!0}}function wd(t){switch(t===void 0&&(t=Me()),t.OTEL_TRACES_SAMPLER){case Ke.AlwaysOn:return new Pt;case Ke.AlwaysOff:return new dr;case Ke.ParentBasedAlwaysOn:return new Yn({root:new Pt});case Ke.ParentBasedAlwaysOff:return new Yn({root:new dr});case Ke.TraceIdRatio:return new mi(dC(t));case Ke.ParentBasedTraceIdRatio:return new Yn({root:new mi(dC(t))});default:return g.error('OTEL_TRACES_SAMPLER value "'+t.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+UX+'".'),new Pt}}function dC(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 "+qn+"."),qn;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 "+qn+"."),qn):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 "+qn+"."),qn):e}var UX,qn,Ud=m(()=>{"use strict";M();K();il();al();Id();Cd();UX=Ke.AlwaysOn,qn=1});function EC(t){var e={sampler:wd()},n=sl(),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 _C(t){var e,n,i,a,s,o,r,u,l,c,f,_,p=Object.assign({},t.spanLimits),S=Tn();return p.attributeCountLimit=(o=(s=(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&&s!==void 0?s:S.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&o!==void 0?o:Cr,p.attributeValueLengthLimit=(_=(f=(c=(u=(r=t.spanLimits)===null||r===void 0?void 0:r.attributeValueLengthLimit)!==null&&u!==void 0?u:(l=t.generalLimits)===null||l===void 0?void 0:l.attributeValueLengthLimit)!==null&&c!==void 0?c:S.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&f!==void 0?f:S.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&_!==void 0?_:Ir,Object.assign({},t,{spanLimits:p})}var Dd=m(()=>{"use strict";Ud();K()});var SC,hC=m(()=>{"use strict";M();K();SC=function(){function t(e,n){this._exporter=e,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var i=Me();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 On(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=[],s=Math.ceil(e._finishedSpans.length/e._maxExportBatchSize),o=0,r=s;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(Sn(Ye.active()),function(){var s;e._finishedSpans.length<=e._maxExportBatchSize?(s=e._finishedSpans,e._finishedSpans=[]):s=e._finishedSpans.splice(0,e._maxExportBatchSize);for(var o=function(){return e._exporter.export(s,function(f){var _;clearTimeout(a),f.code===W.SUCCESS?n():i((_=f.error)!==null&&_!==void 0?_:new Error("BatchSpanProcessor: span export failed"))})},r=null,u=0,l=s.length;u<l;u++){var c=s[u];c.resource.asyncAttributesPending&&c.resource.waitForAsyncAttributes&&(r??(r=[]),r.push(c.resource.waitForAsyncAttributes()))}r===null?o():Promise.all(r).then(o,function(f){Te(f),i(f)})})})},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),sr(this._timer))}},t.prototype._clearTimer=function(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)},t}()});var DX,Er,TC=m(()=>{"use strict";hC();DX=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,a){i.__proto__=a}||function(i,a){for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(i[s]=a[s])},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)}}(),Er=function(t){DX(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.onShutdown=function(){},e}(SC)});function vC(t){return function(){for(var n=0;n<t/4;n++)ul.writeUInt32BE(Math.random()*Math.pow(2,32)>>>0,n*4);for(var n=0;n<t&&!(ul[n]>0);n++)n===t-1&&(ul[t-1]=1);return ul.toString("hex",0,t)}}var VX,mC,jn,ul,yC=m(()=>{"use strict";VX=8,mC=16,jn=function(){function t(){this.generateTraceId=vC(mC),this.generateSpanId=vC(VX)}return t}(),ul=Buffer.allocUnsafe(mC)});var AC=m(()=>{"use strict";TC();yC()});var ll=m(()=>{"use strict";AC()});var cl,Vd=m(()=>{"use strict";M();K();Ld();Dd();ll();cl=function(){function t(e,n,i){this._tracerProvider=i;var a=EC(n);this._sampler=a.sampler,this._generalLimits=a.generalLimits,this._spanLimits=a.spanLimits,this._idGenerator=n.idGenerator||new jn,this.resource=i.resource,this.instrumentationLibrary=e}return t.prototype.startSpan=function(e,n,i){var a,s,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 u=J.wrapSpanContext(TE);return u}var l=r?.spanContext(),c=this._idGenerator.generateSpanId(),f,_,p;!l||!J.isSpanContextValid(l)?f=this._idGenerator.generateTraceId():(f=l.traceId,_=l.traceState,p=l.spanId);var S=(a=n.kind)!==null&&a!==void 0?a:mE.INTERNAL,v=((s=n.links)!==null&&s!==void 0?s:[]).map(function(F){return{context:F.context,attributes:or(F.attributes)}}),T=or(n.attributes),A=this._sampler.shouldSample(i,f,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:f,spanId:c,traceFlags:O,traceState:_};if(A.decision===St.NOT_RECORD){g.debug("Recording is off, propagating context in a non-recording span");var u=J.wrapSpanContext(N);return u}var D=or(Object.assign(T,A.attributes)),G=new ol(this,i,e,N,S,p,v,n.startTime,void 0,D);return G},t.prototype.startActiveSpan=function(e,n,i,a){var s,o,r;if(!(arguments.length<2)){arguments.length===2?r=n:arguments.length===3?(s=n,r=i):(s=n,o=i,r=a);var u=o??Ye.active(),l=this.startSpan(e,s,u),c=J.setSpan(u,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 fl,Bd,OC=m(()=>{"use strict";K();fl=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.")},Bd=function(){function t(e){this._spanProcessors=e}return t.prototype.forceFlush=function(){var e,n,i=[];try{for(var a=fl(this._spanProcessors),s=a.next();!s.done;s=a.next()){var o=s.value;i.push(o.forceFlush())}}catch(r){e={error:r}}finally{try{s&&!s.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(u){Te(u||new Error("MultiSpanProcessor: forceFlush failed")),r()})})},t.prototype.onStart=function(e,n){var i,a;try{for(var s=fl(this._spanProcessors),o=s.next();!o.done;o=s.next()){var r=o.value;r.onStart(e,n)}}catch(u){i={error:u}}finally{try{o&&!o.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}},t.prototype.onEnd=function(e){var n,i;try{for(var a=fl(this._spanProcessors),s=a.next();!s.done;s=a.next()){var o=s.value;o.onEnd(e)}}catch(r){n={error:r}}finally{try{s&&!s.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=fl(this._spanProcessors),s=a.next();!s.done;s=a.next()){var o=s.value;i.push(o.shutdown())}}catch(r){e={error:r}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return new Promise(function(r,u){Promise.all(i).then(function(){r()},u)})},t}()});var pl,Gd=m(()=>{"use strict";pl=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,GX,Vt,gC,NC=m(()=>{"use strict";M();K();Ds();Vd();Ud();OC();Gd();ll();Dd();BX=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),a,s=[],o;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)s.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 s},GX=function(t,e,n){if(n||arguments.length===2)for(var i=0,a=e.length,s;i<a;i++)(s||!(i in e))&&(s||(s=Array.prototype.slice.call(e,0,i)),s[i]=e[i]);return t.concat(s||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={}));gC=function(){function t(e){e===void 0&&(e={});var n,i;this._registeredSpanProcessors=[],this._tracers=new Map;var a=Is({},sl(),_C(e));if(this.resource=(n=a.resource)!==null&&n!==void 0?n:wt.empty(),a.mergeResourceWithDefaults&&(this.resource=wt.default().merge(this.resource)),this._config=Object.assign({},a,{resource:this.resource}),!((i=e.spanProcessors)===null||i===void 0)&&i.length)this._registeredSpanProcessors=GX([],BX(e.spanProcessors),!1),this.activeSpanProcessor=new Bd(this._registeredSpanProcessors);else{var s=this._buildExporterFromEnv();if(s!==void 0){var o=new Er(s);this.activeSpanProcessor=o}else this.activeSpanProcessor=new pl}}return t.prototype.getTracer=function(e,n,i){var a=e+"@"+(n||"")+":"+(i?.schemaUrl||"");return this._tracers.has(a)||this._tracers.set(a,new cl({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 Bd(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 s,o=setTimeout(function(){a(new Error("Span processor did not completed within timeout period of "+e+" ms")),s=Vt.timeout},e);i.forceFlush().then(function(){clearTimeout(o),s!==Vt.timeout&&(s=Vt.resolved,a(s))}).catch(function(r){clearTimeout(o),s=Vt.error,a(r)})})});return new Promise(function(i,a){Promise.all(n).then(function(s){var o=s.filter(function(r){return r!==Vt.resolved});o.length>0?a(o):i()}).catch(function(s){return a([s])})})},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(Me().OTEL_PROPAGATORS)),i=n.map(function(s){var o=e._getPropagator(s);return o||g.warn('Propagator "'+s+'" requested through environment variable is unavailable.'),o}),a=i.reduce(function(s,o){return o&&s.push(o),s},[]);if(a.length!==0)return n.length===1?a[0]:new Rs({propagators:a})},t.prototype._buildExporterFromEnv=function(){var e=Me().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 bs}],["baggage",function(){return new Ss}]]),t._registeredExporters=new Map,t}()});var kX,RC,PC=m(()=>{"use strict";K();kX=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.")},RC=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 s=kX(e),o=s.next();!o.done;o=s.next()){var r=o.value;console.dir(this._exportInfo(r),{depth:3})}}catch(u){i={error:u}}finally{try{o&&!o.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}if(n)return n({code:W.SUCCESS})},t}()});var HX,FX,bC,xC=m(()=>{"use strict";K();HX=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),a,s=[],o;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)s.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 s},FX=function(t,e,n){if(n||arguments.length===2)for(var i=0,a=e.length,s;i<a;i++)(s||!(i in e))&&(s||(s=Array.prototype.slice.call(e,0,i)),s[i]=e[i]);return t.concat(s||Array.prototype.slice.call(e))},bC=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,FX([],HX(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 YX,qX,MC,LC=m(()=>{"use strict";M();K();YX=function(t,e,n,i){function a(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function r(c){try{l(i.next(c))}catch(f){o(f)}}function u(c){try{l(i.throw(c))}catch(f){o(f)}}function l(c){c.done?s(c.value):a(c.value).then(r,u)}l((i=i.apply(t,e||[])).next())})},qX=function(t,e){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,a,s,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 u([l,c])}}function u(l){if(i)throw new TypeError("Generator is already executing.");for(;n;)try{if(i=1,a&&(s=l[0]&2?a.return:l[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,l[1])).done)return s;switch(a=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=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(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){n.label=l[1];break}if(l[0]===6&&n.label<s[1]){n.label=s[1],s=l;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(l);break}s[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(c){l=[6,c],a=0}finally{i=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},MC=function(){function t(e){this._exporter=e,this._shutdownOnce=new On(this._shutdown,this),this._unresolvedExports=new Set}return t.prototype.forceFlush=function(){return YX(this,void 0,void 0,function(){return qX(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 s=function(){return ni._export(n._exporter,[e]).then(function(r){var u;r.code!==W.SUCCESS&&Te((u=r.error)!==null&&u!==void 0?u: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),s()},function(r){return Te(r)});o!=null&&this._unresolvedExports.add(o)}else s()}},t.prototype.shutdown=function(){return this._shutdownOnce.call()},t.prototype._shutdown=function(){return this._exporter.shutdown()},t}()});var kd={};Je(kd,{AlwaysOffSampler:()=>dr,AlwaysOnSampler:()=>Pt,BasicTracerProvider:()=>gC,BatchSpanProcessor:()=>Er,ConsoleSpanExporter:()=>RC,ForceFlushState:()=>Vt,InMemorySpanExporter:()=>bC,NoopSpanProcessor:()=>pl,ParentBasedSampler:()=>Yn,RandomIdGenerator:()=>jn,SamplingDecision:()=>dt,SimpleSpanProcessor:()=>MC,Span:()=>ol,TraceIdRatioBasedSampler:()=>mi,Tracer:()=>cl});var dl=m(()=>{"use strict";Vd();NC();ll();PC();xC();LC();Gd();il();al();Id();Cd();vi();Ld()});var yi=h((ope,IC)=>{"use strict";var jX="2.0.0",$X=Number.MAX_SAFE_INTEGER||9007199254740991,KX=16,WX=250,zX=["major","premajor","minor","preminor","patch","prepatch","prerelease"];IC.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:KX,MAX_SAFE_BUILD_LENGTH:WX,MAX_SAFE_INTEGER:$X,RELEASE_TYPES:zX,SEMVER_SPEC_VERSION:jX,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Ai=h((ipe,CC)=>{"use strict";var XX=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};CC.exports=XX});var $n=h((Bt,wC)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:Hd,MAX_SAFE_BUILD_LENGTH:JX,MAX_LENGTH:QX}=yi(),ZX=Ai();Bt=wC.exports={};var eJ=Bt.re=[],tJ=Bt.safeRe=[],R=Bt.src=[],P=Bt.t={},rJ=0,Fd="[a-zA-Z0-9-]",nJ=[["\\s",1],["\\d",QX],[Fd,JX]],oJ=t=>{for(let[e,n]of nJ)t=t.split(`${e}*`).join(`${e}{0,${n}}`).split(`${e}+`).join(`${e}{1,${n}}`);return t},U=(t,e,n)=>{let i=oJ(e),a=rJ++;ZX(t,a,e),P[t]=a,R[a]=e,eJ[a]=new RegExp(e,n?"g":void 0),tJ[a]=new RegExp(i,n?"g":void 0)};U("NUMERICIDENTIFIER","0|[1-9]\\d*");U("NUMERICIDENTIFIERLOOSE","\\d+");U("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Fd}*`);U("MAINVERSION",`(${R[P.NUMERICIDENTIFIER]})\\.(${R[P.NUMERICIDENTIFIER]})\\.(${R[P.NUMERICIDENTIFIER]})`);U("MAINVERSIONLOOSE",`(${R[P.NUMERICIDENTIFIERLOOSE]})\\.(${R[P.NUMERICIDENTIFIERLOOSE]})\\.(${R[P.NUMERICIDENTIFIERLOOSE]})`);U("PRERELEASEIDENTIFIER",`(?:${R[P.NUMERICIDENTIFIER]}|${R[P.NONNUMERICIDENTIFIER]})`);U("PRERELEASEIDENTIFIERLOOSE",`(?:${R[P.NUMERICIDENTIFIERLOOSE]}|${R[P.NONNUMERICIDENTIFIER]})`);U("PRERELEASE",`(?:-(${R[P.PRERELEASEIDENTIFIER]}(?:\\.${R[P.PRERELEASEIDENTIFIER]})*))`);U("PRERELEASELOOSE",`(?:-?(${R[P.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${R[P.PRERELEASEIDENTIFIERLOOSE]})*))`);U("BUILDIDENTIFIER",`${Fd}+`);U("BUILD",`(?:\\+(${R[P.BUILDIDENTIFIER]}(?:\\.${R[P.BUILDIDENTIFIER]})*))`);U("FULLPLAIN",`v?${R[P.MAINVERSION]}${R[P.PRERELEASE]}?${R[P.BUILD]}?`);U("FULL",`^${R[P.FULLPLAIN]}$`);U("LOOSEPLAIN",`[v=\\s]*${R[P.MAINVERSIONLOOSE]}${R[P.PRERELEASELOOSE]}?${R[P.BUILD]}?`);U("LOOSE",`^${R[P.LOOSEPLAIN]}$`);U("GTLT","((?:<|>)?=?)");U("XRANGEIDENTIFIERLOOSE",`${R[P.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);U("XRANGEIDENTIFIER",`${R[P.NUMERICIDENTIFIER]}|x|X|\\*`);U("XRANGEPLAIN",`[v=\\s]*(${R[P.XRANGEIDENTIFIER]})(?:\\.(${R[P.XRANGEIDENTIFIER]})(?:\\.(${R[P.XRANGEIDENTIFIER]})(?:${R[P.PRERELEASE]})?${R[P.BUILD]}?)?)?`);U("XRANGEPLAINLOOSE",`[v=\\s]*(${R[P.XRANGEIDENTIFIERLOOSE]})(?:\\.(${R[P.XRANGEIDENTIFIERLOOSE]})(?:\\.(${R[P.XRANGEIDENTIFIERLOOSE]})(?:${R[P.PRERELEASELOOSE]})?${R[P.BUILD]}?)?)?`);U("XRANGE",`^${R[P.GTLT]}\\s*${R[P.XRANGEPLAIN]}$`);U("XRANGELOOSE",`^${R[P.GTLT]}\\s*${R[P.XRANGEPLAINLOOSE]}$`);U("COERCEPLAIN",`(^|[^\\d])(\\d{1,${Hd}})(?:\\.(\\d{1,${Hd}}))?(?:\\.(\\d{1,${Hd}}))?`);U("COERCE",`${R[P.COERCEPLAIN]}(?:$|[^\\d])`);U("COERCEFULL",R[P.COERCEPLAIN]+`(?:${R[P.PRERELEASE]})?(?:${R[P.BUILD]})?(?:$|[^\\d])`);U("COERCERTL",R[P.COERCE],!0);U("COERCERTLFULL",R[P.COERCEFULL],!0);U("LONETILDE","(?:~>?)");U("TILDETRIM",`(\\s*)${R[P.LONETILDE]}\\s+`,!0);Bt.tildeTrimReplace="$1~";U("TILDE",`^${R[P.LONETILDE]}${R[P.XRANGEPLAIN]}$`);U("TILDELOOSE",`^${R[P.LONETILDE]}${R[P.XRANGEPLAINLOOSE]}$`);U("LONECARET","(?:\\^)");U("CARETTRIM",`(\\s*)${R[P.LONECARET]}\\s+`,!0);Bt.caretTrimReplace="$1^";U("CARET",`^${R[P.LONECARET]}${R[P.XRANGEPLAIN]}$`);U("CARETLOOSE",`^${R[P.LONECARET]}${R[P.XRANGEPLAINLOOSE]}$`);U("COMPARATORLOOSE",`^${R[P.GTLT]}\\s*(${R[P.LOOSEPLAIN]})$|^$`);U("COMPARATOR",`^${R[P.GTLT]}\\s*(${R[P.FULLPLAIN]})$|^$`);U("COMPARATORTRIM",`(\\s*)${R[P.GTLT]}\\s*(${R[P.LOOSEPLAIN]}|${R[P.XRANGEPLAIN]})`,!0);Bt.comparatorTrimReplace="$1$2$3";U("HYPHENRANGE",`^\\s*(${R[P.XRANGEPLAIN]})\\s+-\\s+(${R[P.XRANGEPLAIN]})\\s*$`);U("HYPHENRANGELOOSE",`^\\s*(${R[P.XRANGEPLAINLOOSE]})\\s+-\\s+(${R[P.XRANGEPLAINLOOSE]})\\s*$`);U("STAR","(<|>)?=?\\s*\\*");U("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");U("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var El=h((ape,UC)=>{"use strict";var iJ=Object.freeze({loose:!0}),aJ=Object.freeze({}),sJ=t=>t?typeof t!="object"?iJ:t:aJ;UC.exports=sJ});var Yd=h((spe,BC)=>{"use strict";var DC=/^[0-9]+$/,VC=(t,e)=>{let n=DC.test(t),i=DC.test(e);return n&&i&&(t=+t,e=+e),t===e?0:n&&!i?-1:i&&!n?1:t<e?-1:1},uJ=(t,e)=>VC(e,t);BC.exports={compareIdentifiers:VC,rcompareIdentifiers:uJ}});var Le=h((upe,FC)=>{"use strict";var _l=Ai(),{MAX_LENGTH:GC,MAX_SAFE_INTEGER:Sl}=yi(),{safeRe:kC,t:HC}=$n(),lJ=El(),{compareIdentifiers:Kn}=Yd(),qd=class t{constructor(e,n){if(n=lJ(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>GC)throw new TypeError(`version is longer than ${GC} characters`);_l("SemVer",e,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let i=e.trim().match(n.loose?kC[HC.LOOSE]:kC[HC.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>Sl||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Sl||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Sl||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(a=>{if(/^[0-9]+$/.test(a)){let s=+a;if(s>=0&&s<Sl)return s}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(_l("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)),Kn(this.major,e.major)||Kn(this.minor,e.minor)||Kn(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(_l("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 Kn(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(_l("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 Kn(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 s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(n===this.prerelease.join(".")&&i===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(a)}}if(n){let s=[n,a];i===!1&&(s=[n]),Kn(this.prerelease[0],n)===0?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};FC.exports=qd});var Fr=h((lpe,qC)=>{"use strict";var YC=Le(),cJ=(t,e,n=!1)=>{if(t instanceof YC)return t;try{return new YC(t,e)}catch(i){if(!n)return null;throw i}};qC.exports=cJ});var $C=h((cpe,jC)=>{"use strict";var fJ=Fr(),pJ=(t,e)=>{let n=fJ(t,e);return n?n.version:null};jC.exports=pJ});var WC=h((fpe,KC)=>{"use strict";var dJ=Fr(),EJ=(t,e)=>{let n=dJ(t.trim().replace(/^[=v]+/,""),e);return n?n.version:null};KC.exports=EJ});var JC=h((ppe,XC)=>{"use strict";var zC=Le(),_J=(t,e,n,i,a)=>{typeof n=="string"&&(a=i,i=n,n=void 0);try{return new zC(t instanceof zC?t.version:t,n).inc(e,i,a).version}catch{return null}};XC.exports=_J});var ew=h((dpe,ZC)=>{"use strict";var QC=Fr(),SJ=(t,e)=>{let n=QC(t,null,!0),i=QC(e,null,!0),a=n.compare(i);if(a===0)return null;let s=a>0,o=s?n:i,r=s?i:n,u=!!o.prerelease.length;if(!!r.prerelease.length&&!u)return!r.patch&&!r.minor?"major":o.patch?"patch":o.minor?"minor":"major";let c=u?"pre":"";return n.major!==i.major?c+"major":n.minor!==i.minor?c+"minor":n.patch!==i.patch?c+"patch":"prerelease"};ZC.exports=SJ});var rw=h((Epe,tw)=>{"use strict";var hJ=Le(),TJ=(t,e)=>new hJ(t,e).major;tw.exports=TJ});var ow=h((_pe,nw)=>{"use strict";var vJ=Le(),mJ=(t,e)=>new vJ(t,e).minor;nw.exports=mJ});var aw=h((Spe,iw)=>{"use strict";var yJ=Le(),AJ=(t,e)=>new yJ(t,e).patch;iw.exports=AJ});var uw=h((hpe,sw)=>{"use strict";var OJ=Fr(),gJ=(t,e)=>{let n=OJ(t,e);return n&&n.prerelease.length?n.prerelease:null};sw.exports=gJ});var nt=h((Tpe,cw)=>{"use strict";var lw=Le(),NJ=(t,e,n)=>new lw(t,n).compare(new lw(e,n));cw.exports=NJ});var pw=h((vpe,fw)=>{"use strict";var RJ=nt(),PJ=(t,e,n)=>RJ(e,t,n);fw.exports=PJ});var Ew=h((mpe,dw)=>{"use strict";var bJ=nt(),xJ=(t,e)=>bJ(t,e,!0);dw.exports=xJ});var hl=h((ype,Sw)=>{"use strict";var _w=Le(),MJ=(t,e,n)=>{let i=new _w(t,n),a=new _w(e,n);return i.compare(a)||i.compareBuild(a)};Sw.exports=MJ});var Tw=h((Ape,hw)=>{"use strict";var LJ=hl(),IJ=(t,e)=>t.sort((n,i)=>LJ(n,i,e));hw.exports=IJ});var mw=h((Ope,vw)=>{"use strict";var CJ=hl(),wJ=(t,e)=>t.sort((n,i)=>CJ(i,n,e));vw.exports=wJ});var Oi=h((gpe,yw)=>{"use strict";var UJ=nt(),DJ=(t,e,n)=>UJ(t,e,n)>0;yw.exports=DJ});var Tl=h((Npe,Aw)=>{"use strict";var VJ=nt(),BJ=(t,e,n)=>VJ(t,e,n)<0;Aw.exports=BJ});var jd=h((Rpe,Ow)=>{"use strict";var GJ=nt(),kJ=(t,e,n)=>GJ(t,e,n)===0;Ow.exports=kJ});var $d=h((Ppe,gw)=>{"use strict";var HJ=nt(),FJ=(t,e,n)=>HJ(t,e,n)!==0;gw.exports=FJ});var vl=h((bpe,Nw)=>{"use strict";var YJ=nt(),qJ=(t,e,n)=>YJ(t,e,n)>=0;Nw.exports=qJ});var ml=h((xpe,Rw)=>{"use strict";var jJ=nt(),$J=(t,e,n)=>jJ(t,e,n)<=0;Rw.exports=$J});var Kd=h((Mpe,Pw)=>{"use strict";var KJ=jd(),WJ=$d(),zJ=Oi(),XJ=vl(),JJ=Tl(),QJ=ml(),ZJ=(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 KJ(t,n,i);case"!=":return WJ(t,n,i);case">":return zJ(t,n,i);case">=":return XJ(t,n,i);case"<":return JJ(t,n,i);case"<=":return QJ(t,n,i);default:throw new TypeError(`Invalid operator: ${e}`)}};Pw.exports=ZJ});var xw=h((Lpe,bw)=>{"use strict";var e9=Le(),t9=Fr(),{safeRe:yl,t:Al}=$n(),r9=(t,e)=>{if(t instanceof e9)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?yl[Al.COERCEFULL]:yl[Al.COERCE]);else{let u=e.includePrerelease?yl[Al.COERCERTLFULL]:yl[Al.COERCERTL],l;for(;(l=u.exec(t))&&(!n||n.index+n[0].length!==t.length);)(!n||l.index+l[0].length!==n.index+n[0].length)&&(n=l),u.lastIndex=l.index+l[1].length+l[2].length;u.lastIndex=-1}if(n===null)return null;let i=n[2],a=n[3]||"0",s=n[4]||"0",o=e.includePrerelease&&n[5]?`-${n[5]}`:"",r=e.includePrerelease&&n[6]?`+${n[6]}`:"";return t9(`${i}.${a}.${s}${o}${r}`,e)};bw.exports=r9});var Lw=h((Ipe,Mw)=>{"use strict";var Wd=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}};Mw.exports=Wd});var ot=h((Cpe,Uw)=>{"use strict";var n9=/\s+/g,zd=class t{constructor(e,n){if(n=i9(n),e instanceof t)return e.loose===!!n.loose&&e.includePrerelease===!!n.includePrerelease?e:new t(e.raw,n);if(e instanceof Xd)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(n9," "),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=>!Cw(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&&p9(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&&c9)|(this.options.loose&&f9))+":"+e,a=Iw.get(i);if(a)return a;let s=this.options.loose,o=s?We[Ge.HYPHENRANGELOOSE]:We[Ge.HYPHENRANGE];e=e.replace(o,A9(this.options.includePrerelease)),te("hyphen replace",e),e=e.replace(We[Ge.COMPARATORTRIM],s9),te("comparator trim",e),e=e.replace(We[Ge.TILDETRIM],u9),te("tilde trim",e),e=e.replace(We[Ge.CARETTRIM],l9),te("caret trim",e);let r=e.split(" ").map(f=>d9(f,this.options)).join(" ").split(/\s+/).map(f=>y9(f,this.options));s&&(r=r.filter(f=>(te("loose invalid filter",f,this.options),!!f.match(We[Ge.COMPARATORLOOSE])))),te("range list",r);let u=new Map,l=r.map(f=>new Xd(f,this.options));for(let f of l){if(Cw(f))return[f];u.set(f.value,f)}u.size>1&&u.has("")&&u.delete("");let c=[...u.values()];return Iw.set(i,c),c}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(i=>ww(i,n)&&e.set.some(a=>ww(a,n)&&i.every(s=>a.every(o=>s.intersects(o,n)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new a9(e,this.options)}catch{return!1}for(let n=0;n<this.set.length;n++)if(O9(this.set[n],e,this.options))return!0;return!1}};Uw.exports=zd;var o9=Lw(),Iw=new o9,i9=El(),Xd=gi(),te=Ai(),a9=Le(),{safeRe:We,t:Ge,comparatorTrimReplace:s9,tildeTrimReplace:u9,caretTrimReplace:l9}=$n(),{FLAG_INCLUDE_PRERELEASE:c9,FLAG_LOOSE:f9}=yi(),Cw=t=>t.value==="<0.0.0-0",p9=t=>t.value==="",ww=(t,e)=>{let n=!0,i=t.slice(),a=i.pop();for(;n&&i.length;)n=i.every(s=>a.intersects(s,e)),a=i.pop();return n},d9=(t,e)=>(te("comp",t,e),t=S9(t,e),te("caret",t),t=E9(t,e),te("tildes",t),t=T9(t,e),te("xrange",t),t=m9(t,e),te("stars",t),t),ke=t=>!t||t.toLowerCase()==="x"||t==="*",E9=(t,e)=>t.trim().split(/\s+/).map(n=>_9(n,e)).join(" "),_9=(t,e)=>{let n=e.loose?We[Ge.TILDELOOSE]:We[Ge.TILDE];return t.replace(n,(i,a,s,o,r)=>{te("tilde",t,i,a,s,o,r);let u;return ke(a)?u="":ke(s)?u=`>=${a}.0.0 <${+a+1}.0.0-0`:ke(o)?u=`>=${a}.${s}.0 <${a}.${+s+1}.0-0`:r?(te("replaceTilde pr",r),u=`>=${a}.${s}.${o}-${r} <${a}.${+s+1}.0-0`):u=`>=${a}.${s}.${o} <${a}.${+s+1}.0-0`,te("tilde return",u),u})},S9=(t,e)=>t.trim().split(/\s+/).map(n=>h9(n,e)).join(" "),h9=(t,e)=>{te("caret",t,e);let n=e.loose?We[Ge.CARETLOOSE]:We[Ge.CARET],i=e.includePrerelease?"-0":"";return t.replace(n,(a,s,o,r,u)=>{te("caret",t,a,s,o,r,u);let l;return ke(s)?l="":ke(o)?l=`>=${s}.0.0${i} <${+s+1}.0.0-0`:ke(r)?s==="0"?l=`>=${s}.${o}.0${i} <${s}.${+o+1}.0-0`:l=`>=${s}.${o}.0${i} <${+s+1}.0.0-0`:u?(te("replaceCaret pr",u),s==="0"?o==="0"?l=`>=${s}.${o}.${r}-${u} <${s}.${o}.${+r+1}-0`:l=`>=${s}.${o}.${r}-${u} <${s}.${+o+1}.0-0`:l=`>=${s}.${o}.${r}-${u} <${+s+1}.0.0-0`):(te("no pr"),s==="0"?o==="0"?l=`>=${s}.${o}.${r}${i} <${s}.${o}.${+r+1}-0`:l=`>=${s}.${o}.${r}${i} <${s}.${+o+1}.0-0`:l=`>=${s}.${o}.${r} <${+s+1}.0.0-0`),te("caret return",l),l})},T9=(t,e)=>(te("replaceXRanges",t,e),t.split(/\s+/).map(n=>v9(n,e)).join(" ")),v9=(t,e)=>{t=t.trim();let n=e.loose?We[Ge.XRANGELOOSE]:We[Ge.XRANGE];return t.replace(n,(i,a,s,o,r,u)=>{te("xRange",t,i,a,s,o,r,u);let l=ke(s),c=l||ke(o),f=c||ke(r),_=f;return a==="="&&_&&(a=""),u=e.includePrerelease?"-0":"",l?a===">"||a==="<"?i="<0.0.0-0":i="*":a&&_?(c&&(o=0),r=0,a===">"?(a=">=",c?(s=+s+1,o=0,r=0):(o=+o+1,r=0)):a==="<="&&(a="<",c?s=+s+1:o=+o+1),a==="<"&&(u="-0"),i=`${a+s}.${o}.${r}${u}`):c?i=`>=${s}.0.0${u} <${+s+1}.0.0-0`:f&&(i=`>=${s}.${o}.0${u} <${s}.${+o+1}.0-0`),te("xRange return",i),i})},m9=(t,e)=>(te("replaceStars",t,e),t.trim().replace(We[Ge.STAR],"")),y9=(t,e)=>(te("replaceGTE0",t,e),t.trim().replace(We[e.includePrerelease?Ge.GTE0PRE:Ge.GTE0],"")),A9=t=>(e,n,i,a,s,o,r,u,l,c,f,_)=>(ke(i)?n="":ke(a)?n=`>=${i}.0.0${t?"-0":""}`:ke(s)?n=`>=${i}.${a}.0${t?"-0":""}`:o?n=`>=${n}`:n=`>=${n}${t?"-0":""}`,ke(l)?u="":ke(c)?u=`<${+l+1}.0.0-0`:ke(f)?u=`<${l}.${+c+1}.0-0`:_?u=`<=${l}.${c}.${f}-${_}`:t?u=`<${l}.${c}.${+f+1}-0`:u=`<=${u}`,`${n} ${u}`.trim()),O9=(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!==Xd.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 gi=h((wpe,Hw)=>{"use strict";var Ni=Symbol("SemVer ANY"),Zd=class t{static get ANY(){return Ni}constructor(e,n){if(n=Dw(n),e instanceof t){if(e.loose===!!n.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),Qd("comparator",e,n),this.options=n,this.loose=!!n.loose,this.parse(e),this.semver===Ni?this.value="":this.value=this.operator+this.semver.version,Qd("comp",this)}parse(e){let n=this.options.loose?Vw[Bw.COMPARATORLOOSE]:Vw[Bw.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 Gw(i[2],this.options.loose):this.semver=Ni}toString(){return this.value}test(e){if(Qd("Comparator.test",e,this.options.loose),this.semver===Ni||e===Ni)return!0;if(typeof e=="string")try{e=new Gw(e,this.options)}catch{return!1}return Jd(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 kw(e.value,n).test(this.value):e.operator===""?e.value===""?!0:new kw(this.value,n).test(e.semver):(n=Dw(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("=")||Jd(this.semver,"<",e.semver,n)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||Jd(this.semver,">",e.semver,n)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};Hw.exports=Zd;var Dw=El(),{safeRe:Vw,t:Bw}=$n(),Jd=Kd(),Qd=Ai(),Gw=Le(),kw=ot()});var Ri=h((Upe,Fw)=>{"use strict";var g9=ot(),N9=(t,e,n)=>{try{e=new g9(e,n)}catch{return!1}return e.test(t)};Fw.exports=N9});var qw=h((Dpe,Yw)=>{"use strict";var R9=ot(),P9=(t,e)=>new R9(t,e).set.map(n=>n.map(i=>i.value).join(" ").trim().split(" "));Yw.exports=P9});var $w=h((Vpe,jw)=>{"use strict";var b9=Le(),x9=ot(),M9=(t,e,n)=>{let i=null,a=null,s=null;try{s=new x9(e,n)}catch{return null}return t.forEach(o=>{s.test(o)&&(!i||a.compare(o)===-1)&&(i=o,a=new b9(i,n))}),i};jw.exports=M9});var Ww=h((Bpe,Kw)=>{"use strict";var L9=Le(),I9=ot(),C9=(t,e,n)=>{let i=null,a=null,s=null;try{s=new I9(e,n)}catch{return null}return t.forEach(o=>{s.test(o)&&(!i||a.compare(o)===1)&&(i=o,a=new L9(i,n))}),i};Kw.exports=C9});var Jw=h((Gpe,Xw)=>{"use strict";var eE=Le(),w9=ot(),zw=Oi(),U9=(t,e)=>{t=new w9(t,e);let n=new eE("0.0.0");if(t.test(n)||(n=new eE("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],s=null;a.forEach(o=>{let r=new eE(o.semver.version);switch(o.operator){case">":r.prerelease.length===0?r.patch++:r.prerelease.push(0),r.raw=r.format();case"":case">=":(!s||zw(r,s))&&(s=r);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),s&&(!n||zw(n,s))&&(n=s)}return n&&t.test(n)?n:null};Xw.exports=U9});var Zw=h((kpe,Qw)=>{"use strict";var D9=ot(),V9=(t,e)=>{try{return new D9(t,e).range||"*"}catch{return null}};Qw.exports=V9});var Ol=h((Hpe,nU)=>{"use strict";var B9=Le(),rU=gi(),{ANY:G9}=rU,k9=ot(),H9=Ri(),eU=Oi(),tU=Tl(),F9=ml(),Y9=vl(),q9=(t,e,n,i)=>{t=new B9(t,i),e=new k9(e,i);let a,s,o,r,u;switch(n){case">":a=eU,s=F9,o=tU,r=">",u=">=";break;case"<":a=tU,s=Y9,o=eU,r="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(H9(t,e,i))return!1;for(let l=0;l<e.set.length;++l){let c=e.set[l],f=null,_=null;if(c.forEach(p=>{p.semver===G9&&(p=new rU(">=0.0.0")),f=f||p,_=_||p,a(p.semver,f.semver,i)?f=p:o(p.semver,_.semver,i)&&(_=p)}),f.operator===r||f.operator===u||(!_.operator||_.operator===r)&&s(t,_.semver))return!1;if(_.operator===u&&o(t,_.semver))return!1}return!0};nU.exports=q9});var iU=h((Fpe,oU)=>{"use strict";var j9=Ol(),$9=(t,e,n)=>j9(t,e,">",n);oU.exports=$9});var sU=h((Ype,aU)=>{"use strict";var K9=Ol(),W9=(t,e,n)=>K9(t,e,"<",n);aU.exports=W9});var cU=h((qpe,lU)=>{"use strict";var uU=ot(),z9=(t,e,n)=>(t=new uU(t,n),e=new uU(e,n),t.intersects(e,n));lU.exports=z9});var pU=h((jpe,fU)=>{"use strict";var X9=Ri(),J9=nt();fU.exports=(t,e,n)=>{let i=[],a=null,s=null,o=t.sort((c,f)=>J9(c,f,n));for(let c of o)X9(c,e,n)?(s=c,a||(a=c)):(s&&i.push([a,s]),s=null,a=null);a&&i.push([a,null]);let r=[];for(let[c,f]of i)c===f?r.push(c):!f&&c===o[0]?r.push("*"):f?c===o[0]?r.push(`<=${f}`):r.push(`${c} - ${f}`):r.push(`>=${c}`);let u=r.join(" || "),l=typeof e.raw=="string"?e.raw:String(e);return u.length<l.length?u:e}});var TU=h(($pe,hU)=>{"use strict";var dU=ot(),rE=gi(),{ANY:tE}=rE,Pi=Ri(),nE=nt(),Q9=(t,e,n={})=>{if(t===e)return!0;t=new dU(t,n),e=new dU(e,n);let i=!1;e:for(let a of t.set){for(let s of e.set){let o=e7(a,s,n);if(i=i||o!==null,o)continue e}if(i)return!1}return!0},Z9=[new rE(">=0.0.0-0")],EU=[new rE(">=0.0.0")],e7=(t,e,n)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===tE){if(e.length===1&&e[0].semver===tE)return!0;n.includePrerelease?t=Z9:t=EU}if(e.length===1&&e[0].semver===tE){if(n.includePrerelease)return!0;e=EU}let i=new Set,a,s;for(let p of t)p.operator===">"||p.operator===">="?a=_U(a,p,n):p.operator==="<"||p.operator==="<="?s=SU(s,p,n):i.add(p.semver);if(i.size>1)return null;let o;if(a&&s){if(o=nE(a.semver,s.semver,n),o>0)return null;if(o===0&&(a.operator!==">="||s.operator!=="<="))return null}for(let p of i){if(a&&!Pi(p,String(a),n)||s&&!Pi(p,String(s),n))return null;for(let S of e)if(!Pi(p,String(S),n))return!1;return!0}let r,u,l,c,f=s&&!n.includePrerelease&&s.semver.prerelease.length?s.semver:!1,_=a&&!n.includePrerelease&&a.semver.prerelease.length?a.semver:!1;f&&f.prerelease.length===1&&s.operator==="<"&&f.prerelease[0]===0&&(f=!1);for(let p of e){if(c=c||p.operator===">"||p.operator===">=",l=l||p.operator==="<"||p.operator==="<=",a){if(_&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===_.major&&p.semver.minor===_.minor&&p.semver.patch===_.patch&&(_=!1),p.operator===">"||p.operator===">="){if(r=_U(a,p,n),r===p&&r!==a)return!1}else if(a.operator===">="&&!Pi(a.semver,String(p),n))return!1}if(s){if(f&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===f.major&&p.semver.minor===f.minor&&p.semver.patch===f.patch&&(f=!1),p.operator==="<"||p.operator==="<="){if(u=SU(s,p,n),u===p&&u!==s)return!1}else if(s.operator==="<="&&!Pi(s.semver,String(p),n))return!1}if(!p.operator&&(s||a)&&o!==0)return!1}return!(a&&l&&!s&&o!==0||s&&c&&!a&&o!==0||_||f)},_U=(t,e,n)=>{if(!t)return e;let i=nE(t.semver,e.semver,n);return i>0?t:i<0||e.operator===">"&&t.operator===">="?e:t},SU=(t,e,n)=>{if(!t)return e;let i=nE(t.semver,e.semver,n);return i<0?t:i>0||e.operator==="<"&&t.operator==="<="?e:t};hU.exports=Q9});var AU=h((Kpe,yU)=>{"use strict";var oE=$n(),vU=yi(),t7=Le(),mU=Yd(),r7=Fr(),n7=$C(),o7=WC(),i7=JC(),a7=ew(),s7=rw(),u7=ow(),l7=aw(),c7=uw(),f7=nt(),p7=pw(),d7=Ew(),E7=hl(),_7=Tw(),S7=mw(),h7=Oi(),T7=Tl(),v7=jd(),m7=$d(),y7=vl(),A7=ml(),O7=Kd(),g7=xw(),N7=gi(),R7=ot(),P7=Ri(),b7=qw(),x7=$w(),M7=Ww(),L7=Jw(),I7=Zw(),C7=Ol(),w7=iU(),U7=sU(),D7=cU(),V7=pU(),B7=TU();yU.exports={parse:r7,valid:n7,clean:o7,inc:i7,diff:a7,major:s7,minor:u7,patch:l7,prerelease:c7,compare:f7,rcompare:p7,compareLoose:d7,compareBuild:E7,sort:_7,rsort:S7,gt:h7,lt:T7,eq:v7,neq:m7,gte:y7,lte:A7,cmp:O7,coerce:g7,Comparator:N7,Range:R7,satisfies:P7,toComparators:b7,maxSatisfying:x7,minSatisfying:M7,minVersion:L7,validRange:I7,outside:C7,gtr:w7,ltr:U7,intersects:D7,simplifyRange:V7,subset:B7,SemVer:t7,re:oE.re,src:oE.src,tokens:oE.t,SEMVER_SPEC_VERSION:vU.SEMVER_SPEC_VERSION,RELEASE_TYPES:vU.RELEASE_TYPES,compareIdentifiers:mU.compareIdentifiers,rcompareIdentifiers:mU.rcompareIdentifiers}});function k7(t){var e=decodeURIComponent(t).split(":");if(e.length!==4)return null;var n=gU(e,4),i=n[0],a=n[1],s=n[3],o=i.padStart(32,"0"),r=a.padStart(16,"0"),u=G7.test(s)?parseInt(s,16)&1:1;return{traceId:o,spanId:r,isRemote:!0,traceFlags:u}}var OU,gU,iE,gl,NU,G7,RU=m(()=>{"use strict";M();K();OU=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.")},gU=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),a,s=[],o;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)s.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 s},iE="uber-trace-id",gl="uberctx",NU=function(){function t(e){typeof e=="string"?(this._jaegerTraceHeader=e,this._jaegerBaggageHeaderPrefix=gl):(this._jaegerTraceHeader=e?.customTraceHeader||iE,this._jaegerBaggageHeaderPrefix=e?.customBaggageHeaderPrefix||gl)}return t.prototype.inject=function(e,n,i){var a,s,o=J.getSpanContext(e),r=at.getBaggage(e);if(o&&xe(e)===!1){var u="0"+(o.traceFlags||Q.NONE).toString(16);i.set(n,this._jaegerTraceHeader,o.traceId+":"+o.spanId+":0:"+u)}if(r)try{for(var l=OU(r.getAllEntries()),c=l.next();!c.done;c=l.next()){var f=gU(c.value,2),_=f[0],p=f[1];i.set(n,this._jaegerBaggageHeaderPrefix+"-"+_,encodeURIComponent(p.value))}}catch(S){a={error:S}}finally{try{c&&!c.done&&(s=l.return)&&s.call(l)}finally{if(a)throw a.error}}},t.prototype.extract=function(e,n,i){var a,s,o=this,r,u=i.get(n,this._jaegerTraceHeader),l=Array.isArray(u)?u[0]:u,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}}),f=e;if(typeof l=="string"){var _=k7(l);_&&(f=J.setSpanContext(f,_))}if(c.length===0)return f;var p=(r=at.getBaggage(e))!==null&&r!==void 0?r:at.createBaggage();try{for(var S=OU(c),v=S.next();!v.done;v=S.next()){var T=v.value;T.value!==void 0&&(p=p.setEntry(T.key,{value:decodeURIComponent(T.value)}))}}catch(A){a={error:A}}finally{try{v&&!v.done&&(s=S.return)&&s.call(S)}finally{if(a)throw a.error}}return f=at.setBaggage(f,p),f},t.prototype.fields=function(){return[this._jaegerTraceHeader]},t}(),G7=/^[0-9a-f]{1,2}$/i});var PU={};Je(PU,{JaegerPropagator:()=>NU,UBER_BAGGAGE_HEADER_PREFIX:()=>gl,UBER_TRACE_ID_HEADER:()=>iE});var bU=m(()=>{"use strict";RU()});var LU=h(Pl=>{"use strict";Object.defineProperty(Pl,"__esModule",{value:!0});Pl.NodeTracerProvider=void 0;var xU=eC(),Nl=(lC(),Y(uC)),MU=(dl(),Y(kd)),H7=AU(),F7=(bU(),Y(PU)),Rl=class extends MU.BasicTracerProvider{constructor(e={}){super(e)}register(e={}){if(e.contextManager===void 0){let n=H7.gte(process.version,"14.8.0")?xU.AsyncLocalStorageContextManager:xU.AsyncHooksContextManager;e.contextManager=new n,e.contextManager.enable()}super.register(e)}};Pl.NodeTracerProvider=Rl;Rl._registeredPropagators=new Map([...MU.BasicTracerProvider._registeredPropagators,["b3",()=>new Nl.B3Propagator({injectEncoding:Nl.B3InjectEncoding.SINGLE_HEADER})],["b3multi",()=>new Nl.B3Propagator({injectEncoding:Nl.B3InjectEncoding.MULTI_HEADER})],["jaeger",()=>new F7.JaegerPropagator]])});var IU=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 Y7=LU();Object.defineProperty(q,"NodeTracerProvider",{enumerable:!0,get:function(){return Y7.NodeTracerProvider}});var He=(dl(),Y(kd));Object.defineProperty(q,"AlwaysOffSampler",{enumerable:!0,get:function(){return He.AlwaysOffSampler}});Object.defineProperty(q,"AlwaysOnSampler",{enumerable:!0,get:function(){return He.AlwaysOnSampler}});Object.defineProperty(q,"BasicTracerProvider",{enumerable:!0,get:function(){return He.BasicTracerProvider}});Object.defineProperty(q,"BatchSpanProcessor",{enumerable:!0,get:function(){return He.BatchSpanProcessor}});Object.defineProperty(q,"ConsoleSpanExporter",{enumerable:!0,get:function(){return He.ConsoleSpanExporter}});Object.defineProperty(q,"ForceFlushState",{enumerable:!0,get:function(){return He.ForceFlushState}});Object.defineProperty(q,"InMemorySpanExporter",{enumerable:!0,get:function(){return He.InMemorySpanExporter}});Object.defineProperty(q,"NoopSpanProcessor",{enumerable:!0,get:function(){return He.NoopSpanProcessor}});Object.defineProperty(q,"ParentBasedSampler",{enumerable:!0,get:function(){return He.ParentBasedSampler}});Object.defineProperty(q,"RandomIdGenerator",{enumerable:!0,get:function(){return He.RandomIdGenerator}});Object.defineProperty(q,"SamplingDecision",{enumerable:!0,get:function(){return He.SamplingDecision}});Object.defineProperty(q,"SimpleSpanProcessor",{enumerable:!0,get:function(){return He.SimpleSpanProcessor}});Object.defineProperty(q,"Span",{enumerable:!0,get:function(){return He.Span}});Object.defineProperty(q,"TraceIdRatioBasedSampler",{enumerable:!0,get:function(){return He.TraceIdRatioBasedSampler}});Object.defineProperty(q,"Tracer",{enumerable:!0,get:function(){return He.Tracer}})});var wU=h(bl=>{"use strict";Object.defineProperty(bl,"__esModule",{value:!0});bl.OTLPTraceExporter=void 0;var CU=hd(),q7=(Iu(),Y(fd)),j7=(fi(),Y(mu)),aE=class extends j7.OTLPExporterBase{constructor(e={}){super((0,CU.createOtlpGrpcExportDelegate)((0,CU.convertLegacyOtlpGrpcOptions)(e,"TRACES"),q7.ProtobufTraceSerializer,"TraceExportService","/opentelemetry.proto.collector.trace.v1.TraceService/Export"))}};bl.OTLPTraceExporter=aE});var UU=h(Yr=>{"use strict";var $7=Yr&&Yr.__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]}),K7=Yr&&Yr.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&$7(e,t,n)};Object.defineProperty(Yr,"__esModule",{value:!0});K7(wU(),Yr)});var HU=Re($l(),1),FU=Re(Jn(),1);import z7 from"path";function J1(t){return typeof t=="object"&&t!==null}function Q1(t){return J1(t)&&typeof t.length=="number"}function Z1(t){return Array.isArray(t)?t:t===void 0?[]:Q1(t)||t instanceof Set?Array.from(t):[t]}var Mt=Z1;function eV(t,e,...n){let i=[];if(!Array.isArray(t))throw new Error("Input must be an array");for(let[a,s]of t.entries()){let o=[];n.forEach(r=>{typeof r=="function"?o=o.concat(r(s)):o.push(r)}),e(s)&&i.push({index:a,replaceWithValue:o})}for(let a of i.reverse()){let s=[a.index,1].concat(a.replaceWithValue);t.splice.apply(t,s)}return t}var ki=eV;var ce={short:/^-([^\d-])$/,long:/^--(\S+)/,combinedShort:/^-[^\d-]{2,}$/,optEquals:/^(--\S+?)=(.*)/},Hi=class extends Array{load(e){if(this.clear(),e&&e!==process.argv)e=Mt(e);else{e=process.argv.slice(0);let n=process.execArgv.some(nV)?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()&&ki(this,ce.combinedShort,tV)}hasCombinedShortOptions(){return this.some(e=>ce.combinedShort.test(e))}static from(e){let n=new this;return n.load(e),n}};function tV(t){return t=t.slice(1),t.split("").map(e=>"-"+e)}function Fi(t){return ce.optEquals.test(t)}function io(t){return(ce.short.test(t)||ce.long.test(t))&&!ce.optEquals.test(t)}function rV(t){return ce.long.test(t)&&!Fi(t)}function Kl(t){return ce.short.test(t)?t.match(ce.short)[1]:rV(t)?t.match(ce.long)[1]:Fi(t)?t.match(ce.optEquals)[1].replace(/^--/,""):null}function hS(t){return!(io(t)||ce.combinedShort.test(t)||ce.optEquals.test(t))}function nV(t){return["--eval","-e"].indexOf(t)>-1||t.startsWith("--eval=")}function oV(t){return!isNaN(parseFloat(t))}function iV(t){return!isNaN(parseFloat(t))&&isFinite(t)}function aV(t){return t!==null&&typeof t=="object"&&t.constructor===Object}function sV(t){return vS(t)&&typeof t.length=="number"}function vS(t){return typeof t=="object"&&t!==null}function ao(t){return typeof t<"u"}function uV(t){return!ao(t)}function mS(t){return t===null}function lV(t){return ao(t)&&!mS(t)&&!Number.isNaN(t)}function cV(t){return typeof t=="function"?/^class /.test(Function.prototype.toString.call(t)):!1}function fV(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 pV(t){if(t){let e=ao(Promise)&&t instanceof Promise,n=t.then&&typeof t.then=="function";return!!(e||n)}else return!1}function dV(t){return t===null||!ao(t)?!1:typeof t[Symbol.iterator]=="function"||typeof t[Symbol.asyncIterator]=="function"}function EV(t){return typeof t=="string"}function _V(t){return typeof t=="function"}function SV(t){return typeof t=="function"&&t.constructor.name==="AsyncFunction"}var Se={isNumber:oV,isFiniteNumber:iV,isPlainObject:aV,isArrayLike:sV,isObject:vS,isDefined:ao,isUndefined:uV,isNull:mS,isDefinedValue:lV,isClass:cV,isPrimitive:fV,isPromise:pV,isIterable:dV,isString:EV,isFunction:_V,isAsyncFunction:SV};var Wl=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)}},so=Wl;var zl=class extends Array{validate(e){this.some(_=>!_.name)&&Lt("INVALID_DEFINITIONS","Invalid option definitions: the `name` property is required on each definition"),this.some(_=>_.type&&typeof _.type!="function")&&Lt("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)))&&Lt("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))&&Lt("INVALID_DEFINITIONS","Invalid option definition: an alias must be a single character"),this.some(_=>(a=_,_.alias==="-"))&&Lt("INVALID_DEFINITIONS",'Invalid option definition: an alias cannot be "-"'),AS(this.map(_=>e?_.name.toLowerCase():_.name))&&Lt("INVALID_DEFINITIONS","Two or more option definitions have the same name"),AS(this.map(_=>e&&Se.isDefined(_.alias)?_.alias.toLowerCase():_.alias))&&Lt("INVALID_DEFINITIONS","Two or more option definitions have the same alias"),this.filter(_=>_.defaultOption===!0).length>1&&Lt("INVALID_DEFINITIONS","Only one option definition can be the defaultOption"),this.some(_=>(a=_,_.isBoolean()&&_.defaultOption))&&Lt("INVALID_DEFINITIONS",`A boolean option ["${a.name}"] can not also be the defaultOption.`)}get(e,n){if(io(e))if(ce.short.test(e)){let i=Kl(e);if(n){let a=i.toLowerCase();return this.find(s=>Se.isDefined(s.alias)&&s.alias.toLowerCase()===a)}else return this.find(a=>a.alias===i)}else{let i=Kl(e);if(n){let a=i.toLowerCase();return this.find(s=>s.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(yS)}whereNotGrouped(){return this.filter(e=>!yS(e))}whereDefaultValueSet(){return this.filter(e=>Se.isDefined(e.defaultValue))}static from(e,n){if(e instanceof this)return e;let i=super.from(Mt(e),a=>so.create(a));return i.validate(n),i}};function Lt(t,e){let n=new Error(e);throw n.name=t,n}function yS(t){return Mt(t.group).some(e=>e)}function AS(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 Jr=zl;var Xl=class{constructor(e,n){this.options=Object.assign({},n),this.definitions=Jr.from(e,this.options.caseInsensitive),this.argv=Hi.from(this.options.argv),this.argv.hasCombinedShortOptions()&&ki(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,s,o=!1,r=!1,u;for(let l of this.argv){if(Se.isPlainObject(l)&&(u=l.origArg,l=l.arg),r&&this.options.stopAtFirstUnknown){yield{event:"unknown_value",arg:l,name:"_unknown",value:void 0};continue}if(io(l))n=e.get(l,this.options.caseInsensitive),i=void 0,n?(i=n.isBoolean()?!0:null,s="set"):s="unknown_option";else if(Fi(l)){let f=l.match(ce.optEquals);n=e.get(f[1],this.options.caseInsensitive),n?n.isBoolean()?(yield{event:"unknown_value",arg:l,name:"_unknown",value:i,def:n},s="set",i=!0):(s="set",i=f[2]):s="unknown_option"}else hS(l)&&(n?(i=l,s="set"):(n=this.definitions.getDefault(),n&&!o?(i=l,s="set"):(s="unknown_value",n=void 0)));a=n?n.name:"_unknown";let c={event:s,arg:l,name:a,value:i,def:n};u&&(c.subArg=l,c.arg=u),yield c,a==="_unknown"&&(r=!0),n&&n.defaultOption&&!n.isMultiple()&&s==="set"&&(o=!0),n&&n.isBoolean()&&(n=void 0),n&&!n.multiple&&Se.isDefined(i)&&i!==null&&(n=void 0),i=void 0,s=void 0,a=void 0,u=void 0}}},OS=Xl;var Tr=new WeakMap,Yi=class{constructor(e){this.definition=new so(e),this.state=null,this.resetToDefault()}get(){return Tr.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?Tr.set(this,e):(Tr.set(this,i.type(e)),this.state=n)}resetToDefault(){Se.isDefined(this.definition.defaultValue)?this.definition.isMultiple()?Tr.set(this,Mt(this.definition.defaultValue).slice()):Tr.set(this,this.definition.defaultValue):this.definition.isMultiple()?Tr.set(this,[]):Tr.set(this,null),this.state="default"}static create(e){return e=new so(e),e.isBoolean()?Jl.create(e):new this(e)}},Jl=class extends Yi{set(e){super.set(!0)}static create(e){return new this(e)}},uo=Yi;var gS=Re(fE(),1),Ql=class extends Map{constructor(e){super(),this.definitions=Jr.from(e),this.set("_unknown",uo.create({name:"_unknown",multiple:!0}));for(let n of this.definitions.whereDefaultValueSet())this.set(n.name,uo.create(n))}toObject(e){e=e||{};let n={};for(let i of this){let a=e.camelCase&&i[0]!=="_unknown"?(0,gS.default)(i[0]):i[0],s=i[1];a==="_unknown"&&!s.get().length||(n[a]=s.get())}return e.skipUnknown&&delete n._unknown,n}},qi=Ql;var Zl=Re(fE(),1),ec=class extends qi{toObject(e){let n=super.toObject({skipUnknown:e.skipUnknown}),i=super.toObject(e),a=i._unknown;delete i._unknown;let s={_all:i};return a&&a.length&&(s._unknown=a),this.definitions.whereGrouped().forEach(o=>{let r=e.camelCase?(0,Zl.default)(o.name):o.name,u=n[o.name];for(let l of Mt(o.group))s[l]=s[l]||{},Se.isDefined(u)&&(s[l][r]=u)}),this.definitions.whereNotGrouped().forEach(o=>{let r=e.camelCase?(0,Zl.default)(o.name):o.name,u=n[o.name];Se.isDefined(u)&&(s._none||(s._none={}),s._none[r]=u)}),s}},NS=ec;function hV(t,e){e=e||{},e.stopAtFirstUnknown&&(e.partial=!0),t=Jr.from(t,e.caseInsensitive);let n=new OS(t,{argv:e.argv,stopAtFirstUnknown:e.stopAtFirstUnknown,caseInsensitive:e.caseInsensitive}),i=t.isGrouped()?NS:qi,a=new i(t);for(let s of n){let o=s.subArg||s.arg;if(!e.partial){if(s.event==="unknown_value"){let u=new Error(`Unknown value: ${o}`);throw u.name="UNKNOWN_VALUE",u.value=o,u}else if(s.event==="unknown_option"){let u=new Error(`Unknown option: ${o}`);throw u.name="UNKNOWN_OPTION",u.optionName=o,u}}let r;a.has(s.name)?r=a.get(s.name):(r=uo.create(s.def),a.set(s.name,r)),s.name==="_unknown"?r.set(o):r.set(s.value)}return a.toObject({skipUnknown:!e.partial,camelCase:e.camelCase})}var RS=hV;var YU=Re(WU(),1),qU=Re(zU(),1),jU=Re(eg(),1);import X7 from"http";import{Session as J7}from"node:inspector/promises";import{createRequire as vY}from"module";var lc=Re($l(),1);import Qi from"path";import uc from"os";var mY=vY(import.meta.url),tg=zn("2.54.0-rc.7"),yY=zn("2.55.0-rc.1"),AY=zn("2.55.0-rc.1"),Zi=new AE({max:1e4});function rg(t){let e=mY.resolve(t),n=Qi.dirname(e);for(;!lc.default.existsSync(Qi.join(n,"package.json"));)n=Qi.dirname(n);let i=lc.default.readFileSync(Qi.join(n,"package.json"),"utf-8");return JSON.parse(i)}var ea=class{constructor(e){this.instance=e;let n=rg("@sentio/sdk"),i=rg("@sentio/runtime");console.log("Runtime version:",i.version,"SDK version:",n.version),this.sdkVersion=zn(n.version)}instance;sdkVersion;async getConfig(e,n){let i=await this.instance.getConfig(e,n);if(i.executionConfig=lE.fromPartial(EE.execution),i.contractConfigs)for(let a of i.contractConfigs)Xn(this.sdkVersion,yY)<0&&a.fuelCallConfigs&&(a.fuelTransactionConfigs=a.fuelCallConfigs),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){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.sdkVersion.minor<=16&&(i.code===uc.constants.errno.ECONNRESET||i.code===uc.constants.errno.ECONNREFUSED||i.code===uc.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){let n=Xn(this.sdkVersion,AY)<0;if(e)switch(e.handlerType){case 20:Xn(this.sdkVersion,tg)<0&&(e.handlerType=13,e.data&&(e.data.fuelCall=e.data?.fuelTransaction));break;case 19:Xn(this.sdkVersion,tg)<0&&(e.handlerType=13,e.data&&(e.data.fuelCall=e.data?.fuelLog));break;case 6:let i=e.data?.aptEvent;if(i&&n&&i.rawTransaction){let c=JSON.parse(i.rawTransaction),f=`${c.hash}-${e.handlerIds[0]}`;if(Zi.has(f)){console.debug("skip binding",f),e.handlerType=0;return}Zi.set(f,!0),i.transaction=c,c.events?.length||(c.events=[JSON.parse(i.rawEvent)])}break;case 7:let a=e.data?.aptCall;a&&n&&a.rawTransaction&&(a.transaction=JSON.parse(a.rawTransaction));break;case 8:let s=e.data?.aptResource;s&&n&&s.rawResources&&(s.resources=s.rawResources.map(c=>JSON.parse(c)));break;case 3:let o=e.data?.suiEvent;if(o&&n&&o.rawTransaction){let c=JSON.parse(o.rawTransaction),f=`${c.digest}-${e.handlerIds[0]}`;if(Zi.has(f)){console.debug("skip binding",f),e.handlerType=0;return}Zi.set(f,!0),o.transaction=c,c.events?.length||(c.events=[JSON.parse(o.rawEvent)])}break;case 9:let r=e.data?.suiCall;r&&n&&r.rawTransaction&&(r.transaction=JSON.parse(r.rawTransaction));break;case 10:let u=e.data?.suiObject;u&&n&&(u.rawSelf||u.rawObjects)&&(u.rawSelf&&(u.self=JSON.parse(u.rawSelf)),u.objects=u.rawObjects.map(c=>JSON.parse(c)));break;case 12:let l=e.data?.suiObjectChange;l&&n&&l.rawChanges&&(l.changes=l.rawChanges.map(c=>JSON.parse(c)));break;case 0:break;default:break}}};import("node:process").then(t=>t.stdout.write(""));var gt=Re(S0(),1);function h0(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 T0(t,e){let n={transform:a=>{let s=[];typeof a.message=="object"?s.push(h0(a.message)):s.push(a.message);let o=a[Symbol.for("splat")];if(o)for(let r in o){let u=o[r];typeof u=="object"?s.push(h0(u)):s.push(u)}return a.message=s.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(""));Ds();Mn();var DU=Re(KI(),1),VU=Re(JI(),1),sE=Re(IU(),1),BU=Re(UU(),1);dl();M();async function GU(t){t&&g.setLogger(new SE,it.DEBUG);let e=await Us.detect(),n=new li({resource:e,readers:[new tu({exporter:new DU.OTLPMetricExporter}),new VU.PrometheusExporter({host:"0.0.0.0",port:4041})]}),i=new sE.NodeTracerProvider({resource:e}),a=new BU.OTLPTraceExporter,s=new Er(a);i.addSpanProcessor(s),xi.setGlobalMeterProvider(n),J.setGlobalTracerProvider(i),["SIGINT","SIGTERM"].forEach(o=>{process.on(o,()=>W7())}),xi.getMeter("processor").createGauge("up").record(1)}async function W7(){let t=J.getTracerProvider();if(t instanceof vE){let n=t.getDelegate();n instanceof sE.NodeTracerProvider&&n.shutdown().catch(console.error)}let e=xi.getMeterProvider();e instanceof li&&e.shutdown().catch(console.error)}import("node:process").then(t=>t.stdout.write(""));var xl=class{constructor(e){this.loader=e}async listen(e){let n=Ml.INSTANCE;await this.loader(),await n.configure(uE.create()),console.log("Starting Action Server at:",e),await n.startServer(e)}forceShutdown(){Ml.INSTANCE.shutdown()}};import("node:process").then(t=>t.stdout.write(""));var Q7=[{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}],Fe=RS(Q7,{partial:!0}),Z7=process.env.LOG_LEVEL?.toUpperCase();T0(Fe["log-format"]==="json",Z7==="debug"?!0:Fe.debug);console.debug("Starting with",Fe.target);await GU(Fe.debug);Error.stackTraceLimit=20;var eQ=z7.resolve(Fe["chains-config"]),tQ=HU.default.readJsonSync(eQ),rQ=process.env.OVERRIDE_CONCURRENCY?parseInt(process.env.OVERRIDE_CONCURRENCY):void 0,nQ=process.env.OVERRIDE_BATCH_COUNT?parseInt(process.env.OVERRIDE_BATCH_COUNT):void 0;_r.INSTANCE.concurrency=rQ??Fe.concurrency;_r.INSTANCE.batchCount=nQ??Fe["batch-count"];_r.INSTANCE.chainQueryAPI=Fe["chainquery-server"];_r.INSTANCE.priceFeedAPI=Fe["pricefeed-server"];for(let[t,e]of Object.entries(tQ)){let n=e;if(n.ChainServer)_r.INSTANCE.chainServer.set(t,n.ChainServer);else{let i=n.Https?.[0];i?_r.INSTANCE.chainServer.set(t,i):console.error("not valid config for chain",t)}}console.debug("Starting Server",Fe);var qr,Wn,kU=async()=>{let t=await import(Fe.target);return console.debug("Module loaded",t),t};if(Fe["start-action-server"])qr=new xl(kU),qr.listen(Fe.port);else{qr=(0,YU.createServer)({"grpc.max_send_message_length":768*1024*1024,"grpc.max_receive_message_length":768*1024*1024,"grpc.default_compression_algorithm":FU.compressionAlgorithms.gzip}).use((0,jU.openTelemetryServerMiddleware)()).use(qU.errorDetailsServerMiddleware),Wn=new OE(kU,qr.shutdown);let t=new ea(Wn);qr.add(cE,t),qr.listen("0.0.0.0:"+Fe.port),console.log("Processor Server Started at:",Fe.port)}var $U=4040,oQ=X7.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,s=new J7;s.connect(),await s.post("Profiler.enable"),await s.post("Profiler.start"),await new Promise(r=>setTimeout(r,a));let{profile:o}=await s.post("Profiler.stop");e.writeHead(200,{"Content-Type":"application/json"}),e.write(JSON.stringify(o)),s.disconnect()}catch{e.writeHead(500)}break}default:e.writeHead(404)}}else e.writeHead(404);e.end()}).listen($U);console.log("Metric Server Started at:",$U);process.on("SIGINT",function(){iQ(0)}).on("uncaughtException",t=>{console.error("Uncaught Exception, please checking if await is properly used",t),Wn&&(Wn.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),Wn&&(Wn.unhandled=t))});function iQ(t){qr?.forceShutdown(),console.log("RPC server shut down"),oQ.close(function(){console.log("Http server shut down"),process.exit(t)})}import("node:process").then(t=>t.stdout.write(""));
|
59
|
+
`}};Xu.PrometheusSerializer=yd});var XI=h(Qu=>{"use strict";Object.defineProperty(Qu,"__esModule",{value:!0});Qu.PrometheusExporter=void 0;var hi=(M(),Y(Pe)),nX=(K(),Y(Cs)),Od=(Mn(),Y(zp)),oX=L("http"),iX=Ad(),aX=L("url"),Ju=class t extends Od.MetricReader{constructor(e={},n=()=>{}){super({aggregationSelector:i=>Od.Aggregation.Default(),aggregationTemporalitySelector:i=>Od.AggregationTemporality.CUMULATIVE,metricProducers:e.metricProducers}),this._requestHandler=(i,a)=>{i.url!=null&&new aX.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:s,errors:o}=a;o.length&&hi.diag.error("PrometheusExporter: metrics collection errors",...o),i.end(this._serializer.serialize(s))},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,oX.createServer)(this._requestHandler).unref(),this._serializer=new iX.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=>{hi.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,nX.globalErrorHandler)(n):hi.diag.debug("Prometheus exporter was stopped"),e()})}):(hi.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},()=>{hi.diag.debug(`Prometheus exporter server started: ${this._host}:${this._port}/${this._endpoint}`),n()})})),this._startServerPromise}getMetricsRequestHandler(e,n){this._exportMetrics(n)}};Qu.PrometheusExporter=Ju;Ju.DEFAULT_OPTIONS={host:void 0,port:9464,endpoint:"/metrics",prefix:"",appendTimestamp:!1}});var JI=h(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});Un.PrometheusSerializer=Un.PrometheusExporter=void 0;var sX=XI();Object.defineProperty(Un,"PrometheusExporter",{enumerable:!0,get:function(){return sX.PrometheusExporter}});var uX=Ad();Object.defineProperty(Un,"PrometheusSerializer",{enumerable:!0,get:function(){return uX.PrometheusSerializer}})});var Nd=h(Zu=>{"use strict";Object.defineProperty(Zu,"__esModule",{value:!0});Zu.AbstractAsyncHooksContextManager=void 0;var lX=L("events"),cX=["addListener","on","once","prependListener","prependOnceListener"],gd=class{constructor(){this._kOtListeners=Symbol("OtListeners"),this._wrapped=!1}bind(e,n){return n instanceof lX.EventEmitter?this._bindEventEmitter(e,n):typeof n=="function"?this._bindFunction(e,n):n}_bindFunction(e,n){let i=this,a=function(...s){return i.with(e,()=>n.apply(this,s))};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),cX.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,s){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,s);let u=r.get(s);return n.call(this,a,u||s)}}_patchRemoveAllListeners(e,n){let i=this;return function(a){let s=i._getPatchMap(e);return s!==void 0&&(arguments.length===0?i._createPatchMap(e):s[a]!==void 0&&delete s[a]),n.apply(this,arguments)}}_patchAddListener(e,n,i){let a=this;return function(s,o){if(a._wrapped)return n.call(this,s,o);let r=a._getPatchMap(e);r===void 0&&(r=a._createPatchMap(e));let u=r[s];u===void 0&&(u=new WeakMap,r[s]=u);let l=a.bind(i,o);u.set(o,l),a._wrapped=!0;try{return n.call(this,s,l)}finally{a._wrapped=!1}}}_createPatchMap(e){let n=Object.create(null);return e[this._kOtListeners]=n,n}_getPatchMap(e){return e[this._kOtListeners]}};Zu.AbstractAsyncHooksContextManager=gd});var QI=h(el=>{"use strict";Object.defineProperty(el,"__esModule",{value:!0});el.AsyncHooksContextManager=void 0;var fX=(M(),Y(Pe)),pX=L("async_hooks"),dX=Nd(),Rd=class extends dX.AbstractAsyncHooksContextManager{constructor(){super(),this._contexts=new Map,this._stack=[],this._asyncHook=pX.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:fX.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()}};el.AsyncHooksContextManager=Rd});var ZI=h(tl=>{"use strict";Object.defineProperty(tl,"__esModule",{value:!0});tl.AsyncLocalStorageContextManager=void 0;var EX=(M(),Y(Pe)),_X=L("async_hooks"),SX=Nd(),Pd=class extends SX.AbstractAsyncHooksContextManager{constructor(){super(),this._asyncLocalStorage=new _X.AsyncLocalStorage}active(){var e;return(e=this._asyncLocalStorage.getStore())!==null&&e!==void 0?e:EX.ROOT_CONTEXT}with(e,n,i,...a){let s=i==null?n:n.bind(i);return this._asyncLocalStorage.run(e,s,...a)}enable(){return this}disable(){return this._asyncLocalStorage.disable(),this}};tl.AsyncLocalStorageContextManager=Pd});var eC=h(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn.AsyncLocalStorageContextManager=Dn.AsyncHooksContextManager=void 0;var hX=QI();Object.defineProperty(Dn,"AsyncHooksContextManager",{enumerable:!0,get:function(){return hX.AsyncHooksContextManager}});var TX=ZI();Object.defineProperty(Dn,"AsyncLocalStorageContextManager",{enumerable:!0,get:function(){return TX.AsyncLocalStorageContextManager}})});var Vn,bd=m(()=>{"use strict";M();Vn=jr("OpenTelemetry Context Key B3 Debug Flag")});var pr,Bn,Gn,kn,rl,Hn,Ti=m(()=>{"use strict";pr="b3",Bn="x-b3-traceid",Gn="x-b3-spanid",kn="x-b3-sampled",rl="x-b3-parentspanid",Hn="x-b3-flags"});function yX(t){return t===Q.SAMPLED||t===Q.NONE}function AX(t){return Array.isArray(t)?t[0]:t}function nl(t,e,n){var i=e.get(t,n);return AX(i)}function OX(t,e){var n=nl(t,e,Bn);return typeof n=="string"?n.padStart(32,"0"):""}function gX(t,e){var n=nl(t,e,Gn);return typeof n=="string"?n:""}function tC(t,e){var n=nl(t,e,Hn);return n==="1"?"1":void 0}function NX(t,e){var n=nl(t,e,kn),i=tC(t,e);if(i==="1"||vX.has(n))return Q.SAMPLED;if(n===void 0||mX.has(n))return Q.NONE}var vX,mX,rC,nC=m(()=>{"use strict";M();K();bd();Ti();vX=new Set([!0,"true","True","1",1]),mX=new Set([!1,"false","False","0",0]);rC=function(){function t(){}return t.prototype.inject=function(e,n,i){var a=J.getSpanContext(e);if(!(!a||!_t(a)||xe(e))){var s=e.getValue(Vn);i.set(n,Bn,a.traceId),i.set(n,Gn,a.spanId),s==="1"?i.set(n,Hn,s):a.traceFlags!==void 0&&i.set(n,kn,(Q.SAMPLED&a.traceFlags)===Q.SAMPLED?"1":"0")}},t.prototype.extract=function(e,n,i){var a=OX(n,i),s=gX(n,i),o=NX(n,i),r=tC(n,i);return Gt(a)&&bi(s)&&yX(o)?(e=e.setValue(Vn,r),J.setSpanContext(e,{traceId:a,spanId:s,isRemote:!0,traceFlags:o})):e},t.prototype.fields=function(){return[Bn,Gn,Hn,kn,rl]},t}()});function LX(t){return t.length===32?t:""+bX+t}function IX(t){return t&&xX.has(t)?Q.SAMPLED:Q.NONE}var RX,PX,bX,xX,MX,oC,iC=m(()=>{"use strict";M();K();bd();Ti();RX=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),a,s=[],o;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)s.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 s},PX=/((?:[0-9a-f]{16}){1,2})-([0-9a-f]{16})(?:-([01d](?![0-9a-f])))?(?:-([0-9a-f]{16}))?/,bX="0".repeat(16),xX=new Set(["d","1"]),MX="d";oC=function(){function t(){}return t.prototype.inject=function(e,n,i){var a=J.getSpanContext(e);if(!(!a||!_t(a)||xe(e))){var s=e.getValue(Vn)||a.traceFlags&1,o=a.traceId+"-"+a.spanId+"-"+s;i.set(n,pr,o)}},t.prototype.extract=function(e,n,i){var a=i.get(n,pr),s=Array.isArray(a)?a[0]:a;if(typeof s!="string")return e;var o=s.match(PX);if(!o)return e;var r=RX(o,4),u=r[1],l=r[2],c=r[3],f=LX(u);if(!Gt(f)||!bi(l))return e;var _=IX(c);return c===MX&&(e=e.setValue(Vn,c)),J.setSpanContext(e,{traceId:f,spanId:l,isRemote:!0,traceFlags:_})},t.prototype.fields=function(){return[pr]},t}()});var Fn,xd=m(()=>{"use strict";(function(t){t[t.SINGLE_HEADER=0]="SINGLE_HEADER",t[t.MULTI_HEADER=1]="MULTI_HEADER"})(Fn||(Fn={}))});var aC,sC=m(()=>{"use strict";K();nC();iC();Ti();xd();aC=function(){function t(e){e===void 0&&(e={}),this._b3MultiPropagator=new rC,this._b3SinglePropagator=new oC,e.injectEncoding===Fn.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,pr),s=Array.isArray(a)?a[0]:a;return s?this._b3SinglePropagator.extract(e,n,i):this._b3MultiPropagator.extract(e,n,i)},t.prototype.fields=function(){return this._fields},t}()});var uC={};Je(uC,{B3InjectEncoding:()=>Fn,B3Propagator:()=>aC,B3_CONTEXT_HEADER:()=>pr,X_B3_FLAGS:()=>Hn,X_B3_PARENT_SPAN_ID:()=>rl,X_B3_SAMPLED:()=>kn,X_B3_SPAN_ID:()=>Gn,X_B3_TRACE_ID:()=>Bn});var lC=m(()=>{"use strict";sC();Ti();xd()});var cC,fC=m(()=>{"use strict";cC="exception"});var Md,CX,pC,wX,ol,Ld=m(()=>{"use strict";M();K();qo();fC();Md=function(){return Md=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},Md.apply(this,arguments)},CX=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.")},pC=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),a,s=[],o;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)s.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 s},wX=function(t,e,n){if(n||arguments.length===2)for(var i=0,a=e.length,s;i<a;i++)(s||!(i in e))&&(s||(s=Array.prototype.slice.call(e,0,i)),s[i]=e[i]);return t.concat(s||Array.prototype.slice.call(e))},ol=function(){function t(e,n,i,a,s,o,r,u,l,c){r===void 0&&(r=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:yE.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=i,this._spanContext=a,this.parentSpanId=o,this.kind=s,this.links=r;var f=Date.now();this._performanceStartTime=et.now(),this._performanceOffset=f-(this._performanceStartTime+mn()),this._startTimeProvided=u!=null,this.startTime=this._getTime(u??f),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):Ko(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=CX(Object.entries(e)),s=a.next();!s.done;s=a.next()){var o=pC(s.value,2),r=o[0],u=o[1];this.setAttribute(r,u)}}catch(l){n={error:l}}finally{try{s&&!s.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++),Jo(n)&&(Jo(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,wX([],pC(e),!1)),this},t.prototype.setStatus=function(e){return this._isSpanEnded()?this:(this.status=Md({},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=gs(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 Xo(e+this._performanceOffset);if(typeof e=="number")return Oe(e);if(e instanceof Date)return Oe(e.getTime());if(yn(e))return e;if(this._startTimeProvided)return Oe(Date.now());var n=et.now()-this._performanceStartTime;return Qo(this.startTime,Oe(n))},t.prototype.isRecording=function(){return this._ended===!1},t.prototype.recordException=function(e,n){var i={};typeof e=="string"?i[cs]=e:e&&(e.code?i[ls]=e.code.toString():e.name&&(i[ls]=e.name),e.message&&(i[cs]=e.message),e.stack&&(i[v0]=e.stack)),i[ls]||i[cs]?this.addEvent(cC,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,vi=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 dr,il=m(()=>{"use strict";vi();dr=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:dt.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t}()});var Pt,al=m(()=>{"use strict";vi();Pt=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:dt.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t}()});var Yn,Id=m(()=>{"use strict";M();K();il();al();Yn=function(){function t(e){var n,i,a,s;this._root=e.root,this._root||(Te(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new Pt),this._remoteParentSampled=(n=e.remoteParentSampled)!==null&&n!==void 0?n:new Pt,this._remoteParentNotSampled=(i=e.remoteParentNotSampled)!==null&&i!==void 0?i:new dr,this._localParentSampled=(a=e.localParentSampled)!==null&&a!==void 0?a:new Pt,this._localParentNotSampled=(s=e.localParentNotSampled)!==null&&s!==void 0?s:new dr}return t.prototype.shouldSample=function(e,n,i,a,s,o){var r=J.getSpanContext(e);return!r||!_t(r)?this._root.shouldSample(e,n,i,a,s,o):r.isRemote?r.traceFlags&Q.SAMPLED?this._remoteParentSampled.shouldSample(e,n,i,a,s,o):this._remoteParentNotSampled.shouldSample(e,n,i,a,s,o):r.traceFlags&Q.SAMPLED?this._localParentSampled.shouldSample(e,n,i,a,s,o):this._localParentNotSampled.shouldSample(e,n,i,a,s,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 mi,Cd=m(()=>{"use strict";M();vi();mi=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,s=parseInt(e.slice(a,a+8),16);n=(n^s)>>>0}return n},t}()});function sl(){var t=Me();return{sampler:wd(t),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:t.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:t.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:t.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:t.OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:t.OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:t.OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT},mergeResourceWithDefaults:!0}}function wd(t){switch(t===void 0&&(t=Me()),t.OTEL_TRACES_SAMPLER){case Ke.AlwaysOn:return new Pt;case Ke.AlwaysOff:return new dr;case Ke.ParentBasedAlwaysOn:return new Yn({root:new Pt});case Ke.ParentBasedAlwaysOff:return new Yn({root:new dr});case Ke.TraceIdRatio:return new mi(dC(t));case Ke.ParentBasedTraceIdRatio:return new Yn({root:new mi(dC(t))});default:return g.error('OTEL_TRACES_SAMPLER value "'+t.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+UX+'".'),new Pt}}function dC(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 "+qn+"."),qn;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 "+qn+"."),qn):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 "+qn+"."),qn):e}var UX,qn,Ud=m(()=>{"use strict";M();K();il();al();Id();Cd();UX=Ke.AlwaysOn,qn=1});function EC(t){var e={sampler:wd()},n=sl(),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 _C(t){var e,n,i,a,s,o,r,u,l,c,f,_,p=Object.assign({},t.spanLimits),S=Tn();return p.attributeCountLimit=(o=(s=(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&&s!==void 0?s:S.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&o!==void 0?o:Cr,p.attributeValueLengthLimit=(_=(f=(c=(u=(r=t.spanLimits)===null||r===void 0?void 0:r.attributeValueLengthLimit)!==null&&u!==void 0?u:(l=t.generalLimits)===null||l===void 0?void 0:l.attributeValueLengthLimit)!==null&&c!==void 0?c:S.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&f!==void 0?f:S.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&_!==void 0?_:Ir,Object.assign({},t,{spanLimits:p})}var Dd=m(()=>{"use strict";Ud();K()});var SC,hC=m(()=>{"use strict";M();K();SC=function(){function t(e,n){this._exporter=e,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var i=Me();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 On(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=[],s=Math.ceil(e._finishedSpans.length/e._maxExportBatchSize),o=0,r=s;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(Sn(Ye.active()),function(){var s;e._finishedSpans.length<=e._maxExportBatchSize?(s=e._finishedSpans,e._finishedSpans=[]):s=e._finishedSpans.splice(0,e._maxExportBatchSize);for(var o=function(){return e._exporter.export(s,function(f){var _;clearTimeout(a),f.code===W.SUCCESS?n():i((_=f.error)!==null&&_!==void 0?_:new Error("BatchSpanProcessor: span export failed"))})},r=null,u=0,l=s.length;u<l;u++){var c=s[u];c.resource.asyncAttributesPending&&c.resource.waitForAsyncAttributes&&(r??(r=[]),r.push(c.resource.waitForAsyncAttributes()))}r===null?o():Promise.all(r).then(o,function(f){Te(f),i(f)})})})},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),sr(this._timer))}},t.prototype._clearTimer=function(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)},t}()});var DX,Er,TC=m(()=>{"use strict";hC();DX=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,a){i.__proto__=a}||function(i,a){for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(i[s]=a[s])},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)}}(),Er=function(t){DX(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.onShutdown=function(){},e}(SC)});function vC(t){return function(){for(var n=0;n<t/4;n++)ul.writeUInt32BE(Math.random()*Math.pow(2,32)>>>0,n*4);for(var n=0;n<t&&!(ul[n]>0);n++)n===t-1&&(ul[t-1]=1);return ul.toString("hex",0,t)}}var VX,mC,jn,ul,yC=m(()=>{"use strict";VX=8,mC=16,jn=function(){function t(){this.generateTraceId=vC(mC),this.generateSpanId=vC(VX)}return t}(),ul=Buffer.allocUnsafe(mC)});var AC=m(()=>{"use strict";TC();yC()});var ll=m(()=>{"use strict";AC()});var cl,Vd=m(()=>{"use strict";M();K();Ld();Dd();ll();cl=function(){function t(e,n,i){this._tracerProvider=i;var a=EC(n);this._sampler=a.sampler,this._generalLimits=a.generalLimits,this._spanLimits=a.spanLimits,this._idGenerator=n.idGenerator||new jn,this.resource=i.resource,this.instrumentationLibrary=e}return t.prototype.startSpan=function(e,n,i){var a,s,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 u=J.wrapSpanContext(TE);return u}var l=r?.spanContext(),c=this._idGenerator.generateSpanId(),f,_,p;!l||!J.isSpanContextValid(l)?f=this._idGenerator.generateTraceId():(f=l.traceId,_=l.traceState,p=l.spanId);var S=(a=n.kind)!==null&&a!==void 0?a:mE.INTERNAL,v=((s=n.links)!==null&&s!==void 0?s:[]).map(function(F){return{context:F.context,attributes:or(F.attributes)}}),T=or(n.attributes),A=this._sampler.shouldSample(i,f,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:f,spanId:c,traceFlags:O,traceState:_};if(A.decision===St.NOT_RECORD){g.debug("Recording is off, propagating context in a non-recording span");var u=J.wrapSpanContext(N);return u}var D=or(Object.assign(T,A.attributes)),G=new ol(this,i,e,N,S,p,v,n.startTime,void 0,D);return G},t.prototype.startActiveSpan=function(e,n,i,a){var s,o,r;if(!(arguments.length<2)){arguments.length===2?r=n:arguments.length===3?(s=n,r=i):(s=n,o=i,r=a);var u=o??Ye.active(),l=this.startSpan(e,s,u),c=J.setSpan(u,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 fl,Bd,OC=m(()=>{"use strict";K();fl=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.")},Bd=function(){function t(e){this._spanProcessors=e}return t.prototype.forceFlush=function(){var e,n,i=[];try{for(var a=fl(this._spanProcessors),s=a.next();!s.done;s=a.next()){var o=s.value;i.push(o.forceFlush())}}catch(r){e={error:r}}finally{try{s&&!s.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(u){Te(u||new Error("MultiSpanProcessor: forceFlush failed")),r()})})},t.prototype.onStart=function(e,n){var i,a;try{for(var s=fl(this._spanProcessors),o=s.next();!o.done;o=s.next()){var r=o.value;r.onStart(e,n)}}catch(u){i={error:u}}finally{try{o&&!o.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}},t.prototype.onEnd=function(e){var n,i;try{for(var a=fl(this._spanProcessors),s=a.next();!s.done;s=a.next()){var o=s.value;o.onEnd(e)}}catch(r){n={error:r}}finally{try{s&&!s.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=fl(this._spanProcessors),s=a.next();!s.done;s=a.next()){var o=s.value;i.push(o.shutdown())}}catch(r){e={error:r}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return new Promise(function(r,u){Promise.all(i).then(function(){r()},u)})},t}()});var pl,Gd=m(()=>{"use strict";pl=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,GX,Vt,gC,NC=m(()=>{"use strict";M();K();Ds();Vd();Ud();OC();Gd();ll();Dd();BX=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),a,s=[],o;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)s.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 s},GX=function(t,e,n){if(n||arguments.length===2)for(var i=0,a=e.length,s;i<a;i++)(s||!(i in e))&&(s||(s=Array.prototype.slice.call(e,0,i)),s[i]=e[i]);return t.concat(s||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={}));gC=function(){function t(e){e===void 0&&(e={});var n,i;this._registeredSpanProcessors=[],this._tracers=new Map;var a=Is({},sl(),_C(e));if(this.resource=(n=a.resource)!==null&&n!==void 0?n:wt.empty(),a.mergeResourceWithDefaults&&(this.resource=wt.default().merge(this.resource)),this._config=Object.assign({},a,{resource:this.resource}),!((i=e.spanProcessors)===null||i===void 0)&&i.length)this._registeredSpanProcessors=GX([],BX(e.spanProcessors),!1),this.activeSpanProcessor=new Bd(this._registeredSpanProcessors);else{var s=this._buildExporterFromEnv();if(s!==void 0){var o=new Er(s);this.activeSpanProcessor=o}else this.activeSpanProcessor=new pl}}return t.prototype.getTracer=function(e,n,i){var a=e+"@"+(n||"")+":"+(i?.schemaUrl||"");return this._tracers.has(a)||this._tracers.set(a,new cl({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 Bd(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 s,o=setTimeout(function(){a(new Error("Span processor did not completed within timeout period of "+e+" ms")),s=Vt.timeout},e);i.forceFlush().then(function(){clearTimeout(o),s!==Vt.timeout&&(s=Vt.resolved,a(s))}).catch(function(r){clearTimeout(o),s=Vt.error,a(r)})})});return new Promise(function(i,a){Promise.all(n).then(function(s){var o=s.filter(function(r){return r!==Vt.resolved});o.length>0?a(o):i()}).catch(function(s){return a([s])})})},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(Me().OTEL_PROPAGATORS)),i=n.map(function(s){var o=e._getPropagator(s);return o||g.warn('Propagator "'+s+'" requested through environment variable is unavailable.'),o}),a=i.reduce(function(s,o){return o&&s.push(o),s},[]);if(a.length!==0)return n.length===1?a[0]:new Rs({propagators:a})},t.prototype._buildExporterFromEnv=function(){var e=Me().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 bs}],["baggage",function(){return new Ss}]]),t._registeredExporters=new Map,t}()});var kX,RC,PC=m(()=>{"use strict";K();kX=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.")},RC=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 s=kX(e),o=s.next();!o.done;o=s.next()){var r=o.value;console.dir(this._exportInfo(r),{depth:3})}}catch(u){i={error:u}}finally{try{o&&!o.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}if(n)return n({code:W.SUCCESS})},t}()});var HX,FX,bC,xC=m(()=>{"use strict";K();HX=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),a,s=[],o;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)s.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 s},FX=function(t,e,n){if(n||arguments.length===2)for(var i=0,a=e.length,s;i<a;i++)(s||!(i in e))&&(s||(s=Array.prototype.slice.call(e,0,i)),s[i]=e[i]);return t.concat(s||Array.prototype.slice.call(e))},bC=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,FX([],HX(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 YX,qX,MC,LC=m(()=>{"use strict";M();K();YX=function(t,e,n,i){function a(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function r(c){try{l(i.next(c))}catch(f){o(f)}}function u(c){try{l(i.throw(c))}catch(f){o(f)}}function l(c){c.done?s(c.value):a(c.value).then(r,u)}l((i=i.apply(t,e||[])).next())})},qX=function(t,e){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,a,s,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 u([l,c])}}function u(l){if(i)throw new TypeError("Generator is already executing.");for(;n;)try{if(i=1,a&&(s=l[0]&2?a.return:l[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,l[1])).done)return s;switch(a=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=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(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){n.label=l[1];break}if(l[0]===6&&n.label<s[1]){n.label=s[1],s=l;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(l);break}s[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(c){l=[6,c],a=0}finally{i=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},MC=function(){function t(e){this._exporter=e,this._shutdownOnce=new On(this._shutdown,this),this._unresolvedExports=new Set}return t.prototype.forceFlush=function(){return YX(this,void 0,void 0,function(){return qX(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 s=function(){return ni._export(n._exporter,[e]).then(function(r){var u;r.code!==W.SUCCESS&&Te((u=r.error)!==null&&u!==void 0?u: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),s()},function(r){return Te(r)});o!=null&&this._unresolvedExports.add(o)}else s()}},t.prototype.shutdown=function(){return this._shutdownOnce.call()},t.prototype._shutdown=function(){return this._exporter.shutdown()},t}()});var kd={};Je(kd,{AlwaysOffSampler:()=>dr,AlwaysOnSampler:()=>Pt,BasicTracerProvider:()=>gC,BatchSpanProcessor:()=>Er,ConsoleSpanExporter:()=>RC,ForceFlushState:()=>Vt,InMemorySpanExporter:()=>bC,NoopSpanProcessor:()=>pl,ParentBasedSampler:()=>Yn,RandomIdGenerator:()=>jn,SamplingDecision:()=>dt,SimpleSpanProcessor:()=>MC,Span:()=>ol,TraceIdRatioBasedSampler:()=>mi,Tracer:()=>cl});var dl=m(()=>{"use strict";Vd();NC();ll();PC();xC();LC();Gd();il();al();Id();Cd();vi();Ld()});var yi=h((ope,IC)=>{"use strict";var jX="2.0.0",$X=Number.MAX_SAFE_INTEGER||9007199254740991,KX=16,WX=250,zX=["major","premajor","minor","preminor","patch","prepatch","prerelease"];IC.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:KX,MAX_SAFE_BUILD_LENGTH:WX,MAX_SAFE_INTEGER:$X,RELEASE_TYPES:zX,SEMVER_SPEC_VERSION:jX,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Ai=h((ipe,CC)=>{"use strict";var XX=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};CC.exports=XX});var $n=h((Bt,wC)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:Hd,MAX_SAFE_BUILD_LENGTH:JX,MAX_LENGTH:QX}=yi(),ZX=Ai();Bt=wC.exports={};var eJ=Bt.re=[],tJ=Bt.safeRe=[],R=Bt.src=[],P=Bt.t={},rJ=0,Fd="[a-zA-Z0-9-]",nJ=[["\\s",1],["\\d",QX],[Fd,JX]],oJ=t=>{for(let[e,n]of nJ)t=t.split(`${e}*`).join(`${e}{0,${n}}`).split(`${e}+`).join(`${e}{1,${n}}`);return t},U=(t,e,n)=>{let i=oJ(e),a=rJ++;ZX(t,a,e),P[t]=a,R[a]=e,eJ[a]=new RegExp(e,n?"g":void 0),tJ[a]=new RegExp(i,n?"g":void 0)};U("NUMERICIDENTIFIER","0|[1-9]\\d*");U("NUMERICIDENTIFIERLOOSE","\\d+");U("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${Fd}*`);U("MAINVERSION",`(${R[P.NUMERICIDENTIFIER]})\\.(${R[P.NUMERICIDENTIFIER]})\\.(${R[P.NUMERICIDENTIFIER]})`);U("MAINVERSIONLOOSE",`(${R[P.NUMERICIDENTIFIERLOOSE]})\\.(${R[P.NUMERICIDENTIFIERLOOSE]})\\.(${R[P.NUMERICIDENTIFIERLOOSE]})`);U("PRERELEASEIDENTIFIER",`(?:${R[P.NUMERICIDENTIFIER]}|${R[P.NONNUMERICIDENTIFIER]})`);U("PRERELEASEIDENTIFIERLOOSE",`(?:${R[P.NUMERICIDENTIFIERLOOSE]}|${R[P.NONNUMERICIDENTIFIER]})`);U("PRERELEASE",`(?:-(${R[P.PRERELEASEIDENTIFIER]}(?:\\.${R[P.PRERELEASEIDENTIFIER]})*))`);U("PRERELEASELOOSE",`(?:-?(${R[P.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${R[P.PRERELEASEIDENTIFIERLOOSE]})*))`);U("BUILDIDENTIFIER",`${Fd}+`);U("BUILD",`(?:\\+(${R[P.BUILDIDENTIFIER]}(?:\\.${R[P.BUILDIDENTIFIER]})*))`);U("FULLPLAIN",`v?${R[P.MAINVERSION]}${R[P.PRERELEASE]}?${R[P.BUILD]}?`);U("FULL",`^${R[P.FULLPLAIN]}$`);U("LOOSEPLAIN",`[v=\\s]*${R[P.MAINVERSIONLOOSE]}${R[P.PRERELEASELOOSE]}?${R[P.BUILD]}?`);U("LOOSE",`^${R[P.LOOSEPLAIN]}$`);U("GTLT","((?:<|>)?=?)");U("XRANGEIDENTIFIERLOOSE",`${R[P.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);U("XRANGEIDENTIFIER",`${R[P.NUMERICIDENTIFIER]}|x|X|\\*`);U("XRANGEPLAIN",`[v=\\s]*(${R[P.XRANGEIDENTIFIER]})(?:\\.(${R[P.XRANGEIDENTIFIER]})(?:\\.(${R[P.XRANGEIDENTIFIER]})(?:${R[P.PRERELEASE]})?${R[P.BUILD]}?)?)?`);U("XRANGEPLAINLOOSE",`[v=\\s]*(${R[P.XRANGEIDENTIFIERLOOSE]})(?:\\.(${R[P.XRANGEIDENTIFIERLOOSE]})(?:\\.(${R[P.XRANGEIDENTIFIERLOOSE]})(?:${R[P.PRERELEASELOOSE]})?${R[P.BUILD]}?)?)?`);U("XRANGE",`^${R[P.GTLT]}\\s*${R[P.XRANGEPLAIN]}$`);U("XRANGELOOSE",`^${R[P.GTLT]}\\s*${R[P.XRANGEPLAINLOOSE]}$`);U("COERCEPLAIN",`(^|[^\\d])(\\d{1,${Hd}})(?:\\.(\\d{1,${Hd}}))?(?:\\.(\\d{1,${Hd}}))?`);U("COERCE",`${R[P.COERCEPLAIN]}(?:$|[^\\d])`);U("COERCEFULL",R[P.COERCEPLAIN]+`(?:${R[P.PRERELEASE]})?(?:${R[P.BUILD]})?(?:$|[^\\d])`);U("COERCERTL",R[P.COERCE],!0);U("COERCERTLFULL",R[P.COERCEFULL],!0);U("LONETILDE","(?:~>?)");U("TILDETRIM",`(\\s*)${R[P.LONETILDE]}\\s+`,!0);Bt.tildeTrimReplace="$1~";U("TILDE",`^${R[P.LONETILDE]}${R[P.XRANGEPLAIN]}$`);U("TILDELOOSE",`^${R[P.LONETILDE]}${R[P.XRANGEPLAINLOOSE]}$`);U("LONECARET","(?:\\^)");U("CARETTRIM",`(\\s*)${R[P.LONECARET]}\\s+`,!0);Bt.caretTrimReplace="$1^";U("CARET",`^${R[P.LONECARET]}${R[P.XRANGEPLAIN]}$`);U("CARETLOOSE",`^${R[P.LONECARET]}${R[P.XRANGEPLAINLOOSE]}$`);U("COMPARATORLOOSE",`^${R[P.GTLT]}\\s*(${R[P.LOOSEPLAIN]})$|^$`);U("COMPARATOR",`^${R[P.GTLT]}\\s*(${R[P.FULLPLAIN]})$|^$`);U("COMPARATORTRIM",`(\\s*)${R[P.GTLT]}\\s*(${R[P.LOOSEPLAIN]}|${R[P.XRANGEPLAIN]})`,!0);Bt.comparatorTrimReplace="$1$2$3";U("HYPHENRANGE",`^\\s*(${R[P.XRANGEPLAIN]})\\s+-\\s+(${R[P.XRANGEPLAIN]})\\s*$`);U("HYPHENRANGELOOSE",`^\\s*(${R[P.XRANGEPLAINLOOSE]})\\s+-\\s+(${R[P.XRANGEPLAINLOOSE]})\\s*$`);U("STAR","(<|>)?=?\\s*\\*");U("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");U("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var El=h((ape,UC)=>{"use strict";var iJ=Object.freeze({loose:!0}),aJ=Object.freeze({}),sJ=t=>t?typeof t!="object"?iJ:t:aJ;UC.exports=sJ});var Yd=h((spe,BC)=>{"use strict";var DC=/^[0-9]+$/,VC=(t,e)=>{let n=DC.test(t),i=DC.test(e);return n&&i&&(t=+t,e=+e),t===e?0:n&&!i?-1:i&&!n?1:t<e?-1:1},uJ=(t,e)=>VC(e,t);BC.exports={compareIdentifiers:VC,rcompareIdentifiers:uJ}});var Le=h((upe,FC)=>{"use strict";var _l=Ai(),{MAX_LENGTH:GC,MAX_SAFE_INTEGER:Sl}=yi(),{safeRe:kC,t:HC}=$n(),lJ=El(),{compareIdentifiers:Kn}=Yd(),qd=class t{constructor(e,n){if(n=lJ(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>GC)throw new TypeError(`version is longer than ${GC} characters`);_l("SemVer",e,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let i=e.trim().match(n.loose?kC[HC.LOOSE]:kC[HC.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>Sl||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Sl||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Sl||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(a=>{if(/^[0-9]+$/.test(a)){let s=+a;if(s>=0&&s<Sl)return s}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(_l("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)),Kn(this.major,e.major)||Kn(this.minor,e.minor)||Kn(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(_l("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 Kn(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(_l("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 Kn(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 s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(n===this.prerelease.join(".")&&i===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(a)}}if(n){let s=[n,a];i===!1&&(s=[n]),Kn(this.prerelease[0],n)===0?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};FC.exports=qd});var Fr=h((lpe,qC)=>{"use strict";var YC=Le(),cJ=(t,e,n=!1)=>{if(t instanceof YC)return t;try{return new YC(t,e)}catch(i){if(!n)return null;throw i}};qC.exports=cJ});var $C=h((cpe,jC)=>{"use strict";var fJ=Fr(),pJ=(t,e)=>{let n=fJ(t,e);return n?n.version:null};jC.exports=pJ});var WC=h((fpe,KC)=>{"use strict";var dJ=Fr(),EJ=(t,e)=>{let n=dJ(t.trim().replace(/^[=v]+/,""),e);return n?n.version:null};KC.exports=EJ});var JC=h((ppe,XC)=>{"use strict";var zC=Le(),_J=(t,e,n,i,a)=>{typeof n=="string"&&(a=i,i=n,n=void 0);try{return new zC(t instanceof zC?t.version:t,n).inc(e,i,a).version}catch{return null}};XC.exports=_J});var ew=h((dpe,ZC)=>{"use strict";var QC=Fr(),SJ=(t,e)=>{let n=QC(t,null,!0),i=QC(e,null,!0),a=n.compare(i);if(a===0)return null;let s=a>0,o=s?n:i,r=s?i:n,u=!!o.prerelease.length;if(!!r.prerelease.length&&!u)return!r.patch&&!r.minor?"major":o.patch?"patch":o.minor?"minor":"major";let c=u?"pre":"";return n.major!==i.major?c+"major":n.minor!==i.minor?c+"minor":n.patch!==i.patch?c+"patch":"prerelease"};ZC.exports=SJ});var rw=h((Epe,tw)=>{"use strict";var hJ=Le(),TJ=(t,e)=>new hJ(t,e).major;tw.exports=TJ});var ow=h((_pe,nw)=>{"use strict";var vJ=Le(),mJ=(t,e)=>new vJ(t,e).minor;nw.exports=mJ});var aw=h((Spe,iw)=>{"use strict";var yJ=Le(),AJ=(t,e)=>new yJ(t,e).patch;iw.exports=AJ});var uw=h((hpe,sw)=>{"use strict";var OJ=Fr(),gJ=(t,e)=>{let n=OJ(t,e);return n&&n.prerelease.length?n.prerelease:null};sw.exports=gJ});var nt=h((Tpe,cw)=>{"use strict";var lw=Le(),NJ=(t,e,n)=>new lw(t,n).compare(new lw(e,n));cw.exports=NJ});var pw=h((vpe,fw)=>{"use strict";var RJ=nt(),PJ=(t,e,n)=>RJ(e,t,n);fw.exports=PJ});var Ew=h((mpe,dw)=>{"use strict";var bJ=nt(),xJ=(t,e)=>bJ(t,e,!0);dw.exports=xJ});var hl=h((ype,Sw)=>{"use strict";var _w=Le(),MJ=(t,e,n)=>{let i=new _w(t,n),a=new _w(e,n);return i.compare(a)||i.compareBuild(a)};Sw.exports=MJ});var Tw=h((Ape,hw)=>{"use strict";var LJ=hl(),IJ=(t,e)=>t.sort((n,i)=>LJ(n,i,e));hw.exports=IJ});var mw=h((Ope,vw)=>{"use strict";var CJ=hl(),wJ=(t,e)=>t.sort((n,i)=>CJ(i,n,e));vw.exports=wJ});var Oi=h((gpe,yw)=>{"use strict";var UJ=nt(),DJ=(t,e,n)=>UJ(t,e,n)>0;yw.exports=DJ});var Tl=h((Npe,Aw)=>{"use strict";var VJ=nt(),BJ=(t,e,n)=>VJ(t,e,n)<0;Aw.exports=BJ});var jd=h((Rpe,Ow)=>{"use strict";var GJ=nt(),kJ=(t,e,n)=>GJ(t,e,n)===0;Ow.exports=kJ});var $d=h((Ppe,gw)=>{"use strict";var HJ=nt(),FJ=(t,e,n)=>HJ(t,e,n)!==0;gw.exports=FJ});var vl=h((bpe,Nw)=>{"use strict";var YJ=nt(),qJ=(t,e,n)=>YJ(t,e,n)>=0;Nw.exports=qJ});var ml=h((xpe,Rw)=>{"use strict";var jJ=nt(),$J=(t,e,n)=>jJ(t,e,n)<=0;Rw.exports=$J});var Kd=h((Mpe,Pw)=>{"use strict";var KJ=jd(),WJ=$d(),zJ=Oi(),XJ=vl(),JJ=Tl(),QJ=ml(),ZJ=(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 KJ(t,n,i);case"!=":return WJ(t,n,i);case">":return zJ(t,n,i);case">=":return XJ(t,n,i);case"<":return JJ(t,n,i);case"<=":return QJ(t,n,i);default:throw new TypeError(`Invalid operator: ${e}`)}};Pw.exports=ZJ});var xw=h((Lpe,bw)=>{"use strict";var e9=Le(),t9=Fr(),{safeRe:yl,t:Al}=$n(),r9=(t,e)=>{if(t instanceof e9)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?yl[Al.COERCEFULL]:yl[Al.COERCE]);else{let u=e.includePrerelease?yl[Al.COERCERTLFULL]:yl[Al.COERCERTL],l;for(;(l=u.exec(t))&&(!n||n.index+n[0].length!==t.length);)(!n||l.index+l[0].length!==n.index+n[0].length)&&(n=l),u.lastIndex=l.index+l[1].length+l[2].length;u.lastIndex=-1}if(n===null)return null;let i=n[2],a=n[3]||"0",s=n[4]||"0",o=e.includePrerelease&&n[5]?`-${n[5]}`:"",r=e.includePrerelease&&n[6]?`+${n[6]}`:"";return t9(`${i}.${a}.${s}${o}${r}`,e)};bw.exports=r9});var Lw=h((Ipe,Mw)=>{"use strict";var Wd=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}};Mw.exports=Wd});var ot=h((Cpe,Uw)=>{"use strict";var n9=/\s+/g,zd=class t{constructor(e,n){if(n=i9(n),e instanceof t)return e.loose===!!n.loose&&e.includePrerelease===!!n.includePrerelease?e:new t(e.raw,n);if(e instanceof Xd)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(n9," "),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=>!Cw(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&&p9(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&&c9)|(this.options.loose&&f9))+":"+e,a=Iw.get(i);if(a)return a;let s=this.options.loose,o=s?We[Ge.HYPHENRANGELOOSE]:We[Ge.HYPHENRANGE];e=e.replace(o,A9(this.options.includePrerelease)),te("hyphen replace",e),e=e.replace(We[Ge.COMPARATORTRIM],s9),te("comparator trim",e),e=e.replace(We[Ge.TILDETRIM],u9),te("tilde trim",e),e=e.replace(We[Ge.CARETTRIM],l9),te("caret trim",e);let r=e.split(" ").map(f=>d9(f,this.options)).join(" ").split(/\s+/).map(f=>y9(f,this.options));s&&(r=r.filter(f=>(te("loose invalid filter",f,this.options),!!f.match(We[Ge.COMPARATORLOOSE])))),te("range list",r);let u=new Map,l=r.map(f=>new Xd(f,this.options));for(let f of l){if(Cw(f))return[f];u.set(f.value,f)}u.size>1&&u.has("")&&u.delete("");let c=[...u.values()];return Iw.set(i,c),c}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(i=>ww(i,n)&&e.set.some(a=>ww(a,n)&&i.every(s=>a.every(o=>s.intersects(o,n)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new a9(e,this.options)}catch{return!1}for(let n=0;n<this.set.length;n++)if(O9(this.set[n],e,this.options))return!0;return!1}};Uw.exports=zd;var o9=Lw(),Iw=new o9,i9=El(),Xd=gi(),te=Ai(),a9=Le(),{safeRe:We,t:Ge,comparatorTrimReplace:s9,tildeTrimReplace:u9,caretTrimReplace:l9}=$n(),{FLAG_INCLUDE_PRERELEASE:c9,FLAG_LOOSE:f9}=yi(),Cw=t=>t.value==="<0.0.0-0",p9=t=>t.value==="",ww=(t,e)=>{let n=!0,i=t.slice(),a=i.pop();for(;n&&i.length;)n=i.every(s=>a.intersects(s,e)),a=i.pop();return n},d9=(t,e)=>(te("comp",t,e),t=S9(t,e),te("caret",t),t=E9(t,e),te("tildes",t),t=T9(t,e),te("xrange",t),t=m9(t,e),te("stars",t),t),ke=t=>!t||t.toLowerCase()==="x"||t==="*",E9=(t,e)=>t.trim().split(/\s+/).map(n=>_9(n,e)).join(" "),_9=(t,e)=>{let n=e.loose?We[Ge.TILDELOOSE]:We[Ge.TILDE];return t.replace(n,(i,a,s,o,r)=>{te("tilde",t,i,a,s,o,r);let u;return ke(a)?u="":ke(s)?u=`>=${a}.0.0 <${+a+1}.0.0-0`:ke(o)?u=`>=${a}.${s}.0 <${a}.${+s+1}.0-0`:r?(te("replaceTilde pr",r),u=`>=${a}.${s}.${o}-${r} <${a}.${+s+1}.0-0`):u=`>=${a}.${s}.${o} <${a}.${+s+1}.0-0`,te("tilde return",u),u})},S9=(t,e)=>t.trim().split(/\s+/).map(n=>h9(n,e)).join(" "),h9=(t,e)=>{te("caret",t,e);let n=e.loose?We[Ge.CARETLOOSE]:We[Ge.CARET],i=e.includePrerelease?"-0":"";return t.replace(n,(a,s,o,r,u)=>{te("caret",t,a,s,o,r,u);let l;return ke(s)?l="":ke(o)?l=`>=${s}.0.0${i} <${+s+1}.0.0-0`:ke(r)?s==="0"?l=`>=${s}.${o}.0${i} <${s}.${+o+1}.0-0`:l=`>=${s}.${o}.0${i} <${+s+1}.0.0-0`:u?(te("replaceCaret pr",u),s==="0"?o==="0"?l=`>=${s}.${o}.${r}-${u} <${s}.${o}.${+r+1}-0`:l=`>=${s}.${o}.${r}-${u} <${s}.${+o+1}.0-0`:l=`>=${s}.${o}.${r}-${u} <${+s+1}.0.0-0`):(te("no pr"),s==="0"?o==="0"?l=`>=${s}.${o}.${r}${i} <${s}.${o}.${+r+1}-0`:l=`>=${s}.${o}.${r}${i} <${s}.${+o+1}.0-0`:l=`>=${s}.${o}.${r} <${+s+1}.0.0-0`),te("caret return",l),l})},T9=(t,e)=>(te("replaceXRanges",t,e),t.split(/\s+/).map(n=>v9(n,e)).join(" ")),v9=(t,e)=>{t=t.trim();let n=e.loose?We[Ge.XRANGELOOSE]:We[Ge.XRANGE];return t.replace(n,(i,a,s,o,r,u)=>{te("xRange",t,i,a,s,o,r,u);let l=ke(s),c=l||ke(o),f=c||ke(r),_=f;return a==="="&&_&&(a=""),u=e.includePrerelease?"-0":"",l?a===">"||a==="<"?i="<0.0.0-0":i="*":a&&_?(c&&(o=0),r=0,a===">"?(a=">=",c?(s=+s+1,o=0,r=0):(o=+o+1,r=0)):a==="<="&&(a="<",c?s=+s+1:o=+o+1),a==="<"&&(u="-0"),i=`${a+s}.${o}.${r}${u}`):c?i=`>=${s}.0.0${u} <${+s+1}.0.0-0`:f&&(i=`>=${s}.${o}.0${u} <${s}.${+o+1}.0-0`),te("xRange return",i),i})},m9=(t,e)=>(te("replaceStars",t,e),t.trim().replace(We[Ge.STAR],"")),y9=(t,e)=>(te("replaceGTE0",t,e),t.trim().replace(We[e.includePrerelease?Ge.GTE0PRE:Ge.GTE0],"")),A9=t=>(e,n,i,a,s,o,r,u,l,c,f,_)=>(ke(i)?n="":ke(a)?n=`>=${i}.0.0${t?"-0":""}`:ke(s)?n=`>=${i}.${a}.0${t?"-0":""}`:o?n=`>=${n}`:n=`>=${n}${t?"-0":""}`,ke(l)?u="":ke(c)?u=`<${+l+1}.0.0-0`:ke(f)?u=`<${l}.${+c+1}.0-0`:_?u=`<=${l}.${c}.${f}-${_}`:t?u=`<${l}.${c}.${+f+1}-0`:u=`<=${u}`,`${n} ${u}`.trim()),O9=(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!==Xd.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 gi=h((wpe,Hw)=>{"use strict";var Ni=Symbol("SemVer ANY"),Zd=class t{static get ANY(){return Ni}constructor(e,n){if(n=Dw(n),e instanceof t){if(e.loose===!!n.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),Qd("comparator",e,n),this.options=n,this.loose=!!n.loose,this.parse(e),this.semver===Ni?this.value="":this.value=this.operator+this.semver.version,Qd("comp",this)}parse(e){let n=this.options.loose?Vw[Bw.COMPARATORLOOSE]:Vw[Bw.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 Gw(i[2],this.options.loose):this.semver=Ni}toString(){return this.value}test(e){if(Qd("Comparator.test",e,this.options.loose),this.semver===Ni||e===Ni)return!0;if(typeof e=="string")try{e=new Gw(e,this.options)}catch{return!1}return Jd(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 kw(e.value,n).test(this.value):e.operator===""?e.value===""?!0:new kw(this.value,n).test(e.semver):(n=Dw(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("=")||Jd(this.semver,"<",e.semver,n)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||Jd(this.semver,">",e.semver,n)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};Hw.exports=Zd;var Dw=El(),{safeRe:Vw,t:Bw}=$n(),Jd=Kd(),Qd=Ai(),Gw=Le(),kw=ot()});var Ri=h((Upe,Fw)=>{"use strict";var g9=ot(),N9=(t,e,n)=>{try{e=new g9(e,n)}catch{return!1}return e.test(t)};Fw.exports=N9});var qw=h((Dpe,Yw)=>{"use strict";var R9=ot(),P9=(t,e)=>new R9(t,e).set.map(n=>n.map(i=>i.value).join(" ").trim().split(" "));Yw.exports=P9});var $w=h((Vpe,jw)=>{"use strict";var b9=Le(),x9=ot(),M9=(t,e,n)=>{let i=null,a=null,s=null;try{s=new x9(e,n)}catch{return null}return t.forEach(o=>{s.test(o)&&(!i||a.compare(o)===-1)&&(i=o,a=new b9(i,n))}),i};jw.exports=M9});var Ww=h((Bpe,Kw)=>{"use strict";var L9=Le(),I9=ot(),C9=(t,e,n)=>{let i=null,a=null,s=null;try{s=new I9(e,n)}catch{return null}return t.forEach(o=>{s.test(o)&&(!i||a.compare(o)===1)&&(i=o,a=new L9(i,n))}),i};Kw.exports=C9});var Jw=h((Gpe,Xw)=>{"use strict";var eE=Le(),w9=ot(),zw=Oi(),U9=(t,e)=>{t=new w9(t,e);let n=new eE("0.0.0");if(t.test(n)||(n=new eE("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],s=null;a.forEach(o=>{let r=new eE(o.semver.version);switch(o.operator){case">":r.prerelease.length===0?r.patch++:r.prerelease.push(0),r.raw=r.format();case"":case">=":(!s||zw(r,s))&&(s=r);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),s&&(!n||zw(n,s))&&(n=s)}return n&&t.test(n)?n:null};Xw.exports=U9});var Zw=h((kpe,Qw)=>{"use strict";var D9=ot(),V9=(t,e)=>{try{return new D9(t,e).range||"*"}catch{return null}};Qw.exports=V9});var Ol=h((Hpe,nU)=>{"use strict";var B9=Le(),rU=gi(),{ANY:G9}=rU,k9=ot(),H9=Ri(),eU=Oi(),tU=Tl(),F9=ml(),Y9=vl(),q9=(t,e,n,i)=>{t=new B9(t,i),e=new k9(e,i);let a,s,o,r,u;switch(n){case">":a=eU,s=F9,o=tU,r=">",u=">=";break;case"<":a=tU,s=Y9,o=eU,r="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(H9(t,e,i))return!1;for(let l=0;l<e.set.length;++l){let c=e.set[l],f=null,_=null;if(c.forEach(p=>{p.semver===G9&&(p=new rU(">=0.0.0")),f=f||p,_=_||p,a(p.semver,f.semver,i)?f=p:o(p.semver,_.semver,i)&&(_=p)}),f.operator===r||f.operator===u||(!_.operator||_.operator===r)&&s(t,_.semver))return!1;if(_.operator===u&&o(t,_.semver))return!1}return!0};nU.exports=q9});var iU=h((Fpe,oU)=>{"use strict";var j9=Ol(),$9=(t,e,n)=>j9(t,e,">",n);oU.exports=$9});var sU=h((Ype,aU)=>{"use strict";var K9=Ol(),W9=(t,e,n)=>K9(t,e,"<",n);aU.exports=W9});var cU=h((qpe,lU)=>{"use strict";var uU=ot(),z9=(t,e,n)=>(t=new uU(t,n),e=new uU(e,n),t.intersects(e,n));lU.exports=z9});var pU=h((jpe,fU)=>{"use strict";var X9=Ri(),J9=nt();fU.exports=(t,e,n)=>{let i=[],a=null,s=null,o=t.sort((c,f)=>J9(c,f,n));for(let c of o)X9(c,e,n)?(s=c,a||(a=c)):(s&&i.push([a,s]),s=null,a=null);a&&i.push([a,null]);let r=[];for(let[c,f]of i)c===f?r.push(c):!f&&c===o[0]?r.push("*"):f?c===o[0]?r.push(`<=${f}`):r.push(`${c} - ${f}`):r.push(`>=${c}`);let u=r.join(" || "),l=typeof e.raw=="string"?e.raw:String(e);return u.length<l.length?u:e}});var TU=h(($pe,hU)=>{"use strict";var dU=ot(),rE=gi(),{ANY:tE}=rE,Pi=Ri(),nE=nt(),Q9=(t,e,n={})=>{if(t===e)return!0;t=new dU(t,n),e=new dU(e,n);let i=!1;e:for(let a of t.set){for(let s of e.set){let o=e7(a,s,n);if(i=i||o!==null,o)continue e}if(i)return!1}return!0},Z9=[new rE(">=0.0.0-0")],EU=[new rE(">=0.0.0")],e7=(t,e,n)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===tE){if(e.length===1&&e[0].semver===tE)return!0;n.includePrerelease?t=Z9:t=EU}if(e.length===1&&e[0].semver===tE){if(n.includePrerelease)return!0;e=EU}let i=new Set,a,s;for(let p of t)p.operator===">"||p.operator===">="?a=_U(a,p,n):p.operator==="<"||p.operator==="<="?s=SU(s,p,n):i.add(p.semver);if(i.size>1)return null;let o;if(a&&s){if(o=nE(a.semver,s.semver,n),o>0)return null;if(o===0&&(a.operator!==">="||s.operator!=="<="))return null}for(let p of i){if(a&&!Pi(p,String(a),n)||s&&!Pi(p,String(s),n))return null;for(let S of e)if(!Pi(p,String(S),n))return!1;return!0}let r,u,l,c,f=s&&!n.includePrerelease&&s.semver.prerelease.length?s.semver:!1,_=a&&!n.includePrerelease&&a.semver.prerelease.length?a.semver:!1;f&&f.prerelease.length===1&&s.operator==="<"&&f.prerelease[0]===0&&(f=!1);for(let p of e){if(c=c||p.operator===">"||p.operator===">=",l=l||p.operator==="<"||p.operator==="<=",a){if(_&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===_.major&&p.semver.minor===_.minor&&p.semver.patch===_.patch&&(_=!1),p.operator===">"||p.operator===">="){if(r=_U(a,p,n),r===p&&r!==a)return!1}else if(a.operator===">="&&!Pi(a.semver,String(p),n))return!1}if(s){if(f&&p.semver.prerelease&&p.semver.prerelease.length&&p.semver.major===f.major&&p.semver.minor===f.minor&&p.semver.patch===f.patch&&(f=!1),p.operator==="<"||p.operator==="<="){if(u=SU(s,p,n),u===p&&u!==s)return!1}else if(s.operator==="<="&&!Pi(s.semver,String(p),n))return!1}if(!p.operator&&(s||a)&&o!==0)return!1}return!(a&&l&&!s&&o!==0||s&&c&&!a&&o!==0||_||f)},_U=(t,e,n)=>{if(!t)return e;let i=nE(t.semver,e.semver,n);return i>0?t:i<0||e.operator===">"&&t.operator===">="?e:t},SU=(t,e,n)=>{if(!t)return e;let i=nE(t.semver,e.semver,n);return i<0?t:i>0||e.operator==="<"&&t.operator==="<="?e:t};hU.exports=Q9});var AU=h((Kpe,yU)=>{"use strict";var oE=$n(),vU=yi(),t7=Le(),mU=Yd(),r7=Fr(),n7=$C(),o7=WC(),i7=JC(),a7=ew(),s7=rw(),u7=ow(),l7=aw(),c7=uw(),f7=nt(),p7=pw(),d7=Ew(),E7=hl(),_7=Tw(),S7=mw(),h7=Oi(),T7=Tl(),v7=jd(),m7=$d(),y7=vl(),A7=ml(),O7=Kd(),g7=xw(),N7=gi(),R7=ot(),P7=Ri(),b7=qw(),x7=$w(),M7=Ww(),L7=Jw(),I7=Zw(),C7=Ol(),w7=iU(),U7=sU(),D7=cU(),V7=pU(),B7=TU();yU.exports={parse:r7,valid:n7,clean:o7,inc:i7,diff:a7,major:s7,minor:u7,patch:l7,prerelease:c7,compare:f7,rcompare:p7,compareLoose:d7,compareBuild:E7,sort:_7,rsort:S7,gt:h7,lt:T7,eq:v7,neq:m7,gte:y7,lte:A7,cmp:O7,coerce:g7,Comparator:N7,Range:R7,satisfies:P7,toComparators:b7,maxSatisfying:x7,minSatisfying:M7,minVersion:L7,validRange:I7,outside:C7,gtr:w7,ltr:U7,intersects:D7,simplifyRange:V7,subset:B7,SemVer:t7,re:oE.re,src:oE.src,tokens:oE.t,SEMVER_SPEC_VERSION:vU.SEMVER_SPEC_VERSION,RELEASE_TYPES:vU.RELEASE_TYPES,compareIdentifiers:mU.compareIdentifiers,rcompareIdentifiers:mU.rcompareIdentifiers}});function k7(t){var e=decodeURIComponent(t).split(":");if(e.length!==4)return null;var n=gU(e,4),i=n[0],a=n[1],s=n[3],o=i.padStart(32,"0"),r=a.padStart(16,"0"),u=G7.test(s)?parseInt(s,16)&1:1;return{traceId:o,spanId:r,isRemote:!0,traceFlags:u}}var OU,gU,iE,gl,NU,G7,RU=m(()=>{"use strict";M();K();OU=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.")},gU=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),a,s=[],o;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)s.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 s},iE="uber-trace-id",gl="uberctx",NU=function(){function t(e){typeof e=="string"?(this._jaegerTraceHeader=e,this._jaegerBaggageHeaderPrefix=gl):(this._jaegerTraceHeader=e?.customTraceHeader||iE,this._jaegerBaggageHeaderPrefix=e?.customBaggageHeaderPrefix||gl)}return t.prototype.inject=function(e,n,i){var a,s,o=J.getSpanContext(e),r=at.getBaggage(e);if(o&&xe(e)===!1){var u="0"+(o.traceFlags||Q.NONE).toString(16);i.set(n,this._jaegerTraceHeader,o.traceId+":"+o.spanId+":0:"+u)}if(r)try{for(var l=OU(r.getAllEntries()),c=l.next();!c.done;c=l.next()){var f=gU(c.value,2),_=f[0],p=f[1];i.set(n,this._jaegerBaggageHeaderPrefix+"-"+_,encodeURIComponent(p.value))}}catch(S){a={error:S}}finally{try{c&&!c.done&&(s=l.return)&&s.call(l)}finally{if(a)throw a.error}}},t.prototype.extract=function(e,n,i){var a,s,o=this,r,u=i.get(n,this._jaegerTraceHeader),l=Array.isArray(u)?u[0]:u,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}}),f=e;if(typeof l=="string"){var _=k7(l);_&&(f=J.setSpanContext(f,_))}if(c.length===0)return f;var p=(r=at.getBaggage(e))!==null&&r!==void 0?r:at.createBaggage();try{for(var S=OU(c),v=S.next();!v.done;v=S.next()){var T=v.value;T.value!==void 0&&(p=p.setEntry(T.key,{value:decodeURIComponent(T.value)}))}}catch(A){a={error:A}}finally{try{v&&!v.done&&(s=S.return)&&s.call(S)}finally{if(a)throw a.error}}return f=at.setBaggage(f,p),f},t.prototype.fields=function(){return[this._jaegerTraceHeader]},t}(),G7=/^[0-9a-f]{1,2}$/i});var PU={};Je(PU,{JaegerPropagator:()=>NU,UBER_BAGGAGE_HEADER_PREFIX:()=>gl,UBER_TRACE_ID_HEADER:()=>iE});var bU=m(()=>{"use strict";RU()});var LU=h(Pl=>{"use strict";Object.defineProperty(Pl,"__esModule",{value:!0});Pl.NodeTracerProvider=void 0;var xU=eC(),Nl=(lC(),Y(uC)),MU=(dl(),Y(kd)),H7=AU(),F7=(bU(),Y(PU)),Rl=class extends MU.BasicTracerProvider{constructor(e={}){super(e)}register(e={}){if(e.contextManager===void 0){let n=H7.gte(process.version,"14.8.0")?xU.AsyncLocalStorageContextManager:xU.AsyncHooksContextManager;e.contextManager=new n,e.contextManager.enable()}super.register(e)}};Pl.NodeTracerProvider=Rl;Rl._registeredPropagators=new Map([...MU.BasicTracerProvider._registeredPropagators,["b3",()=>new Nl.B3Propagator({injectEncoding:Nl.B3InjectEncoding.SINGLE_HEADER})],["b3multi",()=>new Nl.B3Propagator({injectEncoding:Nl.B3InjectEncoding.MULTI_HEADER})],["jaeger",()=>new F7.JaegerPropagator]])});var IU=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 Y7=LU();Object.defineProperty(q,"NodeTracerProvider",{enumerable:!0,get:function(){return Y7.NodeTracerProvider}});var He=(dl(),Y(kd));Object.defineProperty(q,"AlwaysOffSampler",{enumerable:!0,get:function(){return He.AlwaysOffSampler}});Object.defineProperty(q,"AlwaysOnSampler",{enumerable:!0,get:function(){return He.AlwaysOnSampler}});Object.defineProperty(q,"BasicTracerProvider",{enumerable:!0,get:function(){return He.BasicTracerProvider}});Object.defineProperty(q,"BatchSpanProcessor",{enumerable:!0,get:function(){return He.BatchSpanProcessor}});Object.defineProperty(q,"ConsoleSpanExporter",{enumerable:!0,get:function(){return He.ConsoleSpanExporter}});Object.defineProperty(q,"ForceFlushState",{enumerable:!0,get:function(){return He.ForceFlushState}});Object.defineProperty(q,"InMemorySpanExporter",{enumerable:!0,get:function(){return He.InMemorySpanExporter}});Object.defineProperty(q,"NoopSpanProcessor",{enumerable:!0,get:function(){return He.NoopSpanProcessor}});Object.defineProperty(q,"ParentBasedSampler",{enumerable:!0,get:function(){return He.ParentBasedSampler}});Object.defineProperty(q,"RandomIdGenerator",{enumerable:!0,get:function(){return He.RandomIdGenerator}});Object.defineProperty(q,"SamplingDecision",{enumerable:!0,get:function(){return He.SamplingDecision}});Object.defineProperty(q,"SimpleSpanProcessor",{enumerable:!0,get:function(){return He.SimpleSpanProcessor}});Object.defineProperty(q,"Span",{enumerable:!0,get:function(){return He.Span}});Object.defineProperty(q,"TraceIdRatioBasedSampler",{enumerable:!0,get:function(){return He.TraceIdRatioBasedSampler}});Object.defineProperty(q,"Tracer",{enumerable:!0,get:function(){return He.Tracer}})});var wU=h(bl=>{"use strict";Object.defineProperty(bl,"__esModule",{value:!0});bl.OTLPTraceExporter=void 0;var CU=hd(),q7=(Iu(),Y(fd)),j7=(fi(),Y(mu)),aE=class extends j7.OTLPExporterBase{constructor(e={}){super((0,CU.createOtlpGrpcExportDelegate)((0,CU.convertLegacyOtlpGrpcOptions)(e,"TRACES"),q7.ProtobufTraceSerializer,"TraceExportService","/opentelemetry.proto.collector.trace.v1.TraceService/Export"))}};bl.OTLPTraceExporter=aE});var UU=h(Yr=>{"use strict";var $7=Yr&&Yr.__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]}),K7=Yr&&Yr.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&$7(e,t,n)};Object.defineProperty(Yr,"__esModule",{value:!0});K7(wU(),Yr)});var HU=Re($l(),1),FU=Re(Jn(),1);import z7 from"path";function J1(t){return typeof t=="object"&&t!==null}function Q1(t){return J1(t)&&typeof t.length=="number"}function Z1(t){return Array.isArray(t)?t:t===void 0?[]:Q1(t)||t instanceof Set?Array.from(t):[t]}var Mt=Z1;function eV(t,e,...n){let i=[];if(!Array.isArray(t))throw new Error("Input must be an array");for(let[a,s]of t.entries()){let o=[];n.forEach(r=>{typeof r=="function"?o=o.concat(r(s)):o.push(r)}),e(s)&&i.push({index:a,replaceWithValue:o})}for(let a of i.reverse()){let s=[a.index,1].concat(a.replaceWithValue);t.splice.apply(t,s)}return t}var ki=eV;var ce={short:/^-([^\d-])$/,long:/^--(\S+)/,combinedShort:/^-[^\d-]{2,}$/,optEquals:/^(--\S+?)=(.*)/},Hi=class extends Array{load(e){if(this.clear(),e&&e!==process.argv)e=Mt(e);else{e=process.argv.slice(0);let n=process.execArgv.some(nV)?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()&&ki(this,ce.combinedShort,tV)}hasCombinedShortOptions(){return this.some(e=>ce.combinedShort.test(e))}static from(e){let n=new this;return n.load(e),n}};function tV(t){return t=t.slice(1),t.split("").map(e=>"-"+e)}function Fi(t){return ce.optEquals.test(t)}function io(t){return(ce.short.test(t)||ce.long.test(t))&&!ce.optEquals.test(t)}function rV(t){return ce.long.test(t)&&!Fi(t)}function Kl(t){return ce.short.test(t)?t.match(ce.short)[1]:rV(t)?t.match(ce.long)[1]:Fi(t)?t.match(ce.optEquals)[1].replace(/^--/,""):null}function hS(t){return!(io(t)||ce.combinedShort.test(t)||ce.optEquals.test(t))}function nV(t){return["--eval","-e"].indexOf(t)>-1||t.startsWith("--eval=")}function oV(t){return!isNaN(parseFloat(t))}function iV(t){return!isNaN(parseFloat(t))&&isFinite(t)}function aV(t){return t!==null&&typeof t=="object"&&t.constructor===Object}function sV(t){return vS(t)&&typeof t.length=="number"}function vS(t){return typeof t=="object"&&t!==null}function ao(t){return typeof t<"u"}function uV(t){return!ao(t)}function mS(t){return t===null}function lV(t){return ao(t)&&!mS(t)&&!Number.isNaN(t)}function cV(t){return typeof t=="function"?/^class /.test(Function.prototype.toString.call(t)):!1}function fV(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 pV(t){if(t){let e=ao(Promise)&&t instanceof Promise,n=t.then&&typeof t.then=="function";return!!(e||n)}else return!1}function dV(t){return t===null||!ao(t)?!1:typeof t[Symbol.iterator]=="function"||typeof t[Symbol.asyncIterator]=="function"}function EV(t){return typeof t=="string"}function _V(t){return typeof t=="function"}function SV(t){return typeof t=="function"&&t.constructor.name==="AsyncFunction"}var Se={isNumber:oV,isFiniteNumber:iV,isPlainObject:aV,isArrayLike:sV,isObject:vS,isDefined:ao,isUndefined:uV,isNull:mS,isDefinedValue:lV,isClass:cV,isPrimitive:fV,isPromise:pV,isIterable:dV,isString:EV,isFunction:_V,isAsyncFunction:SV};var Wl=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)}},so=Wl;var zl=class extends Array{validate(e){this.some(_=>!_.name)&&Lt("INVALID_DEFINITIONS","Invalid option definitions: the `name` property is required on each definition"),this.some(_=>_.type&&typeof _.type!="function")&&Lt("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)))&&Lt("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))&&Lt("INVALID_DEFINITIONS","Invalid option definition: an alias must be a single character"),this.some(_=>(a=_,_.alias==="-"))&&Lt("INVALID_DEFINITIONS",'Invalid option definition: an alias cannot be "-"'),AS(this.map(_=>e?_.name.toLowerCase():_.name))&&Lt("INVALID_DEFINITIONS","Two or more option definitions have the same name"),AS(this.map(_=>e&&Se.isDefined(_.alias)?_.alias.toLowerCase():_.alias))&&Lt("INVALID_DEFINITIONS","Two or more option definitions have the same alias"),this.filter(_=>_.defaultOption===!0).length>1&&Lt("INVALID_DEFINITIONS","Only one option definition can be the defaultOption"),this.some(_=>(a=_,_.isBoolean()&&_.defaultOption))&&Lt("INVALID_DEFINITIONS",`A boolean option ["${a.name}"] can not also be the defaultOption.`)}get(e,n){if(io(e))if(ce.short.test(e)){let i=Kl(e);if(n){let a=i.toLowerCase();return this.find(s=>Se.isDefined(s.alias)&&s.alias.toLowerCase()===a)}else return this.find(a=>a.alias===i)}else{let i=Kl(e);if(n){let a=i.toLowerCase();return this.find(s=>s.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(yS)}whereNotGrouped(){return this.filter(e=>!yS(e))}whereDefaultValueSet(){return this.filter(e=>Se.isDefined(e.defaultValue))}static from(e,n){if(e instanceof this)return e;let i=super.from(Mt(e),a=>so.create(a));return i.validate(n),i}};function Lt(t,e){let n=new Error(e);throw n.name=t,n}function yS(t){return Mt(t.group).some(e=>e)}function AS(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 Jr=zl;var Xl=class{constructor(e,n){this.options=Object.assign({},n),this.definitions=Jr.from(e,this.options.caseInsensitive),this.argv=Hi.from(this.options.argv),this.argv.hasCombinedShortOptions()&&ki(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,s,o=!1,r=!1,u;for(let l of this.argv){if(Se.isPlainObject(l)&&(u=l.origArg,l=l.arg),r&&this.options.stopAtFirstUnknown){yield{event:"unknown_value",arg:l,name:"_unknown",value:void 0};continue}if(io(l))n=e.get(l,this.options.caseInsensitive),i=void 0,n?(i=n.isBoolean()?!0:null,s="set"):s="unknown_option";else if(Fi(l)){let f=l.match(ce.optEquals);n=e.get(f[1],this.options.caseInsensitive),n?n.isBoolean()?(yield{event:"unknown_value",arg:l,name:"_unknown",value:i,def:n},s="set",i=!0):(s="set",i=f[2]):s="unknown_option"}else hS(l)&&(n?(i=l,s="set"):(n=this.definitions.getDefault(),n&&!o?(i=l,s="set"):(s="unknown_value",n=void 0)));a=n?n.name:"_unknown";let c={event:s,arg:l,name:a,value:i,def:n};u&&(c.subArg=l,c.arg=u),yield c,a==="_unknown"&&(r=!0),n&&n.defaultOption&&!n.isMultiple()&&s==="set"&&(o=!0),n&&n.isBoolean()&&(n=void 0),n&&!n.multiple&&Se.isDefined(i)&&i!==null&&(n=void 0),i=void 0,s=void 0,a=void 0,u=void 0}}},OS=Xl;var Tr=new WeakMap,Yi=class{constructor(e){this.definition=new so(e),this.state=null,this.resetToDefault()}get(){return Tr.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?Tr.set(this,e):(Tr.set(this,i.type(e)),this.state=n)}resetToDefault(){Se.isDefined(this.definition.defaultValue)?this.definition.isMultiple()?Tr.set(this,Mt(this.definition.defaultValue).slice()):Tr.set(this,this.definition.defaultValue):this.definition.isMultiple()?Tr.set(this,[]):Tr.set(this,null),this.state="default"}static create(e){return e=new so(e),e.isBoolean()?Jl.create(e):new this(e)}},Jl=class extends Yi{set(e){super.set(!0)}static create(e){return new this(e)}},uo=Yi;var gS=Re(fE(),1),Ql=class extends Map{constructor(e){super(),this.definitions=Jr.from(e),this.set("_unknown",uo.create({name:"_unknown",multiple:!0}));for(let n of this.definitions.whereDefaultValueSet())this.set(n.name,uo.create(n))}toObject(e){e=e||{};let n={};for(let i of this){let a=e.camelCase&&i[0]!=="_unknown"?(0,gS.default)(i[0]):i[0],s=i[1];a==="_unknown"&&!s.get().length||(n[a]=s.get())}return e.skipUnknown&&delete n._unknown,n}},qi=Ql;var Zl=Re(fE(),1),ec=class extends qi{toObject(e){let n=super.toObject({skipUnknown:e.skipUnknown}),i=super.toObject(e),a=i._unknown;delete i._unknown;let s={_all:i};return a&&a.length&&(s._unknown=a),this.definitions.whereGrouped().forEach(o=>{let r=e.camelCase?(0,Zl.default)(o.name):o.name,u=n[o.name];for(let l of Mt(o.group))s[l]=s[l]||{},Se.isDefined(u)&&(s[l][r]=u)}),this.definitions.whereNotGrouped().forEach(o=>{let r=e.camelCase?(0,Zl.default)(o.name):o.name,u=n[o.name];Se.isDefined(u)&&(s._none||(s._none={}),s._none[r]=u)}),s}},NS=ec;function hV(t,e){e=e||{},e.stopAtFirstUnknown&&(e.partial=!0),t=Jr.from(t,e.caseInsensitive);let n=new OS(t,{argv:e.argv,stopAtFirstUnknown:e.stopAtFirstUnknown,caseInsensitive:e.caseInsensitive}),i=t.isGrouped()?NS:qi,a=new i(t);for(let s of n){let o=s.subArg||s.arg;if(!e.partial){if(s.event==="unknown_value"){let u=new Error(`Unknown value: ${o}`);throw u.name="UNKNOWN_VALUE",u.value=o,u}else if(s.event==="unknown_option"){let u=new Error(`Unknown option: ${o}`);throw u.name="UNKNOWN_OPTION",u.optionName=o,u}}let r;a.has(s.name)?r=a.get(s.name):(r=uo.create(s.def),a.set(s.name,r)),s.name==="_unknown"?r.set(o):r.set(s.value)}return a.toObject({skipUnknown:!e.partial,camelCase:e.camelCase})}var RS=hV;var YU=Re(WU(),1),qU=Re(zU(),1),jU=Re(eg(),1);import X7 from"http";import{Session as J7}from"node:inspector/promises";import{createRequire as vY}from"module";var lc=Re($l(),1);import Qi from"path";import uc from"os";var mY=vY(import.meta.url),tg=zn("2.54.0-rc.7"),yY=zn("2.55.0-rc.1"),AY=zn("2.55.0-rc.1"),Zi=new AE({max:1e4});function rg(t){let e=mY.resolve(t),n=Qi.dirname(e);for(;!lc.default.existsSync(Qi.join(n,"package.json"));)n=Qi.dirname(n);let i=lc.default.readFileSync(Qi.join(n,"package.json"),"utf-8");return JSON.parse(i)}var ea=class{constructor(e){this.instance=e;let n=rg("@sentio/sdk"),i=rg("@sentio/runtime");console.log("Runtime version:",i.version,"SDK version:",n.version),this.sdkVersion=zn(n.version)}instance;sdkVersion;async getConfig(e,n){let i=await this.instance.getConfig(e,n);if(i.executionConfig=lE.fromPartial(EE.execution),i.contractConfigs)for(let a of i.contractConfigs)Xn(this.sdkVersion,yY)<0&&a.fuelCallConfigs&&(a.fuelTransactionConfigs=a.fuelCallConfigs,a.fuelCallConfigs=void 0),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){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.sdkVersion.minor<=16&&(i.code===uc.constants.errno.ECONNRESET||i.code===uc.constants.errno.ECONNREFUSED||i.code===uc.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){let n=Xn(this.sdkVersion,AY)<0;if(e)switch(e.handlerType){case 20:Xn(this.sdkVersion,tg)<0&&(e.handlerType=13,e.data&&(e.data.fuelCall=e.data?.fuelTransaction));break;case 19:Xn(this.sdkVersion,tg)<0&&(e.handlerType=13,e.data&&(e.data.fuelCall=e.data?.fuelLog));break;case 6:let i=e.data?.aptEvent;if(i&&n&&i.rawTransaction){let c=JSON.parse(i.rawTransaction),f=`${c.hash}-${e.handlerIds[0]}`;if(Zi.has(f)){console.debug("skip binding",f),e.handlerType=0;return}Zi.set(f,!0),i.transaction=c,c.events?.length||(c.events=[JSON.parse(i.rawEvent)])}break;case 7:let a=e.data?.aptCall;a&&n&&a.rawTransaction&&(a.transaction=JSON.parse(a.rawTransaction));break;case 8:let s=e.data?.aptResource;s&&n&&s.rawResources&&(s.resources=s.rawResources.map(c=>JSON.parse(c)));break;case 3:let o=e.data?.suiEvent;if(o&&n&&o.rawTransaction){let c=JSON.parse(o.rawTransaction),f=`${c.digest}-${e.handlerIds[0]}`;if(Zi.has(f)){console.debug("skip binding",f),e.handlerType=0;return}Zi.set(f,!0),o.transaction=c,c.events?.length||(c.events=[JSON.parse(o.rawEvent)])}break;case 9:let r=e.data?.suiCall;r&&n&&r.rawTransaction&&(r.transaction=JSON.parse(r.rawTransaction));break;case 10:let u=e.data?.suiObject;u&&n&&(u.rawSelf||u.rawObjects)&&(u.rawSelf&&(u.self=JSON.parse(u.rawSelf)),u.objects=u.rawObjects.map(c=>JSON.parse(c)));break;case 12:let l=e.data?.suiObjectChange;l&&n&&l.rawChanges&&(l.changes=l.rawChanges.map(c=>JSON.parse(c)));break;case 0:break;default:break}}};import("node:process").then(t=>t.stdout.write(""));var gt=Re(S0(),1);function h0(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 T0(t,e){let n={transform:a=>{let s=[];typeof a.message=="object"?s.push(h0(a.message)):s.push(a.message);let o=a[Symbol.for("splat")];if(o)for(let r in o){let u=o[r];typeof u=="object"?s.push(h0(u)):s.push(u)}return a.message=s.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(""));Ds();Mn();var DU=Re(KI(),1),VU=Re(JI(),1),sE=Re(IU(),1),BU=Re(UU(),1);dl();M();async function GU(t){t&&g.setLogger(new SE,it.DEBUG);let e=await Us.detect(),n=new li({resource:e,readers:[new tu({exporter:new DU.OTLPMetricExporter}),new VU.PrometheusExporter({host:"0.0.0.0",port:4041})]}),i=new sE.NodeTracerProvider({resource:e}),a=new BU.OTLPTraceExporter,s=new Er(a);i.addSpanProcessor(s),xi.setGlobalMeterProvider(n),J.setGlobalTracerProvider(i),["SIGINT","SIGTERM"].forEach(o=>{process.on(o,()=>W7())}),xi.getMeter("processor").createGauge("up").record(1)}async function W7(){let t=J.getTracerProvider();if(t instanceof vE){let n=t.getDelegate();n instanceof sE.NodeTracerProvider&&n.shutdown().catch(console.error)}let e=xi.getMeterProvider();e instanceof li&&e.shutdown().catch(console.error)}import("node:process").then(t=>t.stdout.write(""));var xl=class{constructor(e){this.loader=e}async listen(e){let n=Ml.INSTANCE;await this.loader(),await n.configure(uE.create()),console.log("Starting Action Server at:",e),await n.startServer(e)}forceShutdown(){Ml.INSTANCE.shutdown()}};import("node:process").then(t=>t.stdout.write(""));var Q7=[{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}],Fe=RS(Q7,{partial:!0}),Z7=process.env.LOG_LEVEL?.toUpperCase();T0(Fe["log-format"]==="json",Z7==="debug"?!0:Fe.debug);console.debug("Starting with",Fe.target);await GU(Fe.debug);Error.stackTraceLimit=20;var eQ=z7.resolve(Fe["chains-config"]),tQ=HU.default.readJsonSync(eQ),rQ=process.env.OVERRIDE_CONCURRENCY?parseInt(process.env.OVERRIDE_CONCURRENCY):void 0,nQ=process.env.OVERRIDE_BATCH_COUNT?parseInt(process.env.OVERRIDE_BATCH_COUNT):void 0;_r.INSTANCE.concurrency=rQ??Fe.concurrency;_r.INSTANCE.batchCount=nQ??Fe["batch-count"];_r.INSTANCE.chainQueryAPI=Fe["chainquery-server"];_r.INSTANCE.priceFeedAPI=Fe["pricefeed-server"];for(let[t,e]of Object.entries(tQ)){let n=e;if(n.ChainServer)_r.INSTANCE.chainServer.set(t,n.ChainServer);else{let i=n.Https?.[0];i?_r.INSTANCE.chainServer.set(t,i):console.error("not valid config for chain",t)}}console.debug("Starting Server",Fe);var qr,Wn,kU=async()=>{let t=await import(Fe.target);return console.debug("Module loaded",t),t};if(Fe["start-action-server"])qr=new xl(kU),qr.listen(Fe.port);else{qr=(0,YU.createServer)({"grpc.max_send_message_length":768*1024*1024,"grpc.max_receive_message_length":768*1024*1024,"grpc.default_compression_algorithm":FU.compressionAlgorithms.gzip}).use((0,jU.openTelemetryServerMiddleware)()).use(qU.errorDetailsServerMiddleware),Wn=new OE(kU,qr.shutdown);let t=new ea(Wn);qr.add(cE,t),qr.listen("0.0.0.0:"+Fe.port),console.log("Processor Server Started at:",Fe.port)}var $U=4040,oQ=X7.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,s=new J7;s.connect(),await s.post("Profiler.enable"),await s.post("Profiler.start"),await new Promise(r=>setTimeout(r,a));let{profile:o}=await s.post("Profiler.stop");e.writeHead(200,{"Content-Type":"application/json"}),e.write(JSON.stringify(o)),s.disconnect()}catch{e.writeHead(500)}break}default:e.writeHead(404)}}else e.writeHead(404);e.end()}).listen($U);console.log("Metric Server Started at:",$U);process.on("SIGINT",function(){iQ(0)}).on("uncaughtException",t=>{console.error("Uncaught Exception, please checking if await is properly used",t),Wn&&(Wn.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),Wn&&(Wn.unhandled=t))});function iQ(t){qr?.forceShutdown(),console.log("RPC server shut down"),oQ.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:
|