@sentio/runtime 2.49.2-rc.3 → 2.49.2-rc.5
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/chunk-KAWZ7VNL.js +131 -0
- package/lib/chunk-KAWZ7VNL.js.map +1 -0
- package/lib/index.d.ts +20 -14
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/processor-runner.js +2 -2
- package/lib/processor-runner.js.map +1 -1
- package/package.json +1 -1
- package/src/metrics.ts +36 -14
- package/src/otlp.ts +1 -1
- package/src/provider.ts +20 -6
- package/lib/chunk-J24RUMUG.js +0 -131
- package/lib/chunk-J24RUMUG.js.map +0 -1
package/lib/processor-runner.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env node
|
2
2
|
import { createRequire as createRequireShim } from 'module'; const require = createRequireShim(import.meta.url);
|
3
|
-
import{A as EE,B as Kr,C as _E,D as SE,E as pt,F as J,G as hE,H as kt,I as Ii,J as dt,K as TE,L as Et,M as vE,N as mE,O as Ye,P as g,Q as Ci,R as it,S as X,T as Pe,U as x,a as L,b as m,
|
3
|
+
import{A as EE,B as Kr,C as _E,D as SE,E as pt,F as J,G as hE,H as kt,I as Ii,J as dt,K as TE,L as Et,M as vE,N as mE,O as Ye,P as g,Q as Ci,R as it,S as X,T as Pe,U as x,a as L,b as m,c as h,ca as yE,d as nt,e as Fe,f as Y,g as kU,h as uE,j as xl,k as lE,l as cE,q as Tr,r as Ml,s as fE,t as eo,u as pE,v as dE,w as HU,x as FU,y as Ll,z as ot}from"./chunk-KAWZ7VNL.js";var Ee=h(Il=>{"use strict";Il.fromCallback=function(t){return Object.defineProperty(function(...e){if(typeof e[e.length-1]=="function")t.apply(this,e);else return new Promise((n,i)=>{e.push((a,s)=>a!=null?i(a):n(s)),t.apply(this,e)})},"name",{value:t.name})};Il.fromPromise=function(t){return Object.defineProperty(function(...e){let n=e[e.length-1];if(typeof n!="function")return t.apply(this,e);e.pop(),t.apply(this,e).then(i=>n(null,i),n)},"name",{value:t.name})}});var OE=h((Y7,AE)=>{"use strict";var Ht=L("constants"),YU=process.cwd,wi=null,qU=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return wi||(wi=YU.call(process)),wi};try{process.cwd()}catch{}typeof process.chdir=="function"&&(Cl=process.chdir,process.chdir=function(t){wi=null,Cl.call(process,t)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,Cl));var Cl;AE.exports=jU;function jU(t){Ht.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&e(t),t.lutimes||n(t),t.chown=s(t.chown),t.fchown=s(t.fchown),t.lchown=s(t.lchown),t.chmod=i(t.chmod),t.fchmod=i(t.fchmod),t.lchmod=i(t.lchmod),t.chownSync=o(t.chownSync),t.fchownSync=o(t.fchownSync),t.lchownSync=o(t.lchownSync),t.chmodSync=a(t.chmodSync),t.fchmodSync=a(t.fchmodSync),t.lchmodSync=a(t.lchmodSync),t.stat=r(t.stat),t.fstat=r(t.fstat),t.lstat=r(t.lstat),t.statSync=u(t.statSync),t.fstatSync=u(t.fstatSync),t.lstatSync=u(t.lstatSync),t.chmod&&!t.lchmod&&(t.lchmod=function(c,p,_){_&&process.nextTick(_)},t.lchmodSync=function(){}),t.chown&&!t.lchown&&(t.lchown=function(c,p,_,f){f&&process.nextTick(f)},t.lchownSync=function(){}),qU==="win32"&&(t.rename=typeof t.rename!="function"?t.rename:function(c){function p(_,f,S){var v=Date.now(),T=0;c(_,f,function A(O){if(O&&(O.code==="EACCES"||O.code==="EPERM"||O.code==="EBUSY")&&Date.now()-v<6e4){setTimeout(function(){t.stat(f,function(N,D){N&&N.code==="ENOENT"?c(_,f,A):S(O)})},T),T<100&&(T+=10);return}S&&S(O)})}return Object.setPrototypeOf&&Object.setPrototypeOf(p,c),p}(t.rename)),t.read=typeof t.read!="function"?t.read:function(c){function p(_,f,S,v,T,A){var O;if(A&&typeof A=="function"){var N=0;O=function(D,G,F){if(D&&D.code==="EAGAIN"&&N<10)return N++,c.call(t,_,f,S,v,T,O);A.apply(this,arguments)}}return c.call(t,_,f,S,v,T,O)}return Object.setPrototypeOf&&Object.setPrototypeOf(p,c),p}(t.read),t.readSync=typeof t.readSync!="function"?t.readSync:function(c){return function(p,_,f,S,v){for(var T=0;;)try{return c.call(t,p,_,f,S,v)}catch(A){if(A.code==="EAGAIN"&&T<10){T++;continue}throw A}}}(t.readSync);function e(c){c.lchmod=function(p,_,f){c.open(p,Ht.O_WRONLY|Ht.O_SYMLINK,_,function(S,v){if(S){f&&f(S);return}c.fchmod(v,_,function(T){c.close(v,function(A){f&&f(T||A)})})})},c.lchmodSync=function(p,_){var f=c.openSync(p,Ht.O_WRONLY|Ht.O_SYMLINK,_),S=!0,v;try{v=c.fchmodSync(f,_),S=!1}finally{if(S)try{c.closeSync(f)}catch{}else c.closeSync(f)}return v}}function n(c){Ht.hasOwnProperty("O_SYMLINK")&&c.futimes?(c.lutimes=function(p,_,f,S){c.open(p,Ht.O_SYMLINK,function(v,T){if(v){S&&S(v);return}c.futimes(T,_,f,function(A){c.close(T,function(O){S&&S(A||O)})})})},c.lutimesSync=function(p,_,f){var S=c.openSync(p,Ht.O_SYMLINK),v,T=!0;try{v=c.futimesSync(S,_,f),T=!1}finally{if(T)try{c.closeSync(S)}catch{}else c.closeSync(S)}return v}):c.futimes&&(c.lutimes=function(p,_,f,S){S&&process.nextTick(S)},c.lutimesSync=function(){})}function i(c){return c&&function(p,_,f){return c.call(t,p,_,function(S){l(S)&&(S=null),f&&f.apply(this,arguments)})}}function a(c){return c&&function(p,_){try{return c.call(t,p,_)}catch(f){if(!l(f))throw f}}}function s(c){return c&&function(p,_,f,S){return c.call(t,p,_,f,function(v){l(v)&&(v=null),S&&S.apply(this,arguments)})}}function o(c){return c&&function(p,_,f){try{return c.call(t,p,_,f)}catch(S){if(!l(S))throw S}}}function r(c){return c&&function(p,_,f){typeof _=="function"&&(f=_,_=null);function S(v,T){T&&(T.uid<0&&(T.uid+=4294967296),T.gid<0&&(T.gid+=4294967296)),f&&f.apply(this,arguments)}return _?c.call(t,p,_,S):c.call(t,p,S)}}function u(c){return c&&function(p,_){var f=_?c.call(t,p,_):c.call(t,p);return f&&(f.uid<0&&(f.uid+=4294967296),f.gid<0&&(f.gid+=4294967296)),f}}function l(c){if(!c||c.code==="ENOSYS")return!0;var p=!process.getuid||process.getuid()!==0;return!!(p&&(c.code==="EINVAL"||c.code==="EPERM"))}}});var RE=h((q7,NE)=>{"use strict";var gE=L("stream").Stream;NE.exports=$U;function $U(t){return{ReadStream:e,WriteStream:n};function e(i,a){if(!(this instanceof e))return new e(i,a);gE.call(this);var s=this;this.path=i,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,a=a||{};for(var o=Object.keys(a),r=0,u=o.length;r<u;r++){var l=o[r];this[l]=a[l]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){s._read()});return}t.open(this.path,this.flags,this.mode,function(c,p){if(c){s.emit("error",c),s.readable=!1;return}s.fd=p,s.emit("open",p),s._read()})}function n(i,a){if(!(this instanceof n))return new n(i,a);gE.call(this),this.path=i,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,a=a||{};for(var s=Object.keys(a),o=0,r=s.length;o<r;o++){var u=s[o];this[u]=a[u]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=t.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var bE=h((j7,PE)=>{"use strict";PE.exports=WU;var KU=Object.getPrototypeOf||function(t){return t.__proto__};function WU(t){if(t===null||typeof t!="object")return t;if(t instanceof Object)var e={__proto__:KU(t)};else var e=Object.create(null);return Object.getOwnPropertyNames(t).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}});var zr=h(($7,Dl)=>{"use strict";var ie=L("fs"),zU=OE(),XU=RE(),JU=bE(),Ui=L("util"),me,Vi;typeof Symbol=="function"&&typeof Symbol.for=="function"?(me=Symbol.for("graceful-fs.queue"),Vi=Symbol.for("graceful-fs.previous")):(me="___graceful-fs.queue",Vi="___graceful-fs.previous");function QU(){}function LE(t,e){Object.defineProperty(t,me,{get:function(){return e}})}var vr=QU;Ui.debuglog?vr=Ui.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(vr=function(){var t=Ui.format.apply(Ui,arguments);t="GFS4: "+t.split(/\n/).join(`
|
4
4
|
GFS4: `),console.error(t)});ie[me]||(xE=global[me]||[],LE(ie,xE),ie.close=function(t){function e(n,i){return t.call(ie,n,function(a){a||ME(),typeof i=="function"&&i.apply(this,arguments)})}return Object.defineProperty(e,Vi,{value:t}),e}(ie.close),ie.closeSync=function(t){function e(n){t.apply(ie,arguments),ME()}return Object.defineProperty(e,Vi,{value:t}),e}(ie.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){vr(ie[me]),L("assert").equal(ie[me].length,0)}));var xE;global[me]||LE(global,ie[me]);Dl.exports=wl(JU(ie));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!ie.__patched&&(Dl.exports=wl(ie),ie.__patched=!0);function wl(t){zU(t),t.gracefulify=wl,t.createReadStream=G,t.createWriteStream=F;var e=t.readFile;t.readFile=n;function n(M,B,w){return typeof B=="function"&&(w=B,B=null),W(M,B,w);function W(z,ne,oe,se){return e(z,ne,function(Z){Z&&(Z.code==="EMFILE"||Z.code==="ENFILE")?Wr([W,[z,ne,oe],Z,se||Date.now(),Date.now()]):typeof oe=="function"&&oe.apply(this,arguments)})}}var i=t.writeFile;t.writeFile=a;function a(M,B,w,W){return typeof w=="function"&&(W=w,w=null),z(M,B,w,W);function z(ne,oe,se,Z,ve){return i(ne,oe,se,function(re){re&&(re.code==="EMFILE"||re.code==="ENFILE")?Wr([z,[ne,oe,se,Z],re,ve||Date.now(),Date.now()]):typeof Z=="function"&&Z.apply(this,arguments)})}}var s=t.appendFile;s&&(t.appendFile=o);function o(M,B,w,W){return typeof w=="function"&&(W=w,w=null),z(M,B,w,W);function z(ne,oe,se,Z,ve){return s(ne,oe,se,function(re){re&&(re.code==="EMFILE"||re.code==="ENFILE")?Wr([z,[ne,oe,se,Z],re,ve||Date.now(),Date.now()]):typeof Z=="function"&&Z.apply(this,arguments)})}}var r=t.copyFile;r&&(t.copyFile=u);function u(M,B,w,W){return typeof w=="function"&&(W=w,w=0),z(M,B,w,W);function z(ne,oe,se,Z,ve){return r(ne,oe,se,function(re){re&&(re.code==="EMFILE"||re.code==="ENFILE")?Wr([z,[ne,oe,se,Z],re,ve||Date.now(),Date.now()]):typeof Z=="function"&&Z.apply(this,arguments)})}}var l=t.readdir;t.readdir=p;var c=/^v[0-5]\./;function p(M,B,w){typeof B=="function"&&(w=B,B=null);var W=c.test(process.version)?function(oe,se,Z,ve){return l(oe,z(oe,se,Z,ve))}:function(oe,se,Z,ve){return l(oe,se,z(oe,se,Z,ve))};return W(M,B,w);function z(ne,oe,se,Z){return function(ve,re){ve&&(ve.code==="EMFILE"||ve.code==="ENFILE")?Wr([W,[ne,oe,se],ve,Z||Date.now(),Date.now()]):(re&&re.sort&&re.sort(),typeof se=="function"&&se.call(this,ve,re))}}}if(process.version.substr(0,4)==="v0.8"){var _=XU(t);A=_.ReadStream,N=_.WriteStream}var f=t.ReadStream;f&&(A.prototype=Object.create(f.prototype),A.prototype.open=O);var S=t.WriteStream;S&&(N.prototype=Object.create(S.prototype),N.prototype.open=D),Object.defineProperty(t,"ReadStream",{get:function(){return A},set:function(M){A=M},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return N},set:function(M){N=M},enumerable:!0,configurable:!0});var v=A;Object.defineProperty(t,"FileReadStream",{get:function(){return v},set:function(M){v=M},enumerable:!0,configurable:!0});var T=N;Object.defineProperty(t,"FileWriteStream",{get:function(){return T},set:function(M){T=M},enumerable:!0,configurable:!0});function A(M,B){return this instanceof A?(f.apply(this,arguments),this):A.apply(Object.create(A.prototype),arguments)}function O(){var M=this;j(M.path,M.flags,M.mode,function(B,w){B?(M.autoClose&&M.destroy(),M.emit("error",B)):(M.fd=w,M.emit("open",w),M.read())})}function N(M,B){return this instanceof N?(S.apply(this,arguments),this):N.apply(Object.create(N.prototype),arguments)}function D(){var M=this;j(M.path,M.flags,M.mode,function(B,w){B?(M.destroy(),M.emit("error",B)):(M.fd=w,M.emit("open",w))})}function G(M,B){return new t.ReadStream(M,B)}function F(M,B){return new t.WriteStream(M,B)}var ae=t.open;t.open=j;function j(M,B,w,W){return typeof w=="function"&&(W=w,w=null),z(M,B,w,W);function z(ne,oe,se,Z,ve){return ae(ne,oe,se,function(re,H7){re&&(re.code==="EMFILE"||re.code==="ENFILE")?Wr([z,[ne,oe,se,Z],re,ve||Date.now(),Date.now()]):typeof Z=="function"&&Z.apply(this,arguments)})}}return t}function Wr(t){vr("ENQUEUE",t[0].name,t[1]),ie[me].push(t),Ul()}var Di;function ME(){for(var t=Date.now(),e=0;e<ie[me].length;++e)ie[me][e].length>2&&(ie[me][e][3]=t,ie[me][e][4]=t);Ul()}function Ul(){if(clearTimeout(Di),Di=void 0,ie[me].length!==0){var t=ie[me].shift(),e=t[0],n=t[1],i=t[2],a=t[3],s=t[4];if(a===void 0)vr("RETRY",e.name,n),e.apply(null,n);else if(Date.now()-a>=6e4){vr("TIMEOUT",e.name,n);var o=n.pop();typeof o=="function"&&o.call(null,i)}else{var r=Date.now()-s,u=Math.max(s-a,1),l=Math.min(u*1.2,100);r>=l?(vr("RETRY",e.name,n),e.apply(null,n.concat([a]))):ie[me].push(t)}Di===void 0&&(Di=setTimeout(Ul,0))}}});var Ie=h(Mt=>{"use strict";var IE=Ee().fromCallback,Le=zr(),ZU=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchmod","lchown","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(t=>typeof Le[t]=="function");Object.assign(Mt,Le);ZU.forEach(t=>{Mt[t]=IE(Le[t])});Mt.exists=function(t,e){return typeof e=="function"?Le.exists(t,e):new Promise(n=>Le.exists(t,n))};Mt.read=function(t,e,n,i,a,s){return typeof s=="function"?Le.read(t,e,n,i,a,s):new Promise((o,r)=>{Le.read(t,e,n,i,a,(u,l,c)=>{if(u)return r(u);o({bytesRead:l,buffer:c})})})};Mt.write=function(t,e,...n){return typeof n[n.length-1]=="function"?Le.write(t,e,...n):new Promise((i,a)=>{Le.write(t,e,...n,(s,o,r)=>{if(s)return a(s);i({bytesWritten:o,buffer:r})})})};Mt.readv=function(t,e,...n){return typeof n[n.length-1]=="function"?Le.readv(t,e,...n):new Promise((i,a)=>{Le.readv(t,e,...n,(s,o,r)=>{if(s)return a(s);i({bytesRead:o,buffers:r})})})};Mt.writev=function(t,e,...n){return typeof n[n.length-1]=="function"?Le.writev(t,e,...n):new Promise((i,a)=>{Le.writev(t,e,...n,(s,o,r)=>{if(s)return a(s);i({bytesWritten:o,buffers:r})})})};typeof Le.realpath.native=="function"?Mt.realpath.native=IE(Le.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")});var wE=h((W7,CE)=>{"use strict";var eD=L("path");CE.exports.checkPath=function(e){if(process.platform==="win32"&&/[<>:"|?*]/.test(e.replace(eD.parse(e).root,""))){let i=new Error(`Path contains invalid characters: ${e}`);throw i.code="EINVAL",i}}});var BE=h((z7,Vl)=>{"use strict";var UE=Ie(),{checkPath:DE}=wE(),VE=t=>{let e={mode:511};return typeof t=="number"?t:{...e,...t}.mode};Vl.exports.makeDir=async(t,e)=>(DE(t),UE.mkdir(t,{mode:VE(e),recursive:!0}));Vl.exports.makeDirSync=(t,e)=>(DE(t),UE.mkdirSync(t,{mode:VE(e),recursive:!0}))});var at=h((X7,GE)=>{"use strict";var tD=Ee().fromPromise,{makeDir:rD,makeDirSync:Bl}=BE(),Gl=tD(rD);GE.exports={mkdirs:Gl,mkdirsSync:Bl,mkdirp:Gl,mkdirpSync:Bl,ensureDir:Gl,ensureDirSync:Bl}});var Ft=h((J7,HE)=>{"use strict";var nD=Ee().fromPromise,kE=Ie();function oD(t){return kE.access(t).then(()=>!0).catch(()=>!1)}HE.exports={pathExists:nD(oD),pathExistsSync:kE.existsSync}});var kl=h((Q7,FE)=>{"use strict";var Xr=Ie(),iD=Ee().fromPromise;async function aD(t,e,n){let i=await Xr.open(t,"r+"),a=null;try{await Xr.futimes(i,e,n)}finally{try{await Xr.close(i)}catch(s){a=s}}if(a)throw a}function sD(t,e,n){let i=Xr.openSync(t,"r+");return Xr.futimesSync(i,e,n),Xr.closeSync(i)}FE.exports={utimesMillis:iD(aD),utimesMillisSync:sD}});var mr=h((Z7,$E)=>{"use strict";var Jr=Ie(),_e=L("path"),YE=Ee().fromPromise;function uD(t,e,n){let i=n.dereference?a=>Jr.stat(a,{bigint:!0}):a=>Jr.lstat(a,{bigint:!0});return Promise.all([i(t),i(e).catch(a=>{if(a.code==="ENOENT")return null;throw a})]).then(([a,s])=>({srcStat:a,destStat:s}))}function lD(t,e,n){let i,a=n.dereference?o=>Jr.statSync(o,{bigint:!0}):o=>Jr.lstatSync(o,{bigint:!0}),s=a(t);try{i=a(e)}catch(o){if(o.code==="ENOENT")return{srcStat:s,destStat:null};throw o}return{srcStat:s,destStat:i}}async function cD(t,e,n,i){let{srcStat:a,destStat:s}=await uD(t,e,i);if(s){if(to(a,s)){let o=_e.basename(t),r=_e.basename(e);if(n==="move"&&o!==r&&o.toLowerCase()===r.toLowerCase())return{srcStat:a,destStat:s,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(a.isDirectory()&&!s.isDirectory())throw new Error(`Cannot overwrite non-directory '${e}' with directory '${t}'.`);if(!a.isDirectory()&&s.isDirectory())throw new Error(`Cannot overwrite directory '${e}' with non-directory '${t}'.`)}if(a.isDirectory()&&Hl(t,e))throw new Error(Bi(t,e,n));return{srcStat:a,destStat:s}}function fD(t,e,n,i){let{srcStat:a,destStat:s}=lD(t,e,i);if(s){if(to(a,s)){let o=_e.basename(t),r=_e.basename(e);if(n==="move"&&o!==r&&o.toLowerCase()===r.toLowerCase())return{srcStat:a,destStat:s,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(a.isDirectory()&&!s.isDirectory())throw new Error(`Cannot overwrite non-directory '${e}' with directory '${t}'.`);if(!a.isDirectory()&&s.isDirectory())throw new Error(`Cannot overwrite directory '${e}' with non-directory '${t}'.`)}if(a.isDirectory()&&Hl(t,e))throw new Error(Bi(t,e,n));return{srcStat:a,destStat:s}}async function qE(t,e,n,i){let a=_e.resolve(_e.dirname(t)),s=_e.resolve(_e.dirname(n));if(s===a||s===_e.parse(s).root)return;let o;try{o=await Jr.stat(s,{bigint:!0})}catch(r){if(r.code==="ENOENT")return;throw r}if(to(e,o))throw new Error(Bi(t,n,i));return qE(t,e,s,i)}function jE(t,e,n,i){let a=_e.resolve(_e.dirname(t)),s=_e.resolve(_e.dirname(n));if(s===a||s===_e.parse(s).root)return;let o;try{o=Jr.statSync(s,{bigint:!0})}catch(r){if(r.code==="ENOENT")return;throw r}if(to(e,o))throw new Error(Bi(t,n,i));return jE(t,e,s,i)}function to(t,e){return e.ino&&e.dev&&e.ino===t.ino&&e.dev===t.dev}function Hl(t,e){let n=_e.resolve(t).split(_e.sep).filter(a=>a),i=_e.resolve(e).split(_e.sep).filter(a=>a);return n.every((a,s)=>i[s]===a)}function Bi(t,e,n){return`Cannot ${n} '${t}' to a subdirectory of itself, '${e}'.`}$E.exports={checkPaths:YE(cD),checkPathsSync:fD,checkParentPaths:YE(qE),checkParentPathsSync:jE,isSrcSubdir:Hl,areIdentical:to}});var JE=h((eQ,XE)=>{"use strict";var be=Ie(),ro=L("path"),{mkdirs:pD}=at(),{pathExists:dD}=Ft(),{utimesMillis:ED}=kl(),no=mr();async function _D(t,e,n={}){typeof n=="function"&&(n={filter:n}),n.clobber="clobber"in n?!!n.clobber:!0,n.overwrite="overwrite"in n?!!n.overwrite:n.clobber,n.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
|
5
5
|
|
6
6
|
see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0001");let{srcStat:i,destStat:a}=await no.checkPaths(t,e,"copy",n);if(await no.checkParentPaths(t,i,e,"copy"),!await WE(t,e,n))return;let o=ro.dirname(e);await dD(o)||await pD(o),await zE(a,t,e,n)}async function WE(t,e,n){return n.filter?n.filter(t,e):!0}async function zE(t,e,n,i){let s=await(i.dereference?be.stat:be.lstat)(e);if(s.isDirectory())return vD(s,t,e,n,i);if(s.isFile()||s.isCharacterDevice()||s.isBlockDevice())return SD(s,t,e,n,i);if(s.isSymbolicLink())return mD(t,e,n,i);throw s.isSocket()?new Error(`Cannot copy a socket file: ${e}`):s.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${e}`):new Error(`Unknown file: ${e}`)}async function SD(t,e,n,i,a){if(!e)return KE(t,n,i,a);if(a.overwrite)return await be.unlink(i),KE(t,n,i,a);if(a.errorOnExist)throw new Error(`'${i}' already exists`)}async function KE(t,e,n,i){if(await be.copyFile(e,n),i.preserveTimestamps){hD(t.mode)&&await TD(n,t.mode);let a=await be.stat(e);await ED(n,a.atime,a.mtime)}return be.chmod(n,t.mode)}function hD(t){return(t&128)===0}function TD(t,e){return be.chmod(t,e|128)}async function vD(t,e,n,i,a){e||await be.mkdir(i);let s=await be.readdir(n);await Promise.all(s.map(async o=>{let r=ro.join(n,o),u=ro.join(i,o);if(!await WE(r,u,a))return;let{destStat:c}=await no.checkPaths(r,u,"copy",a);return zE(c,r,u,a)})),e||await be.chmod(i,t.mode)}async function mD(t,e,n,i){let a=await be.readlink(e);if(i.dereference&&(a=ro.resolve(process.cwd(),a)),!t)return be.symlink(a,n);let s=null;try{s=await be.readlink(n)}catch(o){if(o.code==="EINVAL"||o.code==="UNKNOWN")return be.symlink(a,n);throw o}if(i.dereference&&(s=ro.resolve(process.cwd(),s)),no.isSrcSubdir(a,s))throw new Error(`Cannot copy '${a}' to a subdirectory of itself, '${s}'.`);if(no.isSrcSubdir(s,a))throw new Error(`Cannot overwrite '${s}' with '${a}'.`);return await be.unlink(n),be.symlink(a,n)}XE.exports=_D});var r_=h((tQ,t_)=>{"use strict";var Ce=zr(),oo=L("path"),yD=at().mkdirsSync,AD=kl().utimesMillisSync,io=mr();function OD(t,e,n){typeof n=="function"&&(n={filter:n}),n=n||{},n.clobber="clobber"in n?!!n.clobber:!0,n.overwrite="overwrite"in n?!!n.overwrite:n.clobber,n.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
|
@@ -56,7 +56,7 @@ ${o}
|
|
56
56
|
${r}`.trim()}_serializeSingularDataPoint(e,n,i){let a="";e=md(e,n);let{value:s,attributes:o}=i,r=(0,HI.hrTimeToMilliseconds)(i.endTime);return a+=Wu(e,o,s,this._appendTimestamp?r:void 0,void 0),a}_serializeHistogramDataPoint(e,n,i){let a="";e=md(e,n);let s=i.attributes,o=i.value,r=(0,HI.hrTimeToMilliseconds)(i.endTime);for(let p of["count","sum"]){let _=o[p];_!=null&&(a+=Wu(e+"_"+p,s,_,this._appendTimestamp?r:void 0,void 0))}let u=0,l=o.buckets.counts.entries(),c=!1;for(let[p,_]of l){u+=_;let f=o.buckets.boundaries[p];if(f===void 0&&c)break;f===1/0&&(c=!0),a+=Wu(e+"_bucket",s,u,this._appendTimestamp?r:void 0,{le:f===void 0||f===1/0?"+Inf":String(f)})}return a}_serializeResource(e){let n="target_info",i=`# HELP ${n} Target metadata`,a=`# TYPE ${n} gauge`,s=Wu(n,e.attributes,1).trim();return`${i}
|
57
57
|
${a}
|
58
58
|
${s}
|
59
|
-
`}};Xu.PrometheusSerializer=Ad});var YI=h(Qu=>{"use strict";Object.defineProperty(Qu,"__esModule",{value:!0});Qu.PrometheusExporter=void 0;var mi=(x(),Y(Pe)),Vz=(K(),Y(Ds)),gd=(Ln(),Y(zp)),Bz=L("http"),Gz=Od(),kz=L("url"),Ju=class t extends gd.MetricReader{constructor(e={},n=()=>{}){super({aggregationSelector:i=>gd.Aggregation.Default(),aggregationTemporalitySelector:i=>gd.AggregationTemporality.CUMULATIVE,metricProducers:e.metricProducers}),this._requestHandler=(i,a)=>{i.url!=null&&new kz.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&&mi.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,Bz.createServer)(this._requestHandler).unref(),this._serializer=new Gz.PrometheusSerializer(this._prefix,this._appendTimestamp),this._baseUrl=`http://${this._host}:${this._port}/`,this._endpoint=(e.endpoint||t.DEFAULT_OPTIONS.endpoint).replace(/^([^/])/,"/$1"),e.preventServerStart!==!0?this.startServer().then(n,i=>{mi.diag.error(i),n(i)}):n&&queueMicrotask(n)}async onForceFlush(){}onShutdown(){return this.stopServer()}stopServer(){return this._server?new Promise(e=>{this._server.close(n=>{n?n.code!=="ERR_SERVER_NOT_RUNNING"&&(0,Vz.globalErrorHandler)(n):mi.diag.debug("Prometheus exporter was stopped"),e()})}):(mi.diag.debug("Prometheus stopServer() was called but server was never started."),Promise.resolve())}startServer(){var e;return(e=this._startServerPromise)!==null&&e!==void 0||(this._startServerPromise=new Promise((n,i)=>{this._server.once("error",i),this._server.listen({port:this._port,host:this._host},()=>{mi.diag.debug(`Prometheus exporter server started: ${this._host}:${this._port}/${this._endpoint}`),n()})})),this._startServerPromise}getMetricsRequestHandler(e,n){this._exportMetrics(n)}};Qu.PrometheusExporter=Ju;Ju.DEFAULT_OPTIONS={host:void 0,port:9464,endpoint:"/metrics",prefix:"",appendTimestamp:!1}});var qI=h(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.PrometheusSerializer=kn.PrometheusExporter=void 0;var Hz=YI();Object.defineProperty(kn,"PrometheusExporter",{enumerable:!0,get:function(){return Hz.PrometheusExporter}});var Fz=Od();Object.defineProperty(kn,"PrometheusSerializer",{enumerable:!0,get:function(){return Fz.PrometheusSerializer}})});var Rd=h(Zu=>{"use strict";Object.defineProperty(Zu,"__esModule",{value:!0});Zu.AbstractAsyncHooksContextManager=void 0;var Yz=L("events"),qz=["addListener","on","once","prependListener","prependOnceListener"],Nd=class{constructor(){this._kOtListeners=Symbol("OtListeners"),this._wrapped=!1}bind(e,n){return n instanceof Yz.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),qz.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=Nd});var jI=h(el=>{"use strict";Object.defineProperty(el,"__esModule",{value:!0});el.AsyncHooksContextManager=void 0;var jz=(x(),Y(Pe)),$z=L("async_hooks"),Kz=Rd(),Pd=class extends Kz.AbstractAsyncHooksContextManager{constructor(){super(),this._contexts=new Map,this._stack=[],this._asyncHook=$z.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:jz.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=Pd});var $I=h(tl=>{"use strict";Object.defineProperty(tl,"__esModule",{value:!0});tl.AsyncLocalStorageContextManager=void 0;var Wz=(x(),Y(Pe)),zz=L("async_hooks"),Xz=Rd(),bd=class extends Xz.AbstractAsyncHooksContextManager{constructor(){super(),this._asyncLocalStorage=new zz.AsyncLocalStorage}active(){var e;return(e=this._asyncLocalStorage.getStore())!==null&&e!==void 0?e:Wz.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=bd});var KI=h(Hn=>{"use strict";Object.defineProperty(Hn,"__esModule",{value:!0});Hn.AsyncLocalStorageContextManager=Hn.AsyncHooksContextManager=void 0;var Jz=jI();Object.defineProperty(Hn,"AsyncHooksContextManager",{enumerable:!0,get:function(){return Jz.AsyncHooksContextManager}});var Qz=$I();Object.defineProperty(Hn,"AsyncLocalStorageContextManager",{enumerable:!0,get:function(){return Qz.AsyncLocalStorageContextManager}})});var Fn,xd=m(()=>{"use strict";x();Fn=Kr("OpenTelemetry Context Key B3 Debug Flag")});var _r,Yn,qn,jn,rl,$n,yi=m(()=>{"use strict";_r="b3",Yn="x-b3-traceid",qn="x-b3-spanid",jn="x-b3-sampled",rl="x-b3-parentspanid",$n="x-b3-flags"});function tX(t){return t===J.SAMPLED||t===J.NONE}function rX(t){return Array.isArray(t)?t[0]:t}function nl(t,e,n){var i=e.get(t,n);return rX(i)}function nX(t,e){var n=nl(t,e,Yn);return typeof n=="string"?n.padStart(32,"0"):""}function oX(t,e){var n=nl(t,e,qn);return typeof n=="string"?n:""}function WI(t,e){var n=nl(t,e,$n);return n==="1"?"1":void 0}function iX(t,e){var n=nl(t,e,jn),i=WI(t,e);if(i==="1"||Zz.has(n))return J.SAMPLED;if(n===void 0||eX.has(n))return J.NONE}var Zz,eX,zI,XI=m(()=>{"use strict";x();K();xd();yi();Zz=new Set([!0,"true","True","1",1]),eX=new Set([!1,"false","False","0",0]);zI=function(){function t(){}return t.prototype.inject=function(e,n,i){var a=X.getSpanContext(e);if(!(!a||!dt(a)||xe(e))){var s=e.getValue(Fn);i.set(n,Yn,a.traceId),i.set(n,qn,a.spanId),s==="1"?i.set(n,$n,s):a.traceFlags!==void 0&&i.set(n,jn,(J.SAMPLED&a.traceFlags)===J.SAMPLED?"1":"0")}},t.prototype.extract=function(e,n,i){var a=nX(n,i),s=oX(n,i),o=iX(n,i),r=WI(n,i);return kt(a)&&Ii(s)&&tX(o)?(e=e.setValue(Fn,r),X.setSpanContext(e,{traceId:a,spanId:s,isRemote:!0,traceFlags:o})):e},t.prototype.fields=function(){return[Yn,qn,$n,jn,rl]},t}()});function fX(t){return t.length===32?t:""+uX+t}function pX(t){return t&&lX.has(t)?J.SAMPLED:J.NONE}var aX,sX,uX,lX,cX,JI,QI=m(()=>{"use strict";x();K();xd();yi();aX=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},sX=/((?:[0-9a-f]{16}){1,2})-([0-9a-f]{16})(?:-([01d](?![0-9a-f])))?(?:-([0-9a-f]{16}))?/,uX="0".repeat(16),lX=new Set(["d","1"]),cX="d";JI=function(){function t(){}return t.prototype.inject=function(e,n,i){var a=X.getSpanContext(e);if(!(!a||!dt(a)||xe(e))){var s=e.getValue(Fn)||a.traceFlags&1,o=a.traceId+"-"+a.spanId+"-"+s;i.set(n,_r,o)}},t.prototype.extract=function(e,n,i){var a=i.get(n,_r),s=Array.isArray(a)?a[0]:a;if(typeof s!="string")return e;var o=s.match(sX);if(!o)return e;var r=aX(o,4),u=r[1],l=r[2],c=r[3],p=fX(u);if(!kt(p)||!Ii(l))return e;var _=pX(c);return c===cX&&(e=e.setValue(Fn,c)),X.setSpanContext(e,{traceId:p,spanId:l,isRemote:!0,traceFlags:_})},t.prototype.fields=function(){return[_r]},t}()});var Kn,Md=m(()=>{"use strict";(function(t){t[t.SINGLE_HEADER=0]="SINGLE_HEADER",t[t.MULTI_HEADER=1]="MULTI_HEADER"})(Kn||(Kn={}))});var ZI,eC=m(()=>{"use strict";K();XI();QI();yi();Md();ZI=function(){function t(e){e===void 0&&(e={}),this._b3MultiPropagator=new zI,this._b3SinglePropagator=new JI,e.injectEncoding===Kn.MULTI_HEADER?(this._inject=this._b3MultiPropagator.inject,this._fields=this._b3MultiPropagator.fields()):(this._inject=this._b3SinglePropagator.inject,this._fields=this._b3SinglePropagator.fields())}return t.prototype.inject=function(e,n,i){xe(e)||this._inject(e,n,i)},t.prototype.extract=function(e,n,i){var a=i.get(n,_r),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 tC={};nt(tC,{B3InjectEncoding:()=>Kn,B3Propagator:()=>ZI,B3_CONTEXT_HEADER:()=>_r,X_B3_FLAGS:()=>$n,X_B3_PARENT_SPAN_ID:()=>rl,X_B3_SAMPLED:()=>jn,X_B3_SPAN_ID:()=>qn,X_B3_TRACE_ID:()=>Yn});var rC=m(()=>{"use strict";eC();yi();Md()});var nC,oC=m(()=>{"use strict";nC="exception"});var Ld,dX,iC,EX,ol,Id=m(()=>{"use strict";x();K();Ko();oC();Ld=function(){return Ld=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},Ld.apply(this,arguments)},dX=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},iC=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),a,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},EX=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:mE.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 p=Date.now();this._performanceStartTime=Ze.now(),this._performanceOffset=p-(this._performanceStartTime+An()),this._startTimeProvided=u!=null,this.startTime=this._getTime(u??p),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this._spanLimits=e.getSpanLimits(),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,c!=null&&this.setAttributes(c),this._spanProcessor=e.getActiveSpanProcessor(),this._spanProcessor.onStart(this,n)}return t.prototype.spanContext=function(){return this._spanContext},t.prototype.setAttribute=function(e,n){return n==null||this._isSpanEnded()?this:e.length===0?(g.warn("Invalid attribute key: "+e),this):Xo(n)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(n),this):(g.warn("Invalid attribute value set for key: "+e),this)},t.prototype.setAttributes=function(e){var n,i;try{for(var a=dX(Object.entries(e)),s=a.next();!s.done;s=a.next()){var o=iC(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++),ei(n)&&(ei(i)||(i=n),n=void 0);var a=ir(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,EX([],iC(e),!1)),this},t.prototype.setStatus=function(e){return this._isSpanEnded()?this:(this.status=Ld({},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=Ps(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<=Ze.now())return Zo(e+this._performanceOffset);if(typeof e=="number")return ge(e);if(e instanceof Date)return ge(e.getTime());if(On(e))return e;if(this._startTimeProvided)return ge(Date.now());var n=Ze.now()-this._performanceStartTime;return ti(this.startTime,ge(n))},t.prototype.isRecording=function(){return this._ended===!1},t.prototype.recordException=function(e,n){var i={};typeof e=="string"?i[ds]=e:e&&(e.code?i[ps]=e.code.toString():e.name&&(i[ps]=e.name),e.message&&(i[ds]=e.message),e.stack&&(i[T0]=e.stack)),i[ps]||i[ds]?this.addEvent(nC,i,n):g.warn("Failed to record an exception "+e)},Object.defineProperty(t.prototype,"duration",{get:function(){return this._duration},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ended",{get:function(){return this._ended},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedAttributesCount",{get:function(){return this._droppedAttributesCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedEventsCount",{get:function(){return this._droppedEventsCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedLinksCount",{get:function(){return this._droppedLinksCount},enumerable:!1,configurable:!0}),t.prototype._isSpanEnded=function(){return this._ended&&g.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},t.prototype._truncateToLimitUtil=function(e,n){return e.length<=n?e:e.substr(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 ft,Ai=m(()=>{"use strict";(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(ft||(ft={}))});var Sr,il=m(()=>{"use strict";Ai();Sr=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:ft.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t}()});var xt,al=m(()=>{"use strict";Ai();xt=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:ft.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t}()});var Wn,Cd=m(()=>{"use strict";x();K();il();al();Wn=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 xt),this._remoteParentSampled=(n=e.remoteParentSampled)!==null&&n!==void 0?n:new xt,this._remoteParentNotSampled=(i=e.remoteParentNotSampled)!==null&&i!==void 0?i:new Sr,this._localParentSampled=(a=e.localParentSampled)!==null&&a!==void 0?a:new xt,this._localParentNotSampled=(s=e.localParentNotSampled)!==null&&s!==void 0?s:new Sr}return t.prototype.shouldSample=function(e,n,i,a,s,o){var r=X.getSpanContext(e);return!r||!dt(r)?this._root.shouldSample(e,n,i,a,s,o):r.isRemote?r.traceFlags&J.SAMPLED?this._remoteParentSampled.shouldSample(e,n,i,a,s,o):this._remoteParentNotSampled.shouldSample(e,n,i,a,s,o):r.traceFlags&J.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 Oi,wd=m(()=>{"use strict";x();Ai();Oi=function(){function t(e){e===void 0&&(e=0),this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}return t.prototype.shouldSample=function(e,n){return{decision:kt(n)&&this._accumulate(n)<this._upperBound?ft.RECORD_AND_SAMPLED:ft.NOT_RECORD}},t.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},t.prototype._normalize=function(e){return typeof e!="number"||isNaN(e)?0:e>=1?1:e<=0?0:e},t.prototype._accumulate=function(e){for(var n=0,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=Oe();return{sampler:Ud(_X),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 Ud(t){switch(t===void 0&&(t=Oe()),t.OTEL_TRACES_SAMPLER){case Ke.AlwaysOn:return new xt;case Ke.AlwaysOff:return new Sr;case Ke.ParentBasedAlwaysOn:return new Wn({root:new xt});case Ke.ParentBasedAlwaysOff:return new Wn({root:new Sr});case Ke.TraceIdRatio:return new Oi(aC(t));case Ke.ParentBasedTraceIdRatio:return new Wn({root:new Oi(aC(t))});default:return g.error('OTEL_TRACES_SAMPLER value "'+t.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+SX+'".'),new xt}}function aC(t){if(t.OTEL_TRACES_SAMPLER_ARG===void 0||t.OTEL_TRACES_SAMPLER_ARG==="")return g.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+zn+"."),zn;var e=Number(t.OTEL_TRACES_SAMPLER_ARG);return isNaN(e)?(g.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+zn+"."),zn):e<0||e>1?(g.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+zn+"."),zn):e}var _X,SX,zn,Dd=m(()=>{"use strict";x();K();il();al();Cd();wd();_X=Oe(),SX=Ke.AlwaysOn,zn=1});function sC(t){var e={sampler:Ud()},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 uC(t){var e,n,i,a,s,o,r,u,l,c,p,_,f=Object.assign({},t.spanLimits),S=mn();return f.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:Dr,f.attributeValueLengthLimit=(_=(p=(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&&p!==void 0?p:S.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&_!==void 0?_:Ur,Object.assign({},t,{spanLimits:f})}var Vd=m(()=>{"use strict";Dd();K()});var lC,cC=m(()=>{"use strict";x();K();lC=function(){function t(e,n){this._exporter=e,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var i=Oe();this._maxExportBatchSize=typeof n?.maxExportBatchSize=="number"?n.maxExportBatchSize:i.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=typeof n?.maxQueueSize=="number"?n.maxQueueSize:i.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=typeof n?.scheduledDelayMillis=="number"?n.scheduledDelayMillis:i.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis=typeof n?.exportTimeoutMillis=="number"?n.exportTimeoutMillis:i.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new lr(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&J.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(Tn(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(p){var _;clearTimeout(a),p.code===ee.SUCCESS?n():i((_=p.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(p){Te(p),i(p)})})})},t.prototype._maybeStartTimer=function(){var e=this;if(!this._isExporting){var n=function(){e._isExporting=!0,e._flushOneBatch().finally(function(){e._isExporting=!1,e._finishedSpans.length>0&&(e._clearTimer(),e._maybeStartTimer())}).catch(function(i){e._isExporting=!1,Te(i)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return n();this._timer===void 0&&(this._timer=setTimeout(function(){return n()},this._scheduledDelayMillis),ur(this._timer))}},t.prototype._clearTimer=function(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)},t}()});var hX,hr,fC=m(()=>{"use strict";cC();hX=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)}}(),hr=function(t){hX(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.onShutdown=function(){},e}(lC)});function pC(t){return function(){for(var n=0;n<t/4;n++)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 TX,dC,Xn,ul,EC=m(()=>{"use strict";TX=8,dC=16,Xn=function(){function t(){this.generateTraceId=pC(dC),this.generateSpanId=pC(TX)}return t}(),ul=Buffer.allocUnsafe(dC)});var _C=m(()=>{"use strict";fC();EC()});var ll=m(()=>{"use strict";_C()});var cl,SC=m(()=>{"use strict";x();K();Id();Vd();ll();cl=function(){function t(e,n,i){this._tracerProvider=i;var a=sC(n);this._sampler=a.sampler,this._generalLimits=a.generalLimits,this._spanLimits=a.spanLimits,this._idGenerator=n.idGenerator||new Xn,this.resource=i.resource,this.instrumentationLibrary=e}return t.prototype.startSpan=function(e,n,i){var a,s,o;n===void 0&&(n={}),i===void 0&&(i=Ye.active()),n.root&&(i=X.deleteSpan(i));var r=X.getSpan(i);if(xe(i)){g.debug("Instrumentation suppressed, returning Noop Span");var u=X.wrapSpanContext(hE);return u}var l=r?.spanContext(),c=this._idGenerator.generateSpanId(),p,_,f;!l||!X.isSpanContextValid(l)?p=this._idGenerator.generateTraceId():(p=l.traceId,_=l.traceState,f=l.spanId);var S=(a=n.kind)!==null&&a!==void 0?a:vE.INTERNAL,v=((s=n.links)!==null&&s!==void 0?s:[]).map(function(F){return{context:F.context,attributes:ir(F.attributes)}}),T=ir(n.attributes),A=this._sampler.shouldSample(i,p,e,S,T,v);_=(o=A.traceState)!==null&&o!==void 0?o:_;var O=A.decision===Et.RECORD_AND_SAMPLED?J.SAMPLED:J.NONE,N={traceId:p,spanId:c,traceFlags:O,traceState:_};if(A.decision===Et.NOT_RECORD){g.debug("Recording is off, propagating context in a non-recording span");var u=X.wrapSpanContext(N);return u}var D=ir(Object.assign(T,A.attributes)),G=new ol(this,i,e,N,S,f,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=X.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,hC=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 vX,mX,Bt,TC,vC=m(()=>{"use strict";x();K();Gs();gi();Dd();hC();Gd();ll();Vd();vX=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},mX=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"})(Bt||(Bt={}));TC=function(){function t(e){e===void 0&&(e={});var n,i;this._registeredSpanProcessors=[],this._tracers=new Map;var a=Us({},sl(),uC(e));if(this.resource=(n=a.resource)!==null&&n!==void 0?n:Dt.empty(),a.mergeResourceWithDefaults&&(this.resource=Dt.default().merge(this.resource)),this._config=Object.assign({},a,{resource:this.resource}),!((i=e.spanProcessors)===null||i===void 0)&&i.length)this._registeredSpanProcessors=mX([],vX(e.spanProcessors),!1),this.activeSpanProcessor=new Bd(this._registeredSpanProcessors);else{var s=this._buildExporterFromEnv();if(s!==void 0){var o=new hr(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={}),X.setGlobalTracerProvider(this),e.propagator===void 0&&(e.propagator=this._buildPropagatorFromEnv()),e.contextManager&&Ye.setGlobalContextManager(e.contextManager),e.propagator&&it.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=Bt.timeout},e);i.forceFlush().then(function(){clearTimeout(o),s!==Bt.timeout&&(s=Bt.resolved,a(s))}).catch(function(r){clearTimeout(o),s=Bt.error,a(r)})})});return new Promise(function(i,a){Promise.all(n).then(function(s){var o=s.filter(function(r){return r!==Bt.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(Oe().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 xs({propagators:a})},t.prototype._buildExporterFromEnv=function(){var e=Oe().OTEL_TRACES_EXPORTER;if(!(e==="none"||e==="")){var n=this._getSpanExporter(e);return n||g.error('Exporter "'+e+'" requested through environment variable is unavailable.'),n}},t._registeredPropagators=new Map([["tracecontext",function(){return new Ls}],["baggage",function(){return new vs}]]),t._registeredExporters=new Map,t}()});var yX,mC,yC=m(()=>{"use strict";K();yX=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},mC=function(){function t(){}return t.prototype.export=function(e,n){return this._sendSpans(e,n)},t.prototype.shutdown=function(){return this._sendSpans([]),this.forceFlush()},t.prototype.forceFlush=function(){return Promise.resolve()},t.prototype._exportInfo=function(e){var n;return{resource:{attributes:e.resource.attributes},instrumentationScope:e.instrumentationLibrary,traceId:e.spanContext().traceId,parentId:e.parentSpanId,traceState:(n=e.spanContext().traceState)===null||n===void 0?void 0:n.serialize(),name:e.name,id:e.spanContext().spanId,kind:e.kind,timestamp:Ot(e.startTime),duration:Ot(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=yX(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:ee.SUCCESS})},t}()});var AX,OX,AC,OC=m(()=>{"use strict";K();AX=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},OX=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))},AC=function(){function t(){this._finishedSpans=[],this._stopped=!1}return t.prototype.export=function(e,n){var i;if(this._stopped)return n({code:ee.FAILED,error:new Error("Exporter has been stopped")});(i=this._finishedSpans).push.apply(i,OX([],AX(e),!1)),setTimeout(function(){return n({code:ee.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 gX,NX,gC,NC=m(()=>{"use strict";x();K();gX=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(p){o(p)}}function u(c){try{l(i.throw(c))}catch(p){o(p)}}function l(c){c.done?s(c.value):a(c.value).then(r,u)}l((i=i.apply(t,e||[])).next())})},NX=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}}},gC=function(){function t(e){this._exporter=e,this._shutdownOnce=new lr(this._shutdown,this),this._unresolvedExports=new Set}return t.prototype.forceFlush=function(){return gX(this,void 0,void 0,function(){return NX(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&J.SAMPLED){var s=function(){return ai._export(n._exporter,[e]).then(function(r){var u;r.code!==ee.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={};nt(kd,{AlwaysOffSampler:()=>Sr,AlwaysOnSampler:()=>xt,BasicTracerProvider:()=>TC,BatchSpanProcessor:()=>hr,ConsoleSpanExporter:()=>mC,ForceFlushState:()=>Bt,InMemorySpanExporter:()=>AC,NoopSpanProcessor:()=>pl,ParentBasedSampler:()=>Wn,RandomIdGenerator:()=>Xn,SamplingDecision:()=>ft,SimpleSpanProcessor:()=>gC,Span:()=>ol,TraceIdRatioBasedSampler:()=>Oi,Tracer:()=>cl});var gi=m(()=>{"use strict";SC();vC();ll();yC();OC();NC();Gd();il();al();Cd();wd();Ai();Id()});var Ni=h((Bfe,RC)=>{"use strict";var RX="2.0.0",PX=Number.MAX_SAFE_INTEGER||9007199254740991,bX=16,xX=250,MX=["major","premajor","minor","preminor","patch","prepatch","prerelease"];RC.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:bX,MAX_SAFE_BUILD_LENGTH:xX,MAX_SAFE_INTEGER:PX,RELEASE_TYPES:MX,SEMVER_SPEC_VERSION:RX,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Ri=h((Gfe,PC)=>{"use strict";var LX=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};PC.exports=LX});var Jn=h((Gt,bC)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:Hd,MAX_SAFE_BUILD_LENGTH:IX,MAX_LENGTH:CX}=Ni(),wX=Ri();Gt=bC.exports={};var UX=Gt.re=[],DX=Gt.safeRe=[],R=Gt.src=[],P=Gt.t={},VX=0,Fd="[a-zA-Z0-9-]",BX=[["\\s",1],["\\d",CX],[Fd,IX]],GX=t=>{for(let[e,n]of BX)t=t.split(`${e}*`).join(`${e}{0,${n}}`).split(`${e}+`).join(`${e}{1,${n}}`);return t},U=(t,e,n)=>{let i=GX(e),a=VX++;wX(t,a,e),P[t]=a,R[a]=e,UX[a]=new RegExp(e,n?"g":void 0),DX[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);Gt.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);Gt.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);Gt.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 dl=h((kfe,xC)=>{"use strict";var kX=Object.freeze({loose:!0}),HX=Object.freeze({}),FX=t=>t?typeof t!="object"?kX:t:HX;xC.exports=FX});var Yd=h((Hfe,IC)=>{"use strict";var MC=/^[0-9]+$/,LC=(t,e)=>{let n=MC.test(t),i=MC.test(e);return n&&i&&(t=+t,e=+e),t===e?0:n&&!i?-1:i&&!n?1:t<e?-1:1},YX=(t,e)=>LC(e,t);IC.exports={compareIdentifiers:LC,rcompareIdentifiers:YX}});var Me=h((Ffe,DC)=>{"use strict";var El=Ri(),{MAX_LENGTH:CC,MAX_SAFE_INTEGER:_l}=Ni(),{safeRe:wC,t:UC}=Jn(),qX=dl(),{compareIdentifiers:Qn}=Yd(),qd=class t{constructor(e,n){if(n=qX(n),e instanceof t){if(e.loose===!!n.loose&&e.includePrerelease===!!n.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>CC)throw new TypeError(`version is longer than ${CC} characters`);El("SemVer",e,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let i=e.trim().match(n.loose?wC[UC.LOOSE]:wC[UC.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>_l||this.major<0)throw new TypeError("Invalid major version");if(this.minor>_l||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>_l||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<_l)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(El("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),Qn(this.major,e.major)||Qn(this.minor,e.minor)||Qn(this.patch,e.patch)}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let n=0;do{let i=this.prerelease[n],a=e.prerelease[n];if(El("prerelease compare",n,i,a),i===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(i===void 0)return-1;if(i===a)continue;return Qn(i,a)}while(++n)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let n=0;do{let i=this.build[n],a=e.build[n];if(El("build compare",n,i,a),i===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(i===void 0)return-1;if(i===a)continue;return Qn(i,a)}while(++n)}inc(e,n,i){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,i);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,i);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,i),this.inc("pre",n,i);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,i),this.inc("pre",n,i);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let a=Number(i)?1:0;if(!n&&i===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[a];else{let 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]),Qn(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}};DC.exports=qd});var qr=h((Yfe,BC)=>{"use strict";var VC=Me(),jX=(t,e,n=!1)=>{if(t instanceof VC)return t;try{return new VC(t,e)}catch(i){if(!n)return null;throw i}};BC.exports=jX});var kC=h((qfe,GC)=>{"use strict";var $X=qr(),KX=(t,e)=>{let n=$X(t,e);return n?n.version:null};GC.exports=KX});var FC=h((jfe,HC)=>{"use strict";var WX=qr(),zX=(t,e)=>{let n=WX(t.trim().replace(/^[=v]+/,""),e);return n?n.version:null};HC.exports=zX});var jC=h(($fe,qC)=>{"use strict";var YC=Me(),XX=(t,e,n,i,a)=>{typeof n=="string"&&(a=i,i=n,n=void 0);try{return new YC(t instanceof YC?t.version:t,n).inc(e,i,a).version}catch{return null}};qC.exports=XX});var WC=h((Kfe,KC)=>{"use strict";var $C=qr(),JX=(t,e)=>{let n=$C(t,null,!0),i=$C(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"};KC.exports=JX});var XC=h((Wfe,zC)=>{"use strict";var QX=Me(),ZX=(t,e)=>new QX(t,e).major;zC.exports=ZX});var QC=h((zfe,JC)=>{"use strict";var eJ=Me(),tJ=(t,e)=>new eJ(t,e).minor;JC.exports=tJ});var ew=h((Xfe,ZC)=>{"use strict";var rJ=Me(),nJ=(t,e)=>new rJ(t,e).patch;ZC.exports=nJ});var rw=h((Jfe,tw)=>{"use strict";var oJ=qr(),iJ=(t,e)=>{let n=oJ(t,e);return n&&n.prerelease.length?n.prerelease:null};tw.exports=iJ});var tt=h((Qfe,ow)=>{"use strict";var nw=Me(),aJ=(t,e,n)=>new nw(t,n).compare(new nw(e,n));ow.exports=aJ});var aw=h((Zfe,iw)=>{"use strict";var sJ=tt(),uJ=(t,e,n)=>sJ(e,t,n);iw.exports=uJ});var uw=h((epe,sw)=>{"use strict";var lJ=tt(),cJ=(t,e)=>lJ(t,e,!0);sw.exports=cJ});var Sl=h((tpe,cw)=>{"use strict";var lw=Me(),fJ=(t,e,n)=>{let i=new lw(t,n),a=new lw(e,n);return i.compare(a)||i.compareBuild(a)};cw.exports=fJ});var pw=h((rpe,fw)=>{"use strict";var pJ=Sl(),dJ=(t,e)=>t.sort((n,i)=>pJ(n,i,e));fw.exports=dJ});var Ew=h((npe,dw)=>{"use strict";var EJ=Sl(),_J=(t,e)=>t.sort((n,i)=>EJ(i,n,e));dw.exports=_J});var Pi=h((ope,_w)=>{"use strict";var SJ=tt(),hJ=(t,e,n)=>SJ(t,e,n)>0;_w.exports=hJ});var hl=h((ipe,Sw)=>{"use strict";var TJ=tt(),vJ=(t,e,n)=>TJ(t,e,n)<0;Sw.exports=vJ});var jd=h((ape,hw)=>{"use strict";var mJ=tt(),yJ=(t,e,n)=>mJ(t,e,n)===0;hw.exports=yJ});var $d=h((spe,Tw)=>{"use strict";var AJ=tt(),OJ=(t,e,n)=>AJ(t,e,n)!==0;Tw.exports=OJ});var Tl=h((upe,vw)=>{"use strict";var gJ=tt(),NJ=(t,e,n)=>gJ(t,e,n)>=0;vw.exports=NJ});var vl=h((lpe,mw)=>{"use strict";var RJ=tt(),PJ=(t,e,n)=>RJ(t,e,n)<=0;mw.exports=PJ});var Kd=h((cpe,yw)=>{"use strict";var bJ=jd(),xJ=$d(),MJ=Pi(),LJ=Tl(),IJ=hl(),CJ=vl(),wJ=(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 bJ(t,n,i);case"!=":return xJ(t,n,i);case">":return MJ(t,n,i);case">=":return LJ(t,n,i);case"<":return IJ(t,n,i);case"<=":return CJ(t,n,i);default:throw new TypeError(`Invalid operator: ${e}`)}};yw.exports=wJ});var Ow=h((fpe,Aw)=>{"use strict";var UJ=Me(),DJ=qr(),{safeRe:ml,t:yl}=Jn(),VJ=(t,e)=>{if(t instanceof UJ)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?ml[yl.COERCEFULL]:ml[yl.COERCE]);else{let u=e.includePrerelease?ml[yl.COERCERTLFULL]:ml[yl.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 DJ(`${i}.${a}.${s}${o}${r}`,e)};Aw.exports=VJ});var Nw=h((ppe,gw)=>{"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}};gw.exports=Wd});var rt=h((dpe,xw)=>{"use strict";var BJ=/\s+/g,zd=class t{constructor(e,n){if(n=kJ(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(BJ," "),this.set=this.raw.split("||").map(i=>this.parseRange(i.trim())).filter(i=>i.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let i=this.set[0];if(this.set=this.set.filter(a=>!Pw(a[0])),this.set.length===0)this.set=[i];else if(this.set.length>1){for(let a of this.set)if(a.length===1&&KJ(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&&jJ)|(this.options.loose&&$J))+":"+e,a=Rw.get(i);if(a)return a;let s=this.options.loose,o=s?We[Be.HYPHENRANGELOOSE]:We[Be.HYPHENRANGE];e=e.replace(o,n9(this.options.includePrerelease)),te("hyphen replace",e),e=e.replace(We[Be.COMPARATORTRIM],FJ),te("comparator trim",e),e=e.replace(We[Be.TILDETRIM],YJ),te("tilde trim",e),e=e.replace(We[Be.CARETTRIM],qJ),te("caret trim",e);let r=e.split(" ").map(p=>WJ(p,this.options)).join(" ").split(/\s+/).map(p=>r9(p,this.options));s&&(r=r.filter(p=>(te("loose invalid filter",p,this.options),!!p.match(We[Be.COMPARATORLOOSE])))),te("range list",r);let u=new Map,l=r.map(p=>new Xd(p,this.options));for(let p of l){if(Pw(p))return[p];u.set(p.value,p)}u.size>1&&u.has("")&&u.delete("");let c=[...u.values()];return Rw.set(i,c),c}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(i=>bw(i,n)&&e.set.some(a=>bw(a,n)&&i.every(s=>a.every(o=>s.intersects(o,n)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new HJ(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}};xw.exports=zd;var GJ=Nw(),Rw=new GJ,kJ=dl(),Xd=bi(),te=Ri(),HJ=Me(),{safeRe:We,t:Be,comparatorTrimReplace:FJ,tildeTrimReplace:YJ,caretTrimReplace:qJ}=Jn(),{FLAG_INCLUDE_PRERELEASE:jJ,FLAG_LOOSE:$J}=Ni(),Pw=t=>t.value==="<0.0.0-0",KJ=t=>t.value==="",bw=(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},WJ=(t,e)=>(te("comp",t,e),t=JJ(t,e),te("caret",t),t=zJ(t,e),te("tildes",t),t=ZJ(t,e),te("xrange",t),t=t9(t,e),te("stars",t),t),Ge=t=>!t||t.toLowerCase()==="x"||t==="*",zJ=(t,e)=>t.trim().split(/\s+/).map(n=>XJ(n,e)).join(" "),XJ=(t,e)=>{let n=e.loose?We[Be.TILDELOOSE]:We[Be.TILDE];return t.replace(n,(i,a,s,o,r)=>{te("tilde",t,i,a,s,o,r);let u;return Ge(a)?u="":Ge(s)?u=`>=${a}.0.0 <${+a+1}.0.0-0`:Ge(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})},JJ=(t,e)=>t.trim().split(/\s+/).map(n=>QJ(n,e)).join(" "),QJ=(t,e)=>{te("caret",t,e);let n=e.loose?We[Be.CARETLOOSE]:We[Be.CARET],i=e.includePrerelease?"-0":"";return t.replace(n,(a,s,o,r,u)=>{te("caret",t,a,s,o,r,u);let l;return Ge(s)?l="":Ge(o)?l=`>=${s}.0.0${i} <${+s+1}.0.0-0`:Ge(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})},ZJ=(t,e)=>(te("replaceXRanges",t,e),t.split(/\s+/).map(n=>e9(n,e)).join(" ")),e9=(t,e)=>{t=t.trim();let n=e.loose?We[Be.XRANGELOOSE]:We[Be.XRANGE];return t.replace(n,(i,a,s,o,r,u)=>{te("xRange",t,i,a,s,o,r,u);let l=Ge(s),c=l||Ge(o),p=c||Ge(r),_=p;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`:p&&(i=`>=${s}.${o}.0${u} <${s}.${+o+1}.0-0`),te("xRange return",i),i})},t9=(t,e)=>(te("replaceStars",t,e),t.trim().replace(We[Be.STAR],"")),r9=(t,e)=>(te("replaceGTE0",t,e),t.trim().replace(We[e.includePrerelease?Be.GTE0PRE:Be.GTE0],"")),n9=t=>(e,n,i,a,s,o,r,u,l,c,p,_)=>(Ge(i)?n="":Ge(a)?n=`>=${i}.0.0${t?"-0":""}`:Ge(s)?n=`>=${i}.${a}.0${t?"-0":""}`:o?n=`>=${n}`:n=`>=${n}${t?"-0":""}`,Ge(l)?u="":Ge(c)?u=`<${+l+1}.0.0-0`:Ge(p)?u=`<${l}.${+c+1}.0-0`:_?u=`<=${l}.${c}.${p}-${_}`:t?u=`<${l}.${c}.${+p+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 bi=h((Epe,Uw)=>{"use strict";var xi=Symbol("SemVer ANY"),Zd=class t{static get ANY(){return xi}constructor(e,n){if(n=Mw(n),e instanceof t){if(e.loose===!!n.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),Qd("comparator",e,n),this.options=n,this.loose=!!n.loose,this.parse(e),this.semver===xi?this.value="":this.value=this.operator+this.semver.version,Qd("comp",this)}parse(e){let n=this.options.loose?Lw[Iw.COMPARATORLOOSE]:Lw[Iw.COMPARATOR],i=e.match(n);if(!i)throw new TypeError(`Invalid comparator: ${e}`);this.operator=i[1]!==void 0?i[1]:"",this.operator==="="&&(this.operator=""),i[2]?this.semver=new Cw(i[2],this.options.loose):this.semver=xi}toString(){return this.value}test(e){if(Qd("Comparator.test",e,this.options.loose),this.semver===xi||e===xi)return!0;if(typeof e=="string")try{e=new Cw(e,this.options)}catch{return!1}return 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 ww(e.value,n).test(this.value):e.operator===""?e.value===""?!0:new ww(this.value,n).test(e.semver):(n=Mw(n),n.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!n.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||Jd(this.semver,"<",e.semver,n)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||Jd(this.semver,">",e.semver,n)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};Uw.exports=Zd;var Mw=dl(),{safeRe:Lw,t:Iw}=Jn(),Jd=Kd(),Qd=Ri(),Cw=Me(),ww=rt()});var Mi=h((_pe,Dw)=>{"use strict";var i9=rt(),a9=(t,e,n)=>{try{e=new i9(e,n)}catch{return!1}return e.test(t)};Dw.exports=a9});var Bw=h((Spe,Vw)=>{"use strict";var s9=rt(),u9=(t,e)=>new s9(t,e).set.map(n=>n.map(i=>i.value).join(" ").trim().split(" "));Vw.exports=u9});var kw=h((hpe,Gw)=>{"use strict";var l9=Me(),c9=rt(),f9=(t,e,n)=>{let i=null,a=null,s=null;try{s=new c9(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};Gw.exports=f9});var Fw=h((Tpe,Hw)=>{"use strict";var p9=Me(),d9=rt(),E9=(t,e,n)=>{let i=null,a=null,s=null;try{s=new d9(e,n)}catch{return null}return t.forEach(o=>{s.test(o)&&(!i||a.compare(o)===1)&&(i=o,a=new p9(i,n))}),i};Hw.exports=E9});var jw=h((vpe,qw)=>{"use strict";var eE=Me(),_9=rt(),Yw=Pi(),S9=(t,e)=>{t=new _9(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||Yw(r,s))&&(s=r);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),s&&(!n||Yw(n,s))&&(n=s)}return n&&t.test(n)?n:null};qw.exports=S9});var Kw=h((mpe,$w)=>{"use strict";var h9=rt(),T9=(t,e)=>{try{return new h9(t,e).range||"*"}catch{return null}};$w.exports=T9});var Al=h((ype,Jw)=>{"use strict";var v9=Me(),Xw=bi(),{ANY:m9}=Xw,y9=rt(),A9=Mi(),Ww=Pi(),zw=hl(),O9=vl(),g9=Tl(),N9=(t,e,n,i)=>{t=new v9(t,i),e=new y9(e,i);let a,s,o,r,u;switch(n){case">":a=Ww,s=O9,o=zw,r=">",u=">=";break;case"<":a=zw,s=g9,o=Ww,r="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(A9(t,e,i))return!1;for(let l=0;l<e.set.length;++l){let c=e.set[l],p=null,_=null;if(c.forEach(f=>{f.semver===m9&&(f=new Xw(">=0.0.0")),p=p||f,_=_||f,a(f.semver,p.semver,i)?p=f:o(f.semver,_.semver,i)&&(_=f)}),p.operator===r||p.operator===u||(!_.operator||_.operator===r)&&s(t,_.semver))return!1;if(_.operator===u&&o(t,_.semver))return!1}return!0};Jw.exports=N9});var Zw=h((Ape,Qw)=>{"use strict";var R9=Al(),P9=(t,e,n)=>R9(t,e,">",n);Qw.exports=P9});var tU=h((Ope,eU)=>{"use strict";var b9=Al(),x9=(t,e,n)=>b9(t,e,"<",n);eU.exports=x9});var oU=h((gpe,nU)=>{"use strict";var rU=rt(),M9=(t,e,n)=>(t=new rU(t,n),e=new rU(e,n),t.intersects(e,n));nU.exports=M9});var aU=h((Npe,iU)=>{"use strict";var L9=Mi(),I9=tt();iU.exports=(t,e,n)=>{let i=[],a=null,s=null,o=t.sort((c,p)=>I9(c,p,n));for(let c of o)L9(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,p]of i)c===p?r.push(c):!p&&c===o[0]?r.push("*"):p?c===o[0]?r.push(`<=${p}`):r.push(`${c} - ${p}`):r.push(`>=${c}`);let u=r.join(" || "),l=typeof e.raw=="string"?e.raw:String(e);return u.length<l.length?u:e}});var pU=h((Rpe,fU)=>{"use strict";var sU=rt(),rE=bi(),{ANY:tE}=rE,Li=Mi(),nE=tt(),C9=(t,e,n={})=>{if(t===e)return!0;t=new sU(t,n),e=new sU(e,n);let i=!1;e:for(let a of t.set){for(let s of e.set){let o=U9(a,s,n);if(i=i||o!==null,o)continue e}if(i)return!1}return!0},w9=[new rE(">=0.0.0-0")],uU=[new rE(">=0.0.0")],U9=(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=w9:t=uU}if(e.length===1&&e[0].semver===tE){if(n.includePrerelease)return!0;e=uU}let i=new Set,a,s;for(let f of t)f.operator===">"||f.operator===">="?a=lU(a,f,n):f.operator==="<"||f.operator==="<="?s=cU(s,f,n):i.add(f.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 f of i){if(a&&!Li(f,String(a),n)||s&&!Li(f,String(s),n))return null;for(let S of e)if(!Li(f,String(S),n))return!1;return!0}let r,u,l,c,p=s&&!n.includePrerelease&&s.semver.prerelease.length?s.semver:!1,_=a&&!n.includePrerelease&&a.semver.prerelease.length?a.semver:!1;p&&p.prerelease.length===1&&s.operator==="<"&&p.prerelease[0]===0&&(p=!1);for(let f of e){if(c=c||f.operator===">"||f.operator===">=",l=l||f.operator==="<"||f.operator==="<=",a){if(_&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===_.major&&f.semver.minor===_.minor&&f.semver.patch===_.patch&&(_=!1),f.operator===">"||f.operator===">="){if(r=lU(a,f,n),r===f&&r!==a)return!1}else if(a.operator===">="&&!Li(a.semver,String(f),n))return!1}if(s){if(p&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===p.major&&f.semver.minor===p.minor&&f.semver.patch===p.patch&&(p=!1),f.operator==="<"||f.operator==="<="){if(u=cU(s,f,n),u===f&&u!==s)return!1}else if(s.operator==="<="&&!Li(s.semver,String(f),n))return!1}if(!f.operator&&(s||a)&&o!==0)return!1}return!(a&&l&&!s&&o!==0||s&&c&&!a&&o!==0||_||p)},lU=(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},cU=(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};fU.exports=C9});var SU=h((Ppe,_U)=>{"use strict";var oE=Jn(),dU=Ni(),D9=Me(),EU=Yd(),V9=qr(),B9=kC(),G9=FC(),k9=jC(),H9=WC(),F9=XC(),Y9=QC(),q9=ew(),j9=rw(),$9=tt(),K9=aw(),W9=uw(),z9=Sl(),X9=pw(),J9=Ew(),Q9=Pi(),Z9=hl(),e7=jd(),t7=$d(),r7=Tl(),n7=vl(),o7=Kd(),i7=Ow(),a7=bi(),s7=rt(),u7=Mi(),l7=Bw(),c7=kw(),f7=Fw(),p7=jw(),d7=Kw(),E7=Al(),_7=Zw(),S7=tU(),h7=oU(),T7=aU(),v7=pU();_U.exports={parse:V9,valid:B9,clean:G9,inc:k9,diff:H9,major:F9,minor:Y9,patch:q9,prerelease:j9,compare:$9,rcompare:K9,compareLoose:W9,compareBuild:z9,sort:X9,rsort:J9,gt:Q9,lt:Z9,eq:e7,neq:t7,gte:r7,lte:n7,cmp:o7,coerce:i7,Comparator:a7,Range:s7,satisfies:u7,toComparators:l7,maxSatisfying:c7,minSatisfying:f7,minVersion:p7,validRange:d7,outside:E7,gtr:_7,ltr:S7,intersects:h7,simplifyRange:T7,subset:v7,SemVer:D9,re:oE.re,src:oE.src,tokens:oE.t,SEMVER_SPEC_VERSION:dU.SEMVER_SPEC_VERSION,RELEASE_TYPES:dU.RELEASE_TYPES,compareIdentifiers:EU.compareIdentifiers,rcompareIdentifiers:EU.rcompareIdentifiers}});function y7(t){var e=decodeURIComponent(t).split(":");if(e.length!==4)return null;var n=TU(e,4),i=n[0],a=n[1],s=n[3],o=i.padStart(32,"0"),r=a.padStart(16,"0"),u=m7.test(s)?parseInt(s,16)&1:1;return{traceId:o,spanId:r,isRemote:!0,traceFlags:u}}var hU,TU,iE,Ol,vU,m7,mU=m(()=>{"use strict";x();K();hU=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.")},TU=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",Ol="uberctx",vU=function(){function t(e){typeof e=="string"?(this._jaegerTraceHeader=e,this._jaegerBaggageHeaderPrefix=Ol):(this._jaegerTraceHeader=e?.customTraceHeader||iE,this._jaegerBaggageHeaderPrefix=e?.customBaggageHeaderPrefix||Ol)}return t.prototype.inject=function(e,n,i){var a,s,o=X.getSpanContext(e),r=it.getBaggage(e);if(o&&xe(e)===!1){var u="0"+(o.traceFlags||J.NONE).toString(16);i.set(n,this._jaegerTraceHeader,o.traceId+":"+o.spanId+":0:"+u)}if(r)try{for(var l=hU(r.getAllEntries()),c=l.next();!c.done;c=l.next()){var p=TU(c.value,2),_=p[0],f=p[1];i.set(n,this._jaegerBaggageHeaderPrefix+"-"+_,encodeURIComponent(f.value))}}catch(S){a={error:S}}finally{try{c&&!c.done&&(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}}),p=e;if(typeof l=="string"){var _=y7(l);_&&(p=X.setSpanContext(p,_))}if(c.length===0)return p;var f=(r=it.getBaggage(e))!==null&&r!==void 0?r:it.createBaggage();try{for(var S=hU(c),v=S.next();!v.done;v=S.next()){var T=v.value;T.value!==void 0&&(f=f.setEntry(T.key,{value:decodeURIComponent(T.value)}))}}catch(A){a={error:A}}finally{try{v&&!v.done&&(s=S.return)&&s.call(S)}finally{if(a)throw a.error}}return p=it.setBaggage(p,f),p},t.prototype.fields=function(){return[this._jaegerTraceHeader]},t}(),m7=/^[0-9a-f]{1,2}$/i});var yU={};nt(yU,{JaegerPropagator:()=>vU,UBER_BAGGAGE_HEADER_PREFIX:()=>Ol,UBER_TRACE_ID_HEADER:()=>iE});var AU=m(()=>{"use strict";mU()});var NU=h(Rl=>{"use strict";Object.defineProperty(Rl,"__esModule",{value:!0});Rl.NodeTracerProvider=void 0;var OU=KI(),gl=(rC(),Y(tC)),gU=(gi(),Y(kd)),A7=SU(),O7=(AU(),Y(yU)),Nl=class extends gU.BasicTracerProvider{constructor(e={}){super(e)}register(e={}){if(e.contextManager===void 0){let n=A7.gte(process.version,"14.8.0")?OU.AsyncLocalStorageContextManager:OU.AsyncHooksContextManager;e.contextManager=new n,e.contextManager.enable()}super.register(e)}};Rl.NodeTracerProvider=Nl;Nl._registeredPropagators=new Map([...gU.BasicTracerProvider._registeredPropagators,["b3",()=>new gl.B3Propagator({injectEncoding:gl.B3InjectEncoding.SINGLE_HEADER})],["b3multi",()=>new gl.B3Propagator({injectEncoding:gl.B3InjectEncoding.MULTI_HEADER})],["jaeger",()=>new O7.JaegerPropagator]])});var RU=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 g7=NU();Object.defineProperty(q,"NodeTracerProvider",{enumerable:!0,get:function(){return g7.NodeTracerProvider}});var ke=(gi(),Y(kd));Object.defineProperty(q,"AlwaysOffSampler",{enumerable:!0,get:function(){return ke.AlwaysOffSampler}});Object.defineProperty(q,"AlwaysOnSampler",{enumerable:!0,get:function(){return ke.AlwaysOnSampler}});Object.defineProperty(q,"BasicTracerProvider",{enumerable:!0,get:function(){return ke.BasicTracerProvider}});Object.defineProperty(q,"BatchSpanProcessor",{enumerable:!0,get:function(){return ke.BatchSpanProcessor}});Object.defineProperty(q,"ConsoleSpanExporter",{enumerable:!0,get:function(){return ke.ConsoleSpanExporter}});Object.defineProperty(q,"ForceFlushState",{enumerable:!0,get:function(){return ke.ForceFlushState}});Object.defineProperty(q,"InMemorySpanExporter",{enumerable:!0,get:function(){return ke.InMemorySpanExporter}});Object.defineProperty(q,"NoopSpanProcessor",{enumerable:!0,get:function(){return ke.NoopSpanProcessor}});Object.defineProperty(q,"ParentBasedSampler",{enumerable:!0,get:function(){return ke.ParentBasedSampler}});Object.defineProperty(q,"RandomIdGenerator",{enumerable:!0,get:function(){return ke.RandomIdGenerator}});Object.defineProperty(q,"SamplingDecision",{enumerable:!0,get:function(){return ke.SamplingDecision}});Object.defineProperty(q,"SimpleSpanProcessor",{enumerable:!0,get:function(){return ke.SimpleSpanProcessor}});Object.defineProperty(q,"Span",{enumerable:!0,get:function(){return ke.Span}});Object.defineProperty(q,"TraceIdRatioBasedSampler",{enumerable:!0,get:function(){return ke.TraceIdRatioBasedSampler}});Object.defineProperty(q,"Tracer",{enumerable:!0,get:function(){return ke.Tracer}})});var PU=h(Pl=>{"use strict";Object.defineProperty(Pl,"__esModule",{value:!0});Pl.OTLPTraceExporter=void 0;var N7=hd(),R7=(Gu(),Y(fd)),aE=class extends N7.OTLPGRPCExporterNodeBase{constructor(e={}){super(e,R7.ProtobufTraceSerializer,"TraceExportService","/opentelemetry.proto.collector.trace.v1.TraceService/Export","TRACES")}};Pl.OTLPTraceExporter=aE});var bU=h(jr=>{"use strict";var P7=jr&&jr.__createBinding||(Object.create?function(t,e,n,i){i===void 0&&(i=n),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]}),b7=jr&&jr.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&P7(e,t,n)};Object.defineProperty(jr,"__esModule",{value:!0});b7(PU(),jr)});var wU=Fe($l(),1),UU=Fe(eo(),1);import M7 from"path";function q1(t){return typeof t=="object"&&t!==null}function j1(t){return q1(t)&&typeof t.length=="number"}function $1(t){return Array.isArray(t)?t:t===void 0?[]:j1(t)||t instanceof Set?Array.from(t):[t]}var It=$1;function K1(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 qi=K1;var ce={short:/^-([^\d-])$/,long:/^--(\S+)/,combinedShort:/^-[^\d-]{2,}$/,optEquals:/^(--\S+?)=(.*)/},ji=class extends Array{load(e){if(this.clear(),e&&e!==process.argv)e=It(e);else{e=process.argv.slice(0);let n=process.execArgv.some(X1)?1:2;e.splice(0,n)}e.forEach(n=>this.push(String(n)))}clear(){this.length=0}expandOptionEqualsNotation(){if(this.some(e=>ce.optEquals.test(e))){let e=[];this.forEach(n=>{let i=n.match(ce.optEquals);i?e.push(i[1],i[2]):e.push(n)}),this.clear(),this.load(e)}}expandGetoptNotation(){this.hasCombinedShortOptions()&&qi(this,ce.combinedShort,W1)}hasCombinedShortOptions(){return this.some(e=>ce.combinedShort.test(e))}static from(e){let n=new this;return n.load(e),n}};function W1(t){return t=t.slice(1),t.split("").map(e=>"-"+e)}function $i(t){return ce.optEquals.test(t)}function uo(t){return(ce.short.test(t)||ce.long.test(t))&&!ce.optEquals.test(t)}function z1(t){return ce.long.test(t)&&!$i(t)}function Kl(t){return ce.short.test(t)?t.match(ce.short)[1]:z1(t)?t.match(ce.long)[1]:$i(t)?t.match(ce.optEquals)[1].replace(/^--/,""):null}function _S(t){return!(uo(t)||ce.combinedShort.test(t)||ce.optEquals.test(t))}function X1(t){return["--eval","-e"].indexOf(t)>-1||t.startsWith("--eval=")}function J1(t){return!isNaN(parseFloat(t))}function Q1(t){return!isNaN(parseFloat(t))&&isFinite(t)}function Z1(t){return t!==null&&typeof t=="object"&&t.constructor===Object}function eV(t){return hS(t)&&typeof t.length=="number"}function hS(t){return typeof t=="object"&&t!==null}function lo(t){return typeof t<"u"}function tV(t){return!lo(t)}function TS(t){return t===null}function rV(t){return lo(t)&&!TS(t)&&!Number.isNaN(t)}function nV(t){return typeof t=="function"?/^class /.test(Function.prototype.toString.call(t)):!1}function oV(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 iV(t){if(t){let e=lo(Promise)&&t instanceof Promise,n=t.then&&typeof t.then=="function";return!!(e||n)}else return!1}function aV(t){return t===null||!lo(t)?!1:typeof t[Symbol.iterator]=="function"||typeof t[Symbol.asyncIterator]=="function"}function sV(t){return typeof t=="string"}function uV(t){return typeof t=="function"}function lV(t){return typeof t=="function"&&t.constructor.name==="AsyncFunction"}var Se={isNumber:J1,isFiniteNumber:Q1,isPlainObject:Z1,isArrayLike:eV,isObject:hS,isDefined:lo,isUndefined:tV,isNull:TS,isDefinedValue:rV,isClass:nV,isPrimitive:oV,isPromise:iV,isIterable:aV,isString:sV,isFunction:uV,isAsyncFunction:lV};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)}},co=Wl;var zl=class extends Array{validate(e){this.some(_=>!_.name)&&Ct("INVALID_DEFINITIONS","Invalid option definitions: the `name` property is required on each definition"),this.some(_=>_.type&&typeof _.type!="function")&&Ct("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)))&&Ct("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))&&Ct("INVALID_DEFINITIONS","Invalid option definition: an alias must be a single character"),this.some(_=>(a=_,_.alias==="-"))&&Ct("INVALID_DEFINITIONS",'Invalid option definition: an alias cannot be "-"'),mS(this.map(_=>e?_.name.toLowerCase():_.name))&&Ct("INVALID_DEFINITIONS","Two or more option definitions have the same name"),mS(this.map(_=>e&&Se.isDefined(_.alias)?_.alias.toLowerCase():_.alias))&&Ct("INVALID_DEFINITIONS","Two or more option definitions have the same alias"),this.filter(_=>_.defaultOption===!0).length>1&&Ct("INVALID_DEFINITIONS","Only one option definition can be the defaultOption"),this.some(_=>(a=_,_.isBoolean()&&_.defaultOption))&&Ct("INVALID_DEFINITIONS",`A boolean option ["${a.name}"] can not also be the defaultOption.`)}get(e,n){if(uo(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(vS)}whereNotGrouped(){return this.filter(e=>!vS(e))}whereDefaultValueSet(){return this.filter(e=>Se.isDefined(e.defaultValue))}static from(e,n){if(e instanceof this)return e;let i=super.from(It(e),a=>co.create(a));return i.validate(n),i}};function Ct(t,e){let n=new Error(e);throw n.name=t,n}function vS(t){return It(t.group).some(e=>e)}function mS(t){let e={};for(let n=0;n<t.length;n++){let i=t[n];if(e[i])return!0;Se.isDefined(i)&&(e[i]=!0)}}var Zr=zl;var Xl=class{constructor(e,n){this.options=Object.assign({},n),this.definitions=Zr.from(e,this.options.caseInsensitive),this.argv=ji.from(this.options.argv),this.argv.hasCombinedShortOptions()&&qi(this.argv,ce.combinedShort.test.bind(ce.combinedShort),i=>(i=i.slice(1),i.split("").map(a=>({origArg:`-${i}`,arg:"-"+a}))))}*[Symbol.iterator](){let e=this.definitions,n,i,a,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(uo(l))n=e.get(l,this.options.caseInsensitive),i=void 0,n?(i=n.isBoolean()?!0:null,s="set"):s="unknown_option";else if($i(l)){let p=l.match(ce.optEquals);n=e.get(p[1],this.options.caseInsensitive),n?n.isBoolean()?(yield{event:"unknown_value",arg:l,name:"_unknown",value:i,def:n},s="set",i=!0):(s="set",i=p[2]):s="unknown_option"}else _S(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}}},yS=Xl;var yr=new WeakMap,Ki=class{constructor(e){this.definition=new co(e),this.state=null,this.resetToDefault()}get(){return yr.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?yr.set(this,e):(yr.set(this,i.type(e)),this.state=n)}resetToDefault(){Se.isDefined(this.definition.defaultValue)?this.definition.isMultiple()?yr.set(this,It(this.definition.defaultValue).slice()):yr.set(this,this.definition.defaultValue):this.definition.isMultiple()?yr.set(this,[]):yr.set(this,null),this.state="default"}static create(e){return e=new co(e),e.isBoolean()?Jl.create(e):new this(e)}},Jl=class extends Ki{set(e){super.set(!0)}static create(e){return new this(e)}},fo=Ki;var AS=Fe(fE(),1),Ql=class extends Map{constructor(e){super(),this.definitions=Zr.from(e),this.set("_unknown",fo.create({name:"_unknown",multiple:!0}));for(let n of this.definitions.whereDefaultValueSet())this.set(n.name,fo.create(n))}toObject(e){e=e||{};let n={};for(let i of this){let a=e.camelCase&&i[0]!=="_unknown"?(0,AS.default)(i[0]):i[0],s=i[1];a==="_unknown"&&!s.get().length||(n[a]=s.get())}return e.skipUnknown&&delete n._unknown,n}},Wi=Ql;var Zl=Fe(fE(),1),ec=class extends Wi{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 It(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}},OS=ec;function cV(t,e){e=e||{},e.stopAtFirstUnknown&&(e.partial=!0),t=Zr.from(t,e.caseInsensitive);let n=new yS(t,{argv:e.argv,stopAtFirstUnknown:e.stopAtFirstUnknown,caseInsensitive:e.caseInsensitive}),i=t.isGrouped()?OS:Wi,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=fo.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 gS=cV;var DU=Fe(HU(),1),VU=Fe(FU(),1),BU=Fe(QO(),1);import L7 from"http";import{Session as I7}from"node:inspector/promises";import{createRequire as pY}from"module";var lc=Fe($l(),1);import ra from"path";import uc from"os";var dY=pY(import.meta.url);function ZO(t){let e=dY.resolve(t),n=ra.dirname(e);for(;!lc.default.existsSync(ra.join(n,"package.json"));)n=ra.dirname(n);let i=lc.default.readFileSync(ra.join(n,"package.json"),"utf-8");return JSON.parse(i)}var na=class{constructor(e){this.instance=e;let n=ZO("@sentio/sdk"),i=ZO("@sentio/runtime");console.log("Runtime version:",i.version,"SDK version:",n.version);let a=n.version.split(".");this.sdkMinorVersion=parseInt(a[1])}instance;sdkMinorVersion;async getConfig(e,n){let i=await this.instance.getConfig(e,n);if(i.executionConfig=lE.fromPartial(Ll.execution),i.contractConfigs)for(let a of i.contractConfigs)a.aptosCallConfigs&&(a.moveCallConfigs=a.aptosCallConfigs),a.aptosEventConfigs&&(a.moveEventConfigs=a.aptosEventConfigs);return i}async start(e,n){return await this.instance.start(e,n)}async stop(e,n){return await this.instance.stop(e,n)}async processBindings(e,n){Ll.execution.sequential&&(e.bindings=e.bindings.sort(EY));for(let i of e.bindings)this.adjustDataBinding(i);try{let i=await this.instance.processBindings(e,n);return this.adjustResult(i.result),!i.configUpdated&&i.result?.states?.configUpdated&&(i.configUpdated=i.result?.states?.configUpdated),i}catch(i){throw this.sdkMinorVersion<=16&&(i.code===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){if(e)switch(e.handlerType){case 6:e.data?.aptEvent&&e.data.aptEvent.rawTransaction&&!e.data.aptEvent.transaction&&(e.data.aptEvent.transaction=JSON.parse(e.data.aptEvent.rawTransaction));break;case 7:e.data?.aptCall&&e.data.aptCall.rawTransaction&&!e.data.aptCall.transaction&&(e.data.aptCall.transaction=JSON.parse(e.data.aptCall.rawTransaction));break;case 8:e.data?.aptResource?.resources&&e.data.aptResource.rawResources&&e.data.aptResource.rawResources.length>0&&(e.data.aptResource.resources=e.data.aptResource.rawResources.map(n=>JSON.parse(n)));break;case 0:e.data?.ethBlock&&e.data.raw.length===0&&(e.data.raw=new TextEncoder().encode(JSON.stringify(e.data.ethBlock.block)));break;default:break}}};function EY(t,e){let n=eg(t)||new Date(0),i=eg(e)||new Date(0),a=n.getTime()-i.getTime();return a!==0?a:tg(t)-tg(e)}function eg(t){return t.data?.ethLog?.timestamp||t.data?.ethTransaction?.timestamp||(t.data?.ethBlock?.block?.timestamp?new Date(Number(t.data.ethBlock.block.timestamp)*1e3):void 0)||t.data?.ethTrace?.timestamp||(t.data?.aptCall?.transaction?new Date(Number(t.data.aptCall.transaction.timestamp)/1e3):void 0)||(t.data?.aptEvent?.transaction?new Date(Number(t.data.aptEvent.transaction.timestamp)/1e3):void 0)||(t.data?.aptResource?.timestampMicros?new Date(Number(t.data.aptResource.timestampMicros)/1e3):void 0)||t.data?.fuelCall?.timestamp}function tg(t){return t.data?.ethLog?.log?.logIndex||t.data?.ethTransaction?.transaction?.transactionIndex||t.data?.ethBlock?.block?.number||t.data?.ethTrace?.trace?.transactionPosition}import("node:process").then(t=>t.stdout.write(""));var At=Fe(_0(),1);function S0(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 h0(t,e){let n={transform:a=>{let s=[];typeof a.message=="object"?s.push(S0(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(S0(u)):s.push(u)}return a.message=s.join(" "),a}},i=(0,At.createLogger)({format:At.format.combine(At.format.timestamp({format:"YYYY-MM-DDTHH:mm:ss.SSSZ"}),n,At.format.errors({stack:!0}),t?At.format.json():At.format.simple()),level:e?"debug":"info",transports:[new At.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(""));Gs();Ln();var xU=Fe(kI(),1),MU=Fe(qI(),1),sE=Fe(RU(),1),LU=Fe(bU(),1);gi();x();async function IU(t){t&&g.setLogger(new _E,ot.DEBUG);let e=await Bs.detect(),n=new pi({resource:e,readers:[new nu({exporter:new xU.OTLPMetricExporter}),new MU.PrometheusExporter({port:4041})]}),i=new sE.NodeTracerProvider({resource:e}),a=new LU.OTLPTraceExporter,s=new hr(a);i.addSpanProcessor(s),Ci.setGlobalMeterProvider(n),X.setGlobalTracerProvider(i),["SIGINT","SIGTERM"].forEach(o=>{process.on(o,()=>x7())}),Ci.getMeter("processor").createGauge("up").record(1)}async function x7(){let t=X.getTracerProvider();if(t instanceof TE){let n=t.getDelegate();n instanceof sE.NodeTracerProvider&&n.shutdown().catch(console.error)}let e=Ci.getMeterProvider();e instanceof pi&&e.shutdown().catch(console.error)}import("node:process").then(t=>t.stdout.write(""));var bl=class{constructor(e){this.loader=e}async listen(e){let n=xl.INSTANCE;await this.loader(),await n.configure(uE.create()),console.log("Starting Action Server at:",e),await n.startServer(e)}forceShutdown(){xl.INSTANCE.shutdown()}};import("node:process").then(t=>t.stdout.write(""));var C7=[{name:"target",type:String,defaultOption:!0},{name:"port",alias:"p",type:String,defaultValue:"4000"},{name:"concurrency",type:Number,defaultValue:4},{name:"batch-count",type:Number,defaultValue:1},{name:"chains-config",alias:"c",type:String,defaultValue:"chains-config.json"},{name:"chainquery-server",type:String,defaultValue:""},{name:"pricefeed-server",type:String,defaultValue:""},{name:"log-format",type:String,defaultValue:"console"},{name:"debug",type:Boolean,defaultValue:!1},{name:"start-action-server",type:Boolean,defaultValue:!1}],He=gS(C7,{partial:!0}),w7=process.env.LOG_LEVEL?.toUpperCase();h0(He["log-format"]==="json",w7==="debug"?!0:He.debug);console.debug("Starting with",He.target);await IU(He.debug);Error.stackTraceLimit=20;var U7=M7.resolve(He["chains-config"]),D7=wU.default.readJsonSync(U7),V7=process.env.OVERRIDE_CONCURRENCY?parseInt(process.env.OVERRIDE_CONCURRENCY):void 0,B7=process.env.OVERRIDE_BATCH_COUNT?parseInt(process.env.OVERRIDE_BATCH_COUNT):void 0;Tr.INSTANCE.concurrency=V7??He.concurrency;Tr.INSTANCE.batchCount=B7??He["batch-count"];Tr.INSTANCE.chainQueryAPI=He["chainquery-server"];Tr.INSTANCE.priceFeedAPI=He["pricefeed-server"];for(let[t,e]of Object.entries(D7)){let n=e;if(n.ChainServer)Tr.INSTANCE.chainServer.set(t,n.ChainServer);else{let i=n.Https?.[0];i?Tr.INSTANCE.chainServer.set(t,i):console.error("not valid config for chain",t)}}console.debug("Starting Server",He);var $r,Zn,CU=async()=>{let t=await import(He.target);return console.debug("Module loaded",t),t};if(He["start-action-server"])$r=new bl(CU),$r.listen(He.port);else{$r=(0,DU.createServer)({"grpc.max_send_message_length":384*1024*1024,"grpc.max_receive_message_length":384*1024*1024,"grpc.default_compression_algorithm":UU.compressionAlgorithms.gzip}).use((0,BU.openTelemetryServerMiddleware)()).use(VU.errorDetailsServerMiddleware),Zn=new yE(CU,$r.shutdown);let t=new na(Zn);$r.add(cE,t),$r.listen("0.0.0.0:"+He.port),console.log("Processor Server Started at:",He.port)}var GU=4040,G7=L7.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 I7;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(GU);console.log("Metric Server Started at:",GU);process.on("SIGINT",function(){k7(0)}).on("uncaughtException",t=>{console.error("Uncaught Exception, please checking if await is properly used",t),Zn&&(Zn.unhandled=t)}).on("unhandledRejection",(t,e)=>{t?.message.startsWith('invalid ENS name (disallowed character: "*"')||(console.error("Unhandled Rejection, please checking if await is properly",t),Zn&&(Zn.unhandled=t))});function k7(t){$r?.forceShutdown(),console.log("RPC server shut down"),G7.close(function(){console.log("Http server shut down"),process.exit(t)})}import("node:process").then(t=>t.stdout.write(""));
|
59
|
+
`}};Xu.PrometheusSerializer=Ad});var YI=h(Qu=>{"use strict";Object.defineProperty(Qu,"__esModule",{value:!0});Qu.PrometheusExporter=void 0;var mi=(x(),Y(Pe)),Vz=(K(),Y(Ds)),gd=(Ln(),Y(zp)),Bz=L("http"),Gz=Od(),kz=L("url"),Ju=class t extends gd.MetricReader{constructor(e={},n=()=>{}){super({aggregationSelector:i=>gd.Aggregation.Default(),aggregationTemporalitySelector:i=>gd.AggregationTemporality.CUMULATIVE,metricProducers:e.metricProducers}),this._requestHandler=(i,a)=>{i.url!=null&&new kz.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&&mi.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,Bz.createServer)(this._requestHandler).unref(),this._serializer=new Gz.PrometheusSerializer(this._prefix,this._appendTimestamp),this._baseUrl=`http://${this._host}:${this._port}/`,this._endpoint=(e.endpoint||t.DEFAULT_OPTIONS.endpoint).replace(/^([^/])/,"/$1"),e.preventServerStart!==!0?this.startServer().then(n,i=>{mi.diag.error(i),n(i)}):n&&queueMicrotask(n)}async onForceFlush(){}onShutdown(){return this.stopServer()}stopServer(){return this._server?new Promise(e=>{this._server.close(n=>{n?n.code!=="ERR_SERVER_NOT_RUNNING"&&(0,Vz.globalErrorHandler)(n):mi.diag.debug("Prometheus exporter was stopped"),e()})}):(mi.diag.debug("Prometheus stopServer() was called but server was never started."),Promise.resolve())}startServer(){var e;return(e=this._startServerPromise)!==null&&e!==void 0||(this._startServerPromise=new Promise((n,i)=>{this._server.once("error",i),this._server.listen({port:this._port,host:this._host},()=>{mi.diag.debug(`Prometheus exporter server started: ${this._host}:${this._port}/${this._endpoint}`),n()})})),this._startServerPromise}getMetricsRequestHandler(e,n){this._exportMetrics(n)}};Qu.PrometheusExporter=Ju;Ju.DEFAULT_OPTIONS={host:void 0,port:9464,endpoint:"/metrics",prefix:"",appendTimestamp:!1}});var qI=h(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.PrometheusSerializer=kn.PrometheusExporter=void 0;var Hz=YI();Object.defineProperty(kn,"PrometheusExporter",{enumerable:!0,get:function(){return Hz.PrometheusExporter}});var Fz=Od();Object.defineProperty(kn,"PrometheusSerializer",{enumerable:!0,get:function(){return Fz.PrometheusSerializer}})});var Rd=h(Zu=>{"use strict";Object.defineProperty(Zu,"__esModule",{value:!0});Zu.AbstractAsyncHooksContextManager=void 0;var Yz=L("events"),qz=["addListener","on","once","prependListener","prependOnceListener"],Nd=class{constructor(){this._kOtListeners=Symbol("OtListeners"),this._wrapped=!1}bind(e,n){return n instanceof Yz.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),qz.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=Nd});var jI=h(el=>{"use strict";Object.defineProperty(el,"__esModule",{value:!0});el.AsyncHooksContextManager=void 0;var jz=(x(),Y(Pe)),$z=L("async_hooks"),Kz=Rd(),Pd=class extends Kz.AbstractAsyncHooksContextManager{constructor(){super(),this._contexts=new Map,this._stack=[],this._asyncHook=$z.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:jz.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=Pd});var $I=h(tl=>{"use strict";Object.defineProperty(tl,"__esModule",{value:!0});tl.AsyncLocalStorageContextManager=void 0;var Wz=(x(),Y(Pe)),zz=L("async_hooks"),Xz=Rd(),bd=class extends Xz.AbstractAsyncHooksContextManager{constructor(){super(),this._asyncLocalStorage=new zz.AsyncLocalStorage}active(){var e;return(e=this._asyncLocalStorage.getStore())!==null&&e!==void 0?e:Wz.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=bd});var KI=h(Hn=>{"use strict";Object.defineProperty(Hn,"__esModule",{value:!0});Hn.AsyncLocalStorageContextManager=Hn.AsyncHooksContextManager=void 0;var Jz=jI();Object.defineProperty(Hn,"AsyncHooksContextManager",{enumerable:!0,get:function(){return Jz.AsyncHooksContextManager}});var Qz=$I();Object.defineProperty(Hn,"AsyncLocalStorageContextManager",{enumerable:!0,get:function(){return Qz.AsyncLocalStorageContextManager}})});var Fn,xd=m(()=>{"use strict";x();Fn=Kr("OpenTelemetry Context Key B3 Debug Flag")});var _r,Yn,qn,jn,rl,$n,yi=m(()=>{"use strict";_r="b3",Yn="x-b3-traceid",qn="x-b3-spanid",jn="x-b3-sampled",rl="x-b3-parentspanid",$n="x-b3-flags"});function tX(t){return t===J.SAMPLED||t===J.NONE}function rX(t){return Array.isArray(t)?t[0]:t}function nl(t,e,n){var i=e.get(t,n);return rX(i)}function nX(t,e){var n=nl(t,e,Yn);return typeof n=="string"?n.padStart(32,"0"):""}function oX(t,e){var n=nl(t,e,qn);return typeof n=="string"?n:""}function WI(t,e){var n=nl(t,e,$n);return n==="1"?"1":void 0}function iX(t,e){var n=nl(t,e,jn),i=WI(t,e);if(i==="1"||Zz.has(n))return J.SAMPLED;if(n===void 0||eX.has(n))return J.NONE}var Zz,eX,zI,XI=m(()=>{"use strict";x();K();xd();yi();Zz=new Set([!0,"true","True","1",1]),eX=new Set([!1,"false","False","0",0]);zI=function(){function t(){}return t.prototype.inject=function(e,n,i){var a=X.getSpanContext(e);if(!(!a||!dt(a)||xe(e))){var s=e.getValue(Fn);i.set(n,Yn,a.traceId),i.set(n,qn,a.spanId),s==="1"?i.set(n,$n,s):a.traceFlags!==void 0&&i.set(n,jn,(J.SAMPLED&a.traceFlags)===J.SAMPLED?"1":"0")}},t.prototype.extract=function(e,n,i){var a=nX(n,i),s=oX(n,i),o=iX(n,i),r=WI(n,i);return kt(a)&&Ii(s)&&tX(o)?(e=e.setValue(Fn,r),X.setSpanContext(e,{traceId:a,spanId:s,isRemote:!0,traceFlags:o})):e},t.prototype.fields=function(){return[Yn,qn,$n,jn,rl]},t}()});function fX(t){return t.length===32?t:""+uX+t}function pX(t){return t&&lX.has(t)?J.SAMPLED:J.NONE}var aX,sX,uX,lX,cX,JI,QI=m(()=>{"use strict";x();K();xd();yi();aX=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},sX=/((?:[0-9a-f]{16}){1,2})-([0-9a-f]{16})(?:-([01d](?![0-9a-f])))?(?:-([0-9a-f]{16}))?/,uX="0".repeat(16),lX=new Set(["d","1"]),cX="d";JI=function(){function t(){}return t.prototype.inject=function(e,n,i){var a=X.getSpanContext(e);if(!(!a||!dt(a)||xe(e))){var s=e.getValue(Fn)||a.traceFlags&1,o=a.traceId+"-"+a.spanId+"-"+s;i.set(n,_r,o)}},t.prototype.extract=function(e,n,i){var a=i.get(n,_r),s=Array.isArray(a)?a[0]:a;if(typeof s!="string")return e;var o=s.match(sX);if(!o)return e;var r=aX(o,4),u=r[1],l=r[2],c=r[3],p=fX(u);if(!kt(p)||!Ii(l))return e;var _=pX(c);return c===cX&&(e=e.setValue(Fn,c)),X.setSpanContext(e,{traceId:p,spanId:l,isRemote:!0,traceFlags:_})},t.prototype.fields=function(){return[_r]},t}()});var Kn,Md=m(()=>{"use strict";(function(t){t[t.SINGLE_HEADER=0]="SINGLE_HEADER",t[t.MULTI_HEADER=1]="MULTI_HEADER"})(Kn||(Kn={}))});var ZI,eC=m(()=>{"use strict";K();XI();QI();yi();Md();ZI=function(){function t(e){e===void 0&&(e={}),this._b3MultiPropagator=new zI,this._b3SinglePropagator=new JI,e.injectEncoding===Kn.MULTI_HEADER?(this._inject=this._b3MultiPropagator.inject,this._fields=this._b3MultiPropagator.fields()):(this._inject=this._b3SinglePropagator.inject,this._fields=this._b3SinglePropagator.fields())}return t.prototype.inject=function(e,n,i){xe(e)||this._inject(e,n,i)},t.prototype.extract=function(e,n,i){var a=i.get(n,_r),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 tC={};nt(tC,{B3InjectEncoding:()=>Kn,B3Propagator:()=>ZI,B3_CONTEXT_HEADER:()=>_r,X_B3_FLAGS:()=>$n,X_B3_PARENT_SPAN_ID:()=>rl,X_B3_SAMPLED:()=>jn,X_B3_SPAN_ID:()=>qn,X_B3_TRACE_ID:()=>Yn});var rC=m(()=>{"use strict";eC();yi();Md()});var nC,oC=m(()=>{"use strict";nC="exception"});var Ld,dX,iC,EX,ol,Id=m(()=>{"use strict";x();K();Ko();oC();Ld=function(){return Ld=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},Ld.apply(this,arguments)},dX=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},iC=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),a,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},EX=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:mE.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 p=Date.now();this._performanceStartTime=Ze.now(),this._performanceOffset=p-(this._performanceStartTime+An()),this._startTimeProvided=u!=null,this.startTime=this._getTime(u??p),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this._spanLimits=e.getSpanLimits(),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,c!=null&&this.setAttributes(c),this._spanProcessor=e.getActiveSpanProcessor(),this._spanProcessor.onStart(this,n)}return t.prototype.spanContext=function(){return this._spanContext},t.prototype.setAttribute=function(e,n){return n==null||this._isSpanEnded()?this:e.length===0?(g.warn("Invalid attribute key: "+e),this):Xo(n)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(n),this):(g.warn("Invalid attribute value set for key: "+e),this)},t.prototype.setAttributes=function(e){var n,i;try{for(var a=dX(Object.entries(e)),s=a.next();!s.done;s=a.next()){var o=iC(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++),ei(n)&&(ei(i)||(i=n),n=void 0);var a=ir(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,EX([],iC(e),!1)),this},t.prototype.setStatus=function(e){return this._isSpanEnded()?this:(this.status=Ld({},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=Ps(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<=Ze.now())return Zo(e+this._performanceOffset);if(typeof e=="number")return ge(e);if(e instanceof Date)return ge(e.getTime());if(On(e))return e;if(this._startTimeProvided)return ge(Date.now());var n=Ze.now()-this._performanceStartTime;return ti(this.startTime,ge(n))},t.prototype.isRecording=function(){return this._ended===!1},t.prototype.recordException=function(e,n){var i={};typeof e=="string"?i[ds]=e:e&&(e.code?i[ps]=e.code.toString():e.name&&(i[ps]=e.name),e.message&&(i[ds]=e.message),e.stack&&(i[T0]=e.stack)),i[ps]||i[ds]?this.addEvent(nC,i,n):g.warn("Failed to record an exception "+e)},Object.defineProperty(t.prototype,"duration",{get:function(){return this._duration},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ended",{get:function(){return this._ended},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedAttributesCount",{get:function(){return this._droppedAttributesCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedEventsCount",{get:function(){return this._droppedEventsCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"droppedLinksCount",{get:function(){return this._droppedLinksCount},enumerable:!1,configurable:!0}),t.prototype._isSpanEnded=function(){return this._ended&&g.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},t.prototype._truncateToLimitUtil=function(e,n){return e.length<=n?e:e.substr(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 ft,Ai=m(()=>{"use strict";(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(ft||(ft={}))});var Sr,il=m(()=>{"use strict";Ai();Sr=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:ft.NOT_RECORD}},t.prototype.toString=function(){return"AlwaysOffSampler"},t}()});var xt,al=m(()=>{"use strict";Ai();xt=function(){function t(){}return t.prototype.shouldSample=function(){return{decision:ft.RECORD_AND_SAMPLED}},t.prototype.toString=function(){return"AlwaysOnSampler"},t}()});var Wn,Cd=m(()=>{"use strict";x();K();il();al();Wn=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 xt),this._remoteParentSampled=(n=e.remoteParentSampled)!==null&&n!==void 0?n:new xt,this._remoteParentNotSampled=(i=e.remoteParentNotSampled)!==null&&i!==void 0?i:new Sr,this._localParentSampled=(a=e.localParentSampled)!==null&&a!==void 0?a:new xt,this._localParentNotSampled=(s=e.localParentNotSampled)!==null&&s!==void 0?s:new Sr}return t.prototype.shouldSample=function(e,n,i,a,s,o){var r=X.getSpanContext(e);return!r||!dt(r)?this._root.shouldSample(e,n,i,a,s,o):r.isRemote?r.traceFlags&J.SAMPLED?this._remoteParentSampled.shouldSample(e,n,i,a,s,o):this._remoteParentNotSampled.shouldSample(e,n,i,a,s,o):r.traceFlags&J.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 Oi,wd=m(()=>{"use strict";x();Ai();Oi=function(){function t(e){e===void 0&&(e=0),this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}return t.prototype.shouldSample=function(e,n){return{decision:kt(n)&&this._accumulate(n)<this._upperBound?ft.RECORD_AND_SAMPLED:ft.NOT_RECORD}},t.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},t.prototype._normalize=function(e){return typeof e!="number"||isNaN(e)?0:e>=1?1:e<=0?0:e},t.prototype._accumulate=function(e){for(var n=0,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=Oe();return{sampler:Ud(_X),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 Ud(t){switch(t===void 0&&(t=Oe()),t.OTEL_TRACES_SAMPLER){case Ke.AlwaysOn:return new xt;case Ke.AlwaysOff:return new Sr;case Ke.ParentBasedAlwaysOn:return new Wn({root:new xt});case Ke.ParentBasedAlwaysOff:return new Wn({root:new Sr});case Ke.TraceIdRatio:return new Oi(aC(t));case Ke.ParentBasedTraceIdRatio:return new Wn({root:new Oi(aC(t))});default:return g.error('OTEL_TRACES_SAMPLER value "'+t.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+SX+'".'),new xt}}function aC(t){if(t.OTEL_TRACES_SAMPLER_ARG===void 0||t.OTEL_TRACES_SAMPLER_ARG==="")return g.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+zn+"."),zn;var e=Number(t.OTEL_TRACES_SAMPLER_ARG);return isNaN(e)?(g.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+zn+"."),zn):e<0||e>1?(g.error("OTEL_TRACES_SAMPLER_ARG="+t.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+zn+"."),zn):e}var _X,SX,zn,Dd=m(()=>{"use strict";x();K();il();al();Cd();wd();_X=Oe(),SX=Ke.AlwaysOn,zn=1});function sC(t){var e={sampler:Ud()},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 uC(t){var e,n,i,a,s,o,r,u,l,c,p,_,f=Object.assign({},t.spanLimits),S=mn();return f.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:Dr,f.attributeValueLengthLimit=(_=(p=(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&&p!==void 0?p:S.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&_!==void 0?_:Ur,Object.assign({},t,{spanLimits:f})}var Vd=m(()=>{"use strict";Dd();K()});var lC,cC=m(()=>{"use strict";x();K();lC=function(){function t(e,n){this._exporter=e,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var i=Oe();this._maxExportBatchSize=typeof n?.maxExportBatchSize=="number"?n.maxExportBatchSize:i.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=typeof n?.maxQueueSize=="number"?n.maxQueueSize:i.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=typeof n?.scheduledDelayMillis=="number"?n.scheduledDelayMillis:i.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis=typeof n?.exportTimeoutMillis=="number"?n.exportTimeoutMillis:i.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new lr(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&J.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(Tn(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(p){var _;clearTimeout(a),p.code===ee.SUCCESS?n():i((_=p.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(p){Te(p),i(p)})})})},t.prototype._maybeStartTimer=function(){var e=this;if(!this._isExporting){var n=function(){e._isExporting=!0,e._flushOneBatch().finally(function(){e._isExporting=!1,e._finishedSpans.length>0&&(e._clearTimer(),e._maybeStartTimer())}).catch(function(i){e._isExporting=!1,Te(i)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return n();this._timer===void 0&&(this._timer=setTimeout(function(){return n()},this._scheduledDelayMillis),ur(this._timer))}},t.prototype._clearTimer=function(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)},t}()});var hX,hr,fC=m(()=>{"use strict";cC();hX=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)}}(),hr=function(t){hX(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.onShutdown=function(){},e}(lC)});function pC(t){return function(){for(var n=0;n<t/4;n++)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 TX,dC,Xn,ul,EC=m(()=>{"use strict";TX=8,dC=16,Xn=function(){function t(){this.generateTraceId=pC(dC),this.generateSpanId=pC(TX)}return t}(),ul=Buffer.allocUnsafe(dC)});var _C=m(()=>{"use strict";fC();EC()});var ll=m(()=>{"use strict";_C()});var cl,SC=m(()=>{"use strict";x();K();Id();Vd();ll();cl=function(){function t(e,n,i){this._tracerProvider=i;var a=sC(n);this._sampler=a.sampler,this._generalLimits=a.generalLimits,this._spanLimits=a.spanLimits,this._idGenerator=n.idGenerator||new Xn,this.resource=i.resource,this.instrumentationLibrary=e}return t.prototype.startSpan=function(e,n,i){var a,s,o;n===void 0&&(n={}),i===void 0&&(i=Ye.active()),n.root&&(i=X.deleteSpan(i));var r=X.getSpan(i);if(xe(i)){g.debug("Instrumentation suppressed, returning Noop Span");var u=X.wrapSpanContext(hE);return u}var l=r?.spanContext(),c=this._idGenerator.generateSpanId(),p,_,f;!l||!X.isSpanContextValid(l)?p=this._idGenerator.generateTraceId():(p=l.traceId,_=l.traceState,f=l.spanId);var S=(a=n.kind)!==null&&a!==void 0?a:vE.INTERNAL,v=((s=n.links)!==null&&s!==void 0?s:[]).map(function(F){return{context:F.context,attributes:ir(F.attributes)}}),T=ir(n.attributes),A=this._sampler.shouldSample(i,p,e,S,T,v);_=(o=A.traceState)!==null&&o!==void 0?o:_;var O=A.decision===Et.RECORD_AND_SAMPLED?J.SAMPLED:J.NONE,N={traceId:p,spanId:c,traceFlags:O,traceState:_};if(A.decision===Et.NOT_RECORD){g.debug("Recording is off, propagating context in a non-recording span");var u=X.wrapSpanContext(N);return u}var D=ir(Object.assign(T,A.attributes)),G=new ol(this,i,e,N,S,f,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=X.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,hC=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 vX,mX,Bt,TC,vC=m(()=>{"use strict";x();K();Gs();gi();Dd();hC();Gd();ll();Vd();vX=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},mX=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"})(Bt||(Bt={}));TC=function(){function t(e){e===void 0&&(e={});var n,i;this._registeredSpanProcessors=[],this._tracers=new Map;var a=Us({},sl(),uC(e));if(this.resource=(n=a.resource)!==null&&n!==void 0?n:Dt.empty(),a.mergeResourceWithDefaults&&(this.resource=Dt.default().merge(this.resource)),this._config=Object.assign({},a,{resource:this.resource}),!((i=e.spanProcessors)===null||i===void 0)&&i.length)this._registeredSpanProcessors=mX([],vX(e.spanProcessors),!1),this.activeSpanProcessor=new Bd(this._registeredSpanProcessors);else{var s=this._buildExporterFromEnv();if(s!==void 0){var o=new hr(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={}),X.setGlobalTracerProvider(this),e.propagator===void 0&&(e.propagator=this._buildPropagatorFromEnv()),e.contextManager&&Ye.setGlobalContextManager(e.contextManager),e.propagator&&it.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=Bt.timeout},e);i.forceFlush().then(function(){clearTimeout(o),s!==Bt.timeout&&(s=Bt.resolved,a(s))}).catch(function(r){clearTimeout(o),s=Bt.error,a(r)})})});return new Promise(function(i,a){Promise.all(n).then(function(s){var o=s.filter(function(r){return r!==Bt.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(Oe().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 xs({propagators:a})},t.prototype._buildExporterFromEnv=function(){var e=Oe().OTEL_TRACES_EXPORTER;if(!(e==="none"||e==="")){var n=this._getSpanExporter(e);return n||g.error('Exporter "'+e+'" requested through environment variable is unavailable.'),n}},t._registeredPropagators=new Map([["tracecontext",function(){return new Ls}],["baggage",function(){return new vs}]]),t._registeredExporters=new Map,t}()});var yX,mC,yC=m(()=>{"use strict";K();yX=function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},mC=function(){function t(){}return t.prototype.export=function(e,n){return this._sendSpans(e,n)},t.prototype.shutdown=function(){return this._sendSpans([]),this.forceFlush()},t.prototype.forceFlush=function(){return Promise.resolve()},t.prototype._exportInfo=function(e){var n;return{resource:{attributes:e.resource.attributes},instrumentationScope:e.instrumentationLibrary,traceId:e.spanContext().traceId,parentId:e.parentSpanId,traceState:(n=e.spanContext().traceState)===null||n===void 0?void 0:n.serialize(),name:e.name,id:e.spanContext().spanId,kind:e.kind,timestamp:Ot(e.startTime),duration:Ot(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=yX(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:ee.SUCCESS})},t}()});var AX,OX,AC,OC=m(()=>{"use strict";K();AX=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},OX=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))},AC=function(){function t(){this._finishedSpans=[],this._stopped=!1}return t.prototype.export=function(e,n){var i;if(this._stopped)return n({code:ee.FAILED,error:new Error("Exporter has been stopped")});(i=this._finishedSpans).push.apply(i,OX([],AX(e),!1)),setTimeout(function(){return n({code:ee.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 gX,NX,gC,NC=m(()=>{"use strict";x();K();gX=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(p){o(p)}}function u(c){try{l(i.throw(c))}catch(p){o(p)}}function l(c){c.done?s(c.value):a(c.value).then(r,u)}l((i=i.apply(t,e||[])).next())})},NX=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}}},gC=function(){function t(e){this._exporter=e,this._shutdownOnce=new lr(this._shutdown,this),this._unresolvedExports=new Set}return t.prototype.forceFlush=function(){return gX(this,void 0,void 0,function(){return NX(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&J.SAMPLED){var s=function(){return ai._export(n._exporter,[e]).then(function(r){var u;r.code!==ee.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={};nt(kd,{AlwaysOffSampler:()=>Sr,AlwaysOnSampler:()=>xt,BasicTracerProvider:()=>TC,BatchSpanProcessor:()=>hr,ConsoleSpanExporter:()=>mC,ForceFlushState:()=>Bt,InMemorySpanExporter:()=>AC,NoopSpanProcessor:()=>pl,ParentBasedSampler:()=>Wn,RandomIdGenerator:()=>Xn,SamplingDecision:()=>ft,SimpleSpanProcessor:()=>gC,Span:()=>ol,TraceIdRatioBasedSampler:()=>Oi,Tracer:()=>cl});var gi=m(()=>{"use strict";SC();vC();ll();yC();OC();NC();Gd();il();al();Cd();wd();Ai();Id()});var Ni=h((Bfe,RC)=>{"use strict";var RX="2.0.0",PX=Number.MAX_SAFE_INTEGER||9007199254740991,bX=16,xX=250,MX=["major","premajor","minor","preminor","patch","prepatch","prerelease"];RC.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:bX,MAX_SAFE_BUILD_LENGTH:xX,MAX_SAFE_INTEGER:PX,RELEASE_TYPES:MX,SEMVER_SPEC_VERSION:RX,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Ri=h((Gfe,PC)=>{"use strict";var LX=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};PC.exports=LX});var Jn=h((Gt,bC)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:Hd,MAX_SAFE_BUILD_LENGTH:IX,MAX_LENGTH:CX}=Ni(),wX=Ri();Gt=bC.exports={};var UX=Gt.re=[],DX=Gt.safeRe=[],R=Gt.src=[],P=Gt.t={},VX=0,Fd="[a-zA-Z0-9-]",BX=[["\\s",1],["\\d",CX],[Fd,IX]],GX=t=>{for(let[e,n]of BX)t=t.split(`${e}*`).join(`${e}{0,${n}}`).split(`${e}+`).join(`${e}{1,${n}}`);return t},U=(t,e,n)=>{let i=GX(e),a=VX++;wX(t,a,e),P[t]=a,R[a]=e,UX[a]=new RegExp(e,n?"g":void 0),DX[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);Gt.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);Gt.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);Gt.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 dl=h((kfe,xC)=>{"use strict";var kX=Object.freeze({loose:!0}),HX=Object.freeze({}),FX=t=>t?typeof t!="object"?kX:t:HX;xC.exports=FX});var Yd=h((Hfe,IC)=>{"use strict";var MC=/^[0-9]+$/,LC=(t,e)=>{let n=MC.test(t),i=MC.test(e);return n&&i&&(t=+t,e=+e),t===e?0:n&&!i?-1:i&&!n?1:t<e?-1:1},YX=(t,e)=>LC(e,t);IC.exports={compareIdentifiers:LC,rcompareIdentifiers:YX}});var Me=h((Ffe,DC)=>{"use strict";var El=Ri(),{MAX_LENGTH:CC,MAX_SAFE_INTEGER:_l}=Ni(),{safeRe:wC,t:UC}=Jn(),qX=dl(),{compareIdentifiers:Qn}=Yd(),qd=class t{constructor(e,n){if(n=qX(n),e instanceof t){if(e.loose===!!n.loose&&e.includePrerelease===!!n.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>CC)throw new TypeError(`version is longer than ${CC} characters`);El("SemVer",e,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let i=e.trim().match(n.loose?wC[UC.LOOSE]:wC[UC.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>_l||this.major<0)throw new TypeError("Invalid major version");if(this.minor>_l||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>_l||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<_l)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(El("SemVer.compare",this.version,this.options,e),!(e instanceof t)){if(typeof e=="string"&&e===this.version)return 0;e=new t(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof t||(e=new t(e,this.options)),Qn(this.major,e.major)||Qn(this.minor,e.minor)||Qn(this.patch,e.patch)}comparePre(e){if(e instanceof t||(e=new t(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let n=0;do{let i=this.prerelease[n],a=e.prerelease[n];if(El("prerelease compare",n,i,a),i===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(i===void 0)return-1;if(i===a)continue;return Qn(i,a)}while(++n)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let n=0;do{let i=this.build[n],a=e.build[n];if(El("build compare",n,i,a),i===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(i===void 0)return-1;if(i===a)continue;return Qn(i,a)}while(++n)}inc(e,n,i){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,i);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,i);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,i),this.inc("pre",n,i);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,i),this.inc("pre",n,i);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{let a=Number(i)?1:0;if(!n&&i===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[a];else{let 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]),Qn(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}};DC.exports=qd});var qr=h((Yfe,BC)=>{"use strict";var VC=Me(),jX=(t,e,n=!1)=>{if(t instanceof VC)return t;try{return new VC(t,e)}catch(i){if(!n)return null;throw i}};BC.exports=jX});var kC=h((qfe,GC)=>{"use strict";var $X=qr(),KX=(t,e)=>{let n=$X(t,e);return n?n.version:null};GC.exports=KX});var FC=h((jfe,HC)=>{"use strict";var WX=qr(),zX=(t,e)=>{let n=WX(t.trim().replace(/^[=v]+/,""),e);return n?n.version:null};HC.exports=zX});var jC=h(($fe,qC)=>{"use strict";var YC=Me(),XX=(t,e,n,i,a)=>{typeof n=="string"&&(a=i,i=n,n=void 0);try{return new YC(t instanceof YC?t.version:t,n).inc(e,i,a).version}catch{return null}};qC.exports=XX});var WC=h((Kfe,KC)=>{"use strict";var $C=qr(),JX=(t,e)=>{let n=$C(t,null,!0),i=$C(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"};KC.exports=JX});var XC=h((Wfe,zC)=>{"use strict";var QX=Me(),ZX=(t,e)=>new QX(t,e).major;zC.exports=ZX});var QC=h((zfe,JC)=>{"use strict";var eJ=Me(),tJ=(t,e)=>new eJ(t,e).minor;JC.exports=tJ});var ew=h((Xfe,ZC)=>{"use strict";var rJ=Me(),nJ=(t,e)=>new rJ(t,e).patch;ZC.exports=nJ});var rw=h((Jfe,tw)=>{"use strict";var oJ=qr(),iJ=(t,e)=>{let n=oJ(t,e);return n&&n.prerelease.length?n.prerelease:null};tw.exports=iJ});var tt=h((Qfe,ow)=>{"use strict";var nw=Me(),aJ=(t,e,n)=>new nw(t,n).compare(new nw(e,n));ow.exports=aJ});var aw=h((Zfe,iw)=>{"use strict";var sJ=tt(),uJ=(t,e,n)=>sJ(e,t,n);iw.exports=uJ});var uw=h((epe,sw)=>{"use strict";var lJ=tt(),cJ=(t,e)=>lJ(t,e,!0);sw.exports=cJ});var Sl=h((tpe,cw)=>{"use strict";var lw=Me(),fJ=(t,e,n)=>{let i=new lw(t,n),a=new lw(e,n);return i.compare(a)||i.compareBuild(a)};cw.exports=fJ});var pw=h((rpe,fw)=>{"use strict";var pJ=Sl(),dJ=(t,e)=>t.sort((n,i)=>pJ(n,i,e));fw.exports=dJ});var Ew=h((npe,dw)=>{"use strict";var EJ=Sl(),_J=(t,e)=>t.sort((n,i)=>EJ(i,n,e));dw.exports=_J});var Pi=h((ope,_w)=>{"use strict";var SJ=tt(),hJ=(t,e,n)=>SJ(t,e,n)>0;_w.exports=hJ});var hl=h((ipe,Sw)=>{"use strict";var TJ=tt(),vJ=(t,e,n)=>TJ(t,e,n)<0;Sw.exports=vJ});var jd=h((ape,hw)=>{"use strict";var mJ=tt(),yJ=(t,e,n)=>mJ(t,e,n)===0;hw.exports=yJ});var $d=h((spe,Tw)=>{"use strict";var AJ=tt(),OJ=(t,e,n)=>AJ(t,e,n)!==0;Tw.exports=OJ});var Tl=h((upe,vw)=>{"use strict";var gJ=tt(),NJ=(t,e,n)=>gJ(t,e,n)>=0;vw.exports=NJ});var vl=h((lpe,mw)=>{"use strict";var RJ=tt(),PJ=(t,e,n)=>RJ(t,e,n)<=0;mw.exports=PJ});var Kd=h((cpe,yw)=>{"use strict";var bJ=jd(),xJ=$d(),MJ=Pi(),LJ=Tl(),IJ=hl(),CJ=vl(),wJ=(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 bJ(t,n,i);case"!=":return xJ(t,n,i);case">":return MJ(t,n,i);case">=":return LJ(t,n,i);case"<":return IJ(t,n,i);case"<=":return CJ(t,n,i);default:throw new TypeError(`Invalid operator: ${e}`)}};yw.exports=wJ});var Ow=h((fpe,Aw)=>{"use strict";var UJ=Me(),DJ=qr(),{safeRe:ml,t:yl}=Jn(),VJ=(t,e)=>{if(t instanceof UJ)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?ml[yl.COERCEFULL]:ml[yl.COERCE]);else{let u=e.includePrerelease?ml[yl.COERCERTLFULL]:ml[yl.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 DJ(`${i}.${a}.${s}${o}${r}`,e)};Aw.exports=VJ});var Nw=h((ppe,gw)=>{"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}};gw.exports=Wd});var rt=h((dpe,xw)=>{"use strict";var BJ=/\s+/g,zd=class t{constructor(e,n){if(n=kJ(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(BJ," "),this.set=this.raw.split("||").map(i=>this.parseRange(i.trim())).filter(i=>i.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let i=this.set[0];if(this.set=this.set.filter(a=>!Pw(a[0])),this.set.length===0)this.set=[i];else if(this.set.length>1){for(let a of this.set)if(a.length===1&&KJ(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&&jJ)|(this.options.loose&&$J))+":"+e,a=Rw.get(i);if(a)return a;let s=this.options.loose,o=s?We[Be.HYPHENRANGELOOSE]:We[Be.HYPHENRANGE];e=e.replace(o,n9(this.options.includePrerelease)),te("hyphen replace",e),e=e.replace(We[Be.COMPARATORTRIM],FJ),te("comparator trim",e),e=e.replace(We[Be.TILDETRIM],YJ),te("tilde trim",e),e=e.replace(We[Be.CARETTRIM],qJ),te("caret trim",e);let r=e.split(" ").map(p=>WJ(p,this.options)).join(" ").split(/\s+/).map(p=>r9(p,this.options));s&&(r=r.filter(p=>(te("loose invalid filter",p,this.options),!!p.match(We[Be.COMPARATORLOOSE])))),te("range list",r);let u=new Map,l=r.map(p=>new Xd(p,this.options));for(let p of l){if(Pw(p))return[p];u.set(p.value,p)}u.size>1&&u.has("")&&u.delete("");let c=[...u.values()];return Rw.set(i,c),c}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(i=>bw(i,n)&&e.set.some(a=>bw(a,n)&&i.every(s=>a.every(o=>s.intersects(o,n)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new HJ(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}};xw.exports=zd;var GJ=Nw(),Rw=new GJ,kJ=dl(),Xd=bi(),te=Ri(),HJ=Me(),{safeRe:We,t:Be,comparatorTrimReplace:FJ,tildeTrimReplace:YJ,caretTrimReplace:qJ}=Jn(),{FLAG_INCLUDE_PRERELEASE:jJ,FLAG_LOOSE:$J}=Ni(),Pw=t=>t.value==="<0.0.0-0",KJ=t=>t.value==="",bw=(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},WJ=(t,e)=>(te("comp",t,e),t=JJ(t,e),te("caret",t),t=zJ(t,e),te("tildes",t),t=ZJ(t,e),te("xrange",t),t=t9(t,e),te("stars",t),t),Ge=t=>!t||t.toLowerCase()==="x"||t==="*",zJ=(t,e)=>t.trim().split(/\s+/).map(n=>XJ(n,e)).join(" "),XJ=(t,e)=>{let n=e.loose?We[Be.TILDELOOSE]:We[Be.TILDE];return t.replace(n,(i,a,s,o,r)=>{te("tilde",t,i,a,s,o,r);let u;return Ge(a)?u="":Ge(s)?u=`>=${a}.0.0 <${+a+1}.0.0-0`:Ge(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})},JJ=(t,e)=>t.trim().split(/\s+/).map(n=>QJ(n,e)).join(" "),QJ=(t,e)=>{te("caret",t,e);let n=e.loose?We[Be.CARETLOOSE]:We[Be.CARET],i=e.includePrerelease?"-0":"";return t.replace(n,(a,s,o,r,u)=>{te("caret",t,a,s,o,r,u);let l;return Ge(s)?l="":Ge(o)?l=`>=${s}.0.0${i} <${+s+1}.0.0-0`:Ge(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})},ZJ=(t,e)=>(te("replaceXRanges",t,e),t.split(/\s+/).map(n=>e9(n,e)).join(" ")),e9=(t,e)=>{t=t.trim();let n=e.loose?We[Be.XRANGELOOSE]:We[Be.XRANGE];return t.replace(n,(i,a,s,o,r,u)=>{te("xRange",t,i,a,s,o,r,u);let l=Ge(s),c=l||Ge(o),p=c||Ge(r),_=p;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`:p&&(i=`>=${s}.${o}.0${u} <${s}.${+o+1}.0-0`),te("xRange return",i),i})},t9=(t,e)=>(te("replaceStars",t,e),t.trim().replace(We[Be.STAR],"")),r9=(t,e)=>(te("replaceGTE0",t,e),t.trim().replace(We[e.includePrerelease?Be.GTE0PRE:Be.GTE0],"")),n9=t=>(e,n,i,a,s,o,r,u,l,c,p,_)=>(Ge(i)?n="":Ge(a)?n=`>=${i}.0.0${t?"-0":""}`:Ge(s)?n=`>=${i}.${a}.0${t?"-0":""}`:o?n=`>=${n}`:n=`>=${n}${t?"-0":""}`,Ge(l)?u="":Ge(c)?u=`<${+l+1}.0.0-0`:Ge(p)?u=`<${l}.${+c+1}.0-0`:_?u=`<=${l}.${c}.${p}-${_}`:t?u=`<${l}.${c}.${+p+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 bi=h((Epe,Uw)=>{"use strict";var xi=Symbol("SemVer ANY"),Zd=class t{static get ANY(){return xi}constructor(e,n){if(n=Mw(n),e instanceof t){if(e.loose===!!n.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),Qd("comparator",e,n),this.options=n,this.loose=!!n.loose,this.parse(e),this.semver===xi?this.value="":this.value=this.operator+this.semver.version,Qd("comp",this)}parse(e){let n=this.options.loose?Lw[Iw.COMPARATORLOOSE]:Lw[Iw.COMPARATOR],i=e.match(n);if(!i)throw new TypeError(`Invalid comparator: ${e}`);this.operator=i[1]!==void 0?i[1]:"",this.operator==="="&&(this.operator=""),i[2]?this.semver=new Cw(i[2],this.options.loose):this.semver=xi}toString(){return this.value}test(e){if(Qd("Comparator.test",e,this.options.loose),this.semver===xi||e===xi)return!0;if(typeof e=="string")try{e=new Cw(e,this.options)}catch{return!1}return 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 ww(e.value,n).test(this.value):e.operator===""?e.value===""?!0:new ww(this.value,n).test(e.semver):(n=Mw(n),n.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!n.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||Jd(this.semver,"<",e.semver,n)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||Jd(this.semver,">",e.semver,n)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};Uw.exports=Zd;var Mw=dl(),{safeRe:Lw,t:Iw}=Jn(),Jd=Kd(),Qd=Ri(),Cw=Me(),ww=rt()});var Mi=h((_pe,Dw)=>{"use strict";var i9=rt(),a9=(t,e,n)=>{try{e=new i9(e,n)}catch{return!1}return e.test(t)};Dw.exports=a9});var Bw=h((Spe,Vw)=>{"use strict";var s9=rt(),u9=(t,e)=>new s9(t,e).set.map(n=>n.map(i=>i.value).join(" ").trim().split(" "));Vw.exports=u9});var kw=h((hpe,Gw)=>{"use strict";var l9=Me(),c9=rt(),f9=(t,e,n)=>{let i=null,a=null,s=null;try{s=new c9(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};Gw.exports=f9});var Fw=h((Tpe,Hw)=>{"use strict";var p9=Me(),d9=rt(),E9=(t,e,n)=>{let i=null,a=null,s=null;try{s=new d9(e,n)}catch{return null}return t.forEach(o=>{s.test(o)&&(!i||a.compare(o)===1)&&(i=o,a=new p9(i,n))}),i};Hw.exports=E9});var jw=h((vpe,qw)=>{"use strict";var eE=Me(),_9=rt(),Yw=Pi(),S9=(t,e)=>{t=new _9(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||Yw(r,s))&&(s=r);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),s&&(!n||Yw(n,s))&&(n=s)}return n&&t.test(n)?n:null};qw.exports=S9});var Kw=h((mpe,$w)=>{"use strict";var h9=rt(),T9=(t,e)=>{try{return new h9(t,e).range||"*"}catch{return null}};$w.exports=T9});var Al=h((ype,Jw)=>{"use strict";var v9=Me(),Xw=bi(),{ANY:m9}=Xw,y9=rt(),A9=Mi(),Ww=Pi(),zw=hl(),O9=vl(),g9=Tl(),N9=(t,e,n,i)=>{t=new v9(t,i),e=new y9(e,i);let a,s,o,r,u;switch(n){case">":a=Ww,s=O9,o=zw,r=">",u=">=";break;case"<":a=zw,s=g9,o=Ww,r="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(A9(t,e,i))return!1;for(let l=0;l<e.set.length;++l){let c=e.set[l],p=null,_=null;if(c.forEach(f=>{f.semver===m9&&(f=new Xw(">=0.0.0")),p=p||f,_=_||f,a(f.semver,p.semver,i)?p=f:o(f.semver,_.semver,i)&&(_=f)}),p.operator===r||p.operator===u||(!_.operator||_.operator===r)&&s(t,_.semver))return!1;if(_.operator===u&&o(t,_.semver))return!1}return!0};Jw.exports=N9});var Zw=h((Ape,Qw)=>{"use strict";var R9=Al(),P9=(t,e,n)=>R9(t,e,">",n);Qw.exports=P9});var tU=h((Ope,eU)=>{"use strict";var b9=Al(),x9=(t,e,n)=>b9(t,e,"<",n);eU.exports=x9});var oU=h((gpe,nU)=>{"use strict";var rU=rt(),M9=(t,e,n)=>(t=new rU(t,n),e=new rU(e,n),t.intersects(e,n));nU.exports=M9});var aU=h((Npe,iU)=>{"use strict";var L9=Mi(),I9=tt();iU.exports=(t,e,n)=>{let i=[],a=null,s=null,o=t.sort((c,p)=>I9(c,p,n));for(let c of o)L9(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,p]of i)c===p?r.push(c):!p&&c===o[0]?r.push("*"):p?c===o[0]?r.push(`<=${p}`):r.push(`${c} - ${p}`):r.push(`>=${c}`);let u=r.join(" || "),l=typeof e.raw=="string"?e.raw:String(e);return u.length<l.length?u:e}});var pU=h((Rpe,fU)=>{"use strict";var sU=rt(),rE=bi(),{ANY:tE}=rE,Li=Mi(),nE=tt(),C9=(t,e,n={})=>{if(t===e)return!0;t=new sU(t,n),e=new sU(e,n);let i=!1;e:for(let a of t.set){for(let s of e.set){let o=U9(a,s,n);if(i=i||o!==null,o)continue e}if(i)return!1}return!0},w9=[new rE(">=0.0.0-0")],uU=[new rE(">=0.0.0")],U9=(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=w9:t=uU}if(e.length===1&&e[0].semver===tE){if(n.includePrerelease)return!0;e=uU}let i=new Set,a,s;for(let f of t)f.operator===">"||f.operator===">="?a=lU(a,f,n):f.operator==="<"||f.operator==="<="?s=cU(s,f,n):i.add(f.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 f of i){if(a&&!Li(f,String(a),n)||s&&!Li(f,String(s),n))return null;for(let S of e)if(!Li(f,String(S),n))return!1;return!0}let r,u,l,c,p=s&&!n.includePrerelease&&s.semver.prerelease.length?s.semver:!1,_=a&&!n.includePrerelease&&a.semver.prerelease.length?a.semver:!1;p&&p.prerelease.length===1&&s.operator==="<"&&p.prerelease[0]===0&&(p=!1);for(let f of e){if(c=c||f.operator===">"||f.operator===">=",l=l||f.operator==="<"||f.operator==="<=",a){if(_&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===_.major&&f.semver.minor===_.minor&&f.semver.patch===_.patch&&(_=!1),f.operator===">"||f.operator===">="){if(r=lU(a,f,n),r===f&&r!==a)return!1}else if(a.operator===">="&&!Li(a.semver,String(f),n))return!1}if(s){if(p&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===p.major&&f.semver.minor===p.minor&&f.semver.patch===p.patch&&(p=!1),f.operator==="<"||f.operator==="<="){if(u=cU(s,f,n),u===f&&u!==s)return!1}else if(s.operator==="<="&&!Li(s.semver,String(f),n))return!1}if(!f.operator&&(s||a)&&o!==0)return!1}return!(a&&l&&!s&&o!==0||s&&c&&!a&&o!==0||_||p)},lU=(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},cU=(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};fU.exports=C9});var SU=h((Ppe,_U)=>{"use strict";var oE=Jn(),dU=Ni(),D9=Me(),EU=Yd(),V9=qr(),B9=kC(),G9=FC(),k9=jC(),H9=WC(),F9=XC(),Y9=QC(),q9=ew(),j9=rw(),$9=tt(),K9=aw(),W9=uw(),z9=Sl(),X9=pw(),J9=Ew(),Q9=Pi(),Z9=hl(),e7=jd(),t7=$d(),r7=Tl(),n7=vl(),o7=Kd(),i7=Ow(),a7=bi(),s7=rt(),u7=Mi(),l7=Bw(),c7=kw(),f7=Fw(),p7=jw(),d7=Kw(),E7=Al(),_7=Zw(),S7=tU(),h7=oU(),T7=aU(),v7=pU();_U.exports={parse:V9,valid:B9,clean:G9,inc:k9,diff:H9,major:F9,minor:Y9,patch:q9,prerelease:j9,compare:$9,rcompare:K9,compareLoose:W9,compareBuild:z9,sort:X9,rsort:J9,gt:Q9,lt:Z9,eq:e7,neq:t7,gte:r7,lte:n7,cmp:o7,coerce:i7,Comparator:a7,Range:s7,satisfies:u7,toComparators:l7,maxSatisfying:c7,minSatisfying:f7,minVersion:p7,validRange:d7,outside:E7,gtr:_7,ltr:S7,intersects:h7,simplifyRange:T7,subset:v7,SemVer:D9,re:oE.re,src:oE.src,tokens:oE.t,SEMVER_SPEC_VERSION:dU.SEMVER_SPEC_VERSION,RELEASE_TYPES:dU.RELEASE_TYPES,compareIdentifiers:EU.compareIdentifiers,rcompareIdentifiers:EU.rcompareIdentifiers}});function y7(t){var e=decodeURIComponent(t).split(":");if(e.length!==4)return null;var n=TU(e,4),i=n[0],a=n[1],s=n[3],o=i.padStart(32,"0"),r=a.padStart(16,"0"),u=m7.test(s)?parseInt(s,16)&1:1;return{traceId:o,spanId:r,isRemote:!0,traceFlags:u}}var hU,TU,iE,Ol,vU,m7,mU=m(()=>{"use strict";x();K();hU=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.")},TU=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",Ol="uberctx",vU=function(){function t(e){typeof e=="string"?(this._jaegerTraceHeader=e,this._jaegerBaggageHeaderPrefix=Ol):(this._jaegerTraceHeader=e?.customTraceHeader||iE,this._jaegerBaggageHeaderPrefix=e?.customBaggageHeaderPrefix||Ol)}return t.prototype.inject=function(e,n,i){var a,s,o=X.getSpanContext(e),r=it.getBaggage(e);if(o&&xe(e)===!1){var u="0"+(o.traceFlags||J.NONE).toString(16);i.set(n,this._jaegerTraceHeader,o.traceId+":"+o.spanId+":0:"+u)}if(r)try{for(var l=hU(r.getAllEntries()),c=l.next();!c.done;c=l.next()){var p=TU(c.value,2),_=p[0],f=p[1];i.set(n,this._jaegerBaggageHeaderPrefix+"-"+_,encodeURIComponent(f.value))}}catch(S){a={error:S}}finally{try{c&&!c.done&&(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}}),p=e;if(typeof l=="string"){var _=y7(l);_&&(p=X.setSpanContext(p,_))}if(c.length===0)return p;var f=(r=it.getBaggage(e))!==null&&r!==void 0?r:it.createBaggage();try{for(var S=hU(c),v=S.next();!v.done;v=S.next()){var T=v.value;T.value!==void 0&&(f=f.setEntry(T.key,{value:decodeURIComponent(T.value)}))}}catch(A){a={error:A}}finally{try{v&&!v.done&&(s=S.return)&&s.call(S)}finally{if(a)throw a.error}}return p=it.setBaggage(p,f),p},t.prototype.fields=function(){return[this._jaegerTraceHeader]},t}(),m7=/^[0-9a-f]{1,2}$/i});var yU={};nt(yU,{JaegerPropagator:()=>vU,UBER_BAGGAGE_HEADER_PREFIX:()=>Ol,UBER_TRACE_ID_HEADER:()=>iE});var AU=m(()=>{"use strict";mU()});var NU=h(Rl=>{"use strict";Object.defineProperty(Rl,"__esModule",{value:!0});Rl.NodeTracerProvider=void 0;var OU=KI(),gl=(rC(),Y(tC)),gU=(gi(),Y(kd)),A7=SU(),O7=(AU(),Y(yU)),Nl=class extends gU.BasicTracerProvider{constructor(e={}){super(e)}register(e={}){if(e.contextManager===void 0){let n=A7.gte(process.version,"14.8.0")?OU.AsyncLocalStorageContextManager:OU.AsyncHooksContextManager;e.contextManager=new n,e.contextManager.enable()}super.register(e)}};Rl.NodeTracerProvider=Nl;Nl._registeredPropagators=new Map([...gU.BasicTracerProvider._registeredPropagators,["b3",()=>new gl.B3Propagator({injectEncoding:gl.B3InjectEncoding.SINGLE_HEADER})],["b3multi",()=>new gl.B3Propagator({injectEncoding:gl.B3InjectEncoding.MULTI_HEADER})],["jaeger",()=>new O7.JaegerPropagator]])});var RU=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 g7=NU();Object.defineProperty(q,"NodeTracerProvider",{enumerable:!0,get:function(){return g7.NodeTracerProvider}});var ke=(gi(),Y(kd));Object.defineProperty(q,"AlwaysOffSampler",{enumerable:!0,get:function(){return ke.AlwaysOffSampler}});Object.defineProperty(q,"AlwaysOnSampler",{enumerable:!0,get:function(){return ke.AlwaysOnSampler}});Object.defineProperty(q,"BasicTracerProvider",{enumerable:!0,get:function(){return ke.BasicTracerProvider}});Object.defineProperty(q,"BatchSpanProcessor",{enumerable:!0,get:function(){return ke.BatchSpanProcessor}});Object.defineProperty(q,"ConsoleSpanExporter",{enumerable:!0,get:function(){return ke.ConsoleSpanExporter}});Object.defineProperty(q,"ForceFlushState",{enumerable:!0,get:function(){return ke.ForceFlushState}});Object.defineProperty(q,"InMemorySpanExporter",{enumerable:!0,get:function(){return ke.InMemorySpanExporter}});Object.defineProperty(q,"NoopSpanProcessor",{enumerable:!0,get:function(){return ke.NoopSpanProcessor}});Object.defineProperty(q,"ParentBasedSampler",{enumerable:!0,get:function(){return ke.ParentBasedSampler}});Object.defineProperty(q,"RandomIdGenerator",{enumerable:!0,get:function(){return ke.RandomIdGenerator}});Object.defineProperty(q,"SamplingDecision",{enumerable:!0,get:function(){return ke.SamplingDecision}});Object.defineProperty(q,"SimpleSpanProcessor",{enumerable:!0,get:function(){return ke.SimpleSpanProcessor}});Object.defineProperty(q,"Span",{enumerable:!0,get:function(){return ke.Span}});Object.defineProperty(q,"TraceIdRatioBasedSampler",{enumerable:!0,get:function(){return ke.TraceIdRatioBasedSampler}});Object.defineProperty(q,"Tracer",{enumerable:!0,get:function(){return ke.Tracer}})});var PU=h(Pl=>{"use strict";Object.defineProperty(Pl,"__esModule",{value:!0});Pl.OTLPTraceExporter=void 0;var N7=hd(),R7=(Gu(),Y(fd)),aE=class extends N7.OTLPGRPCExporterNodeBase{constructor(e={}){super(e,R7.ProtobufTraceSerializer,"TraceExportService","/opentelemetry.proto.collector.trace.v1.TraceService/Export","TRACES")}};Pl.OTLPTraceExporter=aE});var bU=h(jr=>{"use strict";var P7=jr&&jr.__createBinding||(Object.create?function(t,e,n,i){i===void 0&&(i=n),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,i){i===void 0&&(i=n),t[i]=e[n]}),b7=jr&&jr.__exportStar||function(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&P7(e,t,n)};Object.defineProperty(jr,"__esModule",{value:!0});b7(PU(),jr)});var wU=Fe($l(),1),UU=Fe(eo(),1);import M7 from"path";function q1(t){return typeof t=="object"&&t!==null}function j1(t){return q1(t)&&typeof t.length=="number"}function $1(t){return Array.isArray(t)?t:t===void 0?[]:j1(t)||t instanceof Set?Array.from(t):[t]}var It=$1;function K1(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 qi=K1;var ce={short:/^-([^\d-])$/,long:/^--(\S+)/,combinedShort:/^-[^\d-]{2,}$/,optEquals:/^(--\S+?)=(.*)/},ji=class extends Array{load(e){if(this.clear(),e&&e!==process.argv)e=It(e);else{e=process.argv.slice(0);let n=process.execArgv.some(X1)?1:2;e.splice(0,n)}e.forEach(n=>this.push(String(n)))}clear(){this.length=0}expandOptionEqualsNotation(){if(this.some(e=>ce.optEquals.test(e))){let e=[];this.forEach(n=>{let i=n.match(ce.optEquals);i?e.push(i[1],i[2]):e.push(n)}),this.clear(),this.load(e)}}expandGetoptNotation(){this.hasCombinedShortOptions()&&qi(this,ce.combinedShort,W1)}hasCombinedShortOptions(){return this.some(e=>ce.combinedShort.test(e))}static from(e){let n=new this;return n.load(e),n}};function W1(t){return t=t.slice(1),t.split("").map(e=>"-"+e)}function $i(t){return ce.optEquals.test(t)}function uo(t){return(ce.short.test(t)||ce.long.test(t))&&!ce.optEquals.test(t)}function z1(t){return ce.long.test(t)&&!$i(t)}function Kl(t){return ce.short.test(t)?t.match(ce.short)[1]:z1(t)?t.match(ce.long)[1]:$i(t)?t.match(ce.optEquals)[1].replace(/^--/,""):null}function _S(t){return!(uo(t)||ce.combinedShort.test(t)||ce.optEquals.test(t))}function X1(t){return["--eval","-e"].indexOf(t)>-1||t.startsWith("--eval=")}function J1(t){return!isNaN(parseFloat(t))}function Q1(t){return!isNaN(parseFloat(t))&&isFinite(t)}function Z1(t){return t!==null&&typeof t=="object"&&t.constructor===Object}function eV(t){return hS(t)&&typeof t.length=="number"}function hS(t){return typeof t=="object"&&t!==null}function lo(t){return typeof t<"u"}function tV(t){return!lo(t)}function TS(t){return t===null}function rV(t){return lo(t)&&!TS(t)&&!Number.isNaN(t)}function nV(t){return typeof t=="function"?/^class /.test(Function.prototype.toString.call(t)):!1}function oV(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 iV(t){if(t){let e=lo(Promise)&&t instanceof Promise,n=t.then&&typeof t.then=="function";return!!(e||n)}else return!1}function aV(t){return t===null||!lo(t)?!1:typeof t[Symbol.iterator]=="function"||typeof t[Symbol.asyncIterator]=="function"}function sV(t){return typeof t=="string"}function uV(t){return typeof t=="function"}function lV(t){return typeof t=="function"&&t.constructor.name==="AsyncFunction"}var Se={isNumber:J1,isFiniteNumber:Q1,isPlainObject:Z1,isArrayLike:eV,isObject:hS,isDefined:lo,isUndefined:tV,isNull:TS,isDefinedValue:rV,isClass:nV,isPrimitive:oV,isPromise:iV,isIterable:aV,isString:sV,isFunction:uV,isAsyncFunction:lV};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)}},co=Wl;var zl=class extends Array{validate(e){this.some(_=>!_.name)&&Ct("INVALID_DEFINITIONS","Invalid option definitions: the `name` property is required on each definition"),this.some(_=>_.type&&typeof _.type!="function")&&Ct("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)))&&Ct("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))&&Ct("INVALID_DEFINITIONS","Invalid option definition: an alias must be a single character"),this.some(_=>(a=_,_.alias==="-"))&&Ct("INVALID_DEFINITIONS",'Invalid option definition: an alias cannot be "-"'),mS(this.map(_=>e?_.name.toLowerCase():_.name))&&Ct("INVALID_DEFINITIONS","Two or more option definitions have the same name"),mS(this.map(_=>e&&Se.isDefined(_.alias)?_.alias.toLowerCase():_.alias))&&Ct("INVALID_DEFINITIONS","Two or more option definitions have the same alias"),this.filter(_=>_.defaultOption===!0).length>1&&Ct("INVALID_DEFINITIONS","Only one option definition can be the defaultOption"),this.some(_=>(a=_,_.isBoolean()&&_.defaultOption))&&Ct("INVALID_DEFINITIONS",`A boolean option ["${a.name}"] can not also be the defaultOption.`)}get(e,n){if(uo(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(vS)}whereNotGrouped(){return this.filter(e=>!vS(e))}whereDefaultValueSet(){return this.filter(e=>Se.isDefined(e.defaultValue))}static from(e,n){if(e instanceof this)return e;let i=super.from(It(e),a=>co.create(a));return i.validate(n),i}};function Ct(t,e){let n=new Error(e);throw n.name=t,n}function vS(t){return It(t.group).some(e=>e)}function mS(t){let e={};for(let n=0;n<t.length;n++){let i=t[n];if(e[i])return!0;Se.isDefined(i)&&(e[i]=!0)}}var Zr=zl;var Xl=class{constructor(e,n){this.options=Object.assign({},n),this.definitions=Zr.from(e,this.options.caseInsensitive),this.argv=ji.from(this.options.argv),this.argv.hasCombinedShortOptions()&&qi(this.argv,ce.combinedShort.test.bind(ce.combinedShort),i=>(i=i.slice(1),i.split("").map(a=>({origArg:`-${i}`,arg:"-"+a}))))}*[Symbol.iterator](){let e=this.definitions,n,i,a,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(uo(l))n=e.get(l,this.options.caseInsensitive),i=void 0,n?(i=n.isBoolean()?!0:null,s="set"):s="unknown_option";else if($i(l)){let p=l.match(ce.optEquals);n=e.get(p[1],this.options.caseInsensitive),n?n.isBoolean()?(yield{event:"unknown_value",arg:l,name:"_unknown",value:i,def:n},s="set",i=!0):(s="set",i=p[2]):s="unknown_option"}else _S(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}}},yS=Xl;var yr=new WeakMap,Ki=class{constructor(e){this.definition=new co(e),this.state=null,this.resetToDefault()}get(){return yr.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?yr.set(this,e):(yr.set(this,i.type(e)),this.state=n)}resetToDefault(){Se.isDefined(this.definition.defaultValue)?this.definition.isMultiple()?yr.set(this,It(this.definition.defaultValue).slice()):yr.set(this,this.definition.defaultValue):this.definition.isMultiple()?yr.set(this,[]):yr.set(this,null),this.state="default"}static create(e){return e=new co(e),e.isBoolean()?Jl.create(e):new this(e)}},Jl=class extends Ki{set(e){super.set(!0)}static create(e){return new this(e)}},fo=Ki;var AS=Fe(fE(),1),Ql=class extends Map{constructor(e){super(),this.definitions=Zr.from(e),this.set("_unknown",fo.create({name:"_unknown",multiple:!0}));for(let n of this.definitions.whereDefaultValueSet())this.set(n.name,fo.create(n))}toObject(e){e=e||{};let n={};for(let i of this){let a=e.camelCase&&i[0]!=="_unknown"?(0,AS.default)(i[0]):i[0],s=i[1];a==="_unknown"&&!s.get().length||(n[a]=s.get())}return e.skipUnknown&&delete n._unknown,n}},Wi=Ql;var Zl=Fe(fE(),1),ec=class extends Wi{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 It(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}},OS=ec;function cV(t,e){e=e||{},e.stopAtFirstUnknown&&(e.partial=!0),t=Zr.from(t,e.caseInsensitive);let n=new yS(t,{argv:e.argv,stopAtFirstUnknown:e.stopAtFirstUnknown,caseInsensitive:e.caseInsensitive}),i=t.isGrouped()?OS:Wi,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=fo.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 gS=cV;var DU=Fe(HU(),1),VU=Fe(FU(),1),BU=Fe(QO(),1);import L7 from"http";import{Session as I7}from"node:inspector/promises";import{createRequire as pY}from"module";var lc=Fe($l(),1);import ra from"path";import uc from"os";var dY=pY(import.meta.url);function ZO(t){let e=dY.resolve(t),n=ra.dirname(e);for(;!lc.default.existsSync(ra.join(n,"package.json"));)n=ra.dirname(n);let i=lc.default.readFileSync(ra.join(n,"package.json"),"utf-8");return JSON.parse(i)}var na=class{constructor(e){this.instance=e;let n=ZO("@sentio/sdk"),i=ZO("@sentio/runtime");console.log("Runtime version:",i.version,"SDK version:",n.version);let a=n.version.split(".");this.sdkMinorVersion=parseInt(a[1])}instance;sdkMinorVersion;async getConfig(e,n){let i=await this.instance.getConfig(e,n);if(i.executionConfig=lE.fromPartial(Ll.execution),i.contractConfigs)for(let a of i.contractConfigs)a.aptosCallConfigs&&(a.moveCallConfigs=a.aptosCallConfigs),a.aptosEventConfigs&&(a.moveEventConfigs=a.aptosEventConfigs);return i}async start(e,n){return await this.instance.start(e,n)}async stop(e,n){return await this.instance.stop(e,n)}async processBindings(e,n){Ll.execution.sequential&&(e.bindings=e.bindings.sort(EY));for(let i of e.bindings)this.adjustDataBinding(i);try{let i=await this.instance.processBindings(e,n);return this.adjustResult(i.result),!i.configUpdated&&i.result?.states?.configUpdated&&(i.configUpdated=i.result?.states?.configUpdated),i}catch(i){throw this.sdkMinorVersion<=16&&(i.code===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){if(e)switch(e.handlerType){case 6:e.data?.aptEvent&&e.data.aptEvent.rawTransaction&&!e.data.aptEvent.transaction&&(e.data.aptEvent.transaction=JSON.parse(e.data.aptEvent.rawTransaction));break;case 7:e.data?.aptCall&&e.data.aptCall.rawTransaction&&!e.data.aptCall.transaction&&(e.data.aptCall.transaction=JSON.parse(e.data.aptCall.rawTransaction));break;case 8:e.data?.aptResource?.resources&&e.data.aptResource.rawResources&&e.data.aptResource.rawResources.length>0&&(e.data.aptResource.resources=e.data.aptResource.rawResources.map(n=>JSON.parse(n)));break;case 0:e.data?.ethBlock&&e.data.raw.length===0&&(e.data.raw=new TextEncoder().encode(JSON.stringify(e.data.ethBlock.block)));break;default:break}}};function EY(t,e){let n=eg(t)||new Date(0),i=eg(e)||new Date(0),a=n.getTime()-i.getTime();return a!==0?a:tg(t)-tg(e)}function eg(t){return t.data?.ethLog?.timestamp||t.data?.ethTransaction?.timestamp||(t.data?.ethBlock?.block?.timestamp?new Date(Number(t.data.ethBlock.block.timestamp)*1e3):void 0)||t.data?.ethTrace?.timestamp||(t.data?.aptCall?.transaction?new Date(Number(t.data.aptCall.transaction.timestamp)/1e3):void 0)||(t.data?.aptEvent?.transaction?new Date(Number(t.data.aptEvent.transaction.timestamp)/1e3):void 0)||(t.data?.aptResource?.timestampMicros?new Date(Number(t.data.aptResource.timestampMicros)/1e3):void 0)||t.data?.fuelCall?.timestamp}function tg(t){return t.data?.ethLog?.log?.logIndex||t.data?.ethTransaction?.transaction?.transactionIndex||t.data?.ethBlock?.block?.number||t.data?.ethTrace?.trace?.transactionPosition}import("node:process").then(t=>t.stdout.write(""));var At=Fe(_0(),1);function S0(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 h0(t,e){let n={transform:a=>{let s=[];typeof a.message=="object"?s.push(S0(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(S0(u)):s.push(u)}return a.message=s.join(" "),a}},i=(0,At.createLogger)({format:At.format.combine(At.format.timestamp({format:"YYYY-MM-DDTHH:mm:ss.SSSZ"}),n,At.format.errors({stack:!0}),t?At.format.json():At.format.simple()),level:e?"debug":"info",transports:[new At.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(""));Gs();Ln();var xU=Fe(kI(),1),MU=Fe(qI(),1),sE=Fe(RU(),1),LU=Fe(bU(),1);gi();x();async function IU(t){t&&g.setLogger(new _E,ot.DEBUG);let e=await Bs.detect(),n=new pi({resource:e,readers:[new nu({exporter:new xU.OTLPMetricExporter}),new MU.PrometheusExporter({host:"0.0.0.0",port:4041})]}),i=new sE.NodeTracerProvider({resource:e}),a=new LU.OTLPTraceExporter,s=new hr(a);i.addSpanProcessor(s),Ci.setGlobalMeterProvider(n),X.setGlobalTracerProvider(i),["SIGINT","SIGTERM"].forEach(o=>{process.on(o,()=>x7())}),Ci.getMeter("processor").createGauge("up").record(1)}async function x7(){let t=X.getTracerProvider();if(t instanceof TE){let n=t.getDelegate();n instanceof sE.NodeTracerProvider&&n.shutdown().catch(console.error)}let e=Ci.getMeterProvider();e instanceof pi&&e.shutdown().catch(console.error)}import("node:process").then(t=>t.stdout.write(""));var bl=class{constructor(e){this.loader=e}async listen(e){let n=xl.INSTANCE;await this.loader(),await n.configure(uE.create()),console.log("Starting Action Server at:",e),await n.startServer(e)}forceShutdown(){xl.INSTANCE.shutdown()}};import("node:process").then(t=>t.stdout.write(""));var C7=[{name:"target",type:String,defaultOption:!0},{name:"port",alias:"p",type:String,defaultValue:"4000"},{name:"concurrency",type:Number,defaultValue:4},{name:"batch-count",type:Number,defaultValue:1},{name:"chains-config",alias:"c",type:String,defaultValue:"chains-config.json"},{name:"chainquery-server",type:String,defaultValue:""},{name:"pricefeed-server",type:String,defaultValue:""},{name:"log-format",type:String,defaultValue:"console"},{name:"debug",type:Boolean,defaultValue:!1},{name:"start-action-server",type:Boolean,defaultValue:!1}],He=gS(C7,{partial:!0}),w7=process.env.LOG_LEVEL?.toUpperCase();h0(He["log-format"]==="json",w7==="debug"?!0:He.debug);console.debug("Starting with",He.target);await IU(He.debug);Error.stackTraceLimit=20;var U7=M7.resolve(He["chains-config"]),D7=wU.default.readJsonSync(U7),V7=process.env.OVERRIDE_CONCURRENCY?parseInt(process.env.OVERRIDE_CONCURRENCY):void 0,B7=process.env.OVERRIDE_BATCH_COUNT?parseInt(process.env.OVERRIDE_BATCH_COUNT):void 0;Tr.INSTANCE.concurrency=V7??He.concurrency;Tr.INSTANCE.batchCount=B7??He["batch-count"];Tr.INSTANCE.chainQueryAPI=He["chainquery-server"];Tr.INSTANCE.priceFeedAPI=He["pricefeed-server"];for(let[t,e]of Object.entries(D7)){let n=e;if(n.ChainServer)Tr.INSTANCE.chainServer.set(t,n.ChainServer);else{let i=n.Https?.[0];i?Tr.INSTANCE.chainServer.set(t,i):console.error("not valid config for chain",t)}}console.debug("Starting Server",He);var $r,Zn,CU=async()=>{let t=await import(He.target);return console.debug("Module loaded",t),t};if(He["start-action-server"])$r=new bl(CU),$r.listen(He.port);else{$r=(0,DU.createServer)({"grpc.max_send_message_length":384*1024*1024,"grpc.max_receive_message_length":384*1024*1024,"grpc.default_compression_algorithm":UU.compressionAlgorithms.gzip}).use((0,BU.openTelemetryServerMiddleware)()).use(VU.errorDetailsServerMiddleware),Zn=new yE(CU,$r.shutdown);let t=new na(Zn);$r.add(cE,t),$r.listen("0.0.0.0:"+He.port),console.log("Processor Server Started at:",He.port)}var GU=4040,G7=L7.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 I7;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(GU);console.log("Metric Server Started at:",GU);process.on("SIGINT",function(){k7(0)}).on("uncaughtException",t=>{console.error("Uncaught Exception, please checking if await is properly used",t),Zn&&(Zn.unhandled=t)}).on("unhandledRejection",(t,e)=>{t?.message.startsWith('invalid ENS name (disallowed character: "*"')||(console.error("Unhandled Rejection, please checking if await is properly",t),Zn&&(Zn.unhandled=t))});function k7(t){$r?.forceShutdown(),console.log("RPC server shut down"),G7.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:
|