@tanagram/lore 0.1.186 → 0.1.187

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.
Files changed (2) hide show
  1. package/dist/index.js +3 -3
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
3
- var ptt=Object.create;var BL=Object.defineProperty;var ftt=Object.getOwnPropertyDescriptor;var mtt=Object.getOwnPropertyNames;var Att=Object.getPrototypeOf,gtt=Object.prototype.hasOwnProperty;var Qe=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var w=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}};var P=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},Js=(e,t)=>{for(var n in t)BL(e,n,{get:t[n],enumerable:!0})},tAe=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of mtt(t))!gtt.call(e,o)&&o!==n&&BL(e,o,{get:()=>t[o],enumerable:!(r=ftt(t,o))||r.enumerable});return e};var ue=(e,t,n)=>(n=e!=null?ptt(Att(e)):{},tAe(t||!e||!e.__esModule?BL(n,"default",{value:e,enumerable:!0}):n,e)),Le=e=>tAe(BL({},"__esModule",{value:!0}),e);var m=w(()=>{(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"0.1.186"}}catch{}})()});var bg,l5=w(()=>{m();bg="1.9.1"});function htt(e){let t=new Set([e]),n=new Set,r=e.match(oAe);if(!r)return()=>!1;let o={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(o.prerelease!=null)return function(l){return l===e};function i(u){return n.add(u),!1}function s(u){return t.add(u),!0}return function(l){if(t.has(l))return!0;if(n.has(l))return!1;let p=l.match(oAe);if(!p)return i(l);let h={major:+p[1],minor:+p[2],patch:+p[3],prerelease:p[4]};return h.prerelease!=null||o.major!==h.major?i(l):o.major===0?o.minor===h.minor&&o.patch<=h.patch?s(l):i(l):o.minor<=h.minor?s(l):i(l)}}var oAe,iAe,sAe=w(()=>{m();l5();oAe=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;iAe=htt(bg)});function Im(e,t,n,r=!1){var o;let i=nB[tB]=(o=nB[tB])!==null&&o!==void 0?o:{version:bg};if(!r&&i[e]){let s=new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${e}`);return n.error(s.stack||s.message),!1}if(i.version!==bg){let s=new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${bg}`);return n.error(s.stack||s.message),!1}return i[e]=t,n.debug(`@opentelemetry/api: Registered a global for ${e} v${bg}.`),!0}function Ml(e){var t,n;let r=(t=nB[tB])===null||t===void 0?void 0:t.version;if(!(!r||!iAe(r)))return(n=nB[tB])===null||n===void 0?void 0:n[e]}function Cm(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${bg}.`);let n=nB[tB];n&&delete n[e]}var _tt,tB,nB,oS=w(()=>{m();l5();sAe();_tt=bg.split(".")[0],tB=Symbol.for(`opentelemetry.js.api.${_tt}`),nB=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});function rB(e,t,n){let r=Ml("diag");if(r)return r[e](t,...n)}var wL,aAe=w(()=>{m();oS();wL=class{constructor(t){this._namespace=t.namespace||"DiagComponentLogger"}debug(...t){return rB("debug",this._namespace,t)}error(...t){return rB("error",this._namespace,t)}info(...t){return rB("info",this._namespace,t)}warn(...t){return rB("warn",this._namespace,t)}verbose(...t){return rB("verbose",this._namespace,t)}}});var Is,OL=w(()=>{m();(function(e){e[e.NONE=0]="NONE",e[e.ERROR=30]="ERROR",e[e.WARN=50]="WARN",e[e.INFO=60]="INFO",e[e.DEBUG=70]="DEBUG",e[e.VERBOSE=80]="VERBOSE",e[e.ALL=9999]="ALL"})(Is||(Is={}))});function uAe(e,t){e<Is.NONE?e=Is.NONE:e>Is.ALL&&(e=Is.ALL),t=t||{};function n(r,o){let i=t[r];return typeof i=="function"&&e>=o?i.bind(t):function(){}}return{error:n("error",Is.ERROR),warn:n("warn",Is.WARN),info:n("info",Is.INFO),debug:n("debug",Is.DEBUG),verbose:n("verbose",Is.VERBOSE)}}var cAe=w(()=>{m();OL()});var Ett,Zs,iS=w(()=>{m();aAe();cAe();OL();oS();Ett="diag",Zs=class e{static instance(){return this._instance||(this._instance=new e),this._instance}constructor(){function t(o){return function(...i){let s=Ml("diag");if(s)return s[o](...i)}}let n=this,r=(o,i={logLevel:Is.INFO})=>{var s,u,l;if(o===n){let y=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return n.error((s=y.stack)!==null&&s!==void 0?s:y.message),!1}typeof i=="number"&&(i={logLevel:i});let p=Ml("diag"),h=uAe((u=i.logLevel)!==null&&u!==void 0?u:Is.INFO,o);if(p&&!i.suppressOverrideMessage){let y=(l=new Error().stack)!==null&&l!==void 0?l:"<failed to generate stacktrace>";p.warn(`Current logger will be overwritten from ${y}`),h.warn(`Current logger will overwrite one already registered from ${y}`)}return Im("diag",h,n,!0)};n.setLogger=r,n.disable=()=>{Cm(Ett,n)},n.createComponentLogger=o=>new wL(o),n.verbose=t("verbose"),n.debug=t("debug"),n.info=t("info"),n.warn=t("warn"),n.error=t("error")}}});var kL,lAe=w(()=>{m();kL=class e{constructor(t){this._entries=t?new Map(t):new Map}getEntry(t){let n=this._entries.get(t);if(n)return Object.assign({},n)}getAllEntries(){return Array.from(this._entries.entries())}setEntry(t,n){let r=new e(this._entries);return r._entries.set(t,n),r}removeEntry(t){let n=new e(this._entries);return n._entries.delete(t),n}removeEntries(...t){let n=new e(this._entries);for(let r of t)n._entries.delete(r);return n}clear(){return new e}}});var dAe,pAe=w(()=>{m();dAe=Symbol("BaggageEntryMetadata")});function fAe(e={}){return new kL(new Map(Object.entries(e)))}function mAe(e){return typeof e!="string"&&(ytt.error(`Cannot create baggage metadata from unknown type: ${typeof e}`),e=""),{__TYPE__:dAe,toString(){return e}}}var ytt,d5=w(()=>{m();iS();lAe();pAe();ytt=Zs.instance()});function Ll(e){return Symbol.for(e)}var p5,DC,oB=w(()=>{m();p5=class e{constructor(t){let n=this;n._currentContext=t?new Map(t):new Map,n.getValue=r=>n._currentContext.get(r),n.setValue=(r,o)=>{let i=new e(n._currentContext);return i._currentContext.set(r,o),i},n.deleteValue=r=>{let o=new e(n._currentContext);return o._currentContext.delete(r),o}}},DC=new p5});var f5,m5,PL,AAe=w(()=>{m();f5=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],m5={};if(typeof console<"u"){let e=["error","warn","info","debug","trace","log"];for(let t of e)typeof console[t]=="function"&&(m5[t]=console[t])}PL=class{constructor(){function t(n){return function(...r){let o=m5[n];if(typeof o!="function"&&(o=m5.log),typeof o!="function"&&console&&(o=console[n],typeof o!="function"&&(o=console.log)),typeof o=="function")return o.apply(console,r)}}for(let n=0;n<f5.length;n++)this[f5[n].n]=t(f5[n].c)}}});function gAe(){return b5}var A5,NC,g5,h5,_5,E5,iB,y5,S5,T5,b5,Stt,Ttt,btt,Itt,Ctt,vtt,Rtt,I5=w(()=>{m();A5=class{constructor(){}createGauge(t,n){return Ttt}createHistogram(t,n){return btt}createCounter(t,n){return Stt}createUpDownCounter(t,n){return Itt}createObservableGauge(t,n){return vtt}createObservableCounter(t,n){return Ctt}createObservableUpDownCounter(t,n){return Rtt}addBatchObservableCallback(t,n){}removeBatchObservableCallback(t){}},NC=class{},g5=class extends NC{add(t,n){}},h5=class extends NC{add(t,n){}},_5=class extends NC{record(t,n){}},E5=class extends NC{record(t,n){}},iB=class{addCallback(t){}removeCallback(t){}},y5=class extends iB{},S5=class extends iB{},T5=class extends iB{},b5=new A5,Stt=new g5,Ttt=new _5,btt=new E5,Itt=new h5,Ctt=new y5,vtt=new S5,Rtt=new T5});var ML,hAe=w(()=>{m();(function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"})(ML||(ML={}))});var LL,UL,C5=w(()=>{m();LL={get(e,t){if(e!=null)return e[t]},keys(e){return e==null?[]:Object.keys(e)}},UL={set(e,t,n){e!=null&&(e[t]=n)}}});var QL,_Ae=w(()=>{m();oB();QL=class{active(){return DC}with(t,n,r,...o){return n.call(r,...o)}bind(t,n){return n}enable(){return this}disable(){return this}}});var v5,xtt,vm,sB=w(()=>{m();_Ae();oS();iS();v5="context",xtt=new QL,vm=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalContextManager(t){return Im(v5,t,Zs.instance())}active(){return this._getContextManager().active()}with(t,n,r,...o){return this._getContextManager().with(t,n,r,...o)}bind(t,n){return this._getContextManager().bind(t,n)}_getContextManager(){return Ml(v5)||xtt}disable(){this._getContextManager().disable(),Cm(v5,Zs.instance())}}});var ou,R5=w(()=>{m();(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(ou||(ou={}))});var aB,sS,FL,GL=w(()=>{m();R5();aB="0000000000000000",sS="00000000000000000000000000000000",FL={traceId:sS,spanId:aB,traceFlags:ou.NONE}});var Rm,jL=w(()=>{m();GL();Rm=class{constructor(t=FL){this._spanContext=t}spanContext(){return this._spanContext}setAttribute(t,n){return this}setAttributes(t){return this}addEvent(t,n){return this}addLink(t){return this}addLinks(t){return this}setStatus(t){return this}updateName(t){return this}end(t){}isRecording(){return!1}recordException(t,n){}}});function zL(e){return e.getValue(x5)||void 0}function EAe(){return zL(vm.getInstance().active())}function uB(e,t){return e.setValue(x5,t)}function yAe(e){return e.deleteValue(x5)}function SAe(e,t){return uB(e,new Rm(t))}function HL(e){var t;return(t=zL(e))===null||t===void 0?void 0:t.spanContext()}var x5,D5=w(()=>{m();oB();jL();sB();x5=Ll("OpenTelemetry Context Key SPAN")});function TAe(e,t){if(typeof e!="string"||e.length!==t)return!1;let n=0;for(let r=0;r<e.length;r+=4)n+=($L[e.charCodeAt(r)]|0)+($L[e.charCodeAt(r+1)]|0)+($L[e.charCodeAt(r+2)]|0)+($L[e.charCodeAt(r+3)]|0);return n===t}function N5(e){return TAe(e,32)&&e!==sS}function B5(e){return TAe(e,16)&&e!==aB}function Ig(e){return N5(e.traceId)&&B5(e.spanId)}function bAe(e){return new Rm(e)}var $L,qL=w(()=>{m();GL();jL();$L=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1])});function Dtt(e){return e!==null&&typeof e=="object"&&"spanId"in e&&typeof e.spanId=="string"&&"traceId"in e&&typeof e.traceId=="string"&&"traceFlags"in e&&typeof e.traceFlags=="number"}var w5,BC,O5=w(()=>{m();sB();D5();jL();qL();w5=vm.getInstance(),BC=class{startSpan(t,n,r=w5.active()){if(!!n?.root)return new Rm;let i=r&&HL(r);return Dtt(i)&&Ig(i)?new Rm(i):new Rm}startActiveSpan(t,n,r,o){let i,s,u;if(arguments.length<2)return;arguments.length===2?u=n:arguments.length===3?(i=n,u=r):(i=n,s=r,u=o);let l=s??w5.active(),p=this.startSpan(t,i,l),h=uB(l,p);return w5.with(h,u,void 0,p)}}});var Ntt,wC,k5=w(()=>{m();O5();Ntt=new BC,wC=class{constructor(t,n,r,o){this._provider=t,this.name=n,this.version=r,this.options=o}startSpan(t,n,r){return this._getTracer().startSpan(t,n,r)}startActiveSpan(t,n,r,o){let i=this._getTracer();return Reflect.apply(i.startActiveSpan,i,arguments)}_getTracer(){if(this._delegate)return this._delegate;let t=this._provider.getDelegateTracer(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):Ntt}}});var VL,IAe=w(()=>{m();O5();VL=class{getTracer(t,n,r){return new BC}}});var Btt,aS,P5=w(()=>{m();k5();IAe();Btt=new VL,aS=class{getTracer(t,n,r){var o;return(o=this.getDelegateTracer(t,n,r))!==null&&o!==void 0?o:new wC(this,t,n,r)}getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:Btt}setDelegate(t){this._delegate=t}getDelegateTracer(t,n,r){var o;return(o=this._delegate)===null||o===void 0?void 0:o.getTracer(t,n,r)}}});var YL,CAe=w(()=>{m();(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(YL||(YL={}))});var po,vAe=w(()=>{m();(function(e){e[e.INTERNAL=0]="INTERNAL",e[e.SERVER=1]="SERVER",e[e.CLIENT=2]="CLIENT",e[e.PRODUCER=3]="PRODUCER",e[e.CONSUMER=4]="CONSUMER"})(po||(po={}))});var Ai,RAe=w(()=>{m();(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(Ai||(Ai={}))});function xAe(e){return ktt.test(e)}function DAe(e){return Ptt.test(e)&&!Mtt.test(e)}var M5,wtt,Ott,ktt,Ptt,Mtt,NAe=w(()=>{m();M5="[_0-9a-z-*/]",wtt=`[a-z]${M5}{0,255}`,Ott=`[a-z0-9]${M5}{0,240}@[a-z]${M5}{0,13}`,ktt=new RegExp(`^(?:${wtt}|${Ott})$`),Ptt=/^[ -~]{0,255}[!-~]$/,Mtt=/,|=/});var BAe,Ltt,wAe,OAe,KL,kAe=w(()=>{m();NAe();BAe=32,Ltt=512,wAe=",",OAe="=",KL=class e{constructor(t){this._internalState=new Map,t&&this._parse(t)}set(t,n){let r=this._clone();return r._internalState.has(t)&&r._internalState.delete(t),r._internalState.set(t,n),r}unset(t){let n=this._clone();return n._internalState.delete(t),n}get(t){return this._internalState.get(t)}serialize(){return Array.from(this._internalState.keys()).reduceRight((t,n)=>(t.push(n+OAe+this.get(n)),t),[]).join(wAe)}_parse(t){t.length>Ltt||(this._internalState=t.split(wAe).reduceRight((n,r)=>{let o=r.trim(),i=o.indexOf(OAe);if(i!==-1){let s=o.slice(0,i),u=o.slice(i+1,r.length);xAe(s)&&DAe(u)&&n.set(s,u)}return n},new Map),this._internalState.size>BAe&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,BAe))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}}});function PAe(e){return new KL(e)}var MAe=w(()=>{m();kAe()});var Xe,LAe=w(()=>{m();sB();Xe=vm.getInstance()});var Ul,UAe=w(()=>{m();iS();Ul=Zs.instance()});var L5,QAe,FAe=w(()=>{m();I5();L5=class{getMeter(t,n,r){return b5}},QAe=new L5});var U5,JL,GAe=w(()=>{m();FAe();oS();iS();U5="metrics",JL=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalMeterProvider(t){return Im(U5,t,Zs.instance())}getMeterProvider(){return Ml(U5)||QAe}getMeter(t,n,r){return this.getMeterProvider().getMeter(t,n,r)}disable(){Cm(U5,Zs.instance())}}});var Q5,jAe=w(()=>{m();GAe();Q5=JL.getInstance()});var ZL,zAe=w(()=>{m();ZL=class{inject(t,n){}extract(t,n){return t}fields(){return[]}}});function G5(e){return e.getValue(F5)||void 0}function HAe(){return G5(vm.getInstance().active())}function $Ae(e,t){return e.setValue(F5,t)}function qAe(e){return e.deleteValue(F5)}var F5,VAe=w(()=>{m();sB();oB();F5=Ll("OpenTelemetry Baggage Key")});var j5,Utt,WL,YAe=w(()=>{m();oS();zAe();C5();VAe();d5();iS();j5="propagation",Utt=new ZL,WL=class e{constructor(){this.createBaggage=fAe,this.getBaggage=G5,this.getActiveBaggage=HAe,this.setBaggage=$Ae,this.deleteBaggage=qAe}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalPropagator(t){return Im(j5,t,Zs.instance())}inject(t,n,r=UL){return this._getGlobalPropagator().inject(t,n,r)}extract(t,n,r=LL){return this._getGlobalPropagator().extract(t,n,r)}fields(){return this._getGlobalPropagator().fields()}disable(){Cm(j5,Zs.instance())}_getGlobalPropagator(){return Ml(j5)||Utt}}});var lf,KAe=w(()=>{m();YAe();lf=WL.getInstance()});var z5,XL,JAe=w(()=>{m();oS();P5();qL();D5();iS();z5="trace",XL=class e{constructor(){this._proxyTracerProvider=new aS,this.wrapSpanContext=bAe,this.isSpanContextValid=Ig,this.deleteSpan=yAe,this.getSpan=zL,this.getActiveSpan=EAe,this.getSpanContext=HL,this.setSpan=uB,this.setSpanContext=SAe}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalTracerProvider(t){let n=Im(z5,this._proxyTracerProvider,Zs.instance());return n&&this._proxyTracerProvider.setDelegate(t),n}getTracerProvider(){return Ml(z5)||this._proxyTracerProvider}getTracer(t,n){return this.getTracerProvider().getTracer(t,n)}disable(){Cm(z5,Zs.instance()),this._proxyTracerProvider=new aS}}});var qt,ZAe=w(()=>{m();JAe();qt=XL.getInstance()});var nt={};Js(nt,{DiagConsoleLogger:()=>PL,DiagLogLevel:()=>Is,INVALID_SPANID:()=>aB,INVALID_SPAN_CONTEXT:()=>FL,INVALID_TRACEID:()=>sS,ProxyTracer:()=>wC,ProxyTracerProvider:()=>aS,ROOT_CONTEXT:()=>DC,SamplingDecision:()=>YL,SpanKind:()=>po,SpanStatusCode:()=>Ai,TraceFlags:()=>ou,ValueType:()=>ML,baggageEntryMetadataFromString:()=>mAe,context:()=>Xe,createContextKey:()=>Ll,createNoopMeter:()=>gAe,createTraceState:()=>PAe,default:()=>Qtt,defaultTextMapGetter:()=>LL,defaultTextMapSetter:()=>UL,diag:()=>Ul,isSpanContextValid:()=>Ig,isValidSpanId:()=>B5,isValidTraceId:()=>N5,metrics:()=>Q5,propagation:()=>lf,trace:()=>qt});var Qtt,ze=w(()=>{m();d5();oB();AAe();OL();I5();hAe();C5();k5();P5();CAe();vAe();RAe();R5();MAe();qL();GL();LAe();UAe();jAe();KAe();ZAe();Qtt={context:Xe,diag:Ul,metrics:Q5,propagation:lf,trace:qt}});var cB=P(C_=>{"use strict";m();Object.defineProperty(C_,"__esModule",{value:!0});C_.isTracingSuppressed=C_.unsuppressTracing=C_.suppressTracing=void 0;var Ftt=(ze(),Le(nt)),H5=(0,Ftt.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Gtt(e){return e.setValue(H5,!0)}C_.suppressTracing=Gtt;function jtt(e){return e.deleteValue(H5)}C_.unsuppressTracing=jtt;function ztt(e){return e.getValue(H5)===!0}C_.isTracingSuppressed=ztt});var $5=P(iu=>{"use strict";m();Object.defineProperty(iu,"__esModule",{value:!0});iu.BAGGAGE_MAX_TOTAL_LENGTH=iu.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=iu.BAGGAGE_MAX_NAME_VALUE_PAIRS=iu.BAGGAGE_HEADER=iu.BAGGAGE_ITEMS_SEPARATOR=iu.BAGGAGE_PROPERTIES_SEPARATOR=iu.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;iu.BAGGAGE_KEY_PAIR_SEPARATOR="=";iu.BAGGAGE_PROPERTIES_SEPARATOR=";";iu.BAGGAGE_ITEMS_SEPARATOR=",";iu.BAGGAGE_HEADER="baggage";iu.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;iu.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;iu.BAGGAGE_MAX_TOTAL_LENGTH=8192});var V5=P(jd=>{"use strict";m();Object.defineProperty(jd,"__esModule",{value:!0});jd.parseKeyPairsIntoRecord=jd.parseBaggageHeaderString=jd.parsePairKeyValue=jd.getKeyPairs=jd.serializeKeyPairs=void 0;var Htt=(ze(),Le(nt)),xm=$5();function $tt(e){return e.reduce((t,n)=>{let r=`${t}${t!==""?xm.BAGGAGE_ITEMS_SEPARATOR:""}${n}`;return r.length>xm.BAGGAGE_MAX_TOTAL_LENGTH?t:r},"")}jd.serializeKeyPairs=$tt;function qtt(e){return e.getAllEntries().map(([t,n])=>{let r=`${encodeURIComponent(t)}=${encodeURIComponent(n.value)}`;return n.metadata!==void 0&&(r+=xm.BAGGAGE_PROPERTIES_SEPARATOR+n.metadata.toString()),r})}jd.getKeyPairs=qtt;function q5(e){if(!e)return;let t=e.indexOf(xm.BAGGAGE_PROPERTIES_SEPARATOR),n=t===-1?e:e.substring(0,t),r=n.indexOf(xm.BAGGAGE_KEY_PAIR_SEPARATOR);if(r<=0)return;let o=n.substring(0,r).trim(),i=n.substring(r+1).trim();if(!o||!i)return;let s,u;try{s=decodeURIComponent(o),u=decodeURIComponent(i)}catch{return}let l;if(t!==-1&&t<e.length-1){let p=e.substring(t+1);l=(0,Htt.baggageEntryMetadataFromString)(p)}return{key:s,value:u,metadata:l}}jd.parsePairKeyValue=q5;function Vtt(e,t,n,r){let o=0;for(;o<e.length&&n<xm.BAGGAGE_MAX_NAME_VALUE_PAIRS;){let i=e.indexOf(xm.BAGGAGE_ITEMS_SEPARATOR,o),s=i===-1?e.length:i,u=s-o;if(u<=xm.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS){let l=q5(e.substring(o,s));if(l){let p=(n===0?0:1)+u;if(r+p>xm.BAGGAGE_MAX_TOTAL_LENGTH)break;t[l.key]=l.metadata?{value:l.value,metadata:l.metadata}:{value:l.value},n++,r+=p}}if(i===-1)break;o=i+1}return[n,r]}jd.parseBaggageHeaderString=Vtt;function Ytt(e){let t={};return typeof e=="string"&&e.length>0&&e.split(xm.BAGGAGE_ITEMS_SEPARATOR).forEach(n=>{let r=q5(n);r!==void 0&&r.value.length>0&&(t[r.key]=r.value)}),t}jd.parseKeyPairsIntoRecord=Ytt});var WAe=P(tU=>{"use strict";m();Object.defineProperty(tU,"__esModule",{value:!0});tU.W3CBaggagePropagator=void 0;var Y5=(ze(),Le(nt)),Ktt=cB(),lB=$5(),eU=V5(),K5=class{inject(t,n,r){let o=Y5.propagation.getBaggage(t);if(!o||(0,Ktt.isTracingSuppressed)(t))return;let i=(0,eU.getKeyPairs)(o).filter(u=>u.length<=lB.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,lB.BAGGAGE_MAX_NAME_VALUE_PAIRS),s=(0,eU.serializeKeyPairs)(i);s.length>0&&r.set(n,lB.BAGGAGE_HEADER,s)}extract(t,n,r){let o=r.get(n,lB.BAGGAGE_HEADER);if(!o)return t;let i={},s=0,u=0;if(Array.isArray(o))for(let l=0;l<o.length;l++)[s,u]=(0,eU.parseBaggageHeaderString)(o[l],i,s,u);else[s]=(0,eU.parseBaggageHeaderString)(o,i,s,u);return s===0?t:Y5.propagation.setBaggage(t,Y5.propagation.createBaggage(i))}fields(){return[lB.BAGGAGE_HEADER]}};tU.W3CBaggagePropagator=K5});var XAe=P(nU=>{"use strict";m();Object.defineProperty(nU,"__esModule",{value:!0});nU.AnchoredClock=void 0;var J5=class{_monotonicClock;_epochMillis;_performanceMillis;constructor(t,n){this._monotonicClock=n,this._epochMillis=t.now(),this._performanceMillis=n.now()}now(){let t=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+t}};nU.AnchoredClock=J5});var oge=P(v_=>{"use strict";m();Object.defineProperty(v_,"__esModule",{value:!0});v_.isAttributeValue=v_.isAttributeKey=v_.sanitizeAttributes=void 0;var ege=(ze(),Le(nt));function Jtt(e){let t={};if(typeof e!="object"||e==null)return t;for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;if(!tge(n)){ege.diag.warn(`Invalid attribute key: ${n}`);continue}let r=e[n];if(!nge(r)){ege.diag.warn(`Invalid attribute value set for key: ${n}`);continue}Array.isArray(r)?t[n]=r.slice():t[n]=r}return t}v_.sanitizeAttributes=Jtt;function tge(e){return typeof e=="string"&&e!==""}v_.isAttributeKey=tge;function nge(e){return e==null?!0:Array.isArray(e)?Ztt(e):rge(typeof e)}v_.isAttributeValue=nge;function Ztt(e){let t;for(let n of e){if(n==null)continue;let r=typeof n;if(r!==t){if(!t){if(rge(r)){t=r;continue}return!1}return!1}}return!0}function rge(e){switch(e){case"number":case"boolean":case"string":return!0}return!1}});var Z5=P(rU=>{"use strict";m();Object.defineProperty(rU,"__esModule",{value:!0});rU.loggingErrorHandler=void 0;var Wtt=(ze(),Le(nt));function Xtt(){return e=>{Wtt.diag.error(ent(e))}}rU.loggingErrorHandler=Xtt;function ent(e){return typeof e=="string"?e:JSON.stringify(tnt(e))}function tnt(e){let t={},n=e;for(;n!==null;)Object.getOwnPropertyNames(n).forEach(r=>{if(t[r])return;let o=n[r];o&&(t[r]=String(o))}),n=Object.getPrototypeOf(n);return t}});var sge=P(OC=>{"use strict";m();Object.defineProperty(OC,"__esModule",{value:!0});OC.globalErrorHandler=OC.setGlobalErrorHandler=void 0;var nnt=Z5(),ige=(0,nnt.loggingErrorHandler)();function rnt(e){ige=e}OC.setGlobalErrorHandler=rnt;function ont(e){try{ige(e)}catch{}}OC.globalErrorHandler=ont});var lge=P(Dm=>{"use strict";m();Object.defineProperty(Dm,"__esModule",{value:!0});Dm.getStringListFromEnv=Dm.getBooleanFromEnv=Dm.getStringFromEnv=Dm.getNumberFromEnv=void 0;var age=(ze(),Le(nt)),uge=Qe("util");function int(e){let t=process.env[e];if(t==null||t.trim()==="")return;let n=Number(t);if(isNaN(n)){age.diag.warn(`Unknown value ${(0,uge.inspect)(t)} for ${e}, expected a number, using defaults`);return}return n}Dm.getNumberFromEnv=int;function cge(e){let t=process.env[e];if(!(t==null||t.trim()===""))return t}Dm.getStringFromEnv=cge;function snt(e){let t=process.env[e]?.trim().toLowerCase();return t==null||t===""?!1:t==="true"?!0:(t==="false"||age.diag.warn(`Unknown value ${(0,uge.inspect)(t)} for ${e}, expected 'true' or 'false', falling back to 'false' (default)`),!1)}Dm.getBooleanFromEnv=snt;function ant(e){return cge(e)?.split(",").map(t=>t.trim()).filter(t=>t!=="")}Dm.getStringListFromEnv=ant});var dge=P(oU=>{"use strict";m();Object.defineProperty(oU,"__esModule",{value:!0});oU._globalThis=void 0;oU._globalThis=globalThis});var pge=P(iU=>{"use strict";m();Object.defineProperty(iU,"__esModule",{value:!0});iU.VERSION=void 0;iU.VERSION="2.8.0"});function Oi(e){let t={},n=e.length;for(let r=0;r<n;r++){let o=e[r];o&&(t[String(o).toUpperCase().replace(/[-.]/g,"_")]=o)}return t}var W5=w(()=>{m()});var fge,mge,Age,gge,hge,_ge,Ege,yge,Sge,Tge,bge,Ige,Cge,vge,Rge,xge,Dge,Nge,Bge,wge,Oge,kge,Pge,Mge,Lge,Uge,Qge,Fge,Gge,jge,zge,Hge,$ge,qge,Vge,Yge,Kge,Jge,Zge,Wge,Xge,ehe,the,nhe,rhe,ohe,ihe,she,ahe,uhe,che,lhe,dhe,phe,fhe,mhe,Ahe,ghe,hhe,_he,Ehe,yhe,She,The,bhe,Ihe,Che,vhe,Rhe,xhe,Dhe,Nhe,Bhe,whe,Ohe,khe,Phe,Mhe,Lhe,Uhe,Qhe,Fhe,Ghe,jhe,zhe,Hhe,$he,qhe,Vhe,Yhe,Khe,Jhe,Zhe,Whe,Xhe,e_e,t_e,n_e,r_e,o_e,i_e,s_e,a_e,u_e,c_e,l_e,d_e,p_e,f_e,m_e,A_e,g_e,h_e,__e,E_e,y_e,S_e,T_e,b_e,I_e,C_e,v_e,R_e,x_e,D_e,N_e,B_e,w_e,unt,X5,cnt,lnt,dnt,pnt,eV,fnt,mnt,Ant,gnt,hnt,_nt,Ent,ynt,Snt,Tnt,bnt,Int,Cnt,vnt,Rnt,xnt,Dnt,Nnt,tV,Bnt,wnt,Ont,knt,Pnt,Mnt,Lnt,Unt,Qnt,Fnt,Gnt,jnt,nV,znt,Hnt,rV,oV,$nt,qnt,Vnt,Ynt,Knt,Jnt,Znt,Wnt,Xnt,ert,trt,nrt,rrt,ort,irt,srt,art,dB,kC,iV,urt,crt,uS,lrt,drt,prt,frt,sV,aV,mrt,uV,Art,grt,hrt,_rt,Ert,yrt,Srt,Trt,brt,Irt,Crt,vrt,Rrt,xrt,Drt,Nrt,Brt,wrt,Ort,krt,Prt,Mrt,Lrt,cV,Urt,Qrt,Frt,Grt,jrt,zrt,Hrt,$rt,qrt,Vrt,Yrt,Krt,Jrt,Zrt,Wrt,Xrt,eot,tot,not,lV,rot,dV,oot,iot,sot,aot,uot,cot,lot,dot,pot,O_e,k_e,P_e,M_e,L_e,U_e,Q_e,F_e,G_e,j_e,z_e,H_e,$_e,q_e,V_e,Y_e,K_e,J_e,Z_e,W_e,X_e,eEe,tEe,nEe,rEe,oEe,iEe,sEe,aEe,uEe,cEe,lEe,dEe,pEe,fEe,mEe,AEe,gEe,hEe,_Ee,EEe,yEe,SEe,TEe,bEe,IEe,CEe,fot,mot,Aot,got,hot,_ot,Eot,yot,Sot,Tot,bot,Iot,Cot,vot,Rot,xot,Dot,Not,Bot,wot,Oot,kot,Pot,Mot,Lot,Uot,Qot,Fot,Got,jot,zot,Hot,$ot,qot,Vot,Yot,Kot,Jot,Zot,Wot,Xot,eit,tit,nit,rit,oit,iit,sit,vEe,REe,xEe,DEe,NEe,BEe,wEe,OEe,kEe,PEe,MEe,ait,uit,cit,lit,dit,pit,fit,mit,Ait,git,hit,_it,LEe,UEe,QEe,FEe,GEe,Eit,yit,Sit,Tit,bit,Iit,jEe,zEe,HEe,Cit,vit,Rit,xit,$Ee,qEe,VEe,YEe,Dit,Nit,Bit,wit,Oit,KEe,JEe,ZEe,WEe,XEe,e0e,t0e,kit,Pit,Mit,Lit,Uit,Qit,Fit,Git,n0e,r0e,o0e,i0e,s0e,jit,zit,Hit,$it,qit,Vit,a0e,u0e,c0e,l0e,d0e,p0e,f0e,m0e,A0e,g0e,h0e,_0e,E0e,y0e,S0e,T0e,b0e,I0e,C0e,v0e,R0e,Yit,Kit,Jit,Zit,Wit,Xit,est,tst,nst,rst,ost,ist,sst,ast,ust,cst,lst,dst,pst,fst,mst,Ast,x0e,D0e,N0e,B0e,w0e,gst,hst,_st,Est,yst,Sst,O0e,k0e,Tst,bst,Ist,P0e,M0e,Cst,vst,Rst,L0e,U0e,Q0e,F0e,G0e,j0e,z0e,H0e,$0e,q0e,V0e,Y0e,K0e,J0e,Z0e,W0e,X0e,xst,Dst,Nst,Bst,wst,Ost,kst,Pst,Mst,Lst,Ust,Qst,Fst,Gst,jst,zst,Hst,$st,eye,tye,qst,Vst,Yst,nye=w(()=>{m();W5();fge="aws.lambda.invoked_arn",mge="db.system",Age="db.connection_string",gge="db.user",hge="db.jdbc.driver_classname",_ge="db.name",Ege="db.statement",yge="db.operation",Sge="db.mssql.instance_name",Tge="db.cassandra.keyspace",bge="db.cassandra.page_size",Ige="db.cassandra.consistency_level",Cge="db.cassandra.table",vge="db.cassandra.idempotence",Rge="db.cassandra.speculative_execution_count",xge="db.cassandra.coordinator.id",Dge="db.cassandra.coordinator.dc",Nge="db.hbase.namespace",Bge="db.redis.database_index",wge="db.mongodb.collection",Oge="db.sql.table",kge="exception.type",Pge="exception.message",Mge="exception.stacktrace",Lge="exception.escaped",Uge="faas.trigger",Qge="faas.execution",Fge="faas.document.collection",Gge="faas.document.operation",jge="faas.document.time",zge="faas.document.name",Hge="faas.time",$ge="faas.cron",qge="faas.coldstart",Vge="faas.invoked_name",Yge="faas.invoked_provider",Kge="faas.invoked_region",Jge="net.transport",Zge="net.peer.ip",Wge="net.peer.port",Xge="net.peer.name",ehe="net.host.ip",the="net.host.port",nhe="net.host.name",rhe="net.host.connection.type",ohe="net.host.connection.subtype",ihe="net.host.carrier.name",she="net.host.carrier.mcc",ahe="net.host.carrier.mnc",uhe="net.host.carrier.icc",che="peer.service",lhe="enduser.id",dhe="enduser.role",phe="enduser.scope",fhe="thread.id",mhe="thread.name",Ahe="code.function",ghe="code.namespace",hhe="code.filepath",_he="code.lineno",Ehe="http.method",yhe="http.url",She="http.target",The="http.host",bhe="http.scheme",Ihe="http.status_code",Che="http.flavor",vhe="http.user_agent",Rhe="http.request_content_length",xhe="http.request_content_length_uncompressed",Dhe="http.response_content_length",Nhe="http.response_content_length_uncompressed",Bhe="http.server_name",whe="http.route",Ohe="http.client_ip",khe="aws.dynamodb.table_names",Phe="aws.dynamodb.consumed_capacity",Mhe="aws.dynamodb.item_collection_metrics",Lhe="aws.dynamodb.provisioned_read_capacity",Uhe="aws.dynamodb.provisioned_write_capacity",Qhe="aws.dynamodb.consistent_read",Fhe="aws.dynamodb.projection",Ghe="aws.dynamodb.limit",jhe="aws.dynamodb.attributes_to_get",zhe="aws.dynamodb.index_name",Hhe="aws.dynamodb.select",$he="aws.dynamodb.global_secondary_indexes",qhe="aws.dynamodb.local_secondary_indexes",Vhe="aws.dynamodb.exclusive_start_table",Yhe="aws.dynamodb.table_count",Khe="aws.dynamodb.scan_forward",Jhe="aws.dynamodb.segment",Zhe="aws.dynamodb.total_segments",Whe="aws.dynamodb.count",Xhe="aws.dynamodb.scanned_count",e_e="aws.dynamodb.attribute_definitions",t_e="aws.dynamodb.global_secondary_index_updates",n_e="messaging.system",r_e="messaging.destination",o_e="messaging.destination_kind",i_e="messaging.temp_destination",s_e="messaging.protocol",a_e="messaging.protocol_version",u_e="messaging.url",c_e="messaging.message_id",l_e="messaging.conversation_id",d_e="messaging.message_payload_size_bytes",p_e="messaging.message_payload_compressed_size_bytes",f_e="messaging.operation",m_e="messaging.consumer_id",A_e="messaging.rabbitmq.routing_key",g_e="messaging.kafka.message_key",h_e="messaging.kafka.consumer_group",__e="messaging.kafka.client_id",E_e="messaging.kafka.partition",y_e="messaging.kafka.tombstone",S_e="rpc.system",T_e="rpc.service",b_e="rpc.method",I_e="rpc.grpc.status_code",C_e="rpc.jsonrpc.version",v_e="rpc.jsonrpc.request_id",R_e="rpc.jsonrpc.error_code",x_e="rpc.jsonrpc.error_message",D_e="message.type",N_e="message.id",B_e="message.compressed_size",w_e="message.uncompressed_size",unt=fge,X5=mge,cnt=Age,lnt=gge,dnt=hge,pnt=_ge,eV=Ege,fnt=yge,mnt=Sge,Ant=Tge,gnt=bge,hnt=Ige,_nt=Cge,Ent=vge,ynt=Rge,Snt=xge,Tnt=Dge,bnt=Nge,Int=Bge,Cnt=wge,vnt=Oge,Rnt=kge,xnt=Pge,Dnt=Mge,Nnt=Lge,tV=Uge,Bnt=Qge,wnt=Fge,Ont=Gge,knt=jge,Pnt=zge,Mnt=Hge,Lnt=$ge,Unt=qge,Qnt=Vge,Fnt=Yge,Gnt=Kge,jnt=Jge,nV=Zge,znt=Wge,Hnt=Xge,rV=ehe,oV=the,$nt=nhe,qnt=rhe,Vnt=ohe,Ynt=ihe,Knt=she,Jnt=ahe,Znt=uhe,Wnt=che,Xnt=lhe,ert=dhe,trt=phe,nrt=fhe,rrt=mhe,ort=Ahe,irt=ghe,srt=hhe,art=_he,dB=Ehe,kC=yhe,iV=She,urt=The,crt=bhe,uS=Ihe,lrt=Che,drt=vhe,prt=Rhe,frt=xhe,sV=Dhe,aV=Nhe,mrt=Bhe,uV=whe,Art=Ohe,grt=khe,hrt=Phe,_rt=Mhe,Ert=Lhe,yrt=Uhe,Srt=Qhe,Trt=Fhe,brt=Ghe,Irt=jhe,Crt=zhe,vrt=Hhe,Rrt=$he,xrt=qhe,Drt=Vhe,Nrt=Yhe,Brt=Khe,wrt=Jhe,Ort=Zhe,krt=Whe,Prt=Xhe,Mrt=e_e,Lrt=t_e,cV=n_e,Urt=r_e,Qrt=o_e,Frt=i_e,Grt=s_e,jrt=a_e,zrt=u_e,Hrt=c_e,$rt=l_e,qrt=d_e,Vrt=p_e,Yrt=f_e,Krt=m_e,Jrt=A_e,Zrt=g_e,Wrt=h_e,Xrt=__e,eot=E_e,tot=y_e,not=S_e,lV=T_e,rot=b_e,dV=I_e,oot=C_e,iot=v_e,sot=R_e,aot=x_e,uot=D_e,cot=N_e,lot=B_e,dot=w_e,pot=Oi([fge,mge,Age,gge,hge,_ge,Ege,yge,Sge,Tge,bge,Ige,Cge,vge,Rge,xge,Dge,Nge,Bge,wge,Oge,kge,Pge,Mge,Lge,Uge,Qge,Fge,Gge,jge,zge,Hge,$ge,qge,Vge,Yge,Kge,Jge,Zge,Wge,Xge,ehe,the,nhe,rhe,ohe,ihe,she,ahe,uhe,che,lhe,dhe,phe,fhe,mhe,Ahe,ghe,hhe,_he,Ehe,yhe,She,The,bhe,Ihe,Che,vhe,Rhe,xhe,Dhe,Nhe,Bhe,whe,Ohe,khe,Phe,Mhe,Lhe,Uhe,Qhe,Fhe,Ghe,jhe,zhe,Hhe,$he,qhe,Vhe,Yhe,Khe,Jhe,Zhe,Whe,Xhe,e_e,t_e,n_e,r_e,o_e,i_e,s_e,a_e,u_e,c_e,l_e,d_e,p_e,f_e,m_e,A_e,g_e,h_e,__e,E_e,y_e,S_e,T_e,b_e,I_e,C_e,v_e,R_e,x_e,D_e,N_e,B_e,w_e]),O_e="other_sql",k_e="mssql",P_e="mysql",M_e="oracle",L_e="db2",U_e="postgresql",Q_e="redshift",F_e="hive",G_e="cloudscape",j_e="hsqldb",z_e="progress",H_e="maxdb",$_e="hanadb",q_e="ingres",V_e="firstsql",Y_e="edb",K_e="cache",J_e="adabas",Z_e="firebird",W_e="derby",X_e="filemaker",eEe="informix",tEe="instantdb",nEe="interbase",rEe="mariadb",oEe="netezza",iEe="pervasive",sEe="pointbase",aEe="sqlite",uEe="sybase",cEe="teradata",lEe="vertica",dEe="h2",pEe="coldfusion",fEe="cassandra",mEe="hbase",AEe="mongodb",gEe="redis",hEe="couchbase",_Ee="couchdb",EEe="cosmosdb",yEe="dynamodb",SEe="neo4j",TEe="geode",bEe="elasticsearch",IEe="memcached",CEe="cockroachdb",fot=O_e,mot=k_e,Aot=P_e,got=M_e,hot=L_e,_ot=U_e,Eot=Q_e,yot=F_e,Sot=G_e,Tot=j_e,bot=z_e,Iot=H_e,Cot=$_e,vot=q_e,Rot=V_e,xot=Y_e,Dot=K_e,Not=J_e,Bot=Z_e,wot=W_e,Oot=X_e,kot=eEe,Pot=tEe,Mot=nEe,Lot=rEe,Uot=oEe,Qot=iEe,Fot=sEe,Got=aEe,jot=uEe,zot=cEe,Hot=lEe,$ot=dEe,qot=pEe,Vot=fEe,Yot=mEe,Kot=AEe,Jot=gEe,Zot=hEe,Wot=_Ee,Xot=EEe,eit=yEe,tit=SEe,nit=TEe,rit=bEe,oit=IEe,iit=CEe,sit=Oi([O_e,k_e,P_e,M_e,L_e,U_e,Q_e,F_e,G_e,j_e,z_e,H_e,$_e,q_e,V_e,Y_e,K_e,J_e,Z_e,W_e,X_e,eEe,tEe,nEe,rEe,oEe,iEe,sEe,aEe,uEe,cEe,lEe,dEe,pEe,fEe,mEe,AEe,gEe,hEe,_Ee,EEe,yEe,SEe,TEe,bEe,IEe,CEe]),vEe="all",REe="each_quorum",xEe="quorum",DEe="local_quorum",NEe="one",BEe="two",wEe="three",OEe="local_one",kEe="any",PEe="serial",MEe="local_serial",ait=vEe,uit=REe,cit=xEe,lit=DEe,dit=NEe,pit=BEe,fit=wEe,mit=OEe,Ait=kEe,git=PEe,hit=MEe,_it=Oi([vEe,REe,xEe,DEe,NEe,BEe,wEe,OEe,kEe,PEe,MEe]),LEe="datasource",UEe="http",QEe="pubsub",FEe="timer",GEe="other",Eit=LEe,yit=UEe,Sit=QEe,Tit=FEe,bit=GEe,Iit=Oi([LEe,UEe,QEe,FEe,GEe]),jEe="insert",zEe="edit",HEe="delete",Cit=jEe,vit=zEe,Rit=HEe,xit=Oi([jEe,zEe,HEe]),$Ee="alibaba_cloud",qEe="aws",VEe="azure",YEe="gcp",Dit=$Ee,Nit=qEe,Bit=VEe,wit=YEe,Oit=Oi([$Ee,qEe,VEe,YEe]),KEe="ip_tcp",JEe="ip_udp",ZEe="ip",WEe="unix",XEe="pipe",e0e="inproc",t0e="other",kit=KEe,Pit=JEe,Mit=ZEe,Lit=WEe,Uit=XEe,Qit=e0e,Fit=t0e,Git=Oi([KEe,JEe,ZEe,WEe,XEe,e0e,t0e]),n0e="wifi",r0e="wired",o0e="cell",i0e="unavailable",s0e="unknown",jit=n0e,zit=r0e,Hit=o0e,$it=i0e,qit=s0e,Vit=Oi([n0e,r0e,o0e,i0e,s0e]),a0e="gprs",u0e="edge",c0e="umts",l0e="cdma",d0e="evdo_0",p0e="evdo_a",f0e="cdma2000_1xrtt",m0e="hsdpa",A0e="hsupa",g0e="hspa",h0e="iden",_0e="evdo_b",E0e="lte",y0e="ehrpd",S0e="hspap",T0e="gsm",b0e="td_scdma",I0e="iwlan",C0e="nr",v0e="nrnsa",R0e="lte_ca",Yit=a0e,Kit=u0e,Jit=c0e,Zit=l0e,Wit=d0e,Xit=p0e,est=f0e,tst=m0e,nst=A0e,rst=g0e,ost=h0e,ist=_0e,sst=E0e,ast=y0e,ust=S0e,cst=T0e,lst=b0e,dst=I0e,pst=C0e,fst=v0e,mst=R0e,Ast=Oi([a0e,u0e,c0e,l0e,d0e,p0e,f0e,m0e,A0e,g0e,h0e,_0e,E0e,y0e,S0e,T0e,b0e,I0e,C0e,v0e,R0e]),x0e="1.0",D0e="1.1",N0e="2.0",B0e="SPDY",w0e="QUIC",gst=x0e,hst=D0e,_st=N0e,Est=B0e,yst=w0e,Sst={HTTP_1_0:x0e,HTTP_1_1:D0e,HTTP_2_0:N0e,SPDY:B0e,QUIC:w0e},O0e="queue",k0e="topic",Tst=O0e,bst=k0e,Ist=Oi([O0e,k0e]),P0e="receive",M0e="process",Cst=P0e,vst=M0e,Rst=Oi([P0e,M0e]),L0e=0,U0e=1,Q0e=2,F0e=3,G0e=4,j0e=5,z0e=6,H0e=7,$0e=8,q0e=9,V0e=10,Y0e=11,K0e=12,J0e=13,Z0e=14,W0e=15,X0e=16,xst=L0e,Dst=U0e,Nst=Q0e,Bst=F0e,wst=G0e,Ost=j0e,kst=z0e,Pst=H0e,Mst=$0e,Lst=q0e,Ust=V0e,Qst=Y0e,Fst=K0e,Gst=J0e,jst=Z0e,zst=W0e,Hst=X0e,$st={OK:L0e,CANCELLED:U0e,UNKNOWN:Q0e,INVALID_ARGUMENT:F0e,DEADLINE_EXCEEDED:G0e,NOT_FOUND:j0e,ALREADY_EXISTS:z0e,PERMISSION_DENIED:H0e,RESOURCE_EXHAUSTED:$0e,FAILED_PRECONDITION:q0e,ABORTED:V0e,OUT_OF_RANGE:Y0e,UNIMPLEMENTED:K0e,INTERNAL:J0e,UNAVAILABLE:Z0e,DATA_LOSS:W0e,UNAUTHENTICATED:X0e},eye="SENT",tye="RECEIVED",qst=eye,Vst=tye,Yst=Oi([eye,tye])});var rye=w(()=>{m();nye()});var oye,iye,sye,aye,uye,cye,lye,dye,pye,fye,mye,Aye,gye,hye,_ye,Eye,yye,Sye,Tye,bye,Iye,Cye,vye,Rye,xye,Dye,Nye,Bye,wye,Oye,kye,Pye,Mye,Lye,Uye,Qye,Fye,Gye,jye,zye,Hye,$ye,qye,Vye,Yye,Kye,Jye,Zye,Wye,Xye,eSe,tSe,nSe,rSe,oSe,iSe,sSe,aSe,uSe,cSe,lSe,dSe,pSe,fSe,mSe,ASe,gSe,hSe,_Se,ESe,ySe,SSe,TSe,bSe,ISe,CSe,vSe,RSe,xSe,DSe,NSe,Kst,Jst,Zst,Wst,Xst,eat,tat,nat,rat,oat,iat,sat,aat,uat,cat,lat,dat,pat,fat,mat,Aat,gat,hat,_at,Eat,yat,Sat,Tat,bat,Iat,Cat,vat,Rat,xat,Dat,Nat,Bat,wat,Oat,kat,Pat,Mat,Lat,Uat,Qat,Fat,Gat,jat,zat,Hat,$at,qat,Vat,Yat,Kat,Jat,Zat,Wat,Xat,eut,tut,nut,rut,out,iut,sut,aut,uut,cut,lut,dut,pV,put,fut,mut,Aut,gut,hut,_ut,Eut,yut,Sut,BSe,wSe,OSe,kSe,Tut,but,Iut,Cut,vut,PSe,MSe,LSe,USe,QSe,FSe,GSe,jSe,zSe,HSe,$Se,qSe,VSe,YSe,KSe,JSe,ZSe,Rut,xut,Dut,Nut,But,wut,Out,kut,Put,Mut,Lut,Uut,Qut,Fut,Gut,jut,zut,Hut,WSe,XSe,$ut,qut,Vut,eTe,tTe,nTe,rTe,oTe,iTe,sTe,Yut,Kut,Jut,Zut,Wut,Xut,ect,tct,aTe,uTe,cTe,lTe,dTe,pTe,fTe,mTe,ATe,gTe,hTe,nct,rct,oct,ict,sct,act,uct,cct,lct,dct,pct,fct,_Te,ETe,yTe,STe,TTe,bTe,ITe,CTe,vTe,RTe,mct,Act,gct,hct,_ct,Ect,yct,Sct,Tct,bct,Ict,xTe=w(()=>{m();W5();oye="cloud.provider",iye="cloud.account.id",sye="cloud.region",aye="cloud.availability_zone",uye="cloud.platform",cye="aws.ecs.container.arn",lye="aws.ecs.cluster.arn",dye="aws.ecs.launchtype",pye="aws.ecs.task.arn",fye="aws.ecs.task.family",mye="aws.ecs.task.revision",Aye="aws.eks.cluster.arn",gye="aws.log.group.names",hye="aws.log.group.arns",_ye="aws.log.stream.names",Eye="aws.log.stream.arns",yye="container.name",Sye="container.id",Tye="container.runtime",bye="container.image.name",Iye="container.image.tag",Cye="deployment.environment",vye="device.id",Rye="device.model.identifier",xye="device.model.name",Dye="faas.name",Nye="faas.id",Bye="faas.version",wye="faas.instance",Oye="faas.max_memory",kye="host.id",Pye="host.name",Mye="host.type",Lye="host.arch",Uye="host.image.name",Qye="host.image.id",Fye="host.image.version",Gye="k8s.cluster.name",jye="k8s.node.name",zye="k8s.node.uid",Hye="k8s.namespace.name",$ye="k8s.pod.uid",qye="k8s.pod.name",Vye="k8s.container.name",Yye="k8s.replicaset.uid",Kye="k8s.replicaset.name",Jye="k8s.deployment.uid",Zye="k8s.deployment.name",Wye="k8s.statefulset.uid",Xye="k8s.statefulset.name",eSe="k8s.daemonset.uid",tSe="k8s.daemonset.name",nSe="k8s.job.uid",rSe="k8s.job.name",oSe="k8s.cronjob.uid",iSe="k8s.cronjob.name",sSe="os.type",aSe="os.description",uSe="os.name",cSe="os.version",lSe="process.pid",dSe="process.executable.name",pSe="process.executable.path",fSe="process.command",mSe="process.command_line",ASe="process.command_args",gSe="process.owner",hSe="process.runtime.name",_Se="process.runtime.version",ESe="process.runtime.description",ySe="service.name",SSe="service.namespace",TSe="service.instance.id",bSe="service.version",ISe="telemetry.sdk.name",CSe="telemetry.sdk.language",vSe="telemetry.sdk.version",RSe="telemetry.auto.version",xSe="webengine.name",DSe="webengine.version",NSe="webengine.description",Kst=oye,Jst=iye,Zst=sye,Wst=aye,Xst=uye,eat=cye,tat=lye,nat=dye,rat=pye,oat=fye,iat=mye,sat=Aye,aat=gye,uat=hye,cat=_ye,lat=Eye,dat=yye,pat=Sye,fat=Tye,mat=bye,Aat=Iye,gat=Cye,hat=vye,_at=Rye,Eat=xye,yat=Dye,Sat=Nye,Tat=Bye,bat=wye,Iat=Oye,Cat=kye,vat=Pye,Rat=Mye,xat=Lye,Dat=Uye,Nat=Qye,Bat=Fye,wat=Gye,Oat=jye,kat=zye,Pat=Hye,Mat=$ye,Lat=qye,Uat=Vye,Qat=Yye,Fat=Kye,Gat=Jye,jat=Zye,zat=Wye,Hat=Xye,$at=eSe,qat=tSe,Vat=nSe,Yat=rSe,Kat=oSe,Jat=iSe,Zat=sSe,Wat=aSe,Xat=uSe,eut=cSe,tut=lSe,nut=dSe,rut=pSe,out=fSe,iut=mSe,sut=ASe,aut=gSe,uut=hSe,cut=_Se,lut=ESe,dut=ySe,pV=SSe,put=TSe,fut=bSe,mut=ISe,Aut=CSe,gut=vSe,hut=RSe,_ut=xSe,Eut=DSe,yut=NSe,Sut=Oi([oye,iye,sye,aye,uye,cye,lye,dye,pye,fye,mye,Aye,gye,hye,_ye,Eye,yye,Sye,Tye,bye,Iye,Cye,vye,Rye,xye,Dye,Nye,Bye,wye,Oye,kye,Pye,Mye,Lye,Uye,Qye,Fye,Gye,jye,zye,Hye,$ye,qye,Vye,Yye,Kye,Jye,Zye,Wye,Xye,eSe,tSe,nSe,rSe,oSe,iSe,sSe,aSe,uSe,cSe,lSe,dSe,pSe,fSe,mSe,ASe,gSe,hSe,_Se,ESe,ySe,SSe,TSe,bSe,ISe,CSe,vSe,RSe,xSe,DSe,NSe]),BSe="alibaba_cloud",wSe="aws",OSe="azure",kSe="gcp",Tut=BSe,but=wSe,Iut=OSe,Cut=kSe,vut=Oi([BSe,wSe,OSe,kSe]),PSe="alibaba_cloud_ecs",MSe="alibaba_cloud_fc",LSe="aws_ec2",USe="aws_ecs",QSe="aws_eks",FSe="aws_lambda",GSe="aws_elastic_beanstalk",jSe="azure_vm",zSe="azure_container_instances",HSe="azure_aks",$Se="azure_functions",qSe="azure_app_service",VSe="gcp_compute_engine",YSe="gcp_cloud_run",KSe="gcp_kubernetes_engine",JSe="gcp_cloud_functions",ZSe="gcp_app_engine",Rut=PSe,xut=MSe,Dut=LSe,Nut=USe,But=QSe,wut=FSe,Out=GSe,kut=jSe,Put=zSe,Mut=HSe,Lut=$Se,Uut=qSe,Qut=VSe,Fut=YSe,Gut=KSe,jut=JSe,zut=ZSe,Hut=Oi([PSe,MSe,LSe,USe,QSe,FSe,GSe,jSe,zSe,HSe,$Se,qSe,VSe,YSe,KSe,JSe,ZSe]),WSe="ec2",XSe="fargate",$ut=WSe,qut=XSe,Vut=Oi([WSe,XSe]),eTe="amd64",tTe="arm32",nTe="arm64",rTe="ia64",oTe="ppc32",iTe="ppc64",sTe="x86",Yut=eTe,Kut=tTe,Jut=nTe,Zut=rTe,Wut=oTe,Xut=iTe,ect=sTe,tct=Oi([eTe,tTe,nTe,rTe,oTe,iTe,sTe]),aTe="windows",uTe="linux",cTe="darwin",lTe="freebsd",dTe="netbsd",pTe="openbsd",fTe="dragonflybsd",mTe="hpux",ATe="aix",gTe="solaris",hTe="z_os",nct=aTe,rct=uTe,oct=cTe,ict=lTe,sct=dTe,act=pTe,uct=fTe,cct=mTe,lct=ATe,dct=gTe,pct=hTe,fct=Oi([aTe,uTe,cTe,lTe,dTe,pTe,fTe,mTe,ATe,gTe,hTe]),_Te="cpp",ETe="dotnet",yTe="erlang",STe="go",TTe="java",bTe="nodejs",ITe="php",CTe="python",vTe="ruby",RTe="webjs",mct=_Te,Act=ETe,gct=yTe,hct=STe,_ct=TTe,Ect=bTe,yct=ITe,Sct=CTe,Tct=vTe,bct=RTe,Ict=Oi([_Te,ETe,yTe,STe,TTe,bTe,ITe,CTe,vTe,RTe])});var DTe=w(()=>{m();xTe()});var Cct,vct,Rct,xct,Dct,Nct,Bct,wct,Oct,kct,Pct,Mct,Lct,Uct,Qct,Fct,Gct,jct,zct,Hct,$ct,qct,Vct,Yct,Kct,fV,mV,Jct,PC,Zct,AV,gV,Wct,cS,Xct,elt,tlt,nlt,rlt,olt,ilt,slt,win,Oin,hV,alt,ult,clt,llt,dlt,plt,lS,flt,mlt,Alt,kin,glt,hlt,_lt,Elt,Pin,ylt,Slt,Tlt,blt,Cg,vg,Ilt,Clt,vlt,Rlt,xlt,Dlt,Nlt,Blt,wlt,Min,Olt,klt,Plt,Mlt,Llt,Ult,_V,EV,Qlt,yV,SV,Flt,Glt,Lin,Uin,jlt,zlt,Hlt,$lt,qlt,Vlt,Ylt,Klt,Qin,Jlt,TV,bV,Zlt,IV,Wlt,CV,Xlt,edt,tdt,ndt,rdt,odt,idt,sdt,adt,Fin,udt,cdt,Gin,ldt,ddt,jin,pdt,fdt,mdt,Adt,gdt,hdt,_dt,Edt,R_,ydt,Sdt,Tdt,vV,NTe=w(()=>{m();Cct="aspnetcore.diagnostics.exception.result",vct="aborted",Rct="handled",xct="skipped",Dct="unhandled",Nct="aspnetcore.diagnostics.handler.type",Bct="aspnetcore.rate_limiting.policy",wct="aspnetcore.rate_limiting.result",Oct="acquired",kct="endpoint_limiter",Pct="global_limiter",Mct="request_canceled",Lct="aspnetcore.request.is_unhandled",Uct="aspnetcore.routing.is_fallback",Qct="aspnetcore.routing.match_status",Fct="failure",Gct="success",jct="aspnetcore.user.is_authenticated",zct="client.address",Hct="client.port",$ct="code.column.number",qct="code.file.path",Vct="code.function.name",Yct="code.line.number",Kct="code.stacktrace",fV="db.collection.name",mV="db.namespace",Jct="db.operation.batch.size",PC="db.operation.name",Zct="db.query.summary",AV="db.query.text",gV="db.response.status_code",Wct="db.stored_procedure.name",cS="db.system.name",Xct="mariadb",elt="microsoft.sql_server",tlt="mysql",nlt="postgresql",rlt="dotnet.gc.heap.generation",olt="gen0",ilt="gen1",slt="gen2",win="loh",Oin="poh",hV="error.type",alt="_OTHER",ult="exception.escaped",clt="exception.message",llt="exception.stacktrace",dlt="exception.type",plt=e=>`http.request.header.${e}`,lS="http.request.method",flt="_OTHER",mlt="CONNECT",Alt="DELETE",kin="GET",glt="HEAD",hlt="OPTIONS",_lt="PATCH",Elt="POST",Pin="PUT",ylt="TRACE",Slt="http.request.method_original",Tlt="http.request.resend_count",blt=e=>`http.response.header.${e}`,Cg="http.response.status_code",vg="http.route",Ilt="jvm.gc.action",Clt="jvm.gc.name",vlt="jvm.memory.pool.name",Rlt="jvm.memory.type",xlt="heap",Dlt="non_heap",Nlt="jvm.thread.daemon",Blt="jvm.thread.state",wlt="blocked",Min="new",Olt="runnable",klt="terminated",Plt="timed_waiting",Mlt="waiting",Llt="network.local.address",Ult="network.local.port",_V="network.peer.address",EV="network.peer.port",Qlt="network.protocol.name",yV="network.protocol.version",SV="network.transport",Flt="pipe",Glt="quic",Lin="tcp",Uin="udp",jlt="unix",zlt="network.type",Hlt="ipv4",$lt="ipv6",qlt="otel.scope.name",Vlt="otel.scope.version",Ylt="otel.status_code",Klt="ERROR",Qin="OK",Jlt="otel.status_description",TV="server.address",bV="server.port",Zlt="service.instance.id",IV="service.name",Wlt="service.namespace",CV="service.version",Xlt="signalr.connection.status",edt="app_shutdown",tdt="normal_closure",ndt="timeout",rdt="signalr.transport",odt="long_polling",idt="server_sent_events",sdt="web_sockets",adt="telemetry.sdk.language",Fin="cpp",udt="dotnet",cdt="erlang",Gin="go",ldt="java",ddt="nodejs",jin="php",pdt="python",fdt="ruby",mdt="rust",Adt="swift",gdt="webjs",hdt="telemetry.sdk.name",_dt="telemetry.sdk.version",Edt="url.fragment",R_="url.full",ydt="url.path",Sdt="url.query",Tdt="url.scheme",vV="user_agent.original"});var bdt,Idt,Cdt,vdt,Rdt,xdt,Ddt,Ndt,Bdt,wdt,Odt,kdt,Pdt,Mdt,Ldt,Udt,Qdt,Fdt,Gdt,jdt,zdt,Hdt,$dt,qdt,Vdt,Ydt,Kdt,Jdt,Zdt,Wdt,Xdt,ept,tpt,npt,rpt,opt,ipt,spt,apt,upt,cpt,lpt,dpt,ppt,fpt,mpt,Apt,gpt,hpt,_pt,Ept,BTe=w(()=>{m();bdt="aspnetcore.diagnostics.exceptions",Idt="aspnetcore.rate_limiting.active_request_leases",Cdt="aspnetcore.rate_limiting.queued_requests",vdt="aspnetcore.rate_limiting.request.time_in_queue",Rdt="aspnetcore.rate_limiting.request_lease.duration",xdt="aspnetcore.rate_limiting.requests",Ddt="aspnetcore.routing.match_attempts",Ndt="db.client.operation.duration",Bdt="dotnet.assembly.count",wdt="dotnet.exceptions",Odt="dotnet.gc.collections",kdt="dotnet.gc.heap.total_allocated",Pdt="dotnet.gc.last_collection.heap.fragmentation.size",Mdt="dotnet.gc.last_collection.heap.size",Ldt="dotnet.gc.last_collection.memory.committed_size",Udt="dotnet.gc.pause.time",Qdt="dotnet.jit.compilation.time",Fdt="dotnet.jit.compiled_il.size",Gdt="dotnet.jit.compiled_methods",jdt="dotnet.monitor.lock_contentions",zdt="dotnet.process.cpu.count",Hdt="dotnet.process.cpu.time",$dt="dotnet.process.memory.working_set",qdt="dotnet.thread_pool.queue.length",Vdt="dotnet.thread_pool.thread.count",Ydt="dotnet.thread_pool.work_item.count",Kdt="dotnet.timer.count",Jdt="http.client.request.duration",Zdt="http.server.request.duration",Wdt="jvm.class.count",Xdt="jvm.class.loaded",ept="jvm.class.unloaded",tpt="jvm.cpu.count",npt="jvm.cpu.recent_utilization",rpt="jvm.cpu.time",opt="jvm.gc.duration",ipt="jvm.memory.committed",spt="jvm.memory.limit",apt="jvm.memory.used",upt="jvm.memory.used_after_last_gc",cpt="jvm.thread.count",lpt="kestrel.active_connections",dpt="kestrel.active_tls_handshakes",ppt="kestrel.connection.duration",fpt="kestrel.queued_connections",mpt="kestrel.queued_requests",Apt="kestrel.rejected_connections",gpt="kestrel.tls_handshake.duration",hpt="kestrel.upgraded_connections",_pt="signalr.server.active_connections",Ept="signalr.server.connection.duration"});var ypt,wTe=w(()=>{m();ypt="exception"});var Gr={};Js(Gr,{ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED:()=>vct,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED:()=>Rct,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED:()=>xct,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED:()=>Dct,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED:()=>Oct,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER:()=>kct,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER:()=>Pct,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED:()=>Mct,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE:()=>Fct,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS:()=>Gct,ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT:()=>Cct,ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE:()=>Nct,ATTR_ASPNETCORE_RATE_LIMITING_POLICY:()=>Bct,ATTR_ASPNETCORE_RATE_LIMITING_RESULT:()=>wct,ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED:()=>Lct,ATTR_ASPNETCORE_ROUTING_IS_FALLBACK:()=>Uct,ATTR_ASPNETCORE_ROUTING_MATCH_STATUS:()=>Qct,ATTR_ASPNETCORE_USER_IS_AUTHENTICATED:()=>jct,ATTR_CLIENT_ADDRESS:()=>zct,ATTR_CLIENT_PORT:()=>Hct,ATTR_CODE_COLUMN_NUMBER:()=>$ct,ATTR_CODE_FILE_PATH:()=>qct,ATTR_CODE_FUNCTION_NAME:()=>Vct,ATTR_CODE_LINE_NUMBER:()=>Yct,ATTR_CODE_STACKTRACE:()=>Kct,ATTR_DB_COLLECTION_NAME:()=>fV,ATTR_DB_NAMESPACE:()=>mV,ATTR_DB_OPERATION_BATCH_SIZE:()=>Jct,ATTR_DB_OPERATION_NAME:()=>PC,ATTR_DB_QUERY_SUMMARY:()=>Zct,ATTR_DB_QUERY_TEXT:()=>AV,ATTR_DB_RESPONSE_STATUS_CODE:()=>gV,ATTR_DB_STORED_PROCEDURE_NAME:()=>Wct,ATTR_DB_SYSTEM_NAME:()=>cS,ATTR_DOTNET_GC_HEAP_GENERATION:()=>rlt,ATTR_ERROR_TYPE:()=>hV,ATTR_EXCEPTION_ESCAPED:()=>ult,ATTR_EXCEPTION_MESSAGE:()=>clt,ATTR_EXCEPTION_STACKTRACE:()=>llt,ATTR_EXCEPTION_TYPE:()=>dlt,ATTR_HTTP_REQUEST_HEADER:()=>plt,ATTR_HTTP_REQUEST_METHOD:()=>lS,ATTR_HTTP_REQUEST_METHOD_ORIGINAL:()=>Slt,ATTR_HTTP_REQUEST_RESEND_COUNT:()=>Tlt,ATTR_HTTP_RESPONSE_HEADER:()=>blt,ATTR_HTTP_RESPONSE_STATUS_CODE:()=>Cg,ATTR_HTTP_ROUTE:()=>vg,ATTR_JVM_GC_ACTION:()=>Ilt,ATTR_JVM_GC_NAME:()=>Clt,ATTR_JVM_MEMORY_POOL_NAME:()=>vlt,ATTR_JVM_MEMORY_TYPE:()=>Rlt,ATTR_JVM_THREAD_DAEMON:()=>Nlt,ATTR_JVM_THREAD_STATE:()=>Blt,ATTR_NETWORK_LOCAL_ADDRESS:()=>Llt,ATTR_NETWORK_LOCAL_PORT:()=>Ult,ATTR_NETWORK_PEER_ADDRESS:()=>_V,ATTR_NETWORK_PEER_PORT:()=>EV,ATTR_NETWORK_PROTOCOL_NAME:()=>Qlt,ATTR_NETWORK_PROTOCOL_VERSION:()=>yV,ATTR_NETWORK_TRANSPORT:()=>SV,ATTR_NETWORK_TYPE:()=>zlt,ATTR_OTEL_SCOPE_NAME:()=>qlt,ATTR_OTEL_SCOPE_VERSION:()=>Vlt,ATTR_OTEL_STATUS_CODE:()=>Ylt,ATTR_OTEL_STATUS_DESCRIPTION:()=>Jlt,ATTR_SERVER_ADDRESS:()=>TV,ATTR_SERVER_PORT:()=>bV,ATTR_SERVICE_INSTANCE_ID:()=>Zlt,ATTR_SERVICE_NAME:()=>IV,ATTR_SERVICE_NAMESPACE:()=>Wlt,ATTR_SERVICE_VERSION:()=>CV,ATTR_SIGNALR_CONNECTION_STATUS:()=>Xlt,ATTR_SIGNALR_TRANSPORT:()=>rdt,ATTR_TELEMETRY_SDK_LANGUAGE:()=>adt,ATTR_TELEMETRY_SDK_NAME:()=>hdt,ATTR_TELEMETRY_SDK_VERSION:()=>_dt,ATTR_URL_FRAGMENT:()=>Edt,ATTR_URL_FULL:()=>R_,ATTR_URL_PATH:()=>ydt,ATTR_URL_QUERY:()=>Sdt,ATTR_URL_SCHEME:()=>Tdt,ATTR_USER_AGENT_ORIGINAL:()=>vV,AWSECSLAUNCHTYPEVALUES_EC2:()=>$ut,AWSECSLAUNCHTYPEVALUES_FARGATE:()=>qut,AwsEcsLaunchtypeValues:()=>Vut,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:()=>Rut,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:()=>xut,CLOUDPLATFORMVALUES_AWS_EC2:()=>Dut,CLOUDPLATFORMVALUES_AWS_ECS:()=>Nut,CLOUDPLATFORMVALUES_AWS_EKS:()=>But,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:()=>Out,CLOUDPLATFORMVALUES_AWS_LAMBDA:()=>wut,CLOUDPLATFORMVALUES_AZURE_AKS:()=>Mut,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:()=>Uut,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:()=>Put,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:()=>Lut,CLOUDPLATFORMVALUES_AZURE_VM:()=>kut,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:()=>zut,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:()=>jut,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:()=>Fut,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:()=>Qut,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:()=>Gut,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:()=>Tut,CLOUDPROVIDERVALUES_AWS:()=>but,CLOUDPROVIDERVALUES_AZURE:()=>Iut,CLOUDPROVIDERVALUES_GCP:()=>Cut,CloudPlatformValues:()=>Hut,CloudProviderValues:()=>vut,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:()=>ait,DBCASSANDRACONSISTENCYLEVELVALUES_ANY:()=>Ait,DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:()=>uit,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:()=>mit,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:()=>lit,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:()=>hit,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:()=>dit,DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:()=>cit,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:()=>git,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:()=>fit,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:()=>pit,DBSYSTEMVALUES_ADABAS:()=>Not,DBSYSTEMVALUES_CACHE:()=>Dot,DBSYSTEMVALUES_CASSANDRA:()=>Vot,DBSYSTEMVALUES_CLOUDSCAPE:()=>Sot,DBSYSTEMVALUES_COCKROACHDB:()=>iit,DBSYSTEMVALUES_COLDFUSION:()=>qot,DBSYSTEMVALUES_COSMOSDB:()=>Xot,DBSYSTEMVALUES_COUCHBASE:()=>Zot,DBSYSTEMVALUES_COUCHDB:()=>Wot,DBSYSTEMVALUES_DB2:()=>hot,DBSYSTEMVALUES_DERBY:()=>wot,DBSYSTEMVALUES_DYNAMODB:()=>eit,DBSYSTEMVALUES_EDB:()=>xot,DBSYSTEMVALUES_ELASTICSEARCH:()=>rit,DBSYSTEMVALUES_FILEMAKER:()=>Oot,DBSYSTEMVALUES_FIREBIRD:()=>Bot,DBSYSTEMVALUES_FIRSTSQL:()=>Rot,DBSYSTEMVALUES_GEODE:()=>nit,DBSYSTEMVALUES_H2:()=>$ot,DBSYSTEMVALUES_HANADB:()=>Cot,DBSYSTEMVALUES_HBASE:()=>Yot,DBSYSTEMVALUES_HIVE:()=>yot,DBSYSTEMVALUES_HSQLDB:()=>Tot,DBSYSTEMVALUES_INFORMIX:()=>kot,DBSYSTEMVALUES_INGRES:()=>vot,DBSYSTEMVALUES_INSTANTDB:()=>Pot,DBSYSTEMVALUES_INTERBASE:()=>Mot,DBSYSTEMVALUES_MARIADB:()=>Lot,DBSYSTEMVALUES_MAXDB:()=>Iot,DBSYSTEMVALUES_MEMCACHED:()=>oit,DBSYSTEMVALUES_MONGODB:()=>Kot,DBSYSTEMVALUES_MSSQL:()=>mot,DBSYSTEMVALUES_MYSQL:()=>Aot,DBSYSTEMVALUES_NEO4J:()=>tit,DBSYSTEMVALUES_NETEZZA:()=>Uot,DBSYSTEMVALUES_ORACLE:()=>got,DBSYSTEMVALUES_OTHER_SQL:()=>fot,DBSYSTEMVALUES_PERVASIVE:()=>Qot,DBSYSTEMVALUES_POINTBASE:()=>Fot,DBSYSTEMVALUES_POSTGRESQL:()=>_ot,DBSYSTEMVALUES_PROGRESS:()=>bot,DBSYSTEMVALUES_REDIS:()=>Jot,DBSYSTEMVALUES_REDSHIFT:()=>Eot,DBSYSTEMVALUES_SQLITE:()=>Got,DBSYSTEMVALUES_SYBASE:()=>jot,DBSYSTEMVALUES_TERADATA:()=>zot,DBSYSTEMVALUES_VERTICA:()=>Hot,DB_SYSTEM_NAME_VALUE_MARIADB:()=>Xct,DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER:()=>elt,DB_SYSTEM_NAME_VALUE_MYSQL:()=>tlt,DB_SYSTEM_NAME_VALUE_POSTGRESQL:()=>nlt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN0:()=>olt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN1:()=>ilt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN2:()=>slt,DOTNET_GC_HEAP_GENERATION_VALUE_LOH:()=>win,DOTNET_GC_HEAP_GENERATION_VALUE_POH:()=>Oin,DbCassandraConsistencyLevelValues:()=>_it,DbSystemValues:()=>sit,ERROR_TYPE_VALUE_OTHER:()=>alt,EVENT_EXCEPTION:()=>ypt,FAASDOCUMENTOPERATIONVALUES_DELETE:()=>Rit,FAASDOCUMENTOPERATIONVALUES_EDIT:()=>vit,FAASDOCUMENTOPERATIONVALUES_INSERT:()=>Cit,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:()=>Dit,FAASINVOKEDPROVIDERVALUES_AWS:()=>Nit,FAASINVOKEDPROVIDERVALUES_AZURE:()=>Bit,FAASINVOKEDPROVIDERVALUES_GCP:()=>wit,FAASTRIGGERVALUES_DATASOURCE:()=>Eit,FAASTRIGGERVALUES_HTTP:()=>yit,FAASTRIGGERVALUES_OTHER:()=>bit,FAASTRIGGERVALUES_PUBSUB:()=>Sit,FAASTRIGGERVALUES_TIMER:()=>Tit,FaasDocumentOperationValues:()=>xit,FaasInvokedProviderValues:()=>Oit,FaasTriggerValues:()=>Iit,HOSTARCHVALUES_AMD64:()=>Yut,HOSTARCHVALUES_ARM32:()=>Kut,HOSTARCHVALUES_ARM64:()=>Jut,HOSTARCHVALUES_IA64:()=>Zut,HOSTARCHVALUES_PPC32:()=>Wut,HOSTARCHVALUES_PPC64:()=>Xut,HOSTARCHVALUES_X86:()=>ect,HTTPFLAVORVALUES_HTTP_1_0:()=>gst,HTTPFLAVORVALUES_HTTP_1_1:()=>hst,HTTPFLAVORVALUES_HTTP_2_0:()=>_st,HTTPFLAVORVALUES_QUIC:()=>yst,HTTPFLAVORVALUES_SPDY:()=>Est,HTTP_REQUEST_METHOD_VALUE_CONNECT:()=>mlt,HTTP_REQUEST_METHOD_VALUE_DELETE:()=>Alt,HTTP_REQUEST_METHOD_VALUE_GET:()=>kin,HTTP_REQUEST_METHOD_VALUE_HEAD:()=>glt,HTTP_REQUEST_METHOD_VALUE_OPTIONS:()=>hlt,HTTP_REQUEST_METHOD_VALUE_OTHER:()=>flt,HTTP_REQUEST_METHOD_VALUE_PATCH:()=>_lt,HTTP_REQUEST_METHOD_VALUE_POST:()=>Elt,HTTP_REQUEST_METHOD_VALUE_PUT:()=>Pin,HTTP_REQUEST_METHOD_VALUE_TRACE:()=>ylt,HostArchValues:()=>tct,HttpFlavorValues:()=>Sst,JVM_MEMORY_TYPE_VALUE_HEAP:()=>xlt,JVM_MEMORY_TYPE_VALUE_NON_HEAP:()=>Dlt,JVM_THREAD_STATE_VALUE_BLOCKED:()=>wlt,JVM_THREAD_STATE_VALUE_NEW:()=>Min,JVM_THREAD_STATE_VALUE_RUNNABLE:()=>Olt,JVM_THREAD_STATE_VALUE_TERMINATED:()=>klt,JVM_THREAD_STATE_VALUE_TIMED_WAITING:()=>Plt,JVM_THREAD_STATE_VALUE_WAITING:()=>Mlt,MESSAGETYPEVALUES_RECEIVED:()=>Vst,MESSAGETYPEVALUES_SENT:()=>qst,MESSAGINGDESTINATIONKINDVALUES_QUEUE:()=>Tst,MESSAGINGDESTINATIONKINDVALUES_TOPIC:()=>bst,MESSAGINGOPERATIONVALUES_PROCESS:()=>vst,MESSAGINGOPERATIONVALUES_RECEIVE:()=>Cst,METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS:()=>bdt,METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES:()=>Idt,METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS:()=>Cdt,METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS:()=>xdt,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION:()=>Rdt,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE:()=>vdt,METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS:()=>Ddt,METRIC_DB_CLIENT_OPERATION_DURATION:()=>Ndt,METRIC_DOTNET_ASSEMBLY_COUNT:()=>Bdt,METRIC_DOTNET_EXCEPTIONS:()=>wdt,METRIC_DOTNET_GC_COLLECTIONS:()=>Odt,METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED:()=>kdt,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE:()=>Pdt,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE:()=>Mdt,METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE:()=>Ldt,METRIC_DOTNET_GC_PAUSE_TIME:()=>Udt,METRIC_DOTNET_JIT_COMPILATION_TIME:()=>Qdt,METRIC_DOTNET_JIT_COMPILED_IL_SIZE:()=>Fdt,METRIC_DOTNET_JIT_COMPILED_METHODS:()=>Gdt,METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS:()=>jdt,METRIC_DOTNET_PROCESS_CPU_COUNT:()=>zdt,METRIC_DOTNET_PROCESS_CPU_TIME:()=>Hdt,METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET:()=>$dt,METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH:()=>qdt,METRIC_DOTNET_THREAD_POOL_THREAD_COUNT:()=>Vdt,METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT:()=>Ydt,METRIC_DOTNET_TIMER_COUNT:()=>Kdt,METRIC_HTTP_CLIENT_REQUEST_DURATION:()=>Jdt,METRIC_HTTP_SERVER_REQUEST_DURATION:()=>Zdt,METRIC_JVM_CLASS_COUNT:()=>Wdt,METRIC_JVM_CLASS_LOADED:()=>Xdt,METRIC_JVM_CLASS_UNLOADED:()=>ept,METRIC_JVM_CPU_COUNT:()=>tpt,METRIC_JVM_CPU_RECENT_UTILIZATION:()=>npt,METRIC_JVM_CPU_TIME:()=>rpt,METRIC_JVM_GC_DURATION:()=>opt,METRIC_JVM_MEMORY_COMMITTED:()=>ipt,METRIC_JVM_MEMORY_LIMIT:()=>spt,METRIC_JVM_MEMORY_USED:()=>apt,METRIC_JVM_MEMORY_USED_AFTER_LAST_GC:()=>upt,METRIC_JVM_THREAD_COUNT:()=>cpt,METRIC_KESTREL_ACTIVE_CONNECTIONS:()=>lpt,METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES:()=>dpt,METRIC_KESTREL_CONNECTION_DURATION:()=>ppt,METRIC_KESTREL_QUEUED_CONNECTIONS:()=>fpt,METRIC_KESTREL_QUEUED_REQUESTS:()=>mpt,METRIC_KESTREL_REJECTED_CONNECTIONS:()=>Apt,METRIC_KESTREL_TLS_HANDSHAKE_DURATION:()=>gpt,METRIC_KESTREL_UPGRADED_CONNECTIONS:()=>hpt,METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS:()=>_pt,METRIC_SIGNALR_SERVER_CONNECTION_DURATION:()=>Ept,MessageTypeValues:()=>Yst,MessagingDestinationKindValues:()=>Ist,MessagingOperationValues:()=>Rst,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:()=>Zit,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:()=>est,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:()=>Kit,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:()=>ast,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:()=>Wit,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:()=>Xit,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:()=>ist,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:()=>Yit,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:()=>cst,NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:()=>tst,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:()=>rst,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:()=>ust,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:()=>nst,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:()=>ost,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:()=>dst,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:()=>sst,NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:()=>mst,NETHOSTCONNECTIONSUBTYPEVALUES_NR:()=>pst,NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:()=>fst,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:()=>lst,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:()=>Jit,NETHOSTCONNECTIONTYPEVALUES_CELL:()=>Hit,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:()=>$it,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:()=>qit,NETHOSTCONNECTIONTYPEVALUES_WIFI:()=>jit,NETHOSTCONNECTIONTYPEVALUES_WIRED:()=>zit,NETTRANSPORTVALUES_INPROC:()=>Qit,NETTRANSPORTVALUES_IP:()=>Mit,NETTRANSPORTVALUES_IP_TCP:()=>kit,NETTRANSPORTVALUES_IP_UDP:()=>Pit,NETTRANSPORTVALUES_OTHER:()=>Fit,NETTRANSPORTVALUES_PIPE:()=>Uit,NETTRANSPORTVALUES_UNIX:()=>Lit,NETWORK_TRANSPORT_VALUE_PIPE:()=>Flt,NETWORK_TRANSPORT_VALUE_QUIC:()=>Glt,NETWORK_TRANSPORT_VALUE_TCP:()=>Lin,NETWORK_TRANSPORT_VALUE_UDP:()=>Uin,NETWORK_TRANSPORT_VALUE_UNIX:()=>jlt,NETWORK_TYPE_VALUE_IPV4:()=>Hlt,NETWORK_TYPE_VALUE_IPV6:()=>$lt,NetHostConnectionSubtypeValues:()=>Ast,NetHostConnectionTypeValues:()=>Vit,NetTransportValues:()=>Git,OSTYPEVALUES_AIX:()=>lct,OSTYPEVALUES_DARWIN:()=>oct,OSTYPEVALUES_DRAGONFLYBSD:()=>uct,OSTYPEVALUES_FREEBSD:()=>ict,OSTYPEVALUES_HPUX:()=>cct,OSTYPEVALUES_LINUX:()=>rct,OSTYPEVALUES_NETBSD:()=>sct,OSTYPEVALUES_OPENBSD:()=>act,OSTYPEVALUES_SOLARIS:()=>dct,OSTYPEVALUES_WINDOWS:()=>nct,OSTYPEVALUES_Z_OS:()=>pct,OTEL_STATUS_CODE_VALUE_ERROR:()=>Klt,OTEL_STATUS_CODE_VALUE_OK:()=>Qin,OsTypeValues:()=>fct,RPCGRPCSTATUSCODEVALUES_ABORTED:()=>Ust,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:()=>kst,RPCGRPCSTATUSCODEVALUES_CANCELLED:()=>Dst,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:()=>zst,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:()=>wst,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:()=>Lst,RPCGRPCSTATUSCODEVALUES_INTERNAL:()=>Gst,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:()=>Bst,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:()=>Ost,RPCGRPCSTATUSCODEVALUES_OK:()=>xst,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:()=>Qst,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:()=>Pst,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:()=>Mst,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:()=>Hst,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:()=>jst,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:()=>Fst,RPCGRPCSTATUSCODEVALUES_UNKNOWN:()=>Nst,RpcGrpcStatusCodeValues:()=>$st,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:()=>Irt,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:()=>Mrt,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:()=>Srt,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:()=>hrt,SEMATTRS_AWS_DYNAMODB_COUNT:()=>krt,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:()=>Drt,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:()=>Rrt,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:()=>Lrt,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:()=>Crt,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:()=>_rt,SEMATTRS_AWS_DYNAMODB_LIMIT:()=>brt,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:()=>xrt,SEMATTRS_AWS_DYNAMODB_PROJECTION:()=>Trt,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:()=>Ert,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:()=>yrt,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:()=>Prt,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:()=>Brt,SEMATTRS_AWS_DYNAMODB_SEGMENT:()=>wrt,SEMATTRS_AWS_DYNAMODB_SELECT:()=>vrt,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:()=>Nrt,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:()=>grt,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:()=>Ort,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:()=>unt,SEMATTRS_CODE_FILEPATH:()=>srt,SEMATTRS_CODE_FUNCTION:()=>ort,SEMATTRS_CODE_LINENO:()=>art,SEMATTRS_CODE_NAMESPACE:()=>irt,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:()=>hnt,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:()=>Tnt,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:()=>Snt,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:()=>Ent,SEMATTRS_DB_CASSANDRA_KEYSPACE:()=>Ant,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:()=>gnt,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:()=>ynt,SEMATTRS_DB_CASSANDRA_TABLE:()=>_nt,SEMATTRS_DB_CONNECTION_STRING:()=>cnt,SEMATTRS_DB_HBASE_NAMESPACE:()=>bnt,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:()=>dnt,SEMATTRS_DB_MONGODB_COLLECTION:()=>Cnt,SEMATTRS_DB_MSSQL_INSTANCE_NAME:()=>mnt,SEMATTRS_DB_NAME:()=>pnt,SEMATTRS_DB_OPERATION:()=>fnt,SEMATTRS_DB_REDIS_DATABASE_INDEX:()=>Int,SEMATTRS_DB_SQL_TABLE:()=>vnt,SEMATTRS_DB_STATEMENT:()=>eV,SEMATTRS_DB_SYSTEM:()=>X5,SEMATTRS_DB_USER:()=>lnt,SEMATTRS_ENDUSER_ID:()=>Xnt,SEMATTRS_ENDUSER_ROLE:()=>ert,SEMATTRS_ENDUSER_SCOPE:()=>trt,SEMATTRS_EXCEPTION_ESCAPED:()=>Nnt,SEMATTRS_EXCEPTION_MESSAGE:()=>xnt,SEMATTRS_EXCEPTION_STACKTRACE:()=>Dnt,SEMATTRS_EXCEPTION_TYPE:()=>Rnt,SEMATTRS_FAAS_COLDSTART:()=>Unt,SEMATTRS_FAAS_CRON:()=>Lnt,SEMATTRS_FAAS_DOCUMENT_COLLECTION:()=>wnt,SEMATTRS_FAAS_DOCUMENT_NAME:()=>Pnt,SEMATTRS_FAAS_DOCUMENT_OPERATION:()=>Ont,SEMATTRS_FAAS_DOCUMENT_TIME:()=>knt,SEMATTRS_FAAS_EXECUTION:()=>Bnt,SEMATTRS_FAAS_INVOKED_NAME:()=>Qnt,SEMATTRS_FAAS_INVOKED_PROVIDER:()=>Fnt,SEMATTRS_FAAS_INVOKED_REGION:()=>Gnt,SEMATTRS_FAAS_TIME:()=>Mnt,SEMATTRS_FAAS_TRIGGER:()=>tV,SEMATTRS_HTTP_CLIENT_IP:()=>Art,SEMATTRS_HTTP_FLAVOR:()=>lrt,SEMATTRS_HTTP_HOST:()=>urt,SEMATTRS_HTTP_METHOD:()=>dB,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:()=>prt,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:()=>frt,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:()=>sV,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:()=>aV,SEMATTRS_HTTP_ROUTE:()=>uV,SEMATTRS_HTTP_SCHEME:()=>crt,SEMATTRS_HTTP_SERVER_NAME:()=>mrt,SEMATTRS_HTTP_STATUS_CODE:()=>uS,SEMATTRS_HTTP_TARGET:()=>iV,SEMATTRS_HTTP_URL:()=>kC,SEMATTRS_HTTP_USER_AGENT:()=>drt,SEMATTRS_MESSAGE_COMPRESSED_SIZE:()=>lot,SEMATTRS_MESSAGE_ID:()=>cot,SEMATTRS_MESSAGE_TYPE:()=>uot,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:()=>dot,SEMATTRS_MESSAGING_CONSUMER_ID:()=>Krt,SEMATTRS_MESSAGING_CONVERSATION_ID:()=>$rt,SEMATTRS_MESSAGING_DESTINATION:()=>Urt,SEMATTRS_MESSAGING_DESTINATION_KIND:()=>Qrt,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:()=>Xrt,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:()=>Wrt,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:()=>Zrt,SEMATTRS_MESSAGING_KAFKA_PARTITION:()=>eot,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:()=>tot,SEMATTRS_MESSAGING_MESSAGE_ID:()=>Hrt,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:()=>Vrt,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:()=>qrt,SEMATTRS_MESSAGING_OPERATION:()=>Yrt,SEMATTRS_MESSAGING_PROTOCOL:()=>Grt,SEMATTRS_MESSAGING_PROTOCOL_VERSION:()=>jrt,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:()=>Jrt,SEMATTRS_MESSAGING_SYSTEM:()=>cV,SEMATTRS_MESSAGING_TEMP_DESTINATION:()=>Frt,SEMATTRS_MESSAGING_URL:()=>zrt,SEMATTRS_NET_HOST_CARRIER_ICC:()=>Znt,SEMATTRS_NET_HOST_CARRIER_MCC:()=>Knt,SEMATTRS_NET_HOST_CARRIER_MNC:()=>Jnt,SEMATTRS_NET_HOST_CARRIER_NAME:()=>Ynt,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:()=>Vnt,SEMATTRS_NET_HOST_CONNECTION_TYPE:()=>qnt,SEMATTRS_NET_HOST_IP:()=>rV,SEMATTRS_NET_HOST_NAME:()=>$nt,SEMATTRS_NET_HOST_PORT:()=>oV,SEMATTRS_NET_PEER_IP:()=>nV,SEMATTRS_NET_PEER_NAME:()=>Hnt,SEMATTRS_NET_PEER_PORT:()=>znt,SEMATTRS_NET_TRANSPORT:()=>jnt,SEMATTRS_PEER_SERVICE:()=>Wnt,SEMATTRS_RPC_GRPC_STATUS_CODE:()=>dV,SEMATTRS_RPC_JSONRPC_ERROR_CODE:()=>sot,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:()=>aot,SEMATTRS_RPC_JSONRPC_REQUEST_ID:()=>iot,SEMATTRS_RPC_JSONRPC_VERSION:()=>oot,SEMATTRS_RPC_METHOD:()=>rot,SEMATTRS_RPC_SERVICE:()=>lV,SEMATTRS_RPC_SYSTEM:()=>not,SEMATTRS_THREAD_ID:()=>nrt,SEMATTRS_THREAD_NAME:()=>rrt,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:()=>tat,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:()=>eat,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:()=>nat,SEMRESATTRS_AWS_ECS_TASK_ARN:()=>rat,SEMRESATTRS_AWS_ECS_TASK_FAMILY:()=>oat,SEMRESATTRS_AWS_ECS_TASK_REVISION:()=>iat,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:()=>sat,SEMRESATTRS_AWS_LOG_GROUP_ARNS:()=>uat,SEMRESATTRS_AWS_LOG_GROUP_NAMES:()=>aat,SEMRESATTRS_AWS_LOG_STREAM_ARNS:()=>lat,SEMRESATTRS_AWS_LOG_STREAM_NAMES:()=>cat,SEMRESATTRS_CLOUD_ACCOUNT_ID:()=>Jst,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:()=>Wst,SEMRESATTRS_CLOUD_PLATFORM:()=>Xst,SEMRESATTRS_CLOUD_PROVIDER:()=>Kst,SEMRESATTRS_CLOUD_REGION:()=>Zst,SEMRESATTRS_CONTAINER_ID:()=>pat,SEMRESATTRS_CONTAINER_IMAGE_NAME:()=>mat,SEMRESATTRS_CONTAINER_IMAGE_TAG:()=>Aat,SEMRESATTRS_CONTAINER_NAME:()=>dat,SEMRESATTRS_CONTAINER_RUNTIME:()=>fat,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:()=>gat,SEMRESATTRS_DEVICE_ID:()=>hat,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:()=>_at,SEMRESATTRS_DEVICE_MODEL_NAME:()=>Eat,SEMRESATTRS_FAAS_ID:()=>Sat,SEMRESATTRS_FAAS_INSTANCE:()=>bat,SEMRESATTRS_FAAS_MAX_MEMORY:()=>Iat,SEMRESATTRS_FAAS_NAME:()=>yat,SEMRESATTRS_FAAS_VERSION:()=>Tat,SEMRESATTRS_HOST_ARCH:()=>xat,SEMRESATTRS_HOST_ID:()=>Cat,SEMRESATTRS_HOST_IMAGE_ID:()=>Nat,SEMRESATTRS_HOST_IMAGE_NAME:()=>Dat,SEMRESATTRS_HOST_IMAGE_VERSION:()=>Bat,SEMRESATTRS_HOST_NAME:()=>vat,SEMRESATTRS_HOST_TYPE:()=>Rat,SEMRESATTRS_K8S_CLUSTER_NAME:()=>wat,SEMRESATTRS_K8S_CONTAINER_NAME:()=>Uat,SEMRESATTRS_K8S_CRONJOB_NAME:()=>Jat,SEMRESATTRS_K8S_CRONJOB_UID:()=>Kat,SEMRESATTRS_K8S_DAEMONSET_NAME:()=>qat,SEMRESATTRS_K8S_DAEMONSET_UID:()=>$at,SEMRESATTRS_K8S_DEPLOYMENT_NAME:()=>jat,SEMRESATTRS_K8S_DEPLOYMENT_UID:()=>Gat,SEMRESATTRS_K8S_JOB_NAME:()=>Yat,SEMRESATTRS_K8S_JOB_UID:()=>Vat,SEMRESATTRS_K8S_NAMESPACE_NAME:()=>Pat,SEMRESATTRS_K8S_NODE_NAME:()=>Oat,SEMRESATTRS_K8S_NODE_UID:()=>kat,SEMRESATTRS_K8S_POD_NAME:()=>Lat,SEMRESATTRS_K8S_POD_UID:()=>Mat,SEMRESATTRS_K8S_REPLICASET_NAME:()=>Fat,SEMRESATTRS_K8S_REPLICASET_UID:()=>Qat,SEMRESATTRS_K8S_STATEFULSET_NAME:()=>Hat,SEMRESATTRS_K8S_STATEFULSET_UID:()=>zat,SEMRESATTRS_OS_DESCRIPTION:()=>Wat,SEMRESATTRS_OS_NAME:()=>Xat,SEMRESATTRS_OS_TYPE:()=>Zat,SEMRESATTRS_OS_VERSION:()=>eut,SEMRESATTRS_PROCESS_COMMAND:()=>out,SEMRESATTRS_PROCESS_COMMAND_ARGS:()=>sut,SEMRESATTRS_PROCESS_COMMAND_LINE:()=>iut,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:()=>nut,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:()=>rut,SEMRESATTRS_PROCESS_OWNER:()=>aut,SEMRESATTRS_PROCESS_PID:()=>tut,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:()=>lut,SEMRESATTRS_PROCESS_RUNTIME_NAME:()=>uut,SEMRESATTRS_PROCESS_RUNTIME_VERSION:()=>cut,SEMRESATTRS_SERVICE_INSTANCE_ID:()=>put,SEMRESATTRS_SERVICE_NAME:()=>dut,SEMRESATTRS_SERVICE_NAMESPACE:()=>pV,SEMRESATTRS_SERVICE_VERSION:()=>fut,SEMRESATTRS_TELEMETRY_AUTO_VERSION:()=>hut,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:()=>Aut,SEMRESATTRS_TELEMETRY_SDK_NAME:()=>mut,SEMRESATTRS_TELEMETRY_SDK_VERSION:()=>gut,SEMRESATTRS_WEBENGINE_DESCRIPTION:()=>yut,SEMRESATTRS_WEBENGINE_NAME:()=>_ut,SEMRESATTRS_WEBENGINE_VERSION:()=>Eut,SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN:()=>edt,SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE:()=>tdt,SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT:()=>ndt,SIGNALR_TRANSPORT_VALUE_LONG_POLLING:()=>odt,SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS:()=>idt,SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS:()=>sdt,SemanticAttributes:()=>pot,SemanticResourceAttributes:()=>Sut,TELEMETRYSDKLANGUAGEVALUES_CPP:()=>mct,TELEMETRYSDKLANGUAGEVALUES_DOTNET:()=>Act,TELEMETRYSDKLANGUAGEVALUES_ERLANG:()=>gct,TELEMETRYSDKLANGUAGEVALUES_GO:()=>hct,TELEMETRYSDKLANGUAGEVALUES_JAVA:()=>_ct,TELEMETRYSDKLANGUAGEVALUES_NODEJS:()=>Ect,TELEMETRYSDKLANGUAGEVALUES_PHP:()=>yct,TELEMETRYSDKLANGUAGEVALUES_PYTHON:()=>Sct,TELEMETRYSDKLANGUAGEVALUES_RUBY:()=>Tct,TELEMETRYSDKLANGUAGEVALUES_WEBJS:()=>bct,TELEMETRY_SDK_LANGUAGE_VALUE_CPP:()=>Fin,TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET:()=>udt,TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG:()=>cdt,TELEMETRY_SDK_LANGUAGE_VALUE_GO:()=>Gin,TELEMETRY_SDK_LANGUAGE_VALUE_JAVA:()=>ldt,TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:()=>ddt,TELEMETRY_SDK_LANGUAGE_VALUE_PHP:()=>jin,TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON:()=>pdt,TELEMETRY_SDK_LANGUAGE_VALUE_RUBY:()=>fdt,TELEMETRY_SDK_LANGUAGE_VALUE_RUST:()=>mdt,TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT:()=>Adt,TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS:()=>gdt,TelemetrySdkLanguageValues:()=>Ict});var Xn=w(()=>{m();rye();DTe();NTe();BTe();wTe()});var OTe=P(sU=>{"use strict";m();Object.defineProperty(sU,"__esModule",{value:!0});sU.ATTR_PROCESS_RUNTIME_NAME=void 0;sU.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name"});var kTe=P(uU=>{"use strict";m();Object.defineProperty(uU,"__esModule",{value:!0});uU.SDK_INFO=void 0;var Spt=pge(),aU=(Xn(),Le(Gr)),Tpt=OTe();uU.SDK_INFO={[aU.ATTR_TELEMETRY_SDK_NAME]:"opentelemetry",[Tpt.ATTR_PROCESS_RUNTIME_NAME]:"node",[aU.ATTR_TELEMETRY_SDK_LANGUAGE]:aU.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,[aU.ATTR_TELEMETRY_SDK_VERSION]:Spt.VERSION}});var PTe=P(su=>{"use strict";m();Object.defineProperty(su,"__esModule",{value:!0});su.otperformance=su.SDK_INFO=su._globalThis=su.getStringListFromEnv=su.getNumberFromEnv=su.getBooleanFromEnv=su.getStringFromEnv=void 0;var cU=lge();Object.defineProperty(su,"getStringFromEnv",{enumerable:!0,get:function(){return cU.getStringFromEnv}});Object.defineProperty(su,"getBooleanFromEnv",{enumerable:!0,get:function(){return cU.getBooleanFromEnv}});Object.defineProperty(su,"getNumberFromEnv",{enumerable:!0,get:function(){return cU.getNumberFromEnv}});Object.defineProperty(su,"getStringListFromEnv",{enumerable:!0,get:function(){return cU.getStringListFromEnv}});var bpt=dge();Object.defineProperty(su,"_globalThis",{enumerable:!0,get:function(){return bpt._globalThis}});var Ipt=kTe();Object.defineProperty(su,"SDK_INFO",{enumerable:!0,get:function(){return Ipt.SDK_INFO}});su.otperformance=performance});var RV=P(au=>{"use strict";m();Object.defineProperty(au,"__esModule",{value:!0});au.getStringListFromEnv=au.getNumberFromEnv=au.getStringFromEnv=au.getBooleanFromEnv=au.otperformance=au._globalThis=au.SDK_INFO=void 0;var dS=PTe();Object.defineProperty(au,"SDK_INFO",{enumerable:!0,get:function(){return dS.SDK_INFO}});Object.defineProperty(au,"_globalThis",{enumerable:!0,get:function(){return dS._globalThis}});Object.defineProperty(au,"otperformance",{enumerable:!0,get:function(){return dS.otperformance}});Object.defineProperty(au,"getBooleanFromEnv",{enumerable:!0,get:function(){return dS.getBooleanFromEnv}});Object.defineProperty(au,"getStringFromEnv",{enumerable:!0,get:function(){return dS.getStringFromEnv}});Object.defineProperty(au,"getNumberFromEnv",{enumerable:!0,get:function(){return dS.getNumberFromEnv}});Object.defineProperty(au,"getStringListFromEnv",{enumerable:!0,get:function(){return dS.getStringListFromEnv}})});var QTe=P(jr=>{"use strict";m();Object.defineProperty(jr,"__esModule",{value:!0});jr.addHrTimes=jr.isTimeInput=jr.isTimeInputHrTime=jr.hrTimeToSeconds=jr.hrTimeToMilliseconds=jr.hrTimeToMicroseconds=jr.hrTimeToNanoseconds=jr.hrTimeToTimeStamp=jr.hrTimeDuration=jr.timeInputToHrTime=jr.hrTime=jr.getTimeOrigin=jr.millisToHrTime=void 0;var lU=RV(),MTe=9,Cpt=6,vpt=Math.pow(10,Cpt),pB=Math.pow(10,MTe);function fB(e){let t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*vpt);return[n,r]}jr.millisToHrTime=fB;function Rpt(){return lU.otperformance.timeOrigin}jr.getTimeOrigin=Rpt;function LTe(e){let t=fB(lU.otperformance.timeOrigin),n=fB(typeof e=="number"?e:lU.otperformance.now());return UTe(t,n)}jr.hrTime=LTe;function xpt(e){if(xV(e))return e;if(typeof e=="number")return e<lU.otperformance.timeOrigin?LTe(e):fB(e);if(e instanceof Date)return fB(e.getTime());throw TypeError("Invalid input type")}jr.timeInputToHrTime=xpt;function Dpt(e,t){let n=t[0]-e[0],r=t[1]-e[1];return r<0&&(n-=1,r+=pB),[n,r]}jr.hrTimeDuration=Dpt;function Npt(e){let t=MTe,n=`${"0".repeat(t)}${e[1]}Z`,r=n.substring(n.length-t-1);return new Date(e[0]*1e3).toISOString().replace("000Z",r)}jr.hrTimeToTimeStamp=Npt;function Bpt(e){return e[0]*pB+e[1]}jr.hrTimeToNanoseconds=Bpt;function wpt(e){return e[0]*1e6+e[1]/1e3}jr.hrTimeToMicroseconds=wpt;function Opt(e){return e[0]*1e3+e[1]/1e6}jr.hrTimeToMilliseconds=Opt;function kpt(e){return e[0]+e[1]/pB}jr.hrTimeToSeconds=kpt;function xV(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}jr.isTimeInputHrTime=xV;function Ppt(e){return xV(e)||typeof e=="number"||e instanceof Date}jr.isTimeInput=Ppt;function UTe(e,t){let n=[e[0]+t[0],e[1]+t[1]];return n[1]>=pB&&(n[1]-=pB,n[0]+=1),n}jr.addHrTimes=UTe});var FTe=P(dU=>{"use strict";m();Object.defineProperty(dU,"__esModule",{value:!0});dU.unrefTimer=void 0;function Mpt(e){typeof e!="number"&&e.unref()}dU.unrefTimer=Mpt});var GTe=P(mB=>{"use strict";m();Object.defineProperty(mB,"__esModule",{value:!0});mB.ExportResultCode=void 0;var Lpt;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(Lpt=mB.ExportResultCode||(mB.ExportResultCode={}))});var zTe=P(pU=>{"use strict";m();Object.defineProperty(pU,"__esModule",{value:!0});pU.CompositePropagator=void 0;var jTe=(ze(),Le(nt)),DV=class{_propagators;_fields;constructor(t={}){this._propagators=t.propagators??[];let n=new Set;for(let r of this._propagators){let o=typeof r.fields=="function"?r.fields():[];for(let i of o)n.add(i)}this._fields=Array.from(n)}inject(t,n,r){for(let o of this._propagators)try{o.inject(t,n,r)}catch(i){jTe.diag.warn(`Failed to inject with ${o.constructor.name}. Err: ${i.message}`)}}extract(t,n,r){return this._propagators.reduce((o,i)=>{try{return i.extract(o,n,r)}catch(s){jTe.diag.warn(`Failed to extract with ${i.constructor.name}. Err: ${s.message}`)}return o},t)}fields(){return this._fields.slice()}};pU.CompositePropagator=DV});var HTe=P(MC=>{"use strict";m();Object.defineProperty(MC,"__esModule",{value:!0});MC.validateValue=MC.validateKey=void 0;var NV="[_0-9a-z-*/]",Upt=`[a-z]${NV}{0,255}`,Qpt=`[a-z0-9]${NV}{0,240}@[a-z]${NV}{0,13}`,Fpt=new RegExp(`^(?:${Upt}|${Qpt})$`),Gpt=/^[ -~]{0,255}[!-~]$/,jpt=/,|=/;function zpt(e){return Fpt.test(e)}MC.validateKey=zpt;function Hpt(e){return Gpt.test(e)&&!jpt.test(e)}MC.validateValue=Hpt});var wV=P(mU=>{"use strict";m();Object.defineProperty(mU,"__esModule",{value:!0});mU.TraceState=void 0;var fU=HTe(),$pt=32,$Te=512,qTe=",",VTe="=",BV=class e{_length;_rawTraceState;_internalState;constructor(t){this._rawTraceState=typeof t=="string"?t:"",this._length=this._rawTraceState.length}set(t,n){if(!(0,fU.validateKey)(t)||!(0,fU.validateValue)(n))return this;let r=this._getState(),o=r.get(t),i=this._length;if(typeof o=="string"?i+=n.length-o.length:i+=t.length+n.length+(r.size>0?2:1),i>$Te)return this;let s=new Map(r);return s.delete(t),s.set(t,n),this._fromState(s,i)}unset(t){let n=this._getState(),r=n.get(t);if(typeof r!="string")return this;let o=this._length-(t.length+r.length+1);n.size>1&&(o=o-1);let i=new Map(n);return i.delete(t),this._fromState(i,o)}get(t){return this._getState().get(t)}serialize(){let t="",n=0;for(let r of this._getState())n>0&&(t=qTe+t),t=`${r[0]}${VTe}${r[1]}`+t,n++;return t}_getState(){if(this._internalState)return this._internalState;let t=this._rawTraceState.split(qTe),n=new Map,r=0;for(let o of t){let i=o.trim(),s=i.indexOf(VTe);if(s===-1)continue;let u=i.slice(0,s),l=i.slice(s+1);if(!(0,fU.validateKey)(u)||!(0,fU.validateValue)(l))continue;let p=r+i.length+(n.size>0?1:0);if(!(p>$Te)&&(n.set(u,l),r=p,n.size>=$pt))break}return this._length=r,this._internalState=new Map(Array.from(n.entries()).reverse()),this._internalState}_fromState(t,n){let r=Object.create(e.prototype);return r._internalState=t,r._length=n,r}};mU.TraceState=BV});var KTe=P(uu=>{"use strict";m();Object.defineProperty(uu,"__esModule",{value:!0});uu.W3CTraceContextPropagator=uu.parseTraceParent=uu.TRACE_STATE_HEADER=uu.TRACE_PARENT_HEADER=void 0;var AU=(ze(),Le(nt)),qpt=cB(),Vpt=wV();uu.TRACE_PARENT_HEADER="traceparent";uu.TRACE_STATE_HEADER="tracestate";var Ypt="00",Kpt="(?!ff)[\\da-f]{2}",Jpt="(?![0]{32})[\\da-f]{32}",Zpt="(?![0]{16})[\\da-f]{16}",Wpt="[\\da-f]{2}",Xpt=new RegExp(`^\\s?(${Kpt})-(${Jpt})-(${Zpt})-(${Wpt})(-.*)?\\s?$`);function YTe(e){let t=Xpt.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}uu.parseTraceParent=YTe;var OV=class{inject(t,n,r){let o=AU.trace.getSpanContext(t);if(!o||(0,qpt.isTracingSuppressed)(t)||!(0,AU.isSpanContextValid)(o))return;let i=`${Ypt}-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||AU.TraceFlags.NONE).toString(16)}`;r.set(n,uu.TRACE_PARENT_HEADER,i),o.traceState&&r.set(n,uu.TRACE_STATE_HEADER,o.traceState.serialize())}extract(t,n,r){let o=r.get(n,uu.TRACE_PARENT_HEADER);if(!o)return t;let i=Array.isArray(o)?o[0]:o;if(typeof i!="string")return t;let s=YTe(i);if(!s)return t;s.isRemote=!0;let u=r.get(n,uu.TRACE_STATE_HEADER);if(u){let l=Array.isArray(u)?u.join(","):u;s.traceState=new Vpt.TraceState(typeof l=="string"?l:void 0)}return AU.trace.setSpanContext(t,s)}fields(){return[uu.TRACE_PARENT_HEADER,uu.TRACE_STATE_HEADER]}};uu.W3CTraceContextPropagator=OV});var JTe=P(df=>{"use strict";m();Object.defineProperty(df,"__esModule",{value:!0});df.getRPCMetadata=df.deleteRPCMetadata=df.setRPCMetadata=df.RPCType=void 0;var eft=(ze(),Le(nt)),kV=(0,eft.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),tft;(function(e){e.HTTP="http"})(tft=df.RPCType||(df.RPCType={}));function nft(e,t){return e.setValue(kV,t)}df.setRPCMetadata=nft;function rft(e){return e.deleteValue(kV)}df.deleteRPCMetadata=rft;function oft(e){return e.getValue(kV)}df.getRPCMetadata=oft});var tbe=P(gU=>{"use strict";m();Object.defineProperty(gU,"__esModule",{value:!0});gU.isPlainObject=void 0;var ift="[object Object]",sft="[object Null]",aft="[object Undefined]",uft=Function.prototype,ZTe=uft.toString,cft=ZTe.call(Object),lft=Object.getPrototypeOf,WTe=Object.prototype,XTe=WTe.hasOwnProperty,pS=Symbol?Symbol.toStringTag:void 0,ebe=WTe.toString;function dft(e){if(!pft(e)||fft(e)!==ift)return!1;let t=lft(e);if(t===null)return!0;let n=XTe.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&ZTe.call(n)===cft}gU.isPlainObject=dft;function pft(e){return e!=null&&typeof e=="object"}function fft(e){return e==null?e===void 0?aft:sft:pS&&pS in Object(e)?mft(e):Aft(e)}function mft(e){let t=XTe.call(e,pS),n=e[pS],r=!1;try{e[pS]=void 0,r=!0}catch{}let o=ebe.call(e);return r&&(t?e[pS]=n:delete e[pS]),o}function Aft(e){return ebe.call(e)}});var sbe=P(EU=>{"use strict";m();Object.defineProperty(EU,"__esModule",{value:!0});EU.merge=void 0;var nbe=tbe(),gft=20;function hft(...e){let t=e.shift(),n=new WeakMap;for(;e.length>0;)t=obe(t,e.shift(),0,n);return t}EU.merge=hft;function PV(e){return _U(e)?e.slice():e}function obe(e,t,n=0,r){let o;if(!(n>gft)){if(n++,hU(e)||hU(t)||ibe(t))o=PV(t);else if(_U(e)){if(o=e.slice(),_U(t))for(let i=0,s=t.length;i<s;i++)o.push(PV(t[i]));else if(AB(t)){let i=Object.keys(t);for(let s=0,u=i.length;s<u;s++){let l=i[s];l==="__proto__"||l==="constructor"||l==="prototype"||(o[l]=PV(t[l]))}}}else if(AB(e))if(AB(t)){if(!_ft(e,t))return t;o=Object.assign({},e);let i=Object.keys(t);for(let s=0,u=i.length;s<u;s++){let l=i[s];if(l==="__proto__"||l==="constructor"||l==="prototype")continue;let p=t[l];if(hU(p))typeof p>"u"?delete o[l]:o[l]=p;else{let h=o[l],y=p;if(rbe(e,l,r)||rbe(t,l,r))delete o[l];else{if(AB(h)&&AB(y)){let S=r.get(h)||[],T=r.get(y)||[];S.push({obj:e,key:l}),T.push({obj:t,key:l}),r.set(h,S),r.set(y,T)}o[l]=obe(o[l],p,n,r)}}}}else o=t;return o}}function rbe(e,t,n){let r=n.get(e[t])||[];for(let o=0,i=r.length;o<i;o++){let s=r[o];if(s.key===t&&s.obj===e)return!0}return!1}function _U(e){return Array.isArray(e)}function ibe(e){return typeof e=="function"}function AB(e){return!hU(e)&&!_U(e)&&!ibe(e)&&typeof e=="object"}function hU(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function _ft(e,t){return!(!(0,nbe.isPlainObject)(e)||!(0,nbe.isPlainObject)(t))}});var abe=P(LC=>{"use strict";m();Object.defineProperty(LC,"__esModule",{value:!0});LC.callWithTimeout=LC.TimeoutError=void 0;var yU=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};LC.TimeoutError=yU;function Eft(e,t){let n,r=new Promise(function(i,s){n=setTimeout(function(){s(new yU("Operation timed out."))},t)});return Promise.race([e,r]).then(o=>(clearTimeout(n),o),o=>{throw clearTimeout(n),o})}LC.callWithTimeout=Eft});var cbe=P(UC=>{"use strict";m();Object.defineProperty(UC,"__esModule",{value:!0});UC.isUrlIgnored=UC.urlMatches=void 0;function ube(e,t){return typeof t=="string"?e===t:!!e.match(t)}UC.urlMatches=ube;function yft(e,t){if(!t)return!1;for(let n of t)if(ube(e,n))return!0;return!1}UC.isUrlIgnored=yft});var lbe=P(SU=>{"use strict";m();Object.defineProperty(SU,"__esModule",{value:!0});SU.Deferred=void 0;var MV=class{_promise;_resolve;_reject;constructor(){this._promise=new Promise((t,n)=>{this._resolve=t,this._reject=n})}get promise(){return this._promise}resolve(t){this._resolve(t)}reject(t){this._reject(t)}};SU.Deferred=MV});var dbe=P(TU=>{"use strict";m();Object.defineProperty(TU,"__esModule",{value:!0});TU.BindOnceFuture=void 0;var Sft=lbe(),LV=class{_isCalled=!1;_deferred=new Sft.Deferred;_callback;_that;constructor(t,n){this._callback=t,this._that=n}get isCalled(){return this._isCalled}get promise(){return this._deferred.promise}call(...t){if(!this._isCalled){this._isCalled=!0;try{Promise.resolve(this._callback.call(this._that,...t)).then(n=>this._deferred.resolve(n),n=>this._deferred.reject(n))}catch(n){this._deferred.reject(n)}}return this._deferred.promise}};TU.BindOnceFuture=LV});var fbe=P(bU=>{"use strict";m();Object.defineProperty(bU,"__esModule",{value:!0});bU.diagLogLevelFromString=void 0;var Rg=(ze(),Le(nt)),pbe={ALL:Rg.DiagLogLevel.ALL,VERBOSE:Rg.DiagLogLevel.VERBOSE,DEBUG:Rg.DiagLogLevel.DEBUG,INFO:Rg.DiagLogLevel.INFO,WARN:Rg.DiagLogLevel.WARN,ERROR:Rg.DiagLogLevel.ERROR,NONE:Rg.DiagLogLevel.NONE};function Tft(e){if(e==null)return;let t=pbe[e.toUpperCase()];return t??(Rg.diag.warn(`Unknown log level "${e}", expected one of ${Object.keys(pbe)}, using default`),Rg.DiagLogLevel.INFO)}bU.diagLogLevelFromString=Tft});var Abe=P(IU=>{"use strict";m();Object.defineProperty(IU,"__esModule",{value:!0});IU._export=void 0;var mbe=(ze(),Le(nt)),bft=cB();function Ift(e,t){return new Promise(n=>{mbe.context.with((0,bft.suppressTracing)(mbe.context.active()),()=>{e.export(t,n)})})}IU._export=Ift});var Cr=P(we=>{"use strict";m();Object.defineProperty(we,"__esModule",{value:!0});we.diagLogLevelFromString=we.BindOnceFuture=we.urlMatches=we.isUrlIgnored=we.callWithTimeout=we.TimeoutError=we.merge=we.TraceState=we.unsuppressTracing=we.suppressTracing=we.isTracingSuppressed=we.setRPCMetadata=we.getRPCMetadata=we.deleteRPCMetadata=we.RPCType=we.parseTraceParent=we.W3CTraceContextPropagator=we.TRACE_STATE_HEADER=we.TRACE_PARENT_HEADER=we.CompositePropagator=we.otperformance=we.getStringListFromEnv=we.getNumberFromEnv=we.getBooleanFromEnv=we.getStringFromEnv=we._globalThis=we.SDK_INFO=we.parseKeyPairsIntoRecord=we.ExportResultCode=we.unrefTimer=we.timeInputToHrTime=we.millisToHrTime=we.isTimeInputHrTime=we.isTimeInput=we.hrTimeToTimeStamp=we.hrTimeToSeconds=we.hrTimeToNanoseconds=we.hrTimeToMilliseconds=we.hrTimeToMicroseconds=we.hrTimeDuration=we.hrTime=we.getTimeOrigin=we.addHrTimes=we.loggingErrorHandler=we.setGlobalErrorHandler=we.globalErrorHandler=we.sanitizeAttributes=we.isAttributeValue=we.AnchoredClock=we.W3CBaggagePropagator=void 0;we.internal=void 0;var Cft=WAe();Object.defineProperty(we,"W3CBaggagePropagator",{enumerable:!0,get:function(){return Cft.W3CBaggagePropagator}});var vft=XAe();Object.defineProperty(we,"AnchoredClock",{enumerable:!0,get:function(){return vft.AnchoredClock}});var gbe=oge();Object.defineProperty(we,"isAttributeValue",{enumerable:!0,get:function(){return gbe.isAttributeValue}});Object.defineProperty(we,"sanitizeAttributes",{enumerable:!0,get:function(){return gbe.sanitizeAttributes}});var hbe=sge();Object.defineProperty(we,"globalErrorHandler",{enumerable:!0,get:function(){return hbe.globalErrorHandler}});Object.defineProperty(we,"setGlobalErrorHandler",{enumerable:!0,get:function(){return hbe.setGlobalErrorHandler}});var Rft=Z5();Object.defineProperty(we,"loggingErrorHandler",{enumerable:!0,get:function(){return Rft.loggingErrorHandler}});var Ql=QTe();Object.defineProperty(we,"addHrTimes",{enumerable:!0,get:function(){return Ql.addHrTimes}});Object.defineProperty(we,"getTimeOrigin",{enumerable:!0,get:function(){return Ql.getTimeOrigin}});Object.defineProperty(we,"hrTime",{enumerable:!0,get:function(){return Ql.hrTime}});Object.defineProperty(we,"hrTimeDuration",{enumerable:!0,get:function(){return Ql.hrTimeDuration}});Object.defineProperty(we,"hrTimeToMicroseconds",{enumerable:!0,get:function(){return Ql.hrTimeToMicroseconds}});Object.defineProperty(we,"hrTimeToMilliseconds",{enumerable:!0,get:function(){return Ql.hrTimeToMilliseconds}});Object.defineProperty(we,"hrTimeToNanoseconds",{enumerable:!0,get:function(){return Ql.hrTimeToNanoseconds}});Object.defineProperty(we,"hrTimeToSeconds",{enumerable:!0,get:function(){return Ql.hrTimeToSeconds}});Object.defineProperty(we,"hrTimeToTimeStamp",{enumerable:!0,get:function(){return Ql.hrTimeToTimeStamp}});Object.defineProperty(we,"isTimeInput",{enumerable:!0,get:function(){return Ql.isTimeInput}});Object.defineProperty(we,"isTimeInputHrTime",{enumerable:!0,get:function(){return Ql.isTimeInputHrTime}});Object.defineProperty(we,"millisToHrTime",{enumerable:!0,get:function(){return Ql.millisToHrTime}});Object.defineProperty(we,"timeInputToHrTime",{enumerable:!0,get:function(){return Ql.timeInputToHrTime}});var xft=FTe();Object.defineProperty(we,"unrefTimer",{enumerable:!0,get:function(){return xft.unrefTimer}});var Dft=GTe();Object.defineProperty(we,"ExportResultCode",{enumerable:!0,get:function(){return Dft.ExportResultCode}});var Nft=V5();Object.defineProperty(we,"parseKeyPairsIntoRecord",{enumerable:!0,get:function(){return Nft.parseKeyPairsIntoRecord}});var fS=RV();Object.defineProperty(we,"SDK_INFO",{enumerable:!0,get:function(){return fS.SDK_INFO}});Object.defineProperty(we,"_globalThis",{enumerable:!0,get:function(){return fS._globalThis}});Object.defineProperty(we,"getStringFromEnv",{enumerable:!0,get:function(){return fS.getStringFromEnv}});Object.defineProperty(we,"getBooleanFromEnv",{enumerable:!0,get:function(){return fS.getBooleanFromEnv}});Object.defineProperty(we,"getNumberFromEnv",{enumerable:!0,get:function(){return fS.getNumberFromEnv}});Object.defineProperty(we,"getStringListFromEnv",{enumerable:!0,get:function(){return fS.getStringListFromEnv}});Object.defineProperty(we,"otperformance",{enumerable:!0,get:function(){return fS.otperformance}});var Bft=zTe();Object.defineProperty(we,"CompositePropagator",{enumerable:!0,get:function(){return Bft.CompositePropagator}});var CU=KTe();Object.defineProperty(we,"TRACE_PARENT_HEADER",{enumerable:!0,get:function(){return CU.TRACE_PARENT_HEADER}});Object.defineProperty(we,"TRACE_STATE_HEADER",{enumerable:!0,get:function(){return CU.TRACE_STATE_HEADER}});Object.defineProperty(we,"W3CTraceContextPropagator",{enumerable:!0,get:function(){return CU.W3CTraceContextPropagator}});Object.defineProperty(we,"parseTraceParent",{enumerable:!0,get:function(){return CU.parseTraceParent}});var vU=JTe();Object.defineProperty(we,"RPCType",{enumerable:!0,get:function(){return vU.RPCType}});Object.defineProperty(we,"deleteRPCMetadata",{enumerable:!0,get:function(){return vU.deleteRPCMetadata}});Object.defineProperty(we,"getRPCMetadata",{enumerable:!0,get:function(){return vU.getRPCMetadata}});Object.defineProperty(we,"setRPCMetadata",{enumerable:!0,get:function(){return vU.setRPCMetadata}});var UV=cB();Object.defineProperty(we,"isTracingSuppressed",{enumerable:!0,get:function(){return UV.isTracingSuppressed}});Object.defineProperty(we,"suppressTracing",{enumerable:!0,get:function(){return UV.suppressTracing}});Object.defineProperty(we,"unsuppressTracing",{enumerable:!0,get:function(){return UV.unsuppressTracing}});var wft=wV();Object.defineProperty(we,"TraceState",{enumerable:!0,get:function(){return wft.TraceState}});var Oft=sbe();Object.defineProperty(we,"merge",{enumerable:!0,get:function(){return Oft.merge}});var _be=abe();Object.defineProperty(we,"TimeoutError",{enumerable:!0,get:function(){return _be.TimeoutError}});Object.defineProperty(we,"callWithTimeout",{enumerable:!0,get:function(){return _be.callWithTimeout}});var Ebe=cbe();Object.defineProperty(we,"isUrlIgnored",{enumerable:!0,get:function(){return Ebe.isUrlIgnored}});Object.defineProperty(we,"urlMatches",{enumerable:!0,get:function(){return Ebe.urlMatches}});var kft=dbe();Object.defineProperty(we,"BindOnceFuture",{enumerable:!0,get:function(){return kft.BindOnceFuture}});var Pft=fbe();Object.defineProperty(we,"diagLogLevelFromString",{enumerable:!0,get:function(){return Pft.diagLogLevelFromString}});var Mft=Abe();we.internal={_export:Mft._export}});var ybe=P(RU=>{"use strict";m();Object.defineProperty(RU,"__esModule",{value:!0});RU.VERSION=void 0;RU.VERSION="0.214.0"});var Sbe=P(gB=>{"use strict";m();Object.defineProperty(gB,"__esModule",{value:!0});gB.SeverityNumber=void 0;var Lft;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.TRACE=1]="TRACE",e[e.TRACE2=2]="TRACE2",e[e.TRACE3=3]="TRACE3",e[e.TRACE4=4]="TRACE4",e[e.DEBUG=5]="DEBUG",e[e.DEBUG2=6]="DEBUG2",e[e.DEBUG3=7]="DEBUG3",e[e.DEBUG4=8]="DEBUG4",e[e.INFO=9]="INFO",e[e.INFO2=10]="INFO2",e[e.INFO3=11]="INFO3",e[e.INFO4=12]="INFO4",e[e.WARN=13]="WARN",e[e.WARN2=14]="WARN2",e[e.WARN3=15]="WARN3",e[e.WARN4=16]="WARN4",e[e.ERROR=17]="ERROR",e[e.ERROR2=18]="ERROR2",e[e.ERROR3=19]="ERROR3",e[e.ERROR4=20]="ERROR4",e[e.FATAL=21]="FATAL",e[e.FATAL2=22]="FATAL2",e[e.FATAL3=23]="FATAL3",e[e.FATAL4=24]="FATAL4"})(Lft=gB.SeverityNumber||(gB.SeverityNumber={}))});var DU=P(QC=>{"use strict";m();Object.defineProperty(QC,"__esModule",{value:!0});QC.NOOP_LOGGER=QC.NoopLogger=void 0;var xU=class{emit(t){}};QC.NoopLogger=xU;QC.NOOP_LOGGER=new xU});var Tbe=P(Nm=>{"use strict";m();Object.defineProperty(Nm,"__esModule",{value:!0});Nm.API_BACKWARDS_COMPATIBILITY_VERSION=Nm.makeGetter=Nm._global=Nm.GLOBAL_LOGS_API_KEY=void 0;Nm.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");Nm._global=globalThis;function Uft(e,t,n){return r=>r===e?t:n}Nm.makeGetter=Uft;Nm.API_BACKWARDS_COMPATIBILITY_VERSION=1});var QV=P(FC=>{"use strict";m();Object.defineProperty(FC,"__esModule",{value:!0});FC.NOOP_LOGGER_PROVIDER=FC.NoopLoggerProvider=void 0;var Qft=DU(),NU=class{getLogger(t,n,r){return new Qft.NoopLogger}};FC.NoopLoggerProvider=NU;FC.NOOP_LOGGER_PROVIDER=new NU});var bbe=P(BU=>{"use strict";m();Object.defineProperty(BU,"__esModule",{value:!0});BU.ProxyLogger=void 0;var Fft=DU(),FV=class{constructor(t,n,r,o){this._provider=t,this.name=n,this.version=r,this.options=o}emit(t){this._getLogger().emit(t)}_getLogger(){if(this._delegate)return this._delegate;let t=this._provider._getDelegateLogger(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):Fft.NOOP_LOGGER}};BU.ProxyLogger=FV});var Ibe=P(wU=>{"use strict";m();Object.defineProperty(wU,"__esModule",{value:!0});wU.ProxyLoggerProvider=void 0;var Gft=QV(),jft=bbe(),GV=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new jft.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:Gft.NOOP_LOGGER_PROVIDER}_setDelegate(t){this._delegate=t}_getDelegateLogger(t,n,r){var o;return(o=this._delegate)===null||o===void 0?void 0:o.getLogger(t,n,r)}};wU.ProxyLoggerProvider=GV});var vbe=P(OU=>{"use strict";m();Object.defineProperty(OU,"__esModule",{value:!0});OU.LogsAPI=void 0;var zd=Tbe(),zft=QV(),Cbe=Ibe(),jV=class e{constructor(){this._proxyLoggerProvider=new Cbe.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return zd._global[zd.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(zd._global[zd.GLOBAL_LOGS_API_KEY]=(0,zd.makeGetter)(zd.API_BACKWARDS_COMPATIBILITY_VERSION,t,zft.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=zd._global[zd.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(zd._global,zd.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete zd._global[zd.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new Cbe.ProxyLoggerProvider}};OU.LogsAPI=jV});var zV=P(Bm=>{"use strict";m();Object.defineProperty(Bm,"__esModule",{value:!0});Bm.logs=Bm.NoopLogger=Bm.NOOP_LOGGER=Bm.SeverityNumber=void 0;var Hft=Sbe();Object.defineProperty(Bm,"SeverityNumber",{enumerable:!0,get:function(){return Hft.SeverityNumber}});var Rbe=DU();Object.defineProperty(Bm,"NOOP_LOGGER",{enumerable:!0,get:function(){return Rbe.NOOP_LOGGER}});Object.defineProperty(Bm,"NoopLogger",{enumerable:!0,get:function(){return Rbe.NoopLogger}});var $ft=vbe();Bm.logs=$ft.LogsAPI.getInstance()});var xbe=P(GC=>{"use strict";m();Object.defineProperty(GC,"__esModule",{value:!0});GC.disableInstrumentations=GC.enableInstrumentations=void 0;function qft(e,t,n,r){for(let o=0,i=e.length;o<i;o++){let s=e[o];t&&s.setTracerProvider(t),n&&s.setMeterProvider(n),r&&s.setLoggerProvider&&s.setLoggerProvider(r),s.getConfig().enabled||s.enable()}}GC.enableInstrumentations=qft;function Vft(e){e.forEach(t=>t.disable())}GC.disableInstrumentations=Vft});var Bbe=P(kU=>{"use strict";m();Object.defineProperty(kU,"__esModule",{value:!0});kU.registerInstrumentations=void 0;var Dbe=(ze(),Le(nt)),Yft=zV(),Nbe=xbe();function Kft(e){let t=e.tracerProvider||Dbe.trace.getTracerProvider(),n=e.meterProvider||Dbe.metrics.getMeterProvider(),r=e.loggerProvider||Yft.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,Nbe.enableInstrumentations)(o,t,n,r),()=>{(0,Nbe.disableInstrumentations)(o)}}kU.registerInstrumentations=Kft});var Fbe=P(PU=>{"use strict";m();Object.defineProperty(PU,"__esModule",{value:!0});PU.satisfies=void 0;var VV=(ze(),Le(nt)),Mbe=/^(?:v)?(?<version>(?<major>0|[1-9]\d*)\.(?<minor>0|[1-9]\d*)\.(?<patch>0|[1-9]\d*))(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,Jft=/^(?<op><|>|=|==|<=|>=|~|\^|~>)?\s*(?:v)?(?<version>(?<major>x|X|\*|0|[1-9]\d*)(?:\.(?<minor>x|X|\*|0|[1-9]\d*))?(?:\.(?<patch>x|X|\*|0|[1-9]\d*))?)(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,Zft={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function Wft(e,t,n){if(!Xft(e))return VV.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=rmt(e);if(!r)return!1;let o=[],i=Lbe(r,t,o,n);return i&&!n?.includePrerelease?tmt(r,o):i}PU.satisfies=Wft;function Xft(e){return typeof e=="string"&&Mbe.test(e)}function Lbe(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(HV(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=Imt(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!HV(e,i,n,r))return!1;return!0}return HV(e,t,n,r)}function HV(e,t,n,r){if(t=nmt(t,r),t.includes(" "))return Lbe(e,t,n,r);{let o=omt(t);return n.push(o),emt(e,o)}}function emt(e,t){if(t.invalid)return!1;if(!t.version||qV(t.version))return!0;let n=Obe(e.versionSegments||[],t.versionSegments||[]);if(n===0){let r=e.prereleaseSegments||[],o=t.prereleaseSegments||[];!r.length&&!o.length?n=0:!r.length&&o.length?n=1:r.length&&!o.length?n=-1:n=Obe(r,o)}return Zft[t.op]?.includes(n)}function tmt(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function nmt(e,t){return e=e.trim(),e=Tmt(e,t),e=Smt(e),e=bmt(e,t),e=e.trim(),e}function $u(e){return!e||e.toLowerCase()==="x"||e==="*"}function rmt(e){let t=e.match(Mbe);if(!t){VV.diag.error(`Invalid version: ${e}`);return}let n=t.groups.version,r=t.groups.prerelease,o=t.groups.build,i=n.split("."),s=r?.split(".");return{op:void 0,version:n,versionSegments:i,versionSegmentCount:i.length,prerelease:r,prereleaseSegments:s,prereleaseSegmentCount:s?s.length:0,build:o}}function omt(e){if(!e)return{};let t=e.match(Jft);if(!t)return VV.diag.error(`Invalid range: ${e}`),{invalid:!0};let n=t.groups.op,r=t.groups.version,o=t.groups.prerelease,i=t.groups.build,s=r.split("."),u=o?.split(".");return n==="=="&&(n="="),{op:n||"=",version:r,versionSegments:s,versionSegmentCount:s.length,prerelease:o,prereleaseSegments:u,prereleaseSegmentCount:u?u.length:0,build:i}}function qV(e){return e==="*"||e==="x"||e==="X"}function wbe(e){let t=parseInt(e,10);return isNaN(t)?e:t}function imt(e,t){if(typeof e==typeof t){if(typeof e=="number")return[e,t];if(typeof e=="string")return[e,t];throw new Error("Version segments can only be strings or numbers")}else return[String(e),String(t)]}function smt(e,t){if(qV(e)||qV(t))return 0;let[n,r]=imt(wbe(e),wbe(t));return n>r?1:n<r?-1:0}function Obe(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=smt(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var Ube="[a-zA-Z0-9-]",Qbe="0|[1-9]\\d*",amt=`\\d*[a-zA-Z-]${Ube}*`,umt="((?:<|>)?=?)",kbe=`(?:${Qbe}|${amt})`,cmt=`(?:-(${kbe}(?:\\.${kbe})*))`,Pbe=`${Ube}+`,lmt=`(?:\\+(${Pbe}(?:\\.${Pbe})*))`,$V=`${Qbe}|x|X|\\*`,hB=`[v=\\s]*(${$V})(?:\\.(${$V})(?:\\.(${$V})(?:${cmt})?${lmt}?)?)?`,dmt=`^${umt}\\s*${hB}$`,pmt=new RegExp(dmt),fmt=`^\\s*(${hB})\\s+-\\s+(${hB})\\s*$`,mmt=new RegExp(fmt),Amt="(?:~>?)",gmt=`^${Amt}${hB}$`,hmt=new RegExp(gmt),_mt="(?:\\^)",Emt=`^${_mt}${hB}$`,ymt=new RegExp(Emt);function Smt(e){let t=hmt;return e.replace(t,(n,r,o,i,s)=>{let u;return $u(r)?u="":$u(o)?u=`>=${r}.0.0 <${+r+1}.0.0-0`:$u(i)?u=`>=${r}.${o}.0 <${r}.${+o+1}.0-0`:s?u=`>=${r}.${o}.${i}-${s} <${r}.${+o+1}.0-0`:u=`>=${r}.${o}.${i} <${r}.${+o+1}.0-0`,u})}function Tmt(e,t){let n=ymt,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,s,u,l)=>{let p;return $u(i)?p="":$u(s)?p=`>=${i}.0.0${r} <${+i+1}.0.0-0`:$u(u)?i==="0"?p=`>=${i}.${s}.0${r} <${i}.${+s+1}.0-0`:p=`>=${i}.${s}.0${r} <${+i+1}.0.0-0`:l?i==="0"?s==="0"?p=`>=${i}.${s}.${u}-${l} <${i}.${s}.${+u+1}-0`:p=`>=${i}.${s}.${u}-${l} <${i}.${+s+1}.0-0`:p=`>=${i}.${s}.${u}-${l} <${+i+1}.0.0-0`:i==="0"?s==="0"?p=`>=${i}.${s}.${u}${r} <${i}.${s}.${+u+1}-0`:p=`>=${i}.${s}.${u}${r} <${i}.${+s+1}.0-0`:p=`>=${i}.${s}.${u} <${+i+1}.0.0-0`,p})}function bmt(e,t){let n=pmt;return e.replace(n,(r,o,i,s,u,l)=>{let p=$u(i),h=p||$u(s),y=h||$u(u),S=y;return o==="="&&S&&(o=""),l=t?.includePrerelease?"-0":"",p?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&S?(h&&(s=0),u=0,o===">"?(o=">=",h?(i=+i+1,s=0,u=0):(s=+s+1,u=0)):o==="<="&&(o="<",h?i=+i+1:s=+s+1),o==="<"&&(l="-0"),r=`${o+i}.${s}.${u}${l}`):h?r=`>=${i}.0.0${l} <${+i+1}.0.0-0`:y&&(r=`>=${i}.${s}.0${l} <${i}.${+s+1}.0-0`),r})}function Imt(e,t){let n=mmt;return e.replace(n,(r,o,i,s,u,l,p,h,y,S,T,v)=>($u(i)?o="":$u(s)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:$u(u)?o=`>=${i}.${s}.0${t?.includePrerelease?"-0":""}`:l?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,$u(y)?h="":$u(S)?h=`<${+y+1}.0.0-0`:$u(T)?h=`<${y}.${+S+1}.0-0`:v?h=`<=${y}.${S}.${T}-${v}`:t?.includePrerelease?h=`<${y}.${S}.${+T+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var YV=P(Ra=>{"use strict";m();Object.defineProperty(Ra,"__esModule",{value:!0});Ra.massUnwrap=Ra.unwrap=Ra.massWrap=Ra.wrap=void 0;var qu=console.error.bind(console);function _B(e,t,n){let r=!!e[t]&&Object.prototype.propertyIsEnumerable.call(e,t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}var Cmt=(e,t,n)=>{if(!e||!e[t]){qu("no original function "+String(t)+" to wrap");return}if(!n){qu("no wrapper function"),qu(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){qu("original object and wrapper must be functions");return}let o=n(r,t);return _B(o,"__original",r),_B(o,"__unwrap",()=>{e[t]===o&&_B(e,t,r)}),_B(o,"__wrapped",!0),_B(e,t,o),o};Ra.wrap=Cmt;var vmt=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{qu("must provide one or more modules to patch"),qu(new Error().stack);return}if(!(t&&Array.isArray(t))){qu("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,Ra.wrap)(r,o,n)})})};Ra.massWrap=vmt;var Rmt=(e,t)=>{if(!e||!e[t]){qu("no function to unwrap."),qu(new Error().stack);return}let n=e[t];if(!n.__unwrap)qu("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};Ra.unwrap=Rmt;var xmt=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{qu("must provide one or more modules to patch"),qu(new Error().stack);return}if(!(t&&Array.isArray(t))){qu("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,Ra.unwrap)(n,r)})})};Ra.massUnwrap=xmt;function EB(e){e&&e.logger&&(typeof e.logger!="function"?qu("new logger isn't a function, not replacing"):qu=e.logger)}Ra.default=EB;EB.wrap=Ra.wrap;EB.massWrap=Ra.massWrap;EB.unwrap=Ra.unwrap;EB.massUnwrap=Ra.massUnwrap});var Gbe=P(LU=>{"use strict";m();Object.defineProperty(LU,"__esModule",{value:!0});LU.InstrumentationAbstract=void 0;var KV=(ze(),Le(nt)),Dmt=zV(),MU=YV(),JV=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=KV.diag.createComponentLogger({namespace:t}),this._tracer=KV.trace.getTracer(t,n),this._meter=KV.metrics.getMeter(t,n),this._logger=Dmt.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=MU.wrap;_unwrap=MU.unwrap;_massWrap=MU.massWrap;_massUnwrap=MU.massUnwrap;get meter(){return this._meter}setMeterProvider(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()}get logger(){return this._logger}setLoggerProvider(t){this._logger=t.getLogger(this.instrumentationName,this.instrumentationVersion)}getModuleDefinitions(){let t=this.init()??[];return Array.isArray(t)?t:[t]}_updateMetricInstruments(){}getConfig(){return this._config}setConfig(t){this._config={enabled:!0,...t}}setTracerProvider(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)}get tracer(){return this._tracer}_runSpanCustomizationHook(t,n,r,o){if(t)try{t(r,o)}catch(i){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:n},i)}}};LU.InstrumentationAbstract=JV});var zbe=P((han,jbe)=>{m();var jC=1e3,zC=jC*60,HC=zC*60,mS=HC*24,Nmt=mS*7,Bmt=mS*365.25;jbe.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return wmt(e);if(n==="number"&&isFinite(e))return t.long?kmt(e):Omt(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function wmt(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]),r=(t[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*Bmt;case"weeks":case"week":case"w":return n*Nmt;case"days":case"day":case"d":return n*mS;case"hours":case"hour":case"hrs":case"hr":case"h":return n*HC;case"minutes":case"minute":case"mins":case"min":case"m":return n*zC;case"seconds":case"second":case"secs":case"sec":case"s":return n*jC;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function Omt(e){var t=Math.abs(e);return t>=mS?Math.round(e/mS)+"d":t>=HC?Math.round(e/HC)+"h":t>=zC?Math.round(e/zC)+"m":t>=jC?Math.round(e/jC)+"s":e+"ms"}function kmt(e){var t=Math.abs(e);return t>=mS?UU(e,t,mS,"day"):t>=HC?UU(e,t,HC,"hour"):t>=zC?UU(e,t,zC,"minute"):t>=jC?UU(e,t,jC,"second"):e+" ms"}function UU(e,t,n,r){var o=t>=n*1.5;return Math.round(e/n)+" "+r+(o?"s":"")}});var ZV=P((Ean,Hbe)=>{m();function Pmt(e){n.debug=n,n.default=n,n.coerce=l,n.disable=s,n.enable=o,n.enabled=u,n.humanize=zbe(),n.destroy=p,Object.keys(e).forEach(h=>{n[h]=e[h]}),n.names=[],n.skips=[],n.formatters={};function t(h){let y=0;for(let S=0;S<h.length;S++)y=(y<<5)-y+h.charCodeAt(S),y|=0;return n.colors[Math.abs(y)%n.colors.length]}n.selectColor=t;function n(h){let y,S=null,T,v;function R(...x){if(!R.enabled)return;let O=R,M=Number(new Date),j=M-(y||M);O.diff=j,O.prev=y,O.curr=M,y=M,x[0]=n.coerce(x[0]),typeof x[0]!="string"&&x.unshift("%O");let G=0;x[0]=x[0].replace(/%([a-zA-Z%])/g,(V,ae)=>{if(V==="%%")return"%";G++;let se=n.formatters[ae];if(typeof se=="function"){let Ee=x[G];V=se.call(O,Ee),x.splice(G,1),G--}return V}),n.formatArgs.call(O,x),(O.log||n.log).apply(O,x)}return R.namespace=h,R.useColors=n.useColors(),R.color=n.selectColor(h),R.extend=r,R.destroy=n.destroy,Object.defineProperty(R,"enabled",{enumerable:!0,configurable:!1,get:()=>S!==null?S:(T!==n.namespaces&&(T=n.namespaces,v=n.enabled(h)),v),set:x=>{S=x}}),typeof n.init=="function"&&n.init(R),R}function r(h,y){let S=n(this.namespace+(typeof y>"u"?":":y)+h);return S.log=this.log,S}function o(h){n.save(h),n.namespaces=h,n.names=[],n.skips=[];let y=(typeof h=="string"?h:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let S of y)S[0]==="-"?n.skips.push(S.slice(1)):n.names.push(S)}function i(h,y){let S=0,T=0,v=-1,R=0;for(;S<h.length;)if(T<y.length&&(y[T]===h[S]||y[T]==="*"))y[T]==="*"?(v=T,R=S,T++):(S++,T++);else if(v!==-1)T=v+1,R++,S=R;else return!1;for(;T<y.length&&y[T]==="*";)T++;return T===y.length}function s(){let h=[...n.names,...n.skips.map(y=>"-"+y)].join(",");return n.enable(""),h}function u(h){for(let y of n.skips)if(i(h,y))return!1;for(let y of n.names)if(i(h,y))return!0;return!1}function l(h){return h instanceof Error?h.stack||h.message:h}function p(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}Hbe.exports=Pmt});var $be=P((Qc,QU)=>{m();Qc.formatArgs=Lmt;Qc.save=Umt;Qc.load=Qmt;Qc.useColors=Mmt;Qc.storage=Fmt();Qc.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Qc.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Mmt(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Lmt(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+QU.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let n=0,r=0;e[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(n++,o==="%c"&&(r=n))}),e.splice(r,0,t)}Qc.log=console.debug||console.log||(()=>{});function Umt(e){try{e?Qc.storage.setItem("debug",e):Qc.storage.removeItem("debug")}catch{}}function Qmt(){let e;try{e=Qc.storage.getItem("debug")||Qc.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function Fmt(){try{return localStorage}catch{}}QU.exports=ZV()(Qc);var{formatters:Gmt}=QU.exports;Gmt.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Vbe=P((Tan,qbe)=>{"use strict";m();qbe.exports=(e,t=process.argv)=>{let n=e.startsWith("-")?"":e.length===1?"-":"--",r=t.indexOf(n+e),o=t.indexOf("--");return r!==-1&&(o===-1||r<o)}});var Jbe=P((Ian,Kbe)=>{"use strict";m();var jmt=Qe("os"),Ybe=Qe("tty"),Hd=Vbe(),{env:Ws}=process,x_;Hd("no-color")||Hd("no-colors")||Hd("color=false")||Hd("color=never")?x_=0:(Hd("color")||Hd("colors")||Hd("color=true")||Hd("color=always"))&&(x_=1);"FORCE_COLOR"in Ws&&(Ws.FORCE_COLOR==="true"?x_=1:Ws.FORCE_COLOR==="false"?x_=0:x_=Ws.FORCE_COLOR.length===0?1:Math.min(parseInt(Ws.FORCE_COLOR,10),3));function WV(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function XV(e,t){if(x_===0)return 0;if(Hd("color=16m")||Hd("color=full")||Hd("color=truecolor"))return 3;if(Hd("color=256"))return 2;if(e&&!t&&x_===void 0)return 0;let n=x_||0;if(Ws.TERM==="dumb")return n;if(process.platform==="win32"){let r=jmt.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in Ws)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(r=>r in Ws)||Ws.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in Ws)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Ws.TEAMCITY_VERSION)?1:0;if(Ws.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Ws){let r=parseInt((Ws.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Ws.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Ws.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Ws.TERM)||"COLORTERM"in Ws?1:n}function zmt(e){let t=XV(e,e&&e.isTTY);return WV(t)}Kbe.exports={supportsColor:zmt,stdout:WV(XV(!0,Ybe.isatty(1))),stderr:WV(XV(!0,Ybe.isatty(2)))}});var Wbe=P((Xs,GU)=>{m();var Hmt=Qe("tty"),FU=Qe("util");Xs.init=Zmt;Xs.log=Ymt;Xs.formatArgs=qmt;Xs.save=Kmt;Xs.load=Jmt;Xs.useColors=$mt;Xs.destroy=FU.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Xs.colors=[6,2,3,4,5,1];try{let e=Jbe();e&&(e.stderr||e).level>=2&&(Xs.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}Xs.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let n=t.substring(6).toLowerCase().replace(/_([a-z])/g,(o,i)=>i.toUpperCase()),r=process.env[t];return/^(yes|on|true|enabled)$/i.test(r)?r=!0:/^(no|off|false|disabled)$/i.test(r)?r=!1:r==="null"?r=null:r=Number(r),e[n]=r,e},{});function $mt(){return"colors"in Xs.inspectOpts?!!Xs.inspectOpts.colors:Hmt.isatty(process.stderr.fd)}function qmt(e){let{namespace:t,useColors:n}=this;if(n){let r=this.color,o="\x1B[3"+(r<8?r:"8;5;"+r),i=` ${o};1m${t} \x1B[0m`;e[0]=i+e[0].split(`
3
+ var ptt=Object.create;var BL=Object.defineProperty;var ftt=Object.getOwnPropertyDescriptor;var mtt=Object.getOwnPropertyNames;var Att=Object.getPrototypeOf,gtt=Object.prototype.hasOwnProperty;var Qe=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var w=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}};var P=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},Js=(e,t)=>{for(var n in t)BL(e,n,{get:t[n],enumerable:!0})},tAe=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of mtt(t))!gtt.call(e,o)&&o!==n&&BL(e,o,{get:()=>t[o],enumerable:!(r=ftt(t,o))||r.enumerable});return e};var ue=(e,t,n)=>(n=e!=null?ptt(Att(e)):{},tAe(t||!e||!e.__esModule?BL(n,"default",{value:e,enumerable:!0}):n,e)),Le=e=>tAe(BL({},"__esModule",{value:!0}),e);var m=w(()=>{(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"0.1.187"}}catch{}})()});var bg,l5=w(()=>{m();bg="1.9.1"});function htt(e){let t=new Set([e]),n=new Set,r=e.match(oAe);if(!r)return()=>!1;let o={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(o.prerelease!=null)return function(l){return l===e};function i(u){return n.add(u),!1}function s(u){return t.add(u),!0}return function(l){if(t.has(l))return!0;if(n.has(l))return!1;let p=l.match(oAe);if(!p)return i(l);let h={major:+p[1],minor:+p[2],patch:+p[3],prerelease:p[4]};return h.prerelease!=null||o.major!==h.major?i(l):o.major===0?o.minor===h.minor&&o.patch<=h.patch?s(l):i(l):o.minor<=h.minor?s(l):i(l)}}var oAe,iAe,sAe=w(()=>{m();l5();oAe=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;iAe=htt(bg)});function Im(e,t,n,r=!1){var o;let i=nB[tB]=(o=nB[tB])!==null&&o!==void 0?o:{version:bg};if(!r&&i[e]){let s=new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${e}`);return n.error(s.stack||s.message),!1}if(i.version!==bg){let s=new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${bg}`);return n.error(s.stack||s.message),!1}return i[e]=t,n.debug(`@opentelemetry/api: Registered a global for ${e} v${bg}.`),!0}function Ml(e){var t,n;let r=(t=nB[tB])===null||t===void 0?void 0:t.version;if(!(!r||!iAe(r)))return(n=nB[tB])===null||n===void 0?void 0:n[e]}function Cm(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${bg}.`);let n=nB[tB];n&&delete n[e]}var _tt,tB,nB,oS=w(()=>{m();l5();sAe();_tt=bg.split(".")[0],tB=Symbol.for(`opentelemetry.js.api.${_tt}`),nB=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});function rB(e,t,n){let r=Ml("diag");if(r)return r[e](t,...n)}var wL,aAe=w(()=>{m();oS();wL=class{constructor(t){this._namespace=t.namespace||"DiagComponentLogger"}debug(...t){return rB("debug",this._namespace,t)}error(...t){return rB("error",this._namespace,t)}info(...t){return rB("info",this._namespace,t)}warn(...t){return rB("warn",this._namespace,t)}verbose(...t){return rB("verbose",this._namespace,t)}}});var Is,OL=w(()=>{m();(function(e){e[e.NONE=0]="NONE",e[e.ERROR=30]="ERROR",e[e.WARN=50]="WARN",e[e.INFO=60]="INFO",e[e.DEBUG=70]="DEBUG",e[e.VERBOSE=80]="VERBOSE",e[e.ALL=9999]="ALL"})(Is||(Is={}))});function uAe(e,t){e<Is.NONE?e=Is.NONE:e>Is.ALL&&(e=Is.ALL),t=t||{};function n(r,o){let i=t[r];return typeof i=="function"&&e>=o?i.bind(t):function(){}}return{error:n("error",Is.ERROR),warn:n("warn",Is.WARN),info:n("info",Is.INFO),debug:n("debug",Is.DEBUG),verbose:n("verbose",Is.VERBOSE)}}var cAe=w(()=>{m();OL()});var Ett,Zs,iS=w(()=>{m();aAe();cAe();OL();oS();Ett="diag",Zs=class e{static instance(){return this._instance||(this._instance=new e),this._instance}constructor(){function t(o){return function(...i){let s=Ml("diag");if(s)return s[o](...i)}}let n=this,r=(o,i={logLevel:Is.INFO})=>{var s,u,l;if(o===n){let y=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return n.error((s=y.stack)!==null&&s!==void 0?s:y.message),!1}typeof i=="number"&&(i={logLevel:i});let p=Ml("diag"),h=uAe((u=i.logLevel)!==null&&u!==void 0?u:Is.INFO,o);if(p&&!i.suppressOverrideMessage){let y=(l=new Error().stack)!==null&&l!==void 0?l:"<failed to generate stacktrace>";p.warn(`Current logger will be overwritten from ${y}`),h.warn(`Current logger will overwrite one already registered from ${y}`)}return Im("diag",h,n,!0)};n.setLogger=r,n.disable=()=>{Cm(Ett,n)},n.createComponentLogger=o=>new wL(o),n.verbose=t("verbose"),n.debug=t("debug"),n.info=t("info"),n.warn=t("warn"),n.error=t("error")}}});var kL,lAe=w(()=>{m();kL=class e{constructor(t){this._entries=t?new Map(t):new Map}getEntry(t){let n=this._entries.get(t);if(n)return Object.assign({},n)}getAllEntries(){return Array.from(this._entries.entries())}setEntry(t,n){let r=new e(this._entries);return r._entries.set(t,n),r}removeEntry(t){let n=new e(this._entries);return n._entries.delete(t),n}removeEntries(...t){let n=new e(this._entries);for(let r of t)n._entries.delete(r);return n}clear(){return new e}}});var dAe,pAe=w(()=>{m();dAe=Symbol("BaggageEntryMetadata")});function fAe(e={}){return new kL(new Map(Object.entries(e)))}function mAe(e){return typeof e!="string"&&(ytt.error(`Cannot create baggage metadata from unknown type: ${typeof e}`),e=""),{__TYPE__:dAe,toString(){return e}}}var ytt,d5=w(()=>{m();iS();lAe();pAe();ytt=Zs.instance()});function Ll(e){return Symbol.for(e)}var p5,DC,oB=w(()=>{m();p5=class e{constructor(t){let n=this;n._currentContext=t?new Map(t):new Map,n.getValue=r=>n._currentContext.get(r),n.setValue=(r,o)=>{let i=new e(n._currentContext);return i._currentContext.set(r,o),i},n.deleteValue=r=>{let o=new e(n._currentContext);return o._currentContext.delete(r),o}}},DC=new p5});var f5,m5,PL,AAe=w(()=>{m();f5=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],m5={};if(typeof console<"u"){let e=["error","warn","info","debug","trace","log"];for(let t of e)typeof console[t]=="function"&&(m5[t]=console[t])}PL=class{constructor(){function t(n){return function(...r){let o=m5[n];if(typeof o!="function"&&(o=m5.log),typeof o!="function"&&console&&(o=console[n],typeof o!="function"&&(o=console.log)),typeof o=="function")return o.apply(console,r)}}for(let n=0;n<f5.length;n++)this[f5[n].n]=t(f5[n].c)}}});function gAe(){return b5}var A5,NC,g5,h5,_5,E5,iB,y5,S5,T5,b5,Stt,Ttt,btt,Itt,Ctt,vtt,Rtt,I5=w(()=>{m();A5=class{constructor(){}createGauge(t,n){return Ttt}createHistogram(t,n){return btt}createCounter(t,n){return Stt}createUpDownCounter(t,n){return Itt}createObservableGauge(t,n){return vtt}createObservableCounter(t,n){return Ctt}createObservableUpDownCounter(t,n){return Rtt}addBatchObservableCallback(t,n){}removeBatchObservableCallback(t){}},NC=class{},g5=class extends NC{add(t,n){}},h5=class extends NC{add(t,n){}},_5=class extends NC{record(t,n){}},E5=class extends NC{record(t,n){}},iB=class{addCallback(t){}removeCallback(t){}},y5=class extends iB{},S5=class extends iB{},T5=class extends iB{},b5=new A5,Stt=new g5,Ttt=new _5,btt=new E5,Itt=new h5,Ctt=new y5,vtt=new S5,Rtt=new T5});var ML,hAe=w(()=>{m();(function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"})(ML||(ML={}))});var LL,UL,C5=w(()=>{m();LL={get(e,t){if(e!=null)return e[t]},keys(e){return e==null?[]:Object.keys(e)}},UL={set(e,t,n){e!=null&&(e[t]=n)}}});var QL,_Ae=w(()=>{m();oB();QL=class{active(){return DC}with(t,n,r,...o){return n.call(r,...o)}bind(t,n){return n}enable(){return this}disable(){return this}}});var v5,xtt,vm,sB=w(()=>{m();_Ae();oS();iS();v5="context",xtt=new QL,vm=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalContextManager(t){return Im(v5,t,Zs.instance())}active(){return this._getContextManager().active()}with(t,n,r,...o){return this._getContextManager().with(t,n,r,...o)}bind(t,n){return this._getContextManager().bind(t,n)}_getContextManager(){return Ml(v5)||xtt}disable(){this._getContextManager().disable(),Cm(v5,Zs.instance())}}});var ou,R5=w(()=>{m();(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(ou||(ou={}))});var aB,sS,FL,GL=w(()=>{m();R5();aB="0000000000000000",sS="00000000000000000000000000000000",FL={traceId:sS,spanId:aB,traceFlags:ou.NONE}});var Rm,jL=w(()=>{m();GL();Rm=class{constructor(t=FL){this._spanContext=t}spanContext(){return this._spanContext}setAttribute(t,n){return this}setAttributes(t){return this}addEvent(t,n){return this}addLink(t){return this}addLinks(t){return this}setStatus(t){return this}updateName(t){return this}end(t){}isRecording(){return!1}recordException(t,n){}}});function zL(e){return e.getValue(x5)||void 0}function EAe(){return zL(vm.getInstance().active())}function uB(e,t){return e.setValue(x5,t)}function yAe(e){return e.deleteValue(x5)}function SAe(e,t){return uB(e,new Rm(t))}function HL(e){var t;return(t=zL(e))===null||t===void 0?void 0:t.spanContext()}var x5,D5=w(()=>{m();oB();jL();sB();x5=Ll("OpenTelemetry Context Key SPAN")});function TAe(e,t){if(typeof e!="string"||e.length!==t)return!1;let n=0;for(let r=0;r<e.length;r+=4)n+=($L[e.charCodeAt(r)]|0)+($L[e.charCodeAt(r+1)]|0)+($L[e.charCodeAt(r+2)]|0)+($L[e.charCodeAt(r+3)]|0);return n===t}function N5(e){return TAe(e,32)&&e!==sS}function B5(e){return TAe(e,16)&&e!==aB}function Ig(e){return N5(e.traceId)&&B5(e.spanId)}function bAe(e){return new Rm(e)}var $L,qL=w(()=>{m();GL();jL();$L=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1])});function Dtt(e){return e!==null&&typeof e=="object"&&"spanId"in e&&typeof e.spanId=="string"&&"traceId"in e&&typeof e.traceId=="string"&&"traceFlags"in e&&typeof e.traceFlags=="number"}var w5,BC,O5=w(()=>{m();sB();D5();jL();qL();w5=vm.getInstance(),BC=class{startSpan(t,n,r=w5.active()){if(!!n?.root)return new Rm;let i=r&&HL(r);return Dtt(i)&&Ig(i)?new Rm(i):new Rm}startActiveSpan(t,n,r,o){let i,s,u;if(arguments.length<2)return;arguments.length===2?u=n:arguments.length===3?(i=n,u=r):(i=n,s=r,u=o);let l=s??w5.active(),p=this.startSpan(t,i,l),h=uB(l,p);return w5.with(h,u,void 0,p)}}});var Ntt,wC,k5=w(()=>{m();O5();Ntt=new BC,wC=class{constructor(t,n,r,o){this._provider=t,this.name=n,this.version=r,this.options=o}startSpan(t,n,r){return this._getTracer().startSpan(t,n,r)}startActiveSpan(t,n,r,o){let i=this._getTracer();return Reflect.apply(i.startActiveSpan,i,arguments)}_getTracer(){if(this._delegate)return this._delegate;let t=this._provider.getDelegateTracer(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):Ntt}}});var VL,IAe=w(()=>{m();O5();VL=class{getTracer(t,n,r){return new BC}}});var Btt,aS,P5=w(()=>{m();k5();IAe();Btt=new VL,aS=class{getTracer(t,n,r){var o;return(o=this.getDelegateTracer(t,n,r))!==null&&o!==void 0?o:new wC(this,t,n,r)}getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:Btt}setDelegate(t){this._delegate=t}getDelegateTracer(t,n,r){var o;return(o=this._delegate)===null||o===void 0?void 0:o.getTracer(t,n,r)}}});var YL,CAe=w(()=>{m();(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(YL||(YL={}))});var po,vAe=w(()=>{m();(function(e){e[e.INTERNAL=0]="INTERNAL",e[e.SERVER=1]="SERVER",e[e.CLIENT=2]="CLIENT",e[e.PRODUCER=3]="PRODUCER",e[e.CONSUMER=4]="CONSUMER"})(po||(po={}))});var Ai,RAe=w(()=>{m();(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(Ai||(Ai={}))});function xAe(e){return ktt.test(e)}function DAe(e){return Ptt.test(e)&&!Mtt.test(e)}var M5,wtt,Ott,ktt,Ptt,Mtt,NAe=w(()=>{m();M5="[_0-9a-z-*/]",wtt=`[a-z]${M5}{0,255}`,Ott=`[a-z0-9]${M5}{0,240}@[a-z]${M5}{0,13}`,ktt=new RegExp(`^(?:${wtt}|${Ott})$`),Ptt=/^[ -~]{0,255}[!-~]$/,Mtt=/,|=/});var BAe,Ltt,wAe,OAe,KL,kAe=w(()=>{m();NAe();BAe=32,Ltt=512,wAe=",",OAe="=",KL=class e{constructor(t){this._internalState=new Map,t&&this._parse(t)}set(t,n){let r=this._clone();return r._internalState.has(t)&&r._internalState.delete(t),r._internalState.set(t,n),r}unset(t){let n=this._clone();return n._internalState.delete(t),n}get(t){return this._internalState.get(t)}serialize(){return Array.from(this._internalState.keys()).reduceRight((t,n)=>(t.push(n+OAe+this.get(n)),t),[]).join(wAe)}_parse(t){t.length>Ltt||(this._internalState=t.split(wAe).reduceRight((n,r)=>{let o=r.trim(),i=o.indexOf(OAe);if(i!==-1){let s=o.slice(0,i),u=o.slice(i+1,r.length);xAe(s)&&DAe(u)&&n.set(s,u)}return n},new Map),this._internalState.size>BAe&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,BAe))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}}});function PAe(e){return new KL(e)}var MAe=w(()=>{m();kAe()});var Xe,LAe=w(()=>{m();sB();Xe=vm.getInstance()});var Ul,UAe=w(()=>{m();iS();Ul=Zs.instance()});var L5,QAe,FAe=w(()=>{m();I5();L5=class{getMeter(t,n,r){return b5}},QAe=new L5});var U5,JL,GAe=w(()=>{m();FAe();oS();iS();U5="metrics",JL=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalMeterProvider(t){return Im(U5,t,Zs.instance())}getMeterProvider(){return Ml(U5)||QAe}getMeter(t,n,r){return this.getMeterProvider().getMeter(t,n,r)}disable(){Cm(U5,Zs.instance())}}});var Q5,jAe=w(()=>{m();GAe();Q5=JL.getInstance()});var ZL,zAe=w(()=>{m();ZL=class{inject(t,n){}extract(t,n){return t}fields(){return[]}}});function G5(e){return e.getValue(F5)||void 0}function HAe(){return G5(vm.getInstance().active())}function $Ae(e,t){return e.setValue(F5,t)}function qAe(e){return e.deleteValue(F5)}var F5,VAe=w(()=>{m();sB();oB();F5=Ll("OpenTelemetry Baggage Key")});var j5,Utt,WL,YAe=w(()=>{m();oS();zAe();C5();VAe();d5();iS();j5="propagation",Utt=new ZL,WL=class e{constructor(){this.createBaggage=fAe,this.getBaggage=G5,this.getActiveBaggage=HAe,this.setBaggage=$Ae,this.deleteBaggage=qAe}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalPropagator(t){return Im(j5,t,Zs.instance())}inject(t,n,r=UL){return this._getGlobalPropagator().inject(t,n,r)}extract(t,n,r=LL){return this._getGlobalPropagator().extract(t,n,r)}fields(){return this._getGlobalPropagator().fields()}disable(){Cm(j5,Zs.instance())}_getGlobalPropagator(){return Ml(j5)||Utt}}});var lf,KAe=w(()=>{m();YAe();lf=WL.getInstance()});var z5,XL,JAe=w(()=>{m();oS();P5();qL();D5();iS();z5="trace",XL=class e{constructor(){this._proxyTracerProvider=new aS,this.wrapSpanContext=bAe,this.isSpanContextValid=Ig,this.deleteSpan=yAe,this.getSpan=zL,this.getActiveSpan=EAe,this.getSpanContext=HL,this.setSpan=uB,this.setSpanContext=SAe}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalTracerProvider(t){let n=Im(z5,this._proxyTracerProvider,Zs.instance());return n&&this._proxyTracerProvider.setDelegate(t),n}getTracerProvider(){return Ml(z5)||this._proxyTracerProvider}getTracer(t,n){return this.getTracerProvider().getTracer(t,n)}disable(){Cm(z5,Zs.instance()),this._proxyTracerProvider=new aS}}});var qt,ZAe=w(()=>{m();JAe();qt=XL.getInstance()});var nt={};Js(nt,{DiagConsoleLogger:()=>PL,DiagLogLevel:()=>Is,INVALID_SPANID:()=>aB,INVALID_SPAN_CONTEXT:()=>FL,INVALID_TRACEID:()=>sS,ProxyTracer:()=>wC,ProxyTracerProvider:()=>aS,ROOT_CONTEXT:()=>DC,SamplingDecision:()=>YL,SpanKind:()=>po,SpanStatusCode:()=>Ai,TraceFlags:()=>ou,ValueType:()=>ML,baggageEntryMetadataFromString:()=>mAe,context:()=>Xe,createContextKey:()=>Ll,createNoopMeter:()=>gAe,createTraceState:()=>PAe,default:()=>Qtt,defaultTextMapGetter:()=>LL,defaultTextMapSetter:()=>UL,diag:()=>Ul,isSpanContextValid:()=>Ig,isValidSpanId:()=>B5,isValidTraceId:()=>N5,metrics:()=>Q5,propagation:()=>lf,trace:()=>qt});var Qtt,ze=w(()=>{m();d5();oB();AAe();OL();I5();hAe();C5();k5();P5();CAe();vAe();RAe();R5();MAe();qL();GL();LAe();UAe();jAe();KAe();ZAe();Qtt={context:Xe,diag:Ul,metrics:Q5,propagation:lf,trace:qt}});var cB=P(C_=>{"use strict";m();Object.defineProperty(C_,"__esModule",{value:!0});C_.isTracingSuppressed=C_.unsuppressTracing=C_.suppressTracing=void 0;var Ftt=(ze(),Le(nt)),H5=(0,Ftt.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Gtt(e){return e.setValue(H5,!0)}C_.suppressTracing=Gtt;function jtt(e){return e.deleteValue(H5)}C_.unsuppressTracing=jtt;function ztt(e){return e.getValue(H5)===!0}C_.isTracingSuppressed=ztt});var $5=P(iu=>{"use strict";m();Object.defineProperty(iu,"__esModule",{value:!0});iu.BAGGAGE_MAX_TOTAL_LENGTH=iu.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=iu.BAGGAGE_MAX_NAME_VALUE_PAIRS=iu.BAGGAGE_HEADER=iu.BAGGAGE_ITEMS_SEPARATOR=iu.BAGGAGE_PROPERTIES_SEPARATOR=iu.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;iu.BAGGAGE_KEY_PAIR_SEPARATOR="=";iu.BAGGAGE_PROPERTIES_SEPARATOR=";";iu.BAGGAGE_ITEMS_SEPARATOR=",";iu.BAGGAGE_HEADER="baggage";iu.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;iu.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;iu.BAGGAGE_MAX_TOTAL_LENGTH=8192});var V5=P(jd=>{"use strict";m();Object.defineProperty(jd,"__esModule",{value:!0});jd.parseKeyPairsIntoRecord=jd.parseBaggageHeaderString=jd.parsePairKeyValue=jd.getKeyPairs=jd.serializeKeyPairs=void 0;var Htt=(ze(),Le(nt)),xm=$5();function $tt(e){return e.reduce((t,n)=>{let r=`${t}${t!==""?xm.BAGGAGE_ITEMS_SEPARATOR:""}${n}`;return r.length>xm.BAGGAGE_MAX_TOTAL_LENGTH?t:r},"")}jd.serializeKeyPairs=$tt;function qtt(e){return e.getAllEntries().map(([t,n])=>{let r=`${encodeURIComponent(t)}=${encodeURIComponent(n.value)}`;return n.metadata!==void 0&&(r+=xm.BAGGAGE_PROPERTIES_SEPARATOR+n.metadata.toString()),r})}jd.getKeyPairs=qtt;function q5(e){if(!e)return;let t=e.indexOf(xm.BAGGAGE_PROPERTIES_SEPARATOR),n=t===-1?e:e.substring(0,t),r=n.indexOf(xm.BAGGAGE_KEY_PAIR_SEPARATOR);if(r<=0)return;let o=n.substring(0,r).trim(),i=n.substring(r+1).trim();if(!o||!i)return;let s,u;try{s=decodeURIComponent(o),u=decodeURIComponent(i)}catch{return}let l;if(t!==-1&&t<e.length-1){let p=e.substring(t+1);l=(0,Htt.baggageEntryMetadataFromString)(p)}return{key:s,value:u,metadata:l}}jd.parsePairKeyValue=q5;function Vtt(e,t,n,r){let o=0;for(;o<e.length&&n<xm.BAGGAGE_MAX_NAME_VALUE_PAIRS;){let i=e.indexOf(xm.BAGGAGE_ITEMS_SEPARATOR,o),s=i===-1?e.length:i,u=s-o;if(u<=xm.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS){let l=q5(e.substring(o,s));if(l){let p=(n===0?0:1)+u;if(r+p>xm.BAGGAGE_MAX_TOTAL_LENGTH)break;t[l.key]=l.metadata?{value:l.value,metadata:l.metadata}:{value:l.value},n++,r+=p}}if(i===-1)break;o=i+1}return[n,r]}jd.parseBaggageHeaderString=Vtt;function Ytt(e){let t={};return typeof e=="string"&&e.length>0&&e.split(xm.BAGGAGE_ITEMS_SEPARATOR).forEach(n=>{let r=q5(n);r!==void 0&&r.value.length>0&&(t[r.key]=r.value)}),t}jd.parseKeyPairsIntoRecord=Ytt});var WAe=P(tU=>{"use strict";m();Object.defineProperty(tU,"__esModule",{value:!0});tU.W3CBaggagePropagator=void 0;var Y5=(ze(),Le(nt)),Ktt=cB(),lB=$5(),eU=V5(),K5=class{inject(t,n,r){let o=Y5.propagation.getBaggage(t);if(!o||(0,Ktt.isTracingSuppressed)(t))return;let i=(0,eU.getKeyPairs)(o).filter(u=>u.length<=lB.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,lB.BAGGAGE_MAX_NAME_VALUE_PAIRS),s=(0,eU.serializeKeyPairs)(i);s.length>0&&r.set(n,lB.BAGGAGE_HEADER,s)}extract(t,n,r){let o=r.get(n,lB.BAGGAGE_HEADER);if(!o)return t;let i={},s=0,u=0;if(Array.isArray(o))for(let l=0;l<o.length;l++)[s,u]=(0,eU.parseBaggageHeaderString)(o[l],i,s,u);else[s]=(0,eU.parseBaggageHeaderString)(o,i,s,u);return s===0?t:Y5.propagation.setBaggage(t,Y5.propagation.createBaggage(i))}fields(){return[lB.BAGGAGE_HEADER]}};tU.W3CBaggagePropagator=K5});var XAe=P(nU=>{"use strict";m();Object.defineProperty(nU,"__esModule",{value:!0});nU.AnchoredClock=void 0;var J5=class{_monotonicClock;_epochMillis;_performanceMillis;constructor(t,n){this._monotonicClock=n,this._epochMillis=t.now(),this._performanceMillis=n.now()}now(){let t=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+t}};nU.AnchoredClock=J5});var oge=P(v_=>{"use strict";m();Object.defineProperty(v_,"__esModule",{value:!0});v_.isAttributeValue=v_.isAttributeKey=v_.sanitizeAttributes=void 0;var ege=(ze(),Le(nt));function Jtt(e){let t={};if(typeof e!="object"||e==null)return t;for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;if(!tge(n)){ege.diag.warn(`Invalid attribute key: ${n}`);continue}let r=e[n];if(!nge(r)){ege.diag.warn(`Invalid attribute value set for key: ${n}`);continue}Array.isArray(r)?t[n]=r.slice():t[n]=r}return t}v_.sanitizeAttributes=Jtt;function tge(e){return typeof e=="string"&&e!==""}v_.isAttributeKey=tge;function nge(e){return e==null?!0:Array.isArray(e)?Ztt(e):rge(typeof e)}v_.isAttributeValue=nge;function Ztt(e){let t;for(let n of e){if(n==null)continue;let r=typeof n;if(r!==t){if(!t){if(rge(r)){t=r;continue}return!1}return!1}}return!0}function rge(e){switch(e){case"number":case"boolean":case"string":return!0}return!1}});var Z5=P(rU=>{"use strict";m();Object.defineProperty(rU,"__esModule",{value:!0});rU.loggingErrorHandler=void 0;var Wtt=(ze(),Le(nt));function Xtt(){return e=>{Wtt.diag.error(ent(e))}}rU.loggingErrorHandler=Xtt;function ent(e){return typeof e=="string"?e:JSON.stringify(tnt(e))}function tnt(e){let t={},n=e;for(;n!==null;)Object.getOwnPropertyNames(n).forEach(r=>{if(t[r])return;let o=n[r];o&&(t[r]=String(o))}),n=Object.getPrototypeOf(n);return t}});var sge=P(OC=>{"use strict";m();Object.defineProperty(OC,"__esModule",{value:!0});OC.globalErrorHandler=OC.setGlobalErrorHandler=void 0;var nnt=Z5(),ige=(0,nnt.loggingErrorHandler)();function rnt(e){ige=e}OC.setGlobalErrorHandler=rnt;function ont(e){try{ige(e)}catch{}}OC.globalErrorHandler=ont});var lge=P(Dm=>{"use strict";m();Object.defineProperty(Dm,"__esModule",{value:!0});Dm.getStringListFromEnv=Dm.getBooleanFromEnv=Dm.getStringFromEnv=Dm.getNumberFromEnv=void 0;var age=(ze(),Le(nt)),uge=Qe("util");function int(e){let t=process.env[e];if(t==null||t.trim()==="")return;let n=Number(t);if(isNaN(n)){age.diag.warn(`Unknown value ${(0,uge.inspect)(t)} for ${e}, expected a number, using defaults`);return}return n}Dm.getNumberFromEnv=int;function cge(e){let t=process.env[e];if(!(t==null||t.trim()===""))return t}Dm.getStringFromEnv=cge;function snt(e){let t=process.env[e]?.trim().toLowerCase();return t==null||t===""?!1:t==="true"?!0:(t==="false"||age.diag.warn(`Unknown value ${(0,uge.inspect)(t)} for ${e}, expected 'true' or 'false', falling back to 'false' (default)`),!1)}Dm.getBooleanFromEnv=snt;function ant(e){return cge(e)?.split(",").map(t=>t.trim()).filter(t=>t!=="")}Dm.getStringListFromEnv=ant});var dge=P(oU=>{"use strict";m();Object.defineProperty(oU,"__esModule",{value:!0});oU._globalThis=void 0;oU._globalThis=globalThis});var pge=P(iU=>{"use strict";m();Object.defineProperty(iU,"__esModule",{value:!0});iU.VERSION=void 0;iU.VERSION="2.8.0"});function Oi(e){let t={},n=e.length;for(let r=0;r<n;r++){let o=e[r];o&&(t[String(o).toUpperCase().replace(/[-.]/g,"_")]=o)}return t}var W5=w(()=>{m()});var fge,mge,Age,gge,hge,_ge,Ege,yge,Sge,Tge,bge,Ige,Cge,vge,Rge,xge,Dge,Nge,Bge,wge,Oge,kge,Pge,Mge,Lge,Uge,Qge,Fge,Gge,jge,zge,Hge,$ge,qge,Vge,Yge,Kge,Jge,Zge,Wge,Xge,ehe,the,nhe,rhe,ohe,ihe,she,ahe,uhe,che,lhe,dhe,phe,fhe,mhe,Ahe,ghe,hhe,_he,Ehe,yhe,She,The,bhe,Ihe,Che,vhe,Rhe,xhe,Dhe,Nhe,Bhe,whe,Ohe,khe,Phe,Mhe,Lhe,Uhe,Qhe,Fhe,Ghe,jhe,zhe,Hhe,$he,qhe,Vhe,Yhe,Khe,Jhe,Zhe,Whe,Xhe,e_e,t_e,n_e,r_e,o_e,i_e,s_e,a_e,u_e,c_e,l_e,d_e,p_e,f_e,m_e,A_e,g_e,h_e,__e,E_e,y_e,S_e,T_e,b_e,I_e,C_e,v_e,R_e,x_e,D_e,N_e,B_e,w_e,unt,X5,cnt,lnt,dnt,pnt,eV,fnt,mnt,Ant,gnt,hnt,_nt,Ent,ynt,Snt,Tnt,bnt,Int,Cnt,vnt,Rnt,xnt,Dnt,Nnt,tV,Bnt,wnt,Ont,knt,Pnt,Mnt,Lnt,Unt,Qnt,Fnt,Gnt,jnt,nV,znt,Hnt,rV,oV,$nt,qnt,Vnt,Ynt,Knt,Jnt,Znt,Wnt,Xnt,ert,trt,nrt,rrt,ort,irt,srt,art,dB,kC,iV,urt,crt,uS,lrt,drt,prt,frt,sV,aV,mrt,uV,Art,grt,hrt,_rt,Ert,yrt,Srt,Trt,brt,Irt,Crt,vrt,Rrt,xrt,Drt,Nrt,Brt,wrt,Ort,krt,Prt,Mrt,Lrt,cV,Urt,Qrt,Frt,Grt,jrt,zrt,Hrt,$rt,qrt,Vrt,Yrt,Krt,Jrt,Zrt,Wrt,Xrt,eot,tot,not,lV,rot,dV,oot,iot,sot,aot,uot,cot,lot,dot,pot,O_e,k_e,P_e,M_e,L_e,U_e,Q_e,F_e,G_e,j_e,z_e,H_e,$_e,q_e,V_e,Y_e,K_e,J_e,Z_e,W_e,X_e,eEe,tEe,nEe,rEe,oEe,iEe,sEe,aEe,uEe,cEe,lEe,dEe,pEe,fEe,mEe,AEe,gEe,hEe,_Ee,EEe,yEe,SEe,TEe,bEe,IEe,CEe,fot,mot,Aot,got,hot,_ot,Eot,yot,Sot,Tot,bot,Iot,Cot,vot,Rot,xot,Dot,Not,Bot,wot,Oot,kot,Pot,Mot,Lot,Uot,Qot,Fot,Got,jot,zot,Hot,$ot,qot,Vot,Yot,Kot,Jot,Zot,Wot,Xot,eit,tit,nit,rit,oit,iit,sit,vEe,REe,xEe,DEe,NEe,BEe,wEe,OEe,kEe,PEe,MEe,ait,uit,cit,lit,dit,pit,fit,mit,Ait,git,hit,_it,LEe,UEe,QEe,FEe,GEe,Eit,yit,Sit,Tit,bit,Iit,jEe,zEe,HEe,Cit,vit,Rit,xit,$Ee,qEe,VEe,YEe,Dit,Nit,Bit,wit,Oit,KEe,JEe,ZEe,WEe,XEe,e0e,t0e,kit,Pit,Mit,Lit,Uit,Qit,Fit,Git,n0e,r0e,o0e,i0e,s0e,jit,zit,Hit,$it,qit,Vit,a0e,u0e,c0e,l0e,d0e,p0e,f0e,m0e,A0e,g0e,h0e,_0e,E0e,y0e,S0e,T0e,b0e,I0e,C0e,v0e,R0e,Yit,Kit,Jit,Zit,Wit,Xit,est,tst,nst,rst,ost,ist,sst,ast,ust,cst,lst,dst,pst,fst,mst,Ast,x0e,D0e,N0e,B0e,w0e,gst,hst,_st,Est,yst,Sst,O0e,k0e,Tst,bst,Ist,P0e,M0e,Cst,vst,Rst,L0e,U0e,Q0e,F0e,G0e,j0e,z0e,H0e,$0e,q0e,V0e,Y0e,K0e,J0e,Z0e,W0e,X0e,xst,Dst,Nst,Bst,wst,Ost,kst,Pst,Mst,Lst,Ust,Qst,Fst,Gst,jst,zst,Hst,$st,eye,tye,qst,Vst,Yst,nye=w(()=>{m();W5();fge="aws.lambda.invoked_arn",mge="db.system",Age="db.connection_string",gge="db.user",hge="db.jdbc.driver_classname",_ge="db.name",Ege="db.statement",yge="db.operation",Sge="db.mssql.instance_name",Tge="db.cassandra.keyspace",bge="db.cassandra.page_size",Ige="db.cassandra.consistency_level",Cge="db.cassandra.table",vge="db.cassandra.idempotence",Rge="db.cassandra.speculative_execution_count",xge="db.cassandra.coordinator.id",Dge="db.cassandra.coordinator.dc",Nge="db.hbase.namespace",Bge="db.redis.database_index",wge="db.mongodb.collection",Oge="db.sql.table",kge="exception.type",Pge="exception.message",Mge="exception.stacktrace",Lge="exception.escaped",Uge="faas.trigger",Qge="faas.execution",Fge="faas.document.collection",Gge="faas.document.operation",jge="faas.document.time",zge="faas.document.name",Hge="faas.time",$ge="faas.cron",qge="faas.coldstart",Vge="faas.invoked_name",Yge="faas.invoked_provider",Kge="faas.invoked_region",Jge="net.transport",Zge="net.peer.ip",Wge="net.peer.port",Xge="net.peer.name",ehe="net.host.ip",the="net.host.port",nhe="net.host.name",rhe="net.host.connection.type",ohe="net.host.connection.subtype",ihe="net.host.carrier.name",she="net.host.carrier.mcc",ahe="net.host.carrier.mnc",uhe="net.host.carrier.icc",che="peer.service",lhe="enduser.id",dhe="enduser.role",phe="enduser.scope",fhe="thread.id",mhe="thread.name",Ahe="code.function",ghe="code.namespace",hhe="code.filepath",_he="code.lineno",Ehe="http.method",yhe="http.url",She="http.target",The="http.host",bhe="http.scheme",Ihe="http.status_code",Che="http.flavor",vhe="http.user_agent",Rhe="http.request_content_length",xhe="http.request_content_length_uncompressed",Dhe="http.response_content_length",Nhe="http.response_content_length_uncompressed",Bhe="http.server_name",whe="http.route",Ohe="http.client_ip",khe="aws.dynamodb.table_names",Phe="aws.dynamodb.consumed_capacity",Mhe="aws.dynamodb.item_collection_metrics",Lhe="aws.dynamodb.provisioned_read_capacity",Uhe="aws.dynamodb.provisioned_write_capacity",Qhe="aws.dynamodb.consistent_read",Fhe="aws.dynamodb.projection",Ghe="aws.dynamodb.limit",jhe="aws.dynamodb.attributes_to_get",zhe="aws.dynamodb.index_name",Hhe="aws.dynamodb.select",$he="aws.dynamodb.global_secondary_indexes",qhe="aws.dynamodb.local_secondary_indexes",Vhe="aws.dynamodb.exclusive_start_table",Yhe="aws.dynamodb.table_count",Khe="aws.dynamodb.scan_forward",Jhe="aws.dynamodb.segment",Zhe="aws.dynamodb.total_segments",Whe="aws.dynamodb.count",Xhe="aws.dynamodb.scanned_count",e_e="aws.dynamodb.attribute_definitions",t_e="aws.dynamodb.global_secondary_index_updates",n_e="messaging.system",r_e="messaging.destination",o_e="messaging.destination_kind",i_e="messaging.temp_destination",s_e="messaging.protocol",a_e="messaging.protocol_version",u_e="messaging.url",c_e="messaging.message_id",l_e="messaging.conversation_id",d_e="messaging.message_payload_size_bytes",p_e="messaging.message_payload_compressed_size_bytes",f_e="messaging.operation",m_e="messaging.consumer_id",A_e="messaging.rabbitmq.routing_key",g_e="messaging.kafka.message_key",h_e="messaging.kafka.consumer_group",__e="messaging.kafka.client_id",E_e="messaging.kafka.partition",y_e="messaging.kafka.tombstone",S_e="rpc.system",T_e="rpc.service",b_e="rpc.method",I_e="rpc.grpc.status_code",C_e="rpc.jsonrpc.version",v_e="rpc.jsonrpc.request_id",R_e="rpc.jsonrpc.error_code",x_e="rpc.jsonrpc.error_message",D_e="message.type",N_e="message.id",B_e="message.compressed_size",w_e="message.uncompressed_size",unt=fge,X5=mge,cnt=Age,lnt=gge,dnt=hge,pnt=_ge,eV=Ege,fnt=yge,mnt=Sge,Ant=Tge,gnt=bge,hnt=Ige,_nt=Cge,Ent=vge,ynt=Rge,Snt=xge,Tnt=Dge,bnt=Nge,Int=Bge,Cnt=wge,vnt=Oge,Rnt=kge,xnt=Pge,Dnt=Mge,Nnt=Lge,tV=Uge,Bnt=Qge,wnt=Fge,Ont=Gge,knt=jge,Pnt=zge,Mnt=Hge,Lnt=$ge,Unt=qge,Qnt=Vge,Fnt=Yge,Gnt=Kge,jnt=Jge,nV=Zge,znt=Wge,Hnt=Xge,rV=ehe,oV=the,$nt=nhe,qnt=rhe,Vnt=ohe,Ynt=ihe,Knt=she,Jnt=ahe,Znt=uhe,Wnt=che,Xnt=lhe,ert=dhe,trt=phe,nrt=fhe,rrt=mhe,ort=Ahe,irt=ghe,srt=hhe,art=_he,dB=Ehe,kC=yhe,iV=She,urt=The,crt=bhe,uS=Ihe,lrt=Che,drt=vhe,prt=Rhe,frt=xhe,sV=Dhe,aV=Nhe,mrt=Bhe,uV=whe,Art=Ohe,grt=khe,hrt=Phe,_rt=Mhe,Ert=Lhe,yrt=Uhe,Srt=Qhe,Trt=Fhe,brt=Ghe,Irt=jhe,Crt=zhe,vrt=Hhe,Rrt=$he,xrt=qhe,Drt=Vhe,Nrt=Yhe,Brt=Khe,wrt=Jhe,Ort=Zhe,krt=Whe,Prt=Xhe,Mrt=e_e,Lrt=t_e,cV=n_e,Urt=r_e,Qrt=o_e,Frt=i_e,Grt=s_e,jrt=a_e,zrt=u_e,Hrt=c_e,$rt=l_e,qrt=d_e,Vrt=p_e,Yrt=f_e,Krt=m_e,Jrt=A_e,Zrt=g_e,Wrt=h_e,Xrt=__e,eot=E_e,tot=y_e,not=S_e,lV=T_e,rot=b_e,dV=I_e,oot=C_e,iot=v_e,sot=R_e,aot=x_e,uot=D_e,cot=N_e,lot=B_e,dot=w_e,pot=Oi([fge,mge,Age,gge,hge,_ge,Ege,yge,Sge,Tge,bge,Ige,Cge,vge,Rge,xge,Dge,Nge,Bge,wge,Oge,kge,Pge,Mge,Lge,Uge,Qge,Fge,Gge,jge,zge,Hge,$ge,qge,Vge,Yge,Kge,Jge,Zge,Wge,Xge,ehe,the,nhe,rhe,ohe,ihe,she,ahe,uhe,che,lhe,dhe,phe,fhe,mhe,Ahe,ghe,hhe,_he,Ehe,yhe,She,The,bhe,Ihe,Che,vhe,Rhe,xhe,Dhe,Nhe,Bhe,whe,Ohe,khe,Phe,Mhe,Lhe,Uhe,Qhe,Fhe,Ghe,jhe,zhe,Hhe,$he,qhe,Vhe,Yhe,Khe,Jhe,Zhe,Whe,Xhe,e_e,t_e,n_e,r_e,o_e,i_e,s_e,a_e,u_e,c_e,l_e,d_e,p_e,f_e,m_e,A_e,g_e,h_e,__e,E_e,y_e,S_e,T_e,b_e,I_e,C_e,v_e,R_e,x_e,D_e,N_e,B_e,w_e]),O_e="other_sql",k_e="mssql",P_e="mysql",M_e="oracle",L_e="db2",U_e="postgresql",Q_e="redshift",F_e="hive",G_e="cloudscape",j_e="hsqldb",z_e="progress",H_e="maxdb",$_e="hanadb",q_e="ingres",V_e="firstsql",Y_e="edb",K_e="cache",J_e="adabas",Z_e="firebird",W_e="derby",X_e="filemaker",eEe="informix",tEe="instantdb",nEe="interbase",rEe="mariadb",oEe="netezza",iEe="pervasive",sEe="pointbase",aEe="sqlite",uEe="sybase",cEe="teradata",lEe="vertica",dEe="h2",pEe="coldfusion",fEe="cassandra",mEe="hbase",AEe="mongodb",gEe="redis",hEe="couchbase",_Ee="couchdb",EEe="cosmosdb",yEe="dynamodb",SEe="neo4j",TEe="geode",bEe="elasticsearch",IEe="memcached",CEe="cockroachdb",fot=O_e,mot=k_e,Aot=P_e,got=M_e,hot=L_e,_ot=U_e,Eot=Q_e,yot=F_e,Sot=G_e,Tot=j_e,bot=z_e,Iot=H_e,Cot=$_e,vot=q_e,Rot=V_e,xot=Y_e,Dot=K_e,Not=J_e,Bot=Z_e,wot=W_e,Oot=X_e,kot=eEe,Pot=tEe,Mot=nEe,Lot=rEe,Uot=oEe,Qot=iEe,Fot=sEe,Got=aEe,jot=uEe,zot=cEe,Hot=lEe,$ot=dEe,qot=pEe,Vot=fEe,Yot=mEe,Kot=AEe,Jot=gEe,Zot=hEe,Wot=_Ee,Xot=EEe,eit=yEe,tit=SEe,nit=TEe,rit=bEe,oit=IEe,iit=CEe,sit=Oi([O_e,k_e,P_e,M_e,L_e,U_e,Q_e,F_e,G_e,j_e,z_e,H_e,$_e,q_e,V_e,Y_e,K_e,J_e,Z_e,W_e,X_e,eEe,tEe,nEe,rEe,oEe,iEe,sEe,aEe,uEe,cEe,lEe,dEe,pEe,fEe,mEe,AEe,gEe,hEe,_Ee,EEe,yEe,SEe,TEe,bEe,IEe,CEe]),vEe="all",REe="each_quorum",xEe="quorum",DEe="local_quorum",NEe="one",BEe="two",wEe="three",OEe="local_one",kEe="any",PEe="serial",MEe="local_serial",ait=vEe,uit=REe,cit=xEe,lit=DEe,dit=NEe,pit=BEe,fit=wEe,mit=OEe,Ait=kEe,git=PEe,hit=MEe,_it=Oi([vEe,REe,xEe,DEe,NEe,BEe,wEe,OEe,kEe,PEe,MEe]),LEe="datasource",UEe="http",QEe="pubsub",FEe="timer",GEe="other",Eit=LEe,yit=UEe,Sit=QEe,Tit=FEe,bit=GEe,Iit=Oi([LEe,UEe,QEe,FEe,GEe]),jEe="insert",zEe="edit",HEe="delete",Cit=jEe,vit=zEe,Rit=HEe,xit=Oi([jEe,zEe,HEe]),$Ee="alibaba_cloud",qEe="aws",VEe="azure",YEe="gcp",Dit=$Ee,Nit=qEe,Bit=VEe,wit=YEe,Oit=Oi([$Ee,qEe,VEe,YEe]),KEe="ip_tcp",JEe="ip_udp",ZEe="ip",WEe="unix",XEe="pipe",e0e="inproc",t0e="other",kit=KEe,Pit=JEe,Mit=ZEe,Lit=WEe,Uit=XEe,Qit=e0e,Fit=t0e,Git=Oi([KEe,JEe,ZEe,WEe,XEe,e0e,t0e]),n0e="wifi",r0e="wired",o0e="cell",i0e="unavailable",s0e="unknown",jit=n0e,zit=r0e,Hit=o0e,$it=i0e,qit=s0e,Vit=Oi([n0e,r0e,o0e,i0e,s0e]),a0e="gprs",u0e="edge",c0e="umts",l0e="cdma",d0e="evdo_0",p0e="evdo_a",f0e="cdma2000_1xrtt",m0e="hsdpa",A0e="hsupa",g0e="hspa",h0e="iden",_0e="evdo_b",E0e="lte",y0e="ehrpd",S0e="hspap",T0e="gsm",b0e="td_scdma",I0e="iwlan",C0e="nr",v0e="nrnsa",R0e="lte_ca",Yit=a0e,Kit=u0e,Jit=c0e,Zit=l0e,Wit=d0e,Xit=p0e,est=f0e,tst=m0e,nst=A0e,rst=g0e,ost=h0e,ist=_0e,sst=E0e,ast=y0e,ust=S0e,cst=T0e,lst=b0e,dst=I0e,pst=C0e,fst=v0e,mst=R0e,Ast=Oi([a0e,u0e,c0e,l0e,d0e,p0e,f0e,m0e,A0e,g0e,h0e,_0e,E0e,y0e,S0e,T0e,b0e,I0e,C0e,v0e,R0e]),x0e="1.0",D0e="1.1",N0e="2.0",B0e="SPDY",w0e="QUIC",gst=x0e,hst=D0e,_st=N0e,Est=B0e,yst=w0e,Sst={HTTP_1_0:x0e,HTTP_1_1:D0e,HTTP_2_0:N0e,SPDY:B0e,QUIC:w0e},O0e="queue",k0e="topic",Tst=O0e,bst=k0e,Ist=Oi([O0e,k0e]),P0e="receive",M0e="process",Cst=P0e,vst=M0e,Rst=Oi([P0e,M0e]),L0e=0,U0e=1,Q0e=2,F0e=3,G0e=4,j0e=5,z0e=6,H0e=7,$0e=8,q0e=9,V0e=10,Y0e=11,K0e=12,J0e=13,Z0e=14,W0e=15,X0e=16,xst=L0e,Dst=U0e,Nst=Q0e,Bst=F0e,wst=G0e,Ost=j0e,kst=z0e,Pst=H0e,Mst=$0e,Lst=q0e,Ust=V0e,Qst=Y0e,Fst=K0e,Gst=J0e,jst=Z0e,zst=W0e,Hst=X0e,$st={OK:L0e,CANCELLED:U0e,UNKNOWN:Q0e,INVALID_ARGUMENT:F0e,DEADLINE_EXCEEDED:G0e,NOT_FOUND:j0e,ALREADY_EXISTS:z0e,PERMISSION_DENIED:H0e,RESOURCE_EXHAUSTED:$0e,FAILED_PRECONDITION:q0e,ABORTED:V0e,OUT_OF_RANGE:Y0e,UNIMPLEMENTED:K0e,INTERNAL:J0e,UNAVAILABLE:Z0e,DATA_LOSS:W0e,UNAUTHENTICATED:X0e},eye="SENT",tye="RECEIVED",qst=eye,Vst=tye,Yst=Oi([eye,tye])});var rye=w(()=>{m();nye()});var oye,iye,sye,aye,uye,cye,lye,dye,pye,fye,mye,Aye,gye,hye,_ye,Eye,yye,Sye,Tye,bye,Iye,Cye,vye,Rye,xye,Dye,Nye,Bye,wye,Oye,kye,Pye,Mye,Lye,Uye,Qye,Fye,Gye,jye,zye,Hye,$ye,qye,Vye,Yye,Kye,Jye,Zye,Wye,Xye,eSe,tSe,nSe,rSe,oSe,iSe,sSe,aSe,uSe,cSe,lSe,dSe,pSe,fSe,mSe,ASe,gSe,hSe,_Se,ESe,ySe,SSe,TSe,bSe,ISe,CSe,vSe,RSe,xSe,DSe,NSe,Kst,Jst,Zst,Wst,Xst,eat,tat,nat,rat,oat,iat,sat,aat,uat,cat,lat,dat,pat,fat,mat,Aat,gat,hat,_at,Eat,yat,Sat,Tat,bat,Iat,Cat,vat,Rat,xat,Dat,Nat,Bat,wat,Oat,kat,Pat,Mat,Lat,Uat,Qat,Fat,Gat,jat,zat,Hat,$at,qat,Vat,Yat,Kat,Jat,Zat,Wat,Xat,eut,tut,nut,rut,out,iut,sut,aut,uut,cut,lut,dut,pV,put,fut,mut,Aut,gut,hut,_ut,Eut,yut,Sut,BSe,wSe,OSe,kSe,Tut,but,Iut,Cut,vut,PSe,MSe,LSe,USe,QSe,FSe,GSe,jSe,zSe,HSe,$Se,qSe,VSe,YSe,KSe,JSe,ZSe,Rut,xut,Dut,Nut,But,wut,Out,kut,Put,Mut,Lut,Uut,Qut,Fut,Gut,jut,zut,Hut,WSe,XSe,$ut,qut,Vut,eTe,tTe,nTe,rTe,oTe,iTe,sTe,Yut,Kut,Jut,Zut,Wut,Xut,ect,tct,aTe,uTe,cTe,lTe,dTe,pTe,fTe,mTe,ATe,gTe,hTe,nct,rct,oct,ict,sct,act,uct,cct,lct,dct,pct,fct,_Te,ETe,yTe,STe,TTe,bTe,ITe,CTe,vTe,RTe,mct,Act,gct,hct,_ct,Ect,yct,Sct,Tct,bct,Ict,xTe=w(()=>{m();W5();oye="cloud.provider",iye="cloud.account.id",sye="cloud.region",aye="cloud.availability_zone",uye="cloud.platform",cye="aws.ecs.container.arn",lye="aws.ecs.cluster.arn",dye="aws.ecs.launchtype",pye="aws.ecs.task.arn",fye="aws.ecs.task.family",mye="aws.ecs.task.revision",Aye="aws.eks.cluster.arn",gye="aws.log.group.names",hye="aws.log.group.arns",_ye="aws.log.stream.names",Eye="aws.log.stream.arns",yye="container.name",Sye="container.id",Tye="container.runtime",bye="container.image.name",Iye="container.image.tag",Cye="deployment.environment",vye="device.id",Rye="device.model.identifier",xye="device.model.name",Dye="faas.name",Nye="faas.id",Bye="faas.version",wye="faas.instance",Oye="faas.max_memory",kye="host.id",Pye="host.name",Mye="host.type",Lye="host.arch",Uye="host.image.name",Qye="host.image.id",Fye="host.image.version",Gye="k8s.cluster.name",jye="k8s.node.name",zye="k8s.node.uid",Hye="k8s.namespace.name",$ye="k8s.pod.uid",qye="k8s.pod.name",Vye="k8s.container.name",Yye="k8s.replicaset.uid",Kye="k8s.replicaset.name",Jye="k8s.deployment.uid",Zye="k8s.deployment.name",Wye="k8s.statefulset.uid",Xye="k8s.statefulset.name",eSe="k8s.daemonset.uid",tSe="k8s.daemonset.name",nSe="k8s.job.uid",rSe="k8s.job.name",oSe="k8s.cronjob.uid",iSe="k8s.cronjob.name",sSe="os.type",aSe="os.description",uSe="os.name",cSe="os.version",lSe="process.pid",dSe="process.executable.name",pSe="process.executable.path",fSe="process.command",mSe="process.command_line",ASe="process.command_args",gSe="process.owner",hSe="process.runtime.name",_Se="process.runtime.version",ESe="process.runtime.description",ySe="service.name",SSe="service.namespace",TSe="service.instance.id",bSe="service.version",ISe="telemetry.sdk.name",CSe="telemetry.sdk.language",vSe="telemetry.sdk.version",RSe="telemetry.auto.version",xSe="webengine.name",DSe="webengine.version",NSe="webengine.description",Kst=oye,Jst=iye,Zst=sye,Wst=aye,Xst=uye,eat=cye,tat=lye,nat=dye,rat=pye,oat=fye,iat=mye,sat=Aye,aat=gye,uat=hye,cat=_ye,lat=Eye,dat=yye,pat=Sye,fat=Tye,mat=bye,Aat=Iye,gat=Cye,hat=vye,_at=Rye,Eat=xye,yat=Dye,Sat=Nye,Tat=Bye,bat=wye,Iat=Oye,Cat=kye,vat=Pye,Rat=Mye,xat=Lye,Dat=Uye,Nat=Qye,Bat=Fye,wat=Gye,Oat=jye,kat=zye,Pat=Hye,Mat=$ye,Lat=qye,Uat=Vye,Qat=Yye,Fat=Kye,Gat=Jye,jat=Zye,zat=Wye,Hat=Xye,$at=eSe,qat=tSe,Vat=nSe,Yat=rSe,Kat=oSe,Jat=iSe,Zat=sSe,Wat=aSe,Xat=uSe,eut=cSe,tut=lSe,nut=dSe,rut=pSe,out=fSe,iut=mSe,sut=ASe,aut=gSe,uut=hSe,cut=_Se,lut=ESe,dut=ySe,pV=SSe,put=TSe,fut=bSe,mut=ISe,Aut=CSe,gut=vSe,hut=RSe,_ut=xSe,Eut=DSe,yut=NSe,Sut=Oi([oye,iye,sye,aye,uye,cye,lye,dye,pye,fye,mye,Aye,gye,hye,_ye,Eye,yye,Sye,Tye,bye,Iye,Cye,vye,Rye,xye,Dye,Nye,Bye,wye,Oye,kye,Pye,Mye,Lye,Uye,Qye,Fye,Gye,jye,zye,Hye,$ye,qye,Vye,Yye,Kye,Jye,Zye,Wye,Xye,eSe,tSe,nSe,rSe,oSe,iSe,sSe,aSe,uSe,cSe,lSe,dSe,pSe,fSe,mSe,ASe,gSe,hSe,_Se,ESe,ySe,SSe,TSe,bSe,ISe,CSe,vSe,RSe,xSe,DSe,NSe]),BSe="alibaba_cloud",wSe="aws",OSe="azure",kSe="gcp",Tut=BSe,but=wSe,Iut=OSe,Cut=kSe,vut=Oi([BSe,wSe,OSe,kSe]),PSe="alibaba_cloud_ecs",MSe="alibaba_cloud_fc",LSe="aws_ec2",USe="aws_ecs",QSe="aws_eks",FSe="aws_lambda",GSe="aws_elastic_beanstalk",jSe="azure_vm",zSe="azure_container_instances",HSe="azure_aks",$Se="azure_functions",qSe="azure_app_service",VSe="gcp_compute_engine",YSe="gcp_cloud_run",KSe="gcp_kubernetes_engine",JSe="gcp_cloud_functions",ZSe="gcp_app_engine",Rut=PSe,xut=MSe,Dut=LSe,Nut=USe,But=QSe,wut=FSe,Out=GSe,kut=jSe,Put=zSe,Mut=HSe,Lut=$Se,Uut=qSe,Qut=VSe,Fut=YSe,Gut=KSe,jut=JSe,zut=ZSe,Hut=Oi([PSe,MSe,LSe,USe,QSe,FSe,GSe,jSe,zSe,HSe,$Se,qSe,VSe,YSe,KSe,JSe,ZSe]),WSe="ec2",XSe="fargate",$ut=WSe,qut=XSe,Vut=Oi([WSe,XSe]),eTe="amd64",tTe="arm32",nTe="arm64",rTe="ia64",oTe="ppc32",iTe="ppc64",sTe="x86",Yut=eTe,Kut=tTe,Jut=nTe,Zut=rTe,Wut=oTe,Xut=iTe,ect=sTe,tct=Oi([eTe,tTe,nTe,rTe,oTe,iTe,sTe]),aTe="windows",uTe="linux",cTe="darwin",lTe="freebsd",dTe="netbsd",pTe="openbsd",fTe="dragonflybsd",mTe="hpux",ATe="aix",gTe="solaris",hTe="z_os",nct=aTe,rct=uTe,oct=cTe,ict=lTe,sct=dTe,act=pTe,uct=fTe,cct=mTe,lct=ATe,dct=gTe,pct=hTe,fct=Oi([aTe,uTe,cTe,lTe,dTe,pTe,fTe,mTe,ATe,gTe,hTe]),_Te="cpp",ETe="dotnet",yTe="erlang",STe="go",TTe="java",bTe="nodejs",ITe="php",CTe="python",vTe="ruby",RTe="webjs",mct=_Te,Act=ETe,gct=yTe,hct=STe,_ct=TTe,Ect=bTe,yct=ITe,Sct=CTe,Tct=vTe,bct=RTe,Ict=Oi([_Te,ETe,yTe,STe,TTe,bTe,ITe,CTe,vTe,RTe])});var DTe=w(()=>{m();xTe()});var Cct,vct,Rct,xct,Dct,Nct,Bct,wct,Oct,kct,Pct,Mct,Lct,Uct,Qct,Fct,Gct,jct,zct,Hct,$ct,qct,Vct,Yct,Kct,fV,mV,Jct,PC,Zct,AV,gV,Wct,cS,Xct,elt,tlt,nlt,rlt,olt,ilt,slt,win,Oin,hV,alt,ult,clt,llt,dlt,plt,lS,flt,mlt,Alt,kin,glt,hlt,_lt,Elt,Pin,ylt,Slt,Tlt,blt,Cg,vg,Ilt,Clt,vlt,Rlt,xlt,Dlt,Nlt,Blt,wlt,Min,Olt,klt,Plt,Mlt,Llt,Ult,_V,EV,Qlt,yV,SV,Flt,Glt,Lin,Uin,jlt,zlt,Hlt,$lt,qlt,Vlt,Ylt,Klt,Qin,Jlt,TV,bV,Zlt,IV,Wlt,CV,Xlt,edt,tdt,ndt,rdt,odt,idt,sdt,adt,Fin,udt,cdt,Gin,ldt,ddt,jin,pdt,fdt,mdt,Adt,gdt,hdt,_dt,Edt,R_,ydt,Sdt,Tdt,vV,NTe=w(()=>{m();Cct="aspnetcore.diagnostics.exception.result",vct="aborted",Rct="handled",xct="skipped",Dct="unhandled",Nct="aspnetcore.diagnostics.handler.type",Bct="aspnetcore.rate_limiting.policy",wct="aspnetcore.rate_limiting.result",Oct="acquired",kct="endpoint_limiter",Pct="global_limiter",Mct="request_canceled",Lct="aspnetcore.request.is_unhandled",Uct="aspnetcore.routing.is_fallback",Qct="aspnetcore.routing.match_status",Fct="failure",Gct="success",jct="aspnetcore.user.is_authenticated",zct="client.address",Hct="client.port",$ct="code.column.number",qct="code.file.path",Vct="code.function.name",Yct="code.line.number",Kct="code.stacktrace",fV="db.collection.name",mV="db.namespace",Jct="db.operation.batch.size",PC="db.operation.name",Zct="db.query.summary",AV="db.query.text",gV="db.response.status_code",Wct="db.stored_procedure.name",cS="db.system.name",Xct="mariadb",elt="microsoft.sql_server",tlt="mysql",nlt="postgresql",rlt="dotnet.gc.heap.generation",olt="gen0",ilt="gen1",slt="gen2",win="loh",Oin="poh",hV="error.type",alt="_OTHER",ult="exception.escaped",clt="exception.message",llt="exception.stacktrace",dlt="exception.type",plt=e=>`http.request.header.${e}`,lS="http.request.method",flt="_OTHER",mlt="CONNECT",Alt="DELETE",kin="GET",glt="HEAD",hlt="OPTIONS",_lt="PATCH",Elt="POST",Pin="PUT",ylt="TRACE",Slt="http.request.method_original",Tlt="http.request.resend_count",blt=e=>`http.response.header.${e}`,Cg="http.response.status_code",vg="http.route",Ilt="jvm.gc.action",Clt="jvm.gc.name",vlt="jvm.memory.pool.name",Rlt="jvm.memory.type",xlt="heap",Dlt="non_heap",Nlt="jvm.thread.daemon",Blt="jvm.thread.state",wlt="blocked",Min="new",Olt="runnable",klt="terminated",Plt="timed_waiting",Mlt="waiting",Llt="network.local.address",Ult="network.local.port",_V="network.peer.address",EV="network.peer.port",Qlt="network.protocol.name",yV="network.protocol.version",SV="network.transport",Flt="pipe",Glt="quic",Lin="tcp",Uin="udp",jlt="unix",zlt="network.type",Hlt="ipv4",$lt="ipv6",qlt="otel.scope.name",Vlt="otel.scope.version",Ylt="otel.status_code",Klt="ERROR",Qin="OK",Jlt="otel.status_description",TV="server.address",bV="server.port",Zlt="service.instance.id",IV="service.name",Wlt="service.namespace",CV="service.version",Xlt="signalr.connection.status",edt="app_shutdown",tdt="normal_closure",ndt="timeout",rdt="signalr.transport",odt="long_polling",idt="server_sent_events",sdt="web_sockets",adt="telemetry.sdk.language",Fin="cpp",udt="dotnet",cdt="erlang",Gin="go",ldt="java",ddt="nodejs",jin="php",pdt="python",fdt="ruby",mdt="rust",Adt="swift",gdt="webjs",hdt="telemetry.sdk.name",_dt="telemetry.sdk.version",Edt="url.fragment",R_="url.full",ydt="url.path",Sdt="url.query",Tdt="url.scheme",vV="user_agent.original"});var bdt,Idt,Cdt,vdt,Rdt,xdt,Ddt,Ndt,Bdt,wdt,Odt,kdt,Pdt,Mdt,Ldt,Udt,Qdt,Fdt,Gdt,jdt,zdt,Hdt,$dt,qdt,Vdt,Ydt,Kdt,Jdt,Zdt,Wdt,Xdt,ept,tpt,npt,rpt,opt,ipt,spt,apt,upt,cpt,lpt,dpt,ppt,fpt,mpt,Apt,gpt,hpt,_pt,Ept,BTe=w(()=>{m();bdt="aspnetcore.diagnostics.exceptions",Idt="aspnetcore.rate_limiting.active_request_leases",Cdt="aspnetcore.rate_limiting.queued_requests",vdt="aspnetcore.rate_limiting.request.time_in_queue",Rdt="aspnetcore.rate_limiting.request_lease.duration",xdt="aspnetcore.rate_limiting.requests",Ddt="aspnetcore.routing.match_attempts",Ndt="db.client.operation.duration",Bdt="dotnet.assembly.count",wdt="dotnet.exceptions",Odt="dotnet.gc.collections",kdt="dotnet.gc.heap.total_allocated",Pdt="dotnet.gc.last_collection.heap.fragmentation.size",Mdt="dotnet.gc.last_collection.heap.size",Ldt="dotnet.gc.last_collection.memory.committed_size",Udt="dotnet.gc.pause.time",Qdt="dotnet.jit.compilation.time",Fdt="dotnet.jit.compiled_il.size",Gdt="dotnet.jit.compiled_methods",jdt="dotnet.monitor.lock_contentions",zdt="dotnet.process.cpu.count",Hdt="dotnet.process.cpu.time",$dt="dotnet.process.memory.working_set",qdt="dotnet.thread_pool.queue.length",Vdt="dotnet.thread_pool.thread.count",Ydt="dotnet.thread_pool.work_item.count",Kdt="dotnet.timer.count",Jdt="http.client.request.duration",Zdt="http.server.request.duration",Wdt="jvm.class.count",Xdt="jvm.class.loaded",ept="jvm.class.unloaded",tpt="jvm.cpu.count",npt="jvm.cpu.recent_utilization",rpt="jvm.cpu.time",opt="jvm.gc.duration",ipt="jvm.memory.committed",spt="jvm.memory.limit",apt="jvm.memory.used",upt="jvm.memory.used_after_last_gc",cpt="jvm.thread.count",lpt="kestrel.active_connections",dpt="kestrel.active_tls_handshakes",ppt="kestrel.connection.duration",fpt="kestrel.queued_connections",mpt="kestrel.queued_requests",Apt="kestrel.rejected_connections",gpt="kestrel.tls_handshake.duration",hpt="kestrel.upgraded_connections",_pt="signalr.server.active_connections",Ept="signalr.server.connection.duration"});var ypt,wTe=w(()=>{m();ypt="exception"});var Gr={};Js(Gr,{ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED:()=>vct,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED:()=>Rct,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED:()=>xct,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED:()=>Dct,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED:()=>Oct,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER:()=>kct,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER:()=>Pct,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED:()=>Mct,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE:()=>Fct,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS:()=>Gct,ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT:()=>Cct,ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE:()=>Nct,ATTR_ASPNETCORE_RATE_LIMITING_POLICY:()=>Bct,ATTR_ASPNETCORE_RATE_LIMITING_RESULT:()=>wct,ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED:()=>Lct,ATTR_ASPNETCORE_ROUTING_IS_FALLBACK:()=>Uct,ATTR_ASPNETCORE_ROUTING_MATCH_STATUS:()=>Qct,ATTR_ASPNETCORE_USER_IS_AUTHENTICATED:()=>jct,ATTR_CLIENT_ADDRESS:()=>zct,ATTR_CLIENT_PORT:()=>Hct,ATTR_CODE_COLUMN_NUMBER:()=>$ct,ATTR_CODE_FILE_PATH:()=>qct,ATTR_CODE_FUNCTION_NAME:()=>Vct,ATTR_CODE_LINE_NUMBER:()=>Yct,ATTR_CODE_STACKTRACE:()=>Kct,ATTR_DB_COLLECTION_NAME:()=>fV,ATTR_DB_NAMESPACE:()=>mV,ATTR_DB_OPERATION_BATCH_SIZE:()=>Jct,ATTR_DB_OPERATION_NAME:()=>PC,ATTR_DB_QUERY_SUMMARY:()=>Zct,ATTR_DB_QUERY_TEXT:()=>AV,ATTR_DB_RESPONSE_STATUS_CODE:()=>gV,ATTR_DB_STORED_PROCEDURE_NAME:()=>Wct,ATTR_DB_SYSTEM_NAME:()=>cS,ATTR_DOTNET_GC_HEAP_GENERATION:()=>rlt,ATTR_ERROR_TYPE:()=>hV,ATTR_EXCEPTION_ESCAPED:()=>ult,ATTR_EXCEPTION_MESSAGE:()=>clt,ATTR_EXCEPTION_STACKTRACE:()=>llt,ATTR_EXCEPTION_TYPE:()=>dlt,ATTR_HTTP_REQUEST_HEADER:()=>plt,ATTR_HTTP_REQUEST_METHOD:()=>lS,ATTR_HTTP_REQUEST_METHOD_ORIGINAL:()=>Slt,ATTR_HTTP_REQUEST_RESEND_COUNT:()=>Tlt,ATTR_HTTP_RESPONSE_HEADER:()=>blt,ATTR_HTTP_RESPONSE_STATUS_CODE:()=>Cg,ATTR_HTTP_ROUTE:()=>vg,ATTR_JVM_GC_ACTION:()=>Ilt,ATTR_JVM_GC_NAME:()=>Clt,ATTR_JVM_MEMORY_POOL_NAME:()=>vlt,ATTR_JVM_MEMORY_TYPE:()=>Rlt,ATTR_JVM_THREAD_DAEMON:()=>Nlt,ATTR_JVM_THREAD_STATE:()=>Blt,ATTR_NETWORK_LOCAL_ADDRESS:()=>Llt,ATTR_NETWORK_LOCAL_PORT:()=>Ult,ATTR_NETWORK_PEER_ADDRESS:()=>_V,ATTR_NETWORK_PEER_PORT:()=>EV,ATTR_NETWORK_PROTOCOL_NAME:()=>Qlt,ATTR_NETWORK_PROTOCOL_VERSION:()=>yV,ATTR_NETWORK_TRANSPORT:()=>SV,ATTR_NETWORK_TYPE:()=>zlt,ATTR_OTEL_SCOPE_NAME:()=>qlt,ATTR_OTEL_SCOPE_VERSION:()=>Vlt,ATTR_OTEL_STATUS_CODE:()=>Ylt,ATTR_OTEL_STATUS_DESCRIPTION:()=>Jlt,ATTR_SERVER_ADDRESS:()=>TV,ATTR_SERVER_PORT:()=>bV,ATTR_SERVICE_INSTANCE_ID:()=>Zlt,ATTR_SERVICE_NAME:()=>IV,ATTR_SERVICE_NAMESPACE:()=>Wlt,ATTR_SERVICE_VERSION:()=>CV,ATTR_SIGNALR_CONNECTION_STATUS:()=>Xlt,ATTR_SIGNALR_TRANSPORT:()=>rdt,ATTR_TELEMETRY_SDK_LANGUAGE:()=>adt,ATTR_TELEMETRY_SDK_NAME:()=>hdt,ATTR_TELEMETRY_SDK_VERSION:()=>_dt,ATTR_URL_FRAGMENT:()=>Edt,ATTR_URL_FULL:()=>R_,ATTR_URL_PATH:()=>ydt,ATTR_URL_QUERY:()=>Sdt,ATTR_URL_SCHEME:()=>Tdt,ATTR_USER_AGENT_ORIGINAL:()=>vV,AWSECSLAUNCHTYPEVALUES_EC2:()=>$ut,AWSECSLAUNCHTYPEVALUES_FARGATE:()=>qut,AwsEcsLaunchtypeValues:()=>Vut,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:()=>Rut,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:()=>xut,CLOUDPLATFORMVALUES_AWS_EC2:()=>Dut,CLOUDPLATFORMVALUES_AWS_ECS:()=>Nut,CLOUDPLATFORMVALUES_AWS_EKS:()=>But,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:()=>Out,CLOUDPLATFORMVALUES_AWS_LAMBDA:()=>wut,CLOUDPLATFORMVALUES_AZURE_AKS:()=>Mut,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:()=>Uut,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:()=>Put,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:()=>Lut,CLOUDPLATFORMVALUES_AZURE_VM:()=>kut,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:()=>zut,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:()=>jut,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:()=>Fut,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:()=>Qut,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:()=>Gut,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:()=>Tut,CLOUDPROVIDERVALUES_AWS:()=>but,CLOUDPROVIDERVALUES_AZURE:()=>Iut,CLOUDPROVIDERVALUES_GCP:()=>Cut,CloudPlatformValues:()=>Hut,CloudProviderValues:()=>vut,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:()=>ait,DBCASSANDRACONSISTENCYLEVELVALUES_ANY:()=>Ait,DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:()=>uit,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:()=>mit,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:()=>lit,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:()=>hit,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:()=>dit,DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:()=>cit,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:()=>git,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:()=>fit,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:()=>pit,DBSYSTEMVALUES_ADABAS:()=>Not,DBSYSTEMVALUES_CACHE:()=>Dot,DBSYSTEMVALUES_CASSANDRA:()=>Vot,DBSYSTEMVALUES_CLOUDSCAPE:()=>Sot,DBSYSTEMVALUES_COCKROACHDB:()=>iit,DBSYSTEMVALUES_COLDFUSION:()=>qot,DBSYSTEMVALUES_COSMOSDB:()=>Xot,DBSYSTEMVALUES_COUCHBASE:()=>Zot,DBSYSTEMVALUES_COUCHDB:()=>Wot,DBSYSTEMVALUES_DB2:()=>hot,DBSYSTEMVALUES_DERBY:()=>wot,DBSYSTEMVALUES_DYNAMODB:()=>eit,DBSYSTEMVALUES_EDB:()=>xot,DBSYSTEMVALUES_ELASTICSEARCH:()=>rit,DBSYSTEMVALUES_FILEMAKER:()=>Oot,DBSYSTEMVALUES_FIREBIRD:()=>Bot,DBSYSTEMVALUES_FIRSTSQL:()=>Rot,DBSYSTEMVALUES_GEODE:()=>nit,DBSYSTEMVALUES_H2:()=>$ot,DBSYSTEMVALUES_HANADB:()=>Cot,DBSYSTEMVALUES_HBASE:()=>Yot,DBSYSTEMVALUES_HIVE:()=>yot,DBSYSTEMVALUES_HSQLDB:()=>Tot,DBSYSTEMVALUES_INFORMIX:()=>kot,DBSYSTEMVALUES_INGRES:()=>vot,DBSYSTEMVALUES_INSTANTDB:()=>Pot,DBSYSTEMVALUES_INTERBASE:()=>Mot,DBSYSTEMVALUES_MARIADB:()=>Lot,DBSYSTEMVALUES_MAXDB:()=>Iot,DBSYSTEMVALUES_MEMCACHED:()=>oit,DBSYSTEMVALUES_MONGODB:()=>Kot,DBSYSTEMVALUES_MSSQL:()=>mot,DBSYSTEMVALUES_MYSQL:()=>Aot,DBSYSTEMVALUES_NEO4J:()=>tit,DBSYSTEMVALUES_NETEZZA:()=>Uot,DBSYSTEMVALUES_ORACLE:()=>got,DBSYSTEMVALUES_OTHER_SQL:()=>fot,DBSYSTEMVALUES_PERVASIVE:()=>Qot,DBSYSTEMVALUES_POINTBASE:()=>Fot,DBSYSTEMVALUES_POSTGRESQL:()=>_ot,DBSYSTEMVALUES_PROGRESS:()=>bot,DBSYSTEMVALUES_REDIS:()=>Jot,DBSYSTEMVALUES_REDSHIFT:()=>Eot,DBSYSTEMVALUES_SQLITE:()=>Got,DBSYSTEMVALUES_SYBASE:()=>jot,DBSYSTEMVALUES_TERADATA:()=>zot,DBSYSTEMVALUES_VERTICA:()=>Hot,DB_SYSTEM_NAME_VALUE_MARIADB:()=>Xct,DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER:()=>elt,DB_SYSTEM_NAME_VALUE_MYSQL:()=>tlt,DB_SYSTEM_NAME_VALUE_POSTGRESQL:()=>nlt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN0:()=>olt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN1:()=>ilt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN2:()=>slt,DOTNET_GC_HEAP_GENERATION_VALUE_LOH:()=>win,DOTNET_GC_HEAP_GENERATION_VALUE_POH:()=>Oin,DbCassandraConsistencyLevelValues:()=>_it,DbSystemValues:()=>sit,ERROR_TYPE_VALUE_OTHER:()=>alt,EVENT_EXCEPTION:()=>ypt,FAASDOCUMENTOPERATIONVALUES_DELETE:()=>Rit,FAASDOCUMENTOPERATIONVALUES_EDIT:()=>vit,FAASDOCUMENTOPERATIONVALUES_INSERT:()=>Cit,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:()=>Dit,FAASINVOKEDPROVIDERVALUES_AWS:()=>Nit,FAASINVOKEDPROVIDERVALUES_AZURE:()=>Bit,FAASINVOKEDPROVIDERVALUES_GCP:()=>wit,FAASTRIGGERVALUES_DATASOURCE:()=>Eit,FAASTRIGGERVALUES_HTTP:()=>yit,FAASTRIGGERVALUES_OTHER:()=>bit,FAASTRIGGERVALUES_PUBSUB:()=>Sit,FAASTRIGGERVALUES_TIMER:()=>Tit,FaasDocumentOperationValues:()=>xit,FaasInvokedProviderValues:()=>Oit,FaasTriggerValues:()=>Iit,HOSTARCHVALUES_AMD64:()=>Yut,HOSTARCHVALUES_ARM32:()=>Kut,HOSTARCHVALUES_ARM64:()=>Jut,HOSTARCHVALUES_IA64:()=>Zut,HOSTARCHVALUES_PPC32:()=>Wut,HOSTARCHVALUES_PPC64:()=>Xut,HOSTARCHVALUES_X86:()=>ect,HTTPFLAVORVALUES_HTTP_1_0:()=>gst,HTTPFLAVORVALUES_HTTP_1_1:()=>hst,HTTPFLAVORVALUES_HTTP_2_0:()=>_st,HTTPFLAVORVALUES_QUIC:()=>yst,HTTPFLAVORVALUES_SPDY:()=>Est,HTTP_REQUEST_METHOD_VALUE_CONNECT:()=>mlt,HTTP_REQUEST_METHOD_VALUE_DELETE:()=>Alt,HTTP_REQUEST_METHOD_VALUE_GET:()=>kin,HTTP_REQUEST_METHOD_VALUE_HEAD:()=>glt,HTTP_REQUEST_METHOD_VALUE_OPTIONS:()=>hlt,HTTP_REQUEST_METHOD_VALUE_OTHER:()=>flt,HTTP_REQUEST_METHOD_VALUE_PATCH:()=>_lt,HTTP_REQUEST_METHOD_VALUE_POST:()=>Elt,HTTP_REQUEST_METHOD_VALUE_PUT:()=>Pin,HTTP_REQUEST_METHOD_VALUE_TRACE:()=>ylt,HostArchValues:()=>tct,HttpFlavorValues:()=>Sst,JVM_MEMORY_TYPE_VALUE_HEAP:()=>xlt,JVM_MEMORY_TYPE_VALUE_NON_HEAP:()=>Dlt,JVM_THREAD_STATE_VALUE_BLOCKED:()=>wlt,JVM_THREAD_STATE_VALUE_NEW:()=>Min,JVM_THREAD_STATE_VALUE_RUNNABLE:()=>Olt,JVM_THREAD_STATE_VALUE_TERMINATED:()=>klt,JVM_THREAD_STATE_VALUE_TIMED_WAITING:()=>Plt,JVM_THREAD_STATE_VALUE_WAITING:()=>Mlt,MESSAGETYPEVALUES_RECEIVED:()=>Vst,MESSAGETYPEVALUES_SENT:()=>qst,MESSAGINGDESTINATIONKINDVALUES_QUEUE:()=>Tst,MESSAGINGDESTINATIONKINDVALUES_TOPIC:()=>bst,MESSAGINGOPERATIONVALUES_PROCESS:()=>vst,MESSAGINGOPERATIONVALUES_RECEIVE:()=>Cst,METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS:()=>bdt,METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES:()=>Idt,METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS:()=>Cdt,METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS:()=>xdt,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION:()=>Rdt,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE:()=>vdt,METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS:()=>Ddt,METRIC_DB_CLIENT_OPERATION_DURATION:()=>Ndt,METRIC_DOTNET_ASSEMBLY_COUNT:()=>Bdt,METRIC_DOTNET_EXCEPTIONS:()=>wdt,METRIC_DOTNET_GC_COLLECTIONS:()=>Odt,METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED:()=>kdt,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE:()=>Pdt,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE:()=>Mdt,METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE:()=>Ldt,METRIC_DOTNET_GC_PAUSE_TIME:()=>Udt,METRIC_DOTNET_JIT_COMPILATION_TIME:()=>Qdt,METRIC_DOTNET_JIT_COMPILED_IL_SIZE:()=>Fdt,METRIC_DOTNET_JIT_COMPILED_METHODS:()=>Gdt,METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS:()=>jdt,METRIC_DOTNET_PROCESS_CPU_COUNT:()=>zdt,METRIC_DOTNET_PROCESS_CPU_TIME:()=>Hdt,METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET:()=>$dt,METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH:()=>qdt,METRIC_DOTNET_THREAD_POOL_THREAD_COUNT:()=>Vdt,METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT:()=>Ydt,METRIC_DOTNET_TIMER_COUNT:()=>Kdt,METRIC_HTTP_CLIENT_REQUEST_DURATION:()=>Jdt,METRIC_HTTP_SERVER_REQUEST_DURATION:()=>Zdt,METRIC_JVM_CLASS_COUNT:()=>Wdt,METRIC_JVM_CLASS_LOADED:()=>Xdt,METRIC_JVM_CLASS_UNLOADED:()=>ept,METRIC_JVM_CPU_COUNT:()=>tpt,METRIC_JVM_CPU_RECENT_UTILIZATION:()=>npt,METRIC_JVM_CPU_TIME:()=>rpt,METRIC_JVM_GC_DURATION:()=>opt,METRIC_JVM_MEMORY_COMMITTED:()=>ipt,METRIC_JVM_MEMORY_LIMIT:()=>spt,METRIC_JVM_MEMORY_USED:()=>apt,METRIC_JVM_MEMORY_USED_AFTER_LAST_GC:()=>upt,METRIC_JVM_THREAD_COUNT:()=>cpt,METRIC_KESTREL_ACTIVE_CONNECTIONS:()=>lpt,METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES:()=>dpt,METRIC_KESTREL_CONNECTION_DURATION:()=>ppt,METRIC_KESTREL_QUEUED_CONNECTIONS:()=>fpt,METRIC_KESTREL_QUEUED_REQUESTS:()=>mpt,METRIC_KESTREL_REJECTED_CONNECTIONS:()=>Apt,METRIC_KESTREL_TLS_HANDSHAKE_DURATION:()=>gpt,METRIC_KESTREL_UPGRADED_CONNECTIONS:()=>hpt,METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS:()=>_pt,METRIC_SIGNALR_SERVER_CONNECTION_DURATION:()=>Ept,MessageTypeValues:()=>Yst,MessagingDestinationKindValues:()=>Ist,MessagingOperationValues:()=>Rst,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:()=>Zit,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:()=>est,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:()=>Kit,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:()=>ast,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:()=>Wit,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:()=>Xit,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:()=>ist,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:()=>Yit,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:()=>cst,NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:()=>tst,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:()=>rst,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:()=>ust,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:()=>nst,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:()=>ost,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:()=>dst,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:()=>sst,NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:()=>mst,NETHOSTCONNECTIONSUBTYPEVALUES_NR:()=>pst,NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:()=>fst,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:()=>lst,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:()=>Jit,NETHOSTCONNECTIONTYPEVALUES_CELL:()=>Hit,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:()=>$it,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:()=>qit,NETHOSTCONNECTIONTYPEVALUES_WIFI:()=>jit,NETHOSTCONNECTIONTYPEVALUES_WIRED:()=>zit,NETTRANSPORTVALUES_INPROC:()=>Qit,NETTRANSPORTVALUES_IP:()=>Mit,NETTRANSPORTVALUES_IP_TCP:()=>kit,NETTRANSPORTVALUES_IP_UDP:()=>Pit,NETTRANSPORTVALUES_OTHER:()=>Fit,NETTRANSPORTVALUES_PIPE:()=>Uit,NETTRANSPORTVALUES_UNIX:()=>Lit,NETWORK_TRANSPORT_VALUE_PIPE:()=>Flt,NETWORK_TRANSPORT_VALUE_QUIC:()=>Glt,NETWORK_TRANSPORT_VALUE_TCP:()=>Lin,NETWORK_TRANSPORT_VALUE_UDP:()=>Uin,NETWORK_TRANSPORT_VALUE_UNIX:()=>jlt,NETWORK_TYPE_VALUE_IPV4:()=>Hlt,NETWORK_TYPE_VALUE_IPV6:()=>$lt,NetHostConnectionSubtypeValues:()=>Ast,NetHostConnectionTypeValues:()=>Vit,NetTransportValues:()=>Git,OSTYPEVALUES_AIX:()=>lct,OSTYPEVALUES_DARWIN:()=>oct,OSTYPEVALUES_DRAGONFLYBSD:()=>uct,OSTYPEVALUES_FREEBSD:()=>ict,OSTYPEVALUES_HPUX:()=>cct,OSTYPEVALUES_LINUX:()=>rct,OSTYPEVALUES_NETBSD:()=>sct,OSTYPEVALUES_OPENBSD:()=>act,OSTYPEVALUES_SOLARIS:()=>dct,OSTYPEVALUES_WINDOWS:()=>nct,OSTYPEVALUES_Z_OS:()=>pct,OTEL_STATUS_CODE_VALUE_ERROR:()=>Klt,OTEL_STATUS_CODE_VALUE_OK:()=>Qin,OsTypeValues:()=>fct,RPCGRPCSTATUSCODEVALUES_ABORTED:()=>Ust,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:()=>kst,RPCGRPCSTATUSCODEVALUES_CANCELLED:()=>Dst,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:()=>zst,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:()=>wst,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:()=>Lst,RPCGRPCSTATUSCODEVALUES_INTERNAL:()=>Gst,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:()=>Bst,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:()=>Ost,RPCGRPCSTATUSCODEVALUES_OK:()=>xst,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:()=>Qst,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:()=>Pst,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:()=>Mst,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:()=>Hst,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:()=>jst,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:()=>Fst,RPCGRPCSTATUSCODEVALUES_UNKNOWN:()=>Nst,RpcGrpcStatusCodeValues:()=>$st,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:()=>Irt,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:()=>Mrt,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:()=>Srt,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:()=>hrt,SEMATTRS_AWS_DYNAMODB_COUNT:()=>krt,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:()=>Drt,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:()=>Rrt,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:()=>Lrt,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:()=>Crt,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:()=>_rt,SEMATTRS_AWS_DYNAMODB_LIMIT:()=>brt,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:()=>xrt,SEMATTRS_AWS_DYNAMODB_PROJECTION:()=>Trt,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:()=>Ert,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:()=>yrt,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:()=>Prt,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:()=>Brt,SEMATTRS_AWS_DYNAMODB_SEGMENT:()=>wrt,SEMATTRS_AWS_DYNAMODB_SELECT:()=>vrt,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:()=>Nrt,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:()=>grt,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:()=>Ort,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:()=>unt,SEMATTRS_CODE_FILEPATH:()=>srt,SEMATTRS_CODE_FUNCTION:()=>ort,SEMATTRS_CODE_LINENO:()=>art,SEMATTRS_CODE_NAMESPACE:()=>irt,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:()=>hnt,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:()=>Tnt,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:()=>Snt,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:()=>Ent,SEMATTRS_DB_CASSANDRA_KEYSPACE:()=>Ant,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:()=>gnt,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:()=>ynt,SEMATTRS_DB_CASSANDRA_TABLE:()=>_nt,SEMATTRS_DB_CONNECTION_STRING:()=>cnt,SEMATTRS_DB_HBASE_NAMESPACE:()=>bnt,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:()=>dnt,SEMATTRS_DB_MONGODB_COLLECTION:()=>Cnt,SEMATTRS_DB_MSSQL_INSTANCE_NAME:()=>mnt,SEMATTRS_DB_NAME:()=>pnt,SEMATTRS_DB_OPERATION:()=>fnt,SEMATTRS_DB_REDIS_DATABASE_INDEX:()=>Int,SEMATTRS_DB_SQL_TABLE:()=>vnt,SEMATTRS_DB_STATEMENT:()=>eV,SEMATTRS_DB_SYSTEM:()=>X5,SEMATTRS_DB_USER:()=>lnt,SEMATTRS_ENDUSER_ID:()=>Xnt,SEMATTRS_ENDUSER_ROLE:()=>ert,SEMATTRS_ENDUSER_SCOPE:()=>trt,SEMATTRS_EXCEPTION_ESCAPED:()=>Nnt,SEMATTRS_EXCEPTION_MESSAGE:()=>xnt,SEMATTRS_EXCEPTION_STACKTRACE:()=>Dnt,SEMATTRS_EXCEPTION_TYPE:()=>Rnt,SEMATTRS_FAAS_COLDSTART:()=>Unt,SEMATTRS_FAAS_CRON:()=>Lnt,SEMATTRS_FAAS_DOCUMENT_COLLECTION:()=>wnt,SEMATTRS_FAAS_DOCUMENT_NAME:()=>Pnt,SEMATTRS_FAAS_DOCUMENT_OPERATION:()=>Ont,SEMATTRS_FAAS_DOCUMENT_TIME:()=>knt,SEMATTRS_FAAS_EXECUTION:()=>Bnt,SEMATTRS_FAAS_INVOKED_NAME:()=>Qnt,SEMATTRS_FAAS_INVOKED_PROVIDER:()=>Fnt,SEMATTRS_FAAS_INVOKED_REGION:()=>Gnt,SEMATTRS_FAAS_TIME:()=>Mnt,SEMATTRS_FAAS_TRIGGER:()=>tV,SEMATTRS_HTTP_CLIENT_IP:()=>Art,SEMATTRS_HTTP_FLAVOR:()=>lrt,SEMATTRS_HTTP_HOST:()=>urt,SEMATTRS_HTTP_METHOD:()=>dB,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:()=>prt,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:()=>frt,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:()=>sV,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:()=>aV,SEMATTRS_HTTP_ROUTE:()=>uV,SEMATTRS_HTTP_SCHEME:()=>crt,SEMATTRS_HTTP_SERVER_NAME:()=>mrt,SEMATTRS_HTTP_STATUS_CODE:()=>uS,SEMATTRS_HTTP_TARGET:()=>iV,SEMATTRS_HTTP_URL:()=>kC,SEMATTRS_HTTP_USER_AGENT:()=>drt,SEMATTRS_MESSAGE_COMPRESSED_SIZE:()=>lot,SEMATTRS_MESSAGE_ID:()=>cot,SEMATTRS_MESSAGE_TYPE:()=>uot,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:()=>dot,SEMATTRS_MESSAGING_CONSUMER_ID:()=>Krt,SEMATTRS_MESSAGING_CONVERSATION_ID:()=>$rt,SEMATTRS_MESSAGING_DESTINATION:()=>Urt,SEMATTRS_MESSAGING_DESTINATION_KIND:()=>Qrt,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:()=>Xrt,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:()=>Wrt,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:()=>Zrt,SEMATTRS_MESSAGING_KAFKA_PARTITION:()=>eot,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:()=>tot,SEMATTRS_MESSAGING_MESSAGE_ID:()=>Hrt,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:()=>Vrt,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:()=>qrt,SEMATTRS_MESSAGING_OPERATION:()=>Yrt,SEMATTRS_MESSAGING_PROTOCOL:()=>Grt,SEMATTRS_MESSAGING_PROTOCOL_VERSION:()=>jrt,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:()=>Jrt,SEMATTRS_MESSAGING_SYSTEM:()=>cV,SEMATTRS_MESSAGING_TEMP_DESTINATION:()=>Frt,SEMATTRS_MESSAGING_URL:()=>zrt,SEMATTRS_NET_HOST_CARRIER_ICC:()=>Znt,SEMATTRS_NET_HOST_CARRIER_MCC:()=>Knt,SEMATTRS_NET_HOST_CARRIER_MNC:()=>Jnt,SEMATTRS_NET_HOST_CARRIER_NAME:()=>Ynt,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:()=>Vnt,SEMATTRS_NET_HOST_CONNECTION_TYPE:()=>qnt,SEMATTRS_NET_HOST_IP:()=>rV,SEMATTRS_NET_HOST_NAME:()=>$nt,SEMATTRS_NET_HOST_PORT:()=>oV,SEMATTRS_NET_PEER_IP:()=>nV,SEMATTRS_NET_PEER_NAME:()=>Hnt,SEMATTRS_NET_PEER_PORT:()=>znt,SEMATTRS_NET_TRANSPORT:()=>jnt,SEMATTRS_PEER_SERVICE:()=>Wnt,SEMATTRS_RPC_GRPC_STATUS_CODE:()=>dV,SEMATTRS_RPC_JSONRPC_ERROR_CODE:()=>sot,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:()=>aot,SEMATTRS_RPC_JSONRPC_REQUEST_ID:()=>iot,SEMATTRS_RPC_JSONRPC_VERSION:()=>oot,SEMATTRS_RPC_METHOD:()=>rot,SEMATTRS_RPC_SERVICE:()=>lV,SEMATTRS_RPC_SYSTEM:()=>not,SEMATTRS_THREAD_ID:()=>nrt,SEMATTRS_THREAD_NAME:()=>rrt,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:()=>tat,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:()=>eat,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:()=>nat,SEMRESATTRS_AWS_ECS_TASK_ARN:()=>rat,SEMRESATTRS_AWS_ECS_TASK_FAMILY:()=>oat,SEMRESATTRS_AWS_ECS_TASK_REVISION:()=>iat,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:()=>sat,SEMRESATTRS_AWS_LOG_GROUP_ARNS:()=>uat,SEMRESATTRS_AWS_LOG_GROUP_NAMES:()=>aat,SEMRESATTRS_AWS_LOG_STREAM_ARNS:()=>lat,SEMRESATTRS_AWS_LOG_STREAM_NAMES:()=>cat,SEMRESATTRS_CLOUD_ACCOUNT_ID:()=>Jst,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:()=>Wst,SEMRESATTRS_CLOUD_PLATFORM:()=>Xst,SEMRESATTRS_CLOUD_PROVIDER:()=>Kst,SEMRESATTRS_CLOUD_REGION:()=>Zst,SEMRESATTRS_CONTAINER_ID:()=>pat,SEMRESATTRS_CONTAINER_IMAGE_NAME:()=>mat,SEMRESATTRS_CONTAINER_IMAGE_TAG:()=>Aat,SEMRESATTRS_CONTAINER_NAME:()=>dat,SEMRESATTRS_CONTAINER_RUNTIME:()=>fat,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:()=>gat,SEMRESATTRS_DEVICE_ID:()=>hat,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:()=>_at,SEMRESATTRS_DEVICE_MODEL_NAME:()=>Eat,SEMRESATTRS_FAAS_ID:()=>Sat,SEMRESATTRS_FAAS_INSTANCE:()=>bat,SEMRESATTRS_FAAS_MAX_MEMORY:()=>Iat,SEMRESATTRS_FAAS_NAME:()=>yat,SEMRESATTRS_FAAS_VERSION:()=>Tat,SEMRESATTRS_HOST_ARCH:()=>xat,SEMRESATTRS_HOST_ID:()=>Cat,SEMRESATTRS_HOST_IMAGE_ID:()=>Nat,SEMRESATTRS_HOST_IMAGE_NAME:()=>Dat,SEMRESATTRS_HOST_IMAGE_VERSION:()=>Bat,SEMRESATTRS_HOST_NAME:()=>vat,SEMRESATTRS_HOST_TYPE:()=>Rat,SEMRESATTRS_K8S_CLUSTER_NAME:()=>wat,SEMRESATTRS_K8S_CONTAINER_NAME:()=>Uat,SEMRESATTRS_K8S_CRONJOB_NAME:()=>Jat,SEMRESATTRS_K8S_CRONJOB_UID:()=>Kat,SEMRESATTRS_K8S_DAEMONSET_NAME:()=>qat,SEMRESATTRS_K8S_DAEMONSET_UID:()=>$at,SEMRESATTRS_K8S_DEPLOYMENT_NAME:()=>jat,SEMRESATTRS_K8S_DEPLOYMENT_UID:()=>Gat,SEMRESATTRS_K8S_JOB_NAME:()=>Yat,SEMRESATTRS_K8S_JOB_UID:()=>Vat,SEMRESATTRS_K8S_NAMESPACE_NAME:()=>Pat,SEMRESATTRS_K8S_NODE_NAME:()=>Oat,SEMRESATTRS_K8S_NODE_UID:()=>kat,SEMRESATTRS_K8S_POD_NAME:()=>Lat,SEMRESATTRS_K8S_POD_UID:()=>Mat,SEMRESATTRS_K8S_REPLICASET_NAME:()=>Fat,SEMRESATTRS_K8S_REPLICASET_UID:()=>Qat,SEMRESATTRS_K8S_STATEFULSET_NAME:()=>Hat,SEMRESATTRS_K8S_STATEFULSET_UID:()=>zat,SEMRESATTRS_OS_DESCRIPTION:()=>Wat,SEMRESATTRS_OS_NAME:()=>Xat,SEMRESATTRS_OS_TYPE:()=>Zat,SEMRESATTRS_OS_VERSION:()=>eut,SEMRESATTRS_PROCESS_COMMAND:()=>out,SEMRESATTRS_PROCESS_COMMAND_ARGS:()=>sut,SEMRESATTRS_PROCESS_COMMAND_LINE:()=>iut,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:()=>nut,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:()=>rut,SEMRESATTRS_PROCESS_OWNER:()=>aut,SEMRESATTRS_PROCESS_PID:()=>tut,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:()=>lut,SEMRESATTRS_PROCESS_RUNTIME_NAME:()=>uut,SEMRESATTRS_PROCESS_RUNTIME_VERSION:()=>cut,SEMRESATTRS_SERVICE_INSTANCE_ID:()=>put,SEMRESATTRS_SERVICE_NAME:()=>dut,SEMRESATTRS_SERVICE_NAMESPACE:()=>pV,SEMRESATTRS_SERVICE_VERSION:()=>fut,SEMRESATTRS_TELEMETRY_AUTO_VERSION:()=>hut,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:()=>Aut,SEMRESATTRS_TELEMETRY_SDK_NAME:()=>mut,SEMRESATTRS_TELEMETRY_SDK_VERSION:()=>gut,SEMRESATTRS_WEBENGINE_DESCRIPTION:()=>yut,SEMRESATTRS_WEBENGINE_NAME:()=>_ut,SEMRESATTRS_WEBENGINE_VERSION:()=>Eut,SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN:()=>edt,SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE:()=>tdt,SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT:()=>ndt,SIGNALR_TRANSPORT_VALUE_LONG_POLLING:()=>odt,SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS:()=>idt,SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS:()=>sdt,SemanticAttributes:()=>pot,SemanticResourceAttributes:()=>Sut,TELEMETRYSDKLANGUAGEVALUES_CPP:()=>mct,TELEMETRYSDKLANGUAGEVALUES_DOTNET:()=>Act,TELEMETRYSDKLANGUAGEVALUES_ERLANG:()=>gct,TELEMETRYSDKLANGUAGEVALUES_GO:()=>hct,TELEMETRYSDKLANGUAGEVALUES_JAVA:()=>_ct,TELEMETRYSDKLANGUAGEVALUES_NODEJS:()=>Ect,TELEMETRYSDKLANGUAGEVALUES_PHP:()=>yct,TELEMETRYSDKLANGUAGEVALUES_PYTHON:()=>Sct,TELEMETRYSDKLANGUAGEVALUES_RUBY:()=>Tct,TELEMETRYSDKLANGUAGEVALUES_WEBJS:()=>bct,TELEMETRY_SDK_LANGUAGE_VALUE_CPP:()=>Fin,TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET:()=>udt,TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG:()=>cdt,TELEMETRY_SDK_LANGUAGE_VALUE_GO:()=>Gin,TELEMETRY_SDK_LANGUAGE_VALUE_JAVA:()=>ldt,TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:()=>ddt,TELEMETRY_SDK_LANGUAGE_VALUE_PHP:()=>jin,TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON:()=>pdt,TELEMETRY_SDK_LANGUAGE_VALUE_RUBY:()=>fdt,TELEMETRY_SDK_LANGUAGE_VALUE_RUST:()=>mdt,TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT:()=>Adt,TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS:()=>gdt,TelemetrySdkLanguageValues:()=>Ict});var Xn=w(()=>{m();rye();DTe();NTe();BTe();wTe()});var OTe=P(sU=>{"use strict";m();Object.defineProperty(sU,"__esModule",{value:!0});sU.ATTR_PROCESS_RUNTIME_NAME=void 0;sU.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name"});var kTe=P(uU=>{"use strict";m();Object.defineProperty(uU,"__esModule",{value:!0});uU.SDK_INFO=void 0;var Spt=pge(),aU=(Xn(),Le(Gr)),Tpt=OTe();uU.SDK_INFO={[aU.ATTR_TELEMETRY_SDK_NAME]:"opentelemetry",[Tpt.ATTR_PROCESS_RUNTIME_NAME]:"node",[aU.ATTR_TELEMETRY_SDK_LANGUAGE]:aU.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,[aU.ATTR_TELEMETRY_SDK_VERSION]:Spt.VERSION}});var PTe=P(su=>{"use strict";m();Object.defineProperty(su,"__esModule",{value:!0});su.otperformance=su.SDK_INFO=su._globalThis=su.getStringListFromEnv=su.getNumberFromEnv=su.getBooleanFromEnv=su.getStringFromEnv=void 0;var cU=lge();Object.defineProperty(su,"getStringFromEnv",{enumerable:!0,get:function(){return cU.getStringFromEnv}});Object.defineProperty(su,"getBooleanFromEnv",{enumerable:!0,get:function(){return cU.getBooleanFromEnv}});Object.defineProperty(su,"getNumberFromEnv",{enumerable:!0,get:function(){return cU.getNumberFromEnv}});Object.defineProperty(su,"getStringListFromEnv",{enumerable:!0,get:function(){return cU.getStringListFromEnv}});var bpt=dge();Object.defineProperty(su,"_globalThis",{enumerable:!0,get:function(){return bpt._globalThis}});var Ipt=kTe();Object.defineProperty(su,"SDK_INFO",{enumerable:!0,get:function(){return Ipt.SDK_INFO}});su.otperformance=performance});var RV=P(au=>{"use strict";m();Object.defineProperty(au,"__esModule",{value:!0});au.getStringListFromEnv=au.getNumberFromEnv=au.getStringFromEnv=au.getBooleanFromEnv=au.otperformance=au._globalThis=au.SDK_INFO=void 0;var dS=PTe();Object.defineProperty(au,"SDK_INFO",{enumerable:!0,get:function(){return dS.SDK_INFO}});Object.defineProperty(au,"_globalThis",{enumerable:!0,get:function(){return dS._globalThis}});Object.defineProperty(au,"otperformance",{enumerable:!0,get:function(){return dS.otperformance}});Object.defineProperty(au,"getBooleanFromEnv",{enumerable:!0,get:function(){return dS.getBooleanFromEnv}});Object.defineProperty(au,"getStringFromEnv",{enumerable:!0,get:function(){return dS.getStringFromEnv}});Object.defineProperty(au,"getNumberFromEnv",{enumerable:!0,get:function(){return dS.getNumberFromEnv}});Object.defineProperty(au,"getStringListFromEnv",{enumerable:!0,get:function(){return dS.getStringListFromEnv}})});var QTe=P(jr=>{"use strict";m();Object.defineProperty(jr,"__esModule",{value:!0});jr.addHrTimes=jr.isTimeInput=jr.isTimeInputHrTime=jr.hrTimeToSeconds=jr.hrTimeToMilliseconds=jr.hrTimeToMicroseconds=jr.hrTimeToNanoseconds=jr.hrTimeToTimeStamp=jr.hrTimeDuration=jr.timeInputToHrTime=jr.hrTime=jr.getTimeOrigin=jr.millisToHrTime=void 0;var lU=RV(),MTe=9,Cpt=6,vpt=Math.pow(10,Cpt),pB=Math.pow(10,MTe);function fB(e){let t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*vpt);return[n,r]}jr.millisToHrTime=fB;function Rpt(){return lU.otperformance.timeOrigin}jr.getTimeOrigin=Rpt;function LTe(e){let t=fB(lU.otperformance.timeOrigin),n=fB(typeof e=="number"?e:lU.otperformance.now());return UTe(t,n)}jr.hrTime=LTe;function xpt(e){if(xV(e))return e;if(typeof e=="number")return e<lU.otperformance.timeOrigin?LTe(e):fB(e);if(e instanceof Date)return fB(e.getTime());throw TypeError("Invalid input type")}jr.timeInputToHrTime=xpt;function Dpt(e,t){let n=t[0]-e[0],r=t[1]-e[1];return r<0&&(n-=1,r+=pB),[n,r]}jr.hrTimeDuration=Dpt;function Npt(e){let t=MTe,n=`${"0".repeat(t)}${e[1]}Z`,r=n.substring(n.length-t-1);return new Date(e[0]*1e3).toISOString().replace("000Z",r)}jr.hrTimeToTimeStamp=Npt;function Bpt(e){return e[0]*pB+e[1]}jr.hrTimeToNanoseconds=Bpt;function wpt(e){return e[0]*1e6+e[1]/1e3}jr.hrTimeToMicroseconds=wpt;function Opt(e){return e[0]*1e3+e[1]/1e6}jr.hrTimeToMilliseconds=Opt;function kpt(e){return e[0]+e[1]/pB}jr.hrTimeToSeconds=kpt;function xV(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}jr.isTimeInputHrTime=xV;function Ppt(e){return xV(e)||typeof e=="number"||e instanceof Date}jr.isTimeInput=Ppt;function UTe(e,t){let n=[e[0]+t[0],e[1]+t[1]];return n[1]>=pB&&(n[1]-=pB,n[0]+=1),n}jr.addHrTimes=UTe});var FTe=P(dU=>{"use strict";m();Object.defineProperty(dU,"__esModule",{value:!0});dU.unrefTimer=void 0;function Mpt(e){typeof e!="number"&&e.unref()}dU.unrefTimer=Mpt});var GTe=P(mB=>{"use strict";m();Object.defineProperty(mB,"__esModule",{value:!0});mB.ExportResultCode=void 0;var Lpt;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(Lpt=mB.ExportResultCode||(mB.ExportResultCode={}))});var zTe=P(pU=>{"use strict";m();Object.defineProperty(pU,"__esModule",{value:!0});pU.CompositePropagator=void 0;var jTe=(ze(),Le(nt)),DV=class{_propagators;_fields;constructor(t={}){this._propagators=t.propagators??[];let n=new Set;for(let r of this._propagators){let o=typeof r.fields=="function"?r.fields():[];for(let i of o)n.add(i)}this._fields=Array.from(n)}inject(t,n,r){for(let o of this._propagators)try{o.inject(t,n,r)}catch(i){jTe.diag.warn(`Failed to inject with ${o.constructor.name}. Err: ${i.message}`)}}extract(t,n,r){return this._propagators.reduce((o,i)=>{try{return i.extract(o,n,r)}catch(s){jTe.diag.warn(`Failed to extract with ${i.constructor.name}. Err: ${s.message}`)}return o},t)}fields(){return this._fields.slice()}};pU.CompositePropagator=DV});var HTe=P(MC=>{"use strict";m();Object.defineProperty(MC,"__esModule",{value:!0});MC.validateValue=MC.validateKey=void 0;var NV="[_0-9a-z-*/]",Upt=`[a-z]${NV}{0,255}`,Qpt=`[a-z0-9]${NV}{0,240}@[a-z]${NV}{0,13}`,Fpt=new RegExp(`^(?:${Upt}|${Qpt})$`),Gpt=/^[ -~]{0,255}[!-~]$/,jpt=/,|=/;function zpt(e){return Fpt.test(e)}MC.validateKey=zpt;function Hpt(e){return Gpt.test(e)&&!jpt.test(e)}MC.validateValue=Hpt});var wV=P(mU=>{"use strict";m();Object.defineProperty(mU,"__esModule",{value:!0});mU.TraceState=void 0;var fU=HTe(),$pt=32,$Te=512,qTe=",",VTe="=",BV=class e{_length;_rawTraceState;_internalState;constructor(t){this._rawTraceState=typeof t=="string"?t:"",this._length=this._rawTraceState.length}set(t,n){if(!(0,fU.validateKey)(t)||!(0,fU.validateValue)(n))return this;let r=this._getState(),o=r.get(t),i=this._length;if(typeof o=="string"?i+=n.length-o.length:i+=t.length+n.length+(r.size>0?2:1),i>$Te)return this;let s=new Map(r);return s.delete(t),s.set(t,n),this._fromState(s,i)}unset(t){let n=this._getState(),r=n.get(t);if(typeof r!="string")return this;let o=this._length-(t.length+r.length+1);n.size>1&&(o=o-1);let i=new Map(n);return i.delete(t),this._fromState(i,o)}get(t){return this._getState().get(t)}serialize(){let t="",n=0;for(let r of this._getState())n>0&&(t=qTe+t),t=`${r[0]}${VTe}${r[1]}`+t,n++;return t}_getState(){if(this._internalState)return this._internalState;let t=this._rawTraceState.split(qTe),n=new Map,r=0;for(let o of t){let i=o.trim(),s=i.indexOf(VTe);if(s===-1)continue;let u=i.slice(0,s),l=i.slice(s+1);if(!(0,fU.validateKey)(u)||!(0,fU.validateValue)(l))continue;let p=r+i.length+(n.size>0?1:0);if(!(p>$Te)&&(n.set(u,l),r=p,n.size>=$pt))break}return this._length=r,this._internalState=new Map(Array.from(n.entries()).reverse()),this._internalState}_fromState(t,n){let r=Object.create(e.prototype);return r._internalState=t,r._length=n,r}};mU.TraceState=BV});var KTe=P(uu=>{"use strict";m();Object.defineProperty(uu,"__esModule",{value:!0});uu.W3CTraceContextPropagator=uu.parseTraceParent=uu.TRACE_STATE_HEADER=uu.TRACE_PARENT_HEADER=void 0;var AU=(ze(),Le(nt)),qpt=cB(),Vpt=wV();uu.TRACE_PARENT_HEADER="traceparent";uu.TRACE_STATE_HEADER="tracestate";var Ypt="00",Kpt="(?!ff)[\\da-f]{2}",Jpt="(?![0]{32})[\\da-f]{32}",Zpt="(?![0]{16})[\\da-f]{16}",Wpt="[\\da-f]{2}",Xpt=new RegExp(`^\\s?(${Kpt})-(${Jpt})-(${Zpt})-(${Wpt})(-.*)?\\s?$`);function YTe(e){let t=Xpt.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}uu.parseTraceParent=YTe;var OV=class{inject(t,n,r){let o=AU.trace.getSpanContext(t);if(!o||(0,qpt.isTracingSuppressed)(t)||!(0,AU.isSpanContextValid)(o))return;let i=`${Ypt}-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||AU.TraceFlags.NONE).toString(16)}`;r.set(n,uu.TRACE_PARENT_HEADER,i),o.traceState&&r.set(n,uu.TRACE_STATE_HEADER,o.traceState.serialize())}extract(t,n,r){let o=r.get(n,uu.TRACE_PARENT_HEADER);if(!o)return t;let i=Array.isArray(o)?o[0]:o;if(typeof i!="string")return t;let s=YTe(i);if(!s)return t;s.isRemote=!0;let u=r.get(n,uu.TRACE_STATE_HEADER);if(u){let l=Array.isArray(u)?u.join(","):u;s.traceState=new Vpt.TraceState(typeof l=="string"?l:void 0)}return AU.trace.setSpanContext(t,s)}fields(){return[uu.TRACE_PARENT_HEADER,uu.TRACE_STATE_HEADER]}};uu.W3CTraceContextPropagator=OV});var JTe=P(df=>{"use strict";m();Object.defineProperty(df,"__esModule",{value:!0});df.getRPCMetadata=df.deleteRPCMetadata=df.setRPCMetadata=df.RPCType=void 0;var eft=(ze(),Le(nt)),kV=(0,eft.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),tft;(function(e){e.HTTP="http"})(tft=df.RPCType||(df.RPCType={}));function nft(e,t){return e.setValue(kV,t)}df.setRPCMetadata=nft;function rft(e){return e.deleteValue(kV)}df.deleteRPCMetadata=rft;function oft(e){return e.getValue(kV)}df.getRPCMetadata=oft});var tbe=P(gU=>{"use strict";m();Object.defineProperty(gU,"__esModule",{value:!0});gU.isPlainObject=void 0;var ift="[object Object]",sft="[object Null]",aft="[object Undefined]",uft=Function.prototype,ZTe=uft.toString,cft=ZTe.call(Object),lft=Object.getPrototypeOf,WTe=Object.prototype,XTe=WTe.hasOwnProperty,pS=Symbol?Symbol.toStringTag:void 0,ebe=WTe.toString;function dft(e){if(!pft(e)||fft(e)!==ift)return!1;let t=lft(e);if(t===null)return!0;let n=XTe.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&ZTe.call(n)===cft}gU.isPlainObject=dft;function pft(e){return e!=null&&typeof e=="object"}function fft(e){return e==null?e===void 0?aft:sft:pS&&pS in Object(e)?mft(e):Aft(e)}function mft(e){let t=XTe.call(e,pS),n=e[pS],r=!1;try{e[pS]=void 0,r=!0}catch{}let o=ebe.call(e);return r&&(t?e[pS]=n:delete e[pS]),o}function Aft(e){return ebe.call(e)}});var sbe=P(EU=>{"use strict";m();Object.defineProperty(EU,"__esModule",{value:!0});EU.merge=void 0;var nbe=tbe(),gft=20;function hft(...e){let t=e.shift(),n=new WeakMap;for(;e.length>0;)t=obe(t,e.shift(),0,n);return t}EU.merge=hft;function PV(e){return _U(e)?e.slice():e}function obe(e,t,n=0,r){let o;if(!(n>gft)){if(n++,hU(e)||hU(t)||ibe(t))o=PV(t);else if(_U(e)){if(o=e.slice(),_U(t))for(let i=0,s=t.length;i<s;i++)o.push(PV(t[i]));else if(AB(t)){let i=Object.keys(t);for(let s=0,u=i.length;s<u;s++){let l=i[s];l==="__proto__"||l==="constructor"||l==="prototype"||(o[l]=PV(t[l]))}}}else if(AB(e))if(AB(t)){if(!_ft(e,t))return t;o=Object.assign({},e);let i=Object.keys(t);for(let s=0,u=i.length;s<u;s++){let l=i[s];if(l==="__proto__"||l==="constructor"||l==="prototype")continue;let p=t[l];if(hU(p))typeof p>"u"?delete o[l]:o[l]=p;else{let h=o[l],y=p;if(rbe(e,l,r)||rbe(t,l,r))delete o[l];else{if(AB(h)&&AB(y)){let S=r.get(h)||[],T=r.get(y)||[];S.push({obj:e,key:l}),T.push({obj:t,key:l}),r.set(h,S),r.set(y,T)}o[l]=obe(o[l],p,n,r)}}}}else o=t;return o}}function rbe(e,t,n){let r=n.get(e[t])||[];for(let o=0,i=r.length;o<i;o++){let s=r[o];if(s.key===t&&s.obj===e)return!0}return!1}function _U(e){return Array.isArray(e)}function ibe(e){return typeof e=="function"}function AB(e){return!hU(e)&&!_U(e)&&!ibe(e)&&typeof e=="object"}function hU(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function _ft(e,t){return!(!(0,nbe.isPlainObject)(e)||!(0,nbe.isPlainObject)(t))}});var abe=P(LC=>{"use strict";m();Object.defineProperty(LC,"__esModule",{value:!0});LC.callWithTimeout=LC.TimeoutError=void 0;var yU=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};LC.TimeoutError=yU;function Eft(e,t){let n,r=new Promise(function(i,s){n=setTimeout(function(){s(new yU("Operation timed out."))},t)});return Promise.race([e,r]).then(o=>(clearTimeout(n),o),o=>{throw clearTimeout(n),o})}LC.callWithTimeout=Eft});var cbe=P(UC=>{"use strict";m();Object.defineProperty(UC,"__esModule",{value:!0});UC.isUrlIgnored=UC.urlMatches=void 0;function ube(e,t){return typeof t=="string"?e===t:!!e.match(t)}UC.urlMatches=ube;function yft(e,t){if(!t)return!1;for(let n of t)if(ube(e,n))return!0;return!1}UC.isUrlIgnored=yft});var lbe=P(SU=>{"use strict";m();Object.defineProperty(SU,"__esModule",{value:!0});SU.Deferred=void 0;var MV=class{_promise;_resolve;_reject;constructor(){this._promise=new Promise((t,n)=>{this._resolve=t,this._reject=n})}get promise(){return this._promise}resolve(t){this._resolve(t)}reject(t){this._reject(t)}};SU.Deferred=MV});var dbe=P(TU=>{"use strict";m();Object.defineProperty(TU,"__esModule",{value:!0});TU.BindOnceFuture=void 0;var Sft=lbe(),LV=class{_isCalled=!1;_deferred=new Sft.Deferred;_callback;_that;constructor(t,n){this._callback=t,this._that=n}get isCalled(){return this._isCalled}get promise(){return this._deferred.promise}call(...t){if(!this._isCalled){this._isCalled=!0;try{Promise.resolve(this._callback.call(this._that,...t)).then(n=>this._deferred.resolve(n),n=>this._deferred.reject(n))}catch(n){this._deferred.reject(n)}}return this._deferred.promise}};TU.BindOnceFuture=LV});var fbe=P(bU=>{"use strict";m();Object.defineProperty(bU,"__esModule",{value:!0});bU.diagLogLevelFromString=void 0;var Rg=(ze(),Le(nt)),pbe={ALL:Rg.DiagLogLevel.ALL,VERBOSE:Rg.DiagLogLevel.VERBOSE,DEBUG:Rg.DiagLogLevel.DEBUG,INFO:Rg.DiagLogLevel.INFO,WARN:Rg.DiagLogLevel.WARN,ERROR:Rg.DiagLogLevel.ERROR,NONE:Rg.DiagLogLevel.NONE};function Tft(e){if(e==null)return;let t=pbe[e.toUpperCase()];return t??(Rg.diag.warn(`Unknown log level "${e}", expected one of ${Object.keys(pbe)}, using default`),Rg.DiagLogLevel.INFO)}bU.diagLogLevelFromString=Tft});var Abe=P(IU=>{"use strict";m();Object.defineProperty(IU,"__esModule",{value:!0});IU._export=void 0;var mbe=(ze(),Le(nt)),bft=cB();function Ift(e,t){return new Promise(n=>{mbe.context.with((0,bft.suppressTracing)(mbe.context.active()),()=>{e.export(t,n)})})}IU._export=Ift});var Cr=P(we=>{"use strict";m();Object.defineProperty(we,"__esModule",{value:!0});we.diagLogLevelFromString=we.BindOnceFuture=we.urlMatches=we.isUrlIgnored=we.callWithTimeout=we.TimeoutError=we.merge=we.TraceState=we.unsuppressTracing=we.suppressTracing=we.isTracingSuppressed=we.setRPCMetadata=we.getRPCMetadata=we.deleteRPCMetadata=we.RPCType=we.parseTraceParent=we.W3CTraceContextPropagator=we.TRACE_STATE_HEADER=we.TRACE_PARENT_HEADER=we.CompositePropagator=we.otperformance=we.getStringListFromEnv=we.getNumberFromEnv=we.getBooleanFromEnv=we.getStringFromEnv=we._globalThis=we.SDK_INFO=we.parseKeyPairsIntoRecord=we.ExportResultCode=we.unrefTimer=we.timeInputToHrTime=we.millisToHrTime=we.isTimeInputHrTime=we.isTimeInput=we.hrTimeToTimeStamp=we.hrTimeToSeconds=we.hrTimeToNanoseconds=we.hrTimeToMilliseconds=we.hrTimeToMicroseconds=we.hrTimeDuration=we.hrTime=we.getTimeOrigin=we.addHrTimes=we.loggingErrorHandler=we.setGlobalErrorHandler=we.globalErrorHandler=we.sanitizeAttributes=we.isAttributeValue=we.AnchoredClock=we.W3CBaggagePropagator=void 0;we.internal=void 0;var Cft=WAe();Object.defineProperty(we,"W3CBaggagePropagator",{enumerable:!0,get:function(){return Cft.W3CBaggagePropagator}});var vft=XAe();Object.defineProperty(we,"AnchoredClock",{enumerable:!0,get:function(){return vft.AnchoredClock}});var gbe=oge();Object.defineProperty(we,"isAttributeValue",{enumerable:!0,get:function(){return gbe.isAttributeValue}});Object.defineProperty(we,"sanitizeAttributes",{enumerable:!0,get:function(){return gbe.sanitizeAttributes}});var hbe=sge();Object.defineProperty(we,"globalErrorHandler",{enumerable:!0,get:function(){return hbe.globalErrorHandler}});Object.defineProperty(we,"setGlobalErrorHandler",{enumerable:!0,get:function(){return hbe.setGlobalErrorHandler}});var Rft=Z5();Object.defineProperty(we,"loggingErrorHandler",{enumerable:!0,get:function(){return Rft.loggingErrorHandler}});var Ql=QTe();Object.defineProperty(we,"addHrTimes",{enumerable:!0,get:function(){return Ql.addHrTimes}});Object.defineProperty(we,"getTimeOrigin",{enumerable:!0,get:function(){return Ql.getTimeOrigin}});Object.defineProperty(we,"hrTime",{enumerable:!0,get:function(){return Ql.hrTime}});Object.defineProperty(we,"hrTimeDuration",{enumerable:!0,get:function(){return Ql.hrTimeDuration}});Object.defineProperty(we,"hrTimeToMicroseconds",{enumerable:!0,get:function(){return Ql.hrTimeToMicroseconds}});Object.defineProperty(we,"hrTimeToMilliseconds",{enumerable:!0,get:function(){return Ql.hrTimeToMilliseconds}});Object.defineProperty(we,"hrTimeToNanoseconds",{enumerable:!0,get:function(){return Ql.hrTimeToNanoseconds}});Object.defineProperty(we,"hrTimeToSeconds",{enumerable:!0,get:function(){return Ql.hrTimeToSeconds}});Object.defineProperty(we,"hrTimeToTimeStamp",{enumerable:!0,get:function(){return Ql.hrTimeToTimeStamp}});Object.defineProperty(we,"isTimeInput",{enumerable:!0,get:function(){return Ql.isTimeInput}});Object.defineProperty(we,"isTimeInputHrTime",{enumerable:!0,get:function(){return Ql.isTimeInputHrTime}});Object.defineProperty(we,"millisToHrTime",{enumerable:!0,get:function(){return Ql.millisToHrTime}});Object.defineProperty(we,"timeInputToHrTime",{enumerable:!0,get:function(){return Ql.timeInputToHrTime}});var xft=FTe();Object.defineProperty(we,"unrefTimer",{enumerable:!0,get:function(){return xft.unrefTimer}});var Dft=GTe();Object.defineProperty(we,"ExportResultCode",{enumerable:!0,get:function(){return Dft.ExportResultCode}});var Nft=V5();Object.defineProperty(we,"parseKeyPairsIntoRecord",{enumerable:!0,get:function(){return Nft.parseKeyPairsIntoRecord}});var fS=RV();Object.defineProperty(we,"SDK_INFO",{enumerable:!0,get:function(){return fS.SDK_INFO}});Object.defineProperty(we,"_globalThis",{enumerable:!0,get:function(){return fS._globalThis}});Object.defineProperty(we,"getStringFromEnv",{enumerable:!0,get:function(){return fS.getStringFromEnv}});Object.defineProperty(we,"getBooleanFromEnv",{enumerable:!0,get:function(){return fS.getBooleanFromEnv}});Object.defineProperty(we,"getNumberFromEnv",{enumerable:!0,get:function(){return fS.getNumberFromEnv}});Object.defineProperty(we,"getStringListFromEnv",{enumerable:!0,get:function(){return fS.getStringListFromEnv}});Object.defineProperty(we,"otperformance",{enumerable:!0,get:function(){return fS.otperformance}});var Bft=zTe();Object.defineProperty(we,"CompositePropagator",{enumerable:!0,get:function(){return Bft.CompositePropagator}});var CU=KTe();Object.defineProperty(we,"TRACE_PARENT_HEADER",{enumerable:!0,get:function(){return CU.TRACE_PARENT_HEADER}});Object.defineProperty(we,"TRACE_STATE_HEADER",{enumerable:!0,get:function(){return CU.TRACE_STATE_HEADER}});Object.defineProperty(we,"W3CTraceContextPropagator",{enumerable:!0,get:function(){return CU.W3CTraceContextPropagator}});Object.defineProperty(we,"parseTraceParent",{enumerable:!0,get:function(){return CU.parseTraceParent}});var vU=JTe();Object.defineProperty(we,"RPCType",{enumerable:!0,get:function(){return vU.RPCType}});Object.defineProperty(we,"deleteRPCMetadata",{enumerable:!0,get:function(){return vU.deleteRPCMetadata}});Object.defineProperty(we,"getRPCMetadata",{enumerable:!0,get:function(){return vU.getRPCMetadata}});Object.defineProperty(we,"setRPCMetadata",{enumerable:!0,get:function(){return vU.setRPCMetadata}});var UV=cB();Object.defineProperty(we,"isTracingSuppressed",{enumerable:!0,get:function(){return UV.isTracingSuppressed}});Object.defineProperty(we,"suppressTracing",{enumerable:!0,get:function(){return UV.suppressTracing}});Object.defineProperty(we,"unsuppressTracing",{enumerable:!0,get:function(){return UV.unsuppressTracing}});var wft=wV();Object.defineProperty(we,"TraceState",{enumerable:!0,get:function(){return wft.TraceState}});var Oft=sbe();Object.defineProperty(we,"merge",{enumerable:!0,get:function(){return Oft.merge}});var _be=abe();Object.defineProperty(we,"TimeoutError",{enumerable:!0,get:function(){return _be.TimeoutError}});Object.defineProperty(we,"callWithTimeout",{enumerable:!0,get:function(){return _be.callWithTimeout}});var Ebe=cbe();Object.defineProperty(we,"isUrlIgnored",{enumerable:!0,get:function(){return Ebe.isUrlIgnored}});Object.defineProperty(we,"urlMatches",{enumerable:!0,get:function(){return Ebe.urlMatches}});var kft=dbe();Object.defineProperty(we,"BindOnceFuture",{enumerable:!0,get:function(){return kft.BindOnceFuture}});var Pft=fbe();Object.defineProperty(we,"diagLogLevelFromString",{enumerable:!0,get:function(){return Pft.diagLogLevelFromString}});var Mft=Abe();we.internal={_export:Mft._export}});var ybe=P(RU=>{"use strict";m();Object.defineProperty(RU,"__esModule",{value:!0});RU.VERSION=void 0;RU.VERSION="0.214.0"});var Sbe=P(gB=>{"use strict";m();Object.defineProperty(gB,"__esModule",{value:!0});gB.SeverityNumber=void 0;var Lft;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.TRACE=1]="TRACE",e[e.TRACE2=2]="TRACE2",e[e.TRACE3=3]="TRACE3",e[e.TRACE4=4]="TRACE4",e[e.DEBUG=5]="DEBUG",e[e.DEBUG2=6]="DEBUG2",e[e.DEBUG3=7]="DEBUG3",e[e.DEBUG4=8]="DEBUG4",e[e.INFO=9]="INFO",e[e.INFO2=10]="INFO2",e[e.INFO3=11]="INFO3",e[e.INFO4=12]="INFO4",e[e.WARN=13]="WARN",e[e.WARN2=14]="WARN2",e[e.WARN3=15]="WARN3",e[e.WARN4=16]="WARN4",e[e.ERROR=17]="ERROR",e[e.ERROR2=18]="ERROR2",e[e.ERROR3=19]="ERROR3",e[e.ERROR4=20]="ERROR4",e[e.FATAL=21]="FATAL",e[e.FATAL2=22]="FATAL2",e[e.FATAL3=23]="FATAL3",e[e.FATAL4=24]="FATAL4"})(Lft=gB.SeverityNumber||(gB.SeverityNumber={}))});var DU=P(QC=>{"use strict";m();Object.defineProperty(QC,"__esModule",{value:!0});QC.NOOP_LOGGER=QC.NoopLogger=void 0;var xU=class{emit(t){}};QC.NoopLogger=xU;QC.NOOP_LOGGER=new xU});var Tbe=P(Nm=>{"use strict";m();Object.defineProperty(Nm,"__esModule",{value:!0});Nm.API_BACKWARDS_COMPATIBILITY_VERSION=Nm.makeGetter=Nm._global=Nm.GLOBAL_LOGS_API_KEY=void 0;Nm.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");Nm._global=globalThis;function Uft(e,t,n){return r=>r===e?t:n}Nm.makeGetter=Uft;Nm.API_BACKWARDS_COMPATIBILITY_VERSION=1});var QV=P(FC=>{"use strict";m();Object.defineProperty(FC,"__esModule",{value:!0});FC.NOOP_LOGGER_PROVIDER=FC.NoopLoggerProvider=void 0;var Qft=DU(),NU=class{getLogger(t,n,r){return new Qft.NoopLogger}};FC.NoopLoggerProvider=NU;FC.NOOP_LOGGER_PROVIDER=new NU});var bbe=P(BU=>{"use strict";m();Object.defineProperty(BU,"__esModule",{value:!0});BU.ProxyLogger=void 0;var Fft=DU(),FV=class{constructor(t,n,r,o){this._provider=t,this.name=n,this.version=r,this.options=o}emit(t){this._getLogger().emit(t)}_getLogger(){if(this._delegate)return this._delegate;let t=this._provider._getDelegateLogger(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):Fft.NOOP_LOGGER}};BU.ProxyLogger=FV});var Ibe=P(wU=>{"use strict";m();Object.defineProperty(wU,"__esModule",{value:!0});wU.ProxyLoggerProvider=void 0;var Gft=QV(),jft=bbe(),GV=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new jft.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:Gft.NOOP_LOGGER_PROVIDER}_setDelegate(t){this._delegate=t}_getDelegateLogger(t,n,r){var o;return(o=this._delegate)===null||o===void 0?void 0:o.getLogger(t,n,r)}};wU.ProxyLoggerProvider=GV});var vbe=P(OU=>{"use strict";m();Object.defineProperty(OU,"__esModule",{value:!0});OU.LogsAPI=void 0;var zd=Tbe(),zft=QV(),Cbe=Ibe(),jV=class e{constructor(){this._proxyLoggerProvider=new Cbe.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return zd._global[zd.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(zd._global[zd.GLOBAL_LOGS_API_KEY]=(0,zd.makeGetter)(zd.API_BACKWARDS_COMPATIBILITY_VERSION,t,zft.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=zd._global[zd.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(zd._global,zd.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete zd._global[zd.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new Cbe.ProxyLoggerProvider}};OU.LogsAPI=jV});var zV=P(Bm=>{"use strict";m();Object.defineProperty(Bm,"__esModule",{value:!0});Bm.logs=Bm.NoopLogger=Bm.NOOP_LOGGER=Bm.SeverityNumber=void 0;var Hft=Sbe();Object.defineProperty(Bm,"SeverityNumber",{enumerable:!0,get:function(){return Hft.SeverityNumber}});var Rbe=DU();Object.defineProperty(Bm,"NOOP_LOGGER",{enumerable:!0,get:function(){return Rbe.NOOP_LOGGER}});Object.defineProperty(Bm,"NoopLogger",{enumerable:!0,get:function(){return Rbe.NoopLogger}});var $ft=vbe();Bm.logs=$ft.LogsAPI.getInstance()});var xbe=P(GC=>{"use strict";m();Object.defineProperty(GC,"__esModule",{value:!0});GC.disableInstrumentations=GC.enableInstrumentations=void 0;function qft(e,t,n,r){for(let o=0,i=e.length;o<i;o++){let s=e[o];t&&s.setTracerProvider(t),n&&s.setMeterProvider(n),r&&s.setLoggerProvider&&s.setLoggerProvider(r),s.getConfig().enabled||s.enable()}}GC.enableInstrumentations=qft;function Vft(e){e.forEach(t=>t.disable())}GC.disableInstrumentations=Vft});var Bbe=P(kU=>{"use strict";m();Object.defineProperty(kU,"__esModule",{value:!0});kU.registerInstrumentations=void 0;var Dbe=(ze(),Le(nt)),Yft=zV(),Nbe=xbe();function Kft(e){let t=e.tracerProvider||Dbe.trace.getTracerProvider(),n=e.meterProvider||Dbe.metrics.getMeterProvider(),r=e.loggerProvider||Yft.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,Nbe.enableInstrumentations)(o,t,n,r),()=>{(0,Nbe.disableInstrumentations)(o)}}kU.registerInstrumentations=Kft});var Fbe=P(PU=>{"use strict";m();Object.defineProperty(PU,"__esModule",{value:!0});PU.satisfies=void 0;var VV=(ze(),Le(nt)),Mbe=/^(?:v)?(?<version>(?<major>0|[1-9]\d*)\.(?<minor>0|[1-9]\d*)\.(?<patch>0|[1-9]\d*))(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,Jft=/^(?<op><|>|=|==|<=|>=|~|\^|~>)?\s*(?:v)?(?<version>(?<major>x|X|\*|0|[1-9]\d*)(?:\.(?<minor>x|X|\*|0|[1-9]\d*))?(?:\.(?<patch>x|X|\*|0|[1-9]\d*))?)(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,Zft={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function Wft(e,t,n){if(!Xft(e))return VV.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=rmt(e);if(!r)return!1;let o=[],i=Lbe(r,t,o,n);return i&&!n?.includePrerelease?tmt(r,o):i}PU.satisfies=Wft;function Xft(e){return typeof e=="string"&&Mbe.test(e)}function Lbe(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(HV(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=Imt(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!HV(e,i,n,r))return!1;return!0}return HV(e,t,n,r)}function HV(e,t,n,r){if(t=nmt(t,r),t.includes(" "))return Lbe(e,t,n,r);{let o=omt(t);return n.push(o),emt(e,o)}}function emt(e,t){if(t.invalid)return!1;if(!t.version||qV(t.version))return!0;let n=Obe(e.versionSegments||[],t.versionSegments||[]);if(n===0){let r=e.prereleaseSegments||[],o=t.prereleaseSegments||[];!r.length&&!o.length?n=0:!r.length&&o.length?n=1:r.length&&!o.length?n=-1:n=Obe(r,o)}return Zft[t.op]?.includes(n)}function tmt(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function nmt(e,t){return e=e.trim(),e=Tmt(e,t),e=Smt(e),e=bmt(e,t),e=e.trim(),e}function $u(e){return!e||e.toLowerCase()==="x"||e==="*"}function rmt(e){let t=e.match(Mbe);if(!t){VV.diag.error(`Invalid version: ${e}`);return}let n=t.groups.version,r=t.groups.prerelease,o=t.groups.build,i=n.split("."),s=r?.split(".");return{op:void 0,version:n,versionSegments:i,versionSegmentCount:i.length,prerelease:r,prereleaseSegments:s,prereleaseSegmentCount:s?s.length:0,build:o}}function omt(e){if(!e)return{};let t=e.match(Jft);if(!t)return VV.diag.error(`Invalid range: ${e}`),{invalid:!0};let n=t.groups.op,r=t.groups.version,o=t.groups.prerelease,i=t.groups.build,s=r.split("."),u=o?.split(".");return n==="=="&&(n="="),{op:n||"=",version:r,versionSegments:s,versionSegmentCount:s.length,prerelease:o,prereleaseSegments:u,prereleaseSegmentCount:u?u.length:0,build:i}}function qV(e){return e==="*"||e==="x"||e==="X"}function wbe(e){let t=parseInt(e,10);return isNaN(t)?e:t}function imt(e,t){if(typeof e==typeof t){if(typeof e=="number")return[e,t];if(typeof e=="string")return[e,t];throw new Error("Version segments can only be strings or numbers")}else return[String(e),String(t)]}function smt(e,t){if(qV(e)||qV(t))return 0;let[n,r]=imt(wbe(e),wbe(t));return n>r?1:n<r?-1:0}function Obe(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=smt(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var Ube="[a-zA-Z0-9-]",Qbe="0|[1-9]\\d*",amt=`\\d*[a-zA-Z-]${Ube}*`,umt="((?:<|>)?=?)",kbe=`(?:${Qbe}|${amt})`,cmt=`(?:-(${kbe}(?:\\.${kbe})*))`,Pbe=`${Ube}+`,lmt=`(?:\\+(${Pbe}(?:\\.${Pbe})*))`,$V=`${Qbe}|x|X|\\*`,hB=`[v=\\s]*(${$V})(?:\\.(${$V})(?:\\.(${$V})(?:${cmt})?${lmt}?)?)?`,dmt=`^${umt}\\s*${hB}$`,pmt=new RegExp(dmt),fmt=`^\\s*(${hB})\\s+-\\s+(${hB})\\s*$`,mmt=new RegExp(fmt),Amt="(?:~>?)",gmt=`^${Amt}${hB}$`,hmt=new RegExp(gmt),_mt="(?:\\^)",Emt=`^${_mt}${hB}$`,ymt=new RegExp(Emt);function Smt(e){let t=hmt;return e.replace(t,(n,r,o,i,s)=>{let u;return $u(r)?u="":$u(o)?u=`>=${r}.0.0 <${+r+1}.0.0-0`:$u(i)?u=`>=${r}.${o}.0 <${r}.${+o+1}.0-0`:s?u=`>=${r}.${o}.${i}-${s} <${r}.${+o+1}.0-0`:u=`>=${r}.${o}.${i} <${r}.${+o+1}.0-0`,u})}function Tmt(e,t){let n=ymt,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,s,u,l)=>{let p;return $u(i)?p="":$u(s)?p=`>=${i}.0.0${r} <${+i+1}.0.0-0`:$u(u)?i==="0"?p=`>=${i}.${s}.0${r} <${i}.${+s+1}.0-0`:p=`>=${i}.${s}.0${r} <${+i+1}.0.0-0`:l?i==="0"?s==="0"?p=`>=${i}.${s}.${u}-${l} <${i}.${s}.${+u+1}-0`:p=`>=${i}.${s}.${u}-${l} <${i}.${+s+1}.0-0`:p=`>=${i}.${s}.${u}-${l} <${+i+1}.0.0-0`:i==="0"?s==="0"?p=`>=${i}.${s}.${u}${r} <${i}.${s}.${+u+1}-0`:p=`>=${i}.${s}.${u}${r} <${i}.${+s+1}.0-0`:p=`>=${i}.${s}.${u} <${+i+1}.0.0-0`,p})}function bmt(e,t){let n=pmt;return e.replace(n,(r,o,i,s,u,l)=>{let p=$u(i),h=p||$u(s),y=h||$u(u),S=y;return o==="="&&S&&(o=""),l=t?.includePrerelease?"-0":"",p?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&S?(h&&(s=0),u=0,o===">"?(o=">=",h?(i=+i+1,s=0,u=0):(s=+s+1,u=0)):o==="<="&&(o="<",h?i=+i+1:s=+s+1),o==="<"&&(l="-0"),r=`${o+i}.${s}.${u}${l}`):h?r=`>=${i}.0.0${l} <${+i+1}.0.0-0`:y&&(r=`>=${i}.${s}.0${l} <${i}.${+s+1}.0-0`),r})}function Imt(e,t){let n=mmt;return e.replace(n,(r,o,i,s,u,l,p,h,y,S,T,v)=>($u(i)?o="":$u(s)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:$u(u)?o=`>=${i}.${s}.0${t?.includePrerelease?"-0":""}`:l?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,$u(y)?h="":$u(S)?h=`<${+y+1}.0.0-0`:$u(T)?h=`<${y}.${+S+1}.0-0`:v?h=`<=${y}.${S}.${T}-${v}`:t?.includePrerelease?h=`<${y}.${S}.${+T+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var YV=P(Ra=>{"use strict";m();Object.defineProperty(Ra,"__esModule",{value:!0});Ra.massUnwrap=Ra.unwrap=Ra.massWrap=Ra.wrap=void 0;var qu=console.error.bind(console);function _B(e,t,n){let r=!!e[t]&&Object.prototype.propertyIsEnumerable.call(e,t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}var Cmt=(e,t,n)=>{if(!e||!e[t]){qu("no original function "+String(t)+" to wrap");return}if(!n){qu("no wrapper function"),qu(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){qu("original object and wrapper must be functions");return}let o=n(r,t);return _B(o,"__original",r),_B(o,"__unwrap",()=>{e[t]===o&&_B(e,t,r)}),_B(o,"__wrapped",!0),_B(e,t,o),o};Ra.wrap=Cmt;var vmt=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{qu("must provide one or more modules to patch"),qu(new Error().stack);return}if(!(t&&Array.isArray(t))){qu("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,Ra.wrap)(r,o,n)})})};Ra.massWrap=vmt;var Rmt=(e,t)=>{if(!e||!e[t]){qu("no function to unwrap."),qu(new Error().stack);return}let n=e[t];if(!n.__unwrap)qu("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};Ra.unwrap=Rmt;var xmt=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{qu("must provide one or more modules to patch"),qu(new Error().stack);return}if(!(t&&Array.isArray(t))){qu("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,Ra.unwrap)(n,r)})})};Ra.massUnwrap=xmt;function EB(e){e&&e.logger&&(typeof e.logger!="function"?qu("new logger isn't a function, not replacing"):qu=e.logger)}Ra.default=EB;EB.wrap=Ra.wrap;EB.massWrap=Ra.massWrap;EB.unwrap=Ra.unwrap;EB.massUnwrap=Ra.massUnwrap});var Gbe=P(LU=>{"use strict";m();Object.defineProperty(LU,"__esModule",{value:!0});LU.InstrumentationAbstract=void 0;var KV=(ze(),Le(nt)),Dmt=zV(),MU=YV(),JV=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=KV.diag.createComponentLogger({namespace:t}),this._tracer=KV.trace.getTracer(t,n),this._meter=KV.metrics.getMeter(t,n),this._logger=Dmt.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=MU.wrap;_unwrap=MU.unwrap;_massWrap=MU.massWrap;_massUnwrap=MU.massUnwrap;get meter(){return this._meter}setMeterProvider(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()}get logger(){return this._logger}setLoggerProvider(t){this._logger=t.getLogger(this.instrumentationName,this.instrumentationVersion)}getModuleDefinitions(){let t=this.init()??[];return Array.isArray(t)?t:[t]}_updateMetricInstruments(){}getConfig(){return this._config}setConfig(t){this._config={enabled:!0,...t}}setTracerProvider(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)}get tracer(){return this._tracer}_runSpanCustomizationHook(t,n,r,o){if(t)try{t(r,o)}catch(i){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:n},i)}}};LU.InstrumentationAbstract=JV});var zbe=P((han,jbe)=>{m();var jC=1e3,zC=jC*60,HC=zC*60,mS=HC*24,Nmt=mS*7,Bmt=mS*365.25;jbe.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return wmt(e);if(n==="number"&&isFinite(e))return t.long?kmt(e):Omt(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function wmt(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]),r=(t[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*Bmt;case"weeks":case"week":case"w":return n*Nmt;case"days":case"day":case"d":return n*mS;case"hours":case"hour":case"hrs":case"hr":case"h":return n*HC;case"minutes":case"minute":case"mins":case"min":case"m":return n*zC;case"seconds":case"second":case"secs":case"sec":case"s":return n*jC;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function Omt(e){var t=Math.abs(e);return t>=mS?Math.round(e/mS)+"d":t>=HC?Math.round(e/HC)+"h":t>=zC?Math.round(e/zC)+"m":t>=jC?Math.round(e/jC)+"s":e+"ms"}function kmt(e){var t=Math.abs(e);return t>=mS?UU(e,t,mS,"day"):t>=HC?UU(e,t,HC,"hour"):t>=zC?UU(e,t,zC,"minute"):t>=jC?UU(e,t,jC,"second"):e+" ms"}function UU(e,t,n,r){var o=t>=n*1.5;return Math.round(e/n)+" "+r+(o?"s":"")}});var ZV=P((Ean,Hbe)=>{m();function Pmt(e){n.debug=n,n.default=n,n.coerce=l,n.disable=s,n.enable=o,n.enabled=u,n.humanize=zbe(),n.destroy=p,Object.keys(e).forEach(h=>{n[h]=e[h]}),n.names=[],n.skips=[],n.formatters={};function t(h){let y=0;for(let S=0;S<h.length;S++)y=(y<<5)-y+h.charCodeAt(S),y|=0;return n.colors[Math.abs(y)%n.colors.length]}n.selectColor=t;function n(h){let y,S=null,T,v;function R(...x){if(!R.enabled)return;let O=R,M=Number(new Date),j=M-(y||M);O.diff=j,O.prev=y,O.curr=M,y=M,x[0]=n.coerce(x[0]),typeof x[0]!="string"&&x.unshift("%O");let G=0;x[0]=x[0].replace(/%([a-zA-Z%])/g,(V,ae)=>{if(V==="%%")return"%";G++;let se=n.formatters[ae];if(typeof se=="function"){let Ee=x[G];V=se.call(O,Ee),x.splice(G,1),G--}return V}),n.formatArgs.call(O,x),(O.log||n.log).apply(O,x)}return R.namespace=h,R.useColors=n.useColors(),R.color=n.selectColor(h),R.extend=r,R.destroy=n.destroy,Object.defineProperty(R,"enabled",{enumerable:!0,configurable:!1,get:()=>S!==null?S:(T!==n.namespaces&&(T=n.namespaces,v=n.enabled(h)),v),set:x=>{S=x}}),typeof n.init=="function"&&n.init(R),R}function r(h,y){let S=n(this.namespace+(typeof y>"u"?":":y)+h);return S.log=this.log,S}function o(h){n.save(h),n.namespaces=h,n.names=[],n.skips=[];let y=(typeof h=="string"?h:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let S of y)S[0]==="-"?n.skips.push(S.slice(1)):n.names.push(S)}function i(h,y){let S=0,T=0,v=-1,R=0;for(;S<h.length;)if(T<y.length&&(y[T]===h[S]||y[T]==="*"))y[T]==="*"?(v=T,R=S,T++):(S++,T++);else if(v!==-1)T=v+1,R++,S=R;else return!1;for(;T<y.length&&y[T]==="*";)T++;return T===y.length}function s(){let h=[...n.names,...n.skips.map(y=>"-"+y)].join(",");return n.enable(""),h}function u(h){for(let y of n.skips)if(i(h,y))return!1;for(let y of n.names)if(i(h,y))return!0;return!1}function l(h){return h instanceof Error?h.stack||h.message:h}function p(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}Hbe.exports=Pmt});var $be=P((Qc,QU)=>{m();Qc.formatArgs=Lmt;Qc.save=Umt;Qc.load=Qmt;Qc.useColors=Mmt;Qc.storage=Fmt();Qc.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Qc.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Mmt(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Lmt(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+QU.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let n=0,r=0;e[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(n++,o==="%c"&&(r=n))}),e.splice(r,0,t)}Qc.log=console.debug||console.log||(()=>{});function Umt(e){try{e?Qc.storage.setItem("debug",e):Qc.storage.removeItem("debug")}catch{}}function Qmt(){let e;try{e=Qc.storage.getItem("debug")||Qc.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function Fmt(){try{return localStorage}catch{}}QU.exports=ZV()(Qc);var{formatters:Gmt}=QU.exports;Gmt.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Vbe=P((Tan,qbe)=>{"use strict";m();qbe.exports=(e,t=process.argv)=>{let n=e.startsWith("-")?"":e.length===1?"-":"--",r=t.indexOf(n+e),o=t.indexOf("--");return r!==-1&&(o===-1||r<o)}});var Jbe=P((Ian,Kbe)=>{"use strict";m();var jmt=Qe("os"),Ybe=Qe("tty"),Hd=Vbe(),{env:Ws}=process,x_;Hd("no-color")||Hd("no-colors")||Hd("color=false")||Hd("color=never")?x_=0:(Hd("color")||Hd("colors")||Hd("color=true")||Hd("color=always"))&&(x_=1);"FORCE_COLOR"in Ws&&(Ws.FORCE_COLOR==="true"?x_=1:Ws.FORCE_COLOR==="false"?x_=0:x_=Ws.FORCE_COLOR.length===0?1:Math.min(parseInt(Ws.FORCE_COLOR,10),3));function WV(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function XV(e,t){if(x_===0)return 0;if(Hd("color=16m")||Hd("color=full")||Hd("color=truecolor"))return 3;if(Hd("color=256"))return 2;if(e&&!t&&x_===void 0)return 0;let n=x_||0;if(Ws.TERM==="dumb")return n;if(process.platform==="win32"){let r=jmt.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in Ws)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(r=>r in Ws)||Ws.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in Ws)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Ws.TEAMCITY_VERSION)?1:0;if(Ws.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Ws){let r=parseInt((Ws.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Ws.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Ws.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Ws.TERM)||"COLORTERM"in Ws?1:n}function zmt(e){let t=XV(e,e&&e.isTTY);return WV(t)}Kbe.exports={supportsColor:zmt,stdout:WV(XV(!0,Ybe.isatty(1))),stderr:WV(XV(!0,Ybe.isatty(2)))}});var Wbe=P((Xs,GU)=>{m();var Hmt=Qe("tty"),FU=Qe("util");Xs.init=Zmt;Xs.log=Ymt;Xs.formatArgs=qmt;Xs.save=Kmt;Xs.load=Jmt;Xs.useColors=$mt;Xs.destroy=FU.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Xs.colors=[6,2,3,4,5,1];try{let e=Jbe();e&&(e.stderr||e).level>=2&&(Xs.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}Xs.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let n=t.substring(6).toLowerCase().replace(/_([a-z])/g,(o,i)=>i.toUpperCase()),r=process.env[t];return/^(yes|on|true|enabled)$/i.test(r)?r=!0:/^(no|off|false|disabled)$/i.test(r)?r=!1:r==="null"?r=null:r=Number(r),e[n]=r,e},{});function $mt(){return"colors"in Xs.inspectOpts?!!Xs.inspectOpts.colors:Hmt.isatty(process.stderr.fd)}function qmt(e){let{namespace:t,useColors:n}=this;if(n){let r=this.color,o="\x1B[3"+(r<8?r:"8;5;"+r),i=` ${o};1m${t} \x1B[0m`;e[0]=i+e[0].split(`
4
4
  `).join(`
5
5
  `+i),e.push(o+"m+"+GU.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=Vmt()+t+" "+e[0]}function Vmt(){return Xs.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Ymt(...e){return process.stderr.write(FU.formatWithOptions(Xs.inspectOpts,...e)+`
6
6
  `)}function Kmt(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function Jmt(){return process.env.DEBUG}function Zmt(e){e.inspectOpts={};let t=Object.keys(Xs.inspectOpts);for(let n=0;n<t.length;n++)e.inspectOpts[t[n]]=Xs.inspectOpts[t[n]]}GU.exports=ZV()(Xs);var{formatters:Zbe}=GU.exports;Zbe.o=function(e){return this.inspectOpts.colors=this.useColors,FU.inspect(e,this.inspectOpts).split(`
@@ -35,7 +35,7 @@ Url: ${ZQ(e)}`),!0}return!1}function f_t(e,t){return t?.length?qQ(e).some(n=>U_(
35
35
  `);for(let o of r){if(!o)continue;let i=o.indexOf(":");if(i===-1)continue;let s=o.substring(0,i).toLowerCase(),u=o.substring(i+1).trim(),l=n.get(s);l&&Array.isArray(l)?l.push(u):l?n.set(s,[l,u]):n.set(s,u)}}return n}onRequestCreated({request:t}){let n=this.getConfig(),r=n.enabled!==!1;if((0,Pw.safeExecuteInTheMiddle)(()=>!r||t.method==="CONNECT"||n.ignoreRequestHook?.(t),V=>V&&this._diag.error("caught ignoreRequestHook error: ",V),!0))return;let i=(0,F4.hrTime)(),s;try{s=new hIt.URL(t.path,t.origin)}catch(V){this._diag.warn("could not determine url.full:",V);return}let u=s.protocol.replace(":",""),l=this.getRequestMethod(t.method),p={[os.ATTR_HTTP_REQUEST_METHOD]:l,[os.ATTR_HTTP_REQUEST_METHOD_ORIGINAL]:t.method,[os.ATTR_URL_FULL]:s.toString(),[os.ATTR_URL_PATH]:s.pathname,[os.ATTR_URL_QUERY]:s.search,[os.ATTR_URL_SCHEME]:u},h={https:"443",http:"80"},y=s.hostname,S=s.port||h[u];p[os.ATTR_SERVER_ADDRESS]=y,S&&!isNaN(Number(S))&&(p[os.ATTR_SERVER_PORT]=Number(S));let v=this.parseRequestHeaders(t).get("user-agent");if(v){let V=Array.isArray(v)?v[v.length-1]:v;p[os.ATTR_USER_AGENT_ORIGINAL]=V}let R=(0,Pw.safeExecuteInTheMiddle)(()=>n.startSpanHook?.(t),V=>V&&this._diag.error("caught startSpanHook error: ",V),!0);R&&Object.entries(R).forEach(([V,ae])=>{p[V]=ae});let x=Kl.context.active(),O=Kl.trace.getSpan(x),M;n.requireParentforSpans&&(!O||!Kl.trace.isSpanContextValid(O.spanContext()))?M=Kl.trace.wrapSpanContext(Kl.INVALID_SPAN_CONTEXT):M=this.tracer.startSpan(l==="_OTHER"?"HTTP":l,{kind:Kl.SpanKind.CLIENT,attributes:p},x),(0,Pw.safeExecuteInTheMiddle)(()=>n.requestHook?.(M,t),V=>V&&this._diag.error("caught requestHook error: ",V),!0);let j=Kl.trace.setSpan(Kl.context.active(),M),G={};Kl.propagation.inject(j,G);let H=Object.entries(G);for(let V=0;V<H.length;V++){let[ae,se]=H[V];typeof t.addHeader=="function"?t.addHeader(ae,se):typeof t.headers=="string"?t.headers+=`${ae}: ${se}\r
36
36
  `:Array.isArray(t.headers)&&t.headers.push(ae,se)}this._recordFromReq.set(t,{span:M,attributes:p,startTime:i})}onRequestHeaders({request:t,socket:n}){let r=this._recordFromReq.get(t);if(!r)return;let o=this.getConfig(),{span:i}=r,{remoteAddress:s,remotePort:u}=n,l={[os.ATTR_NETWORK_PEER_ADDRESS]:s,[os.ATTR_NETWORK_PEER_PORT]:u};if(o.headersToSpanAttributes?.requestHeaders){let p=new Set(o.headersToSpanAttributes.requestHeaders.map(y=>y.toLowerCase())),h=this.parseRequestHeaders(t);for(let[y,S]of h.entries())if(p.has(y)){let T=Array.isArray(S)?S:[S];l[`http.request.header.${y}`]=T}}i.setAttributes(l)}onResponseHeaders({request:t,response:n}){let r=this._recordFromReq.get(t);if(!r)return;let{span:o,attributes:i}=r,s={[os.ATTR_HTTP_RESPONSE_STATUS_CODE]:n.statusCode},u=this.getConfig();if((0,Pw.safeExecuteInTheMiddle)(()=>u.responseHook?.(o,{request:t,response:n}),l=>l&&this._diag.error("caught responseHook error: ",l),!0),u.headersToSpanAttributes?.responseHeaders){let l=new Set;u.headersToSpanAttributes?.responseHeaders.forEach(p=>l.add(p.toLowerCase()));for(let p=0;p<n.headers.length;p=p+2){let h=n.headers[p].toString().toLowerCase(),y=n.headers[p+1];if(l.has(h)){let S=`http.response.header.${h}`;Object.hasOwn(s,S)?s[S].push(y.toString()):s[S]=[y.toString()]}}}o.setAttributes(s),o.setStatus({code:n.statusCode>=400?Kl.SpanStatusCode.ERROR:Kl.SpanStatusCode.UNSET}),r.attributes=Object.assign(i,s)}onDone({request:t}){let n=this._recordFromReq.get(t);if(!n)return;let{span:r,attributes:o,startTime:i}=n;r.end(),this._recordFromReq.delete(t),this.recordRequestDuration(o,i)}onError({request:t,error:n}){let r=this._recordFromReq.get(t);if(!r)return;let{span:o,attributes:i,startTime:s}=r;o.recordException(n),o.setStatus({code:Kl.SpanStatusCode.ERROR,message:n.message}),o.end(),this._recordFromReq.delete(t),i[os.ATTR_ERROR_TYPE]=n.message,this.recordRequestDuration(i,s)}recordRequestDuration(t,n){let r={};[os.ATTR_HTTP_RESPONSE_STATUS_CODE,os.ATTR_HTTP_REQUEST_METHOD,os.ATTR_SERVER_ADDRESS,os.ATTR_SERVER_PORT,os.ATTR_URL_SCHEME,os.ATTR_ERROR_TYPE].forEach(s=>{s in t&&(r[s]=t[s])});let i=(0,F4.hrTimeToMilliseconds)((0,F4.hrTimeDuration)(n,(0,F4.hrTime)()))/1e3;this._httpClientDurationHistogram.record(i,r)}getRequestMethod(t){let n={CONNECT:!0,OPTIONS:!0,HEAD:!0,GET:!0,POST:!0,PUT:!0,PATCH:!0,DELETE:!0,TRACE:!0,QUERY:!0};return t.toUpperCase()in n?t.toUpperCase():"_OTHER"}};G4.UndiciInstrumentation=OZ});var twe=P(j4=>{"use strict";m();Object.defineProperty(j4,"__esModule",{value:!0});j4.UndiciInstrumentation=void 0;var _It=ewe();Object.defineProperty(j4,"UndiciInstrumentation",{enumerable:!0,get:function(){return _It.UndiciInstrumentation}})});function nwe(e,t="/"){let n=`${e}`;return n.endsWith("/")&&t.startsWith("/")?`${n}${t.slice(1)}`:!n.endsWith("/")&&!t.startsWith("/")?`${n}/${t}`:`${n}${t}`}function TIt(e,t={}){return typeof e.spans=="boolean"?e.spans:!t.skipOpenTelemetrySetup&&Mi(t)}function bIt(e={}){return{requireParentforSpans:!1,ignoreRequestHook:n=>{let r=nwe(n.origin,n.path),o=e.ignoreOutgoingRequests;return!!(o&&r&&o(r))},startSpanHook:n=>{let r=nwe(n.origin,n.path);if(r.startsWith("data:")){let o=Tv(r);return{[Pt]:"auto.http.otel.node_fetch","http.url":o,[z_]:o,[Yd]:`${n.method||"GET"} ${o}`}}return{[Pt]:"auto.http.otel.node_fetch"}},requestHook:e.requestHook,responseHook:e.responseHook,headersToSpanAttributes:e.headersToSpanAttributes}}var rwe,owe,EIt,yIt,SIt,iwe,swe=w(()=>{m();rwe=ue(twe(),1);mt();_r();owe="NodeFetch",EIt=ut(owe,rwe.UndiciInstrumentation,e=>bIt(e)),yIt=ut(`${owe}.sentry`,LS,e=>e),SIt=((e={})=>({name:"NodeFetch",setupOnce(){TIt(e,_t()?.getOptions())&&EIt(e),yIt(e)}})),iwe=SIt});var z4=P(Mw=>{"use strict";m();Object.defineProperty(Mw,"__esModule",{value:!0});Mw.ExpressLayerType=void 0;var IIt;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(IIt=Mw.ExpressLayerType||(Mw.ExpressLayerType={}))});var H4=P(Lw=>{"use strict";m();Object.defineProperty(Lw,"__esModule",{value:!0});Lw.AttributeNames=void 0;var CIt;(function(e){e.EXPRESS_TYPE="express.type",e.EXPRESS_NAME="express.name"})(CIt=Lw.AttributeNames||(Lw.AttributeNames={}))});var kZ=P(Xv=>{"use strict";m();Object.defineProperty(Xv,"__esModule",{value:!0});Xv._LAYERS_STORE_PROPERTY=Xv.kLayerPatched=void 0;Xv.kLayerPatched=Symbol("express-layer-patched");Xv._LAYERS_STORE_PROPERTY="__ot_middlewares"});var cwe=P(is=>{"use strict";m();Object.defineProperty(is,"__esModule",{value:!0});is.getActualMatchedRoute=is.getConstructedRoute=is.getLayerPath=is.asErrorAndMessage=is.isLayerIgnored=is.getLayerMetadata=is.getRouterPath=is.storeLayerPath=void 0;var PZ=z4(),eR=H4(),zS=kZ(),vIt=(e,t)=>(Array.isArray(e[zS._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(e,zS._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),t===void 0?{isLayerPathStored:!1}:(e[zS._LAYERS_STORE_PROPERTY].push(t),{isLayerPathStored:!0}));is.storeLayerPath=vIt;var RIt=(e,t)=>{let n=t.handle?.stack?.[0];return n?.route?.path?`${e}${n.route.path}`:n?.handle?.stack?(0,is.getRouterPath)(e,n):e};is.getRouterPath=RIt;var xIt=(e,t,n)=>{if(t.name==="router"){let r=(0,is.getRouterPath)("",t),o=r||n||e||"/";return{attributes:{[eR.AttributeNames.EXPRESS_NAME]:o,[eR.AttributeNames.EXPRESS_TYPE]:PZ.ExpressLayerType.ROUTER},name:`router - ${o}`}}else return t.name==="bound dispatch"||t.name==="handle"?{attributes:{[eR.AttributeNames.EXPRESS_NAME]:(e||n)??"request handler",[eR.AttributeNames.EXPRESS_TYPE]:PZ.ExpressLayerType.REQUEST_HANDLER},name:`request handler${t.path?` - ${e||n}`:""}`}:{attributes:{[eR.AttributeNames.EXPRESS_NAME]:t.name,[eR.AttributeNames.EXPRESS_TYPE]:PZ.ExpressLayerType.MIDDLEWARE},name:`middleware - ${t.name}`}};is.getLayerMetadata=xIt;var DIt=(e,t)=>{if(typeof t=="string")return t===e;if(t instanceof RegExp)return t.test(e);if(typeof t=="function")return t(e);throw new TypeError("Pattern is in unsupported datatype")},NIt=(e,t,n)=>{if(Array.isArray(n?.ignoreLayersType)&&n?.ignoreLayersType?.includes(t))return!0;if(Array.isArray(n?.ignoreLayers)===!1)return!1;try{for(let r of n.ignoreLayers)if(DIt(e,r))return!0}catch{}return!1};is.isLayerIgnored=NIt;var BIt=e=>e instanceof Error?[e,e.message]:[String(e),String(e)];is.asErrorAndMessage=BIt;var wIt=e=>{let t=e[0];return Array.isArray(t)?t.map(n=>awe(n)||"").join(","):awe(t)};is.getLayerPath=wIt;var awe=e=>{if(typeof e=="string")return e;if(e instanceof RegExp||typeof e=="number")return e.toString()};function uwe(e){let n=(Array.isArray(e[zS._LAYERS_STORE_PROPERTY])?e[zS._LAYERS_STORE_PROPERTY]:[]).filter(r=>r!=="/"&&r!=="/*");return n.length===1&&n[0]==="*"?"*":n.join("").replace(/\/{2,}/g,"/")}is.getConstructedRoute=uwe;function OIt(e){let t=Array.isArray(e[zS._LAYERS_STORE_PROPERTY])?e[zS._LAYERS_STORE_PROPERTY]:[];if(t.length===0)return;if(t.every(i=>i==="/"))return e.originalUrl==="/"?"/":void 0;let n=uwe(e);if(n==="*"||n.includes("/")&&(n.includes(",")||n.includes("\\")||n.includes("*")||n.includes("[")))return n;let r=n.startsWith("/")?n:`/${n}`;return r.length>0&&(e.originalUrl===r||e.originalUrl.startsWith(r)||kIt(r))?r:void 0}is.getActualMatchedRoute=OIt;function kIt(e){return e.includes(":")||e.includes("*")}});var lwe=P(tR=>{"use strict";m();Object.defineProperty(tR,"__esModule",{value:!0});tR.PACKAGE_NAME=tR.PACKAGE_VERSION=void 0;tR.PACKAGE_VERSION="0.62.0";tR.PACKAGE_NAME="@opentelemetry/instrumentation-express"});var Awe=P(q4=>{"use strict";m();Object.defineProperty(q4,"__esModule",{value:!0});q4.ExpressInstrumentation=void 0;var dwe=Cr(),qc=(ze(),Le(nt)),pwe=z4(),fwe=H4(),Zm=cwe(),mwe=lwe(),nR=sn(),PIt=(Xn(),Le(Gr)),$4=kZ(),MZ=class extends nR.InstrumentationBase{constructor(t={}){super(mwe.PACKAGE_NAME,mwe.PACKAGE_VERSION,t)}init(){return[new nR.InstrumentationNodeModuleDefinition("express",[">=4.0.0 <6"],t=>{let n=typeof t?.Router?.prototype?.route=="function",r=n?t.Router.prototype:t.Router;return(0,nR.isWrapped)(r.route)&&this._unwrap(r,"route"),this._wrap(r,"route",this._getRoutePatch()),(0,nR.isWrapped)(r.use)&&this._unwrap(r,"use"),this._wrap(r,"use",this._getRouterUsePatch()),(0,nR.isWrapped)(t.application.use)&&this._unwrap(t.application,"use"),this._wrap(t.application,"use",this._getAppUsePatch(n)),t},t=>{if(t===void 0)return;let r=typeof t?.Router?.prototype?.route=="function"?t.Router.prototype:t.Router;this._unwrap(r,"route"),this._unwrap(r,"use"),this._unwrap(t.application,"use")})]}_getRoutePatch(){let t=this;return function(n){return function(...o){let i=n.apply(this,o),s=this.stack[this.stack.length-1];return t._applyPatch(s,(0,Zm.getLayerPath)(o)),i}}}_getRouterUsePatch(){let t=this;return function(n){return function(...o){let i=n.apply(this,o),s=this.stack[this.stack.length-1];return t._applyPatch(s,(0,Zm.getLayerPath)(o)),i}}}_getAppUsePatch(t){let n=this;return function(r){return function(...i){let s=t?this.router:this._router,u=r.apply(this,i);if(s){let l=s.stack[s.stack.length-1];n._applyPatch(l,(0,Zm.getLayerPath)(i))}return u}}}_applyPatch(t,n){let r=this;t[$4.kLayerPatched]!==!0&&(t[$4.kLayerPatched]=!0,this._wrap(t,"handle",o=>{if(o.length===4)return o;let i=function(s,u){let{isLayerPathStored:l}=(0,Zm.storeLayerPath)(s,n),p=(0,Zm.getConstructedRoute)(s),h=(0,Zm.getActualMatchedRoute)(s),y={[PIt.ATTR_HTTP_ROUTE]:h},S=(0,Zm.getLayerMetadata)(p,t,n),T=S.attributes[fwe.AttributeNames.EXPRESS_TYPE],v=(0,dwe.getRPCMetadata)(qc.context.active());if(v?.type===dwe.RPCType.HTTP&&(v.route=h),(0,Zm.isLayerIgnored)(S.name,T,r.getConfig()))return T===pwe.ExpressLayerType.MIDDLEWARE&&s[$4._LAYERS_STORE_PROPERTY].pop(),o.apply(this,arguments);if(qc.trace.getSpan(qc.context.active())===void 0)return o.apply(this,arguments);let R=r._getSpanName({request:s,layerType:T,route:p},S.name),x=r.tracer.startSpan(R,{attributes:Object.assign(y,S.attributes)}),O=qc.context.active(),M=qc.trace.setSpan(O,x),{requestHook:j}=r.getConfig();j&&(0,nR.safeExecuteInTheMiddle)(()=>j(x,{request:s,layerType:T,route:p}),se=>{se&&qc.diag.error("express instrumentation: request hook failed",se)},!0);let G=!1;S.attributes[fwe.AttributeNames.EXPRESS_TYPE]===pwe.ExpressLayerType.ROUTER&&(x.end(),G=!0,M=O);let H=()=>{G===!1&&(G=!0,x.end())},V=Array.from(arguments),ae=V.findIndex(se=>typeof se=="function");ae>=0&&(arguments[ae]=function(){let se=arguments[0],Ee=![void 0,null,"route","router"].includes(se);if(!G&&Ee){let[Ft,ve]=(0,Zm.asErrorAndMessage)(se);x.recordException(Ft),x.setStatus({code:qc.SpanStatusCode.ERROR,message:ve})}G===!1&&(G=!0,s.res?.removeListener("finish",H),x.end()),!(s.route&&Ee)&&l&&s[$4._LAYERS_STORE_PROPERTY].pop();let Ke=V[ae],Ze=qc.context.active(),xe=qc.trace.getSpan(O),St=xe?qc.trace.setSpan(Ze,xe):Ze;return qc.context.bind(St,Ke).apply(this,arguments)});try{return qc.context.bind(M,o).apply(this,arguments)}catch(se){let[Ee,Ke]=(0,Zm.asErrorAndMessage)(se);throw x.recordException(Ee),x.setStatus({code:qc.SpanStatusCode.ERROR,message:Ke}),se}finally{G||u.once("finish",H)}};for(let s in o)Object.defineProperty(i,s,{get(){return o[s]},set(u){o[s]=u}});return i}))}_getSpanName(t,n){let{spanNameHook:r}=this.getConfig();if(!(r instanceof Function))return n;try{return r(t,n)??n}catch(o){return qc.diag.error("express instrumentation: error calling span name rewrite hook",o),n}}};q4.ExpressInstrumentation=MZ});var gwe=P(dE=>{"use strict";m();Object.defineProperty(dE,"__esModule",{value:!0});dE.AttributeNames=dE.ExpressLayerType=dE.ExpressInstrumentation=void 0;var MIt=Awe();Object.defineProperty(dE,"ExpressInstrumentation",{enumerable:!0,get:function(){return MIt.ExpressInstrumentation}});var LIt=z4();Object.defineProperty(dE,"ExpressLayerType",{enumerable:!0,get:function(){return LIt.ExpressLayerType}});var UIt=H4();Object.defineProperty(dE,"AttributeNames",{enumerable:!0,get:function(){return UIt.AttributeNames}})});var xs,HS=w(()=>{m();xs=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__});function QIt(e){zr(e,"auto.http.otel.express");let t=kt(e).data,n=t["express.type"];n&&e.setAttribute(Xt,`${n}.express`);let r=t["express.name"];typeof r=="string"&&e.updateName(r)}function FIt(e,t){if(Rn()===Vd())return xs&&W.warn("Isolation scope is still default isolation scope - skipping setting transactionName"),t;if(e.layerType==="request_handler"){let n=e.request,r=n.method?n.method.toUpperCase():"GET";Rn().setTransactionName(`${r} ${e.route}`)}return t}var hwe,_we,Ewe,GIt,ywe,Swe=w(()=>{m();hwe=ue(gwe(),1);mt();_r();HS();_we="Express";Ewe=ut(_we,()=>new hwe.ExpressInstrumentation({requestHook:e=>QIt(e),spanNameHook:(e,t)=>FIt(e,t)})),GIt=(()=>({name:_we,setupOnce(){Ewe()}})),ywe=GIt});var Twe=P(Uw=>{"use strict";m();Object.defineProperty(Uw,"__esModule",{value:!0});Uw.SeverityNumber=void 0;var jIt;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.TRACE=1]="TRACE",e[e.TRACE2=2]="TRACE2",e[e.TRACE3=3]="TRACE3",e[e.TRACE4=4]="TRACE4",e[e.DEBUG=5]="DEBUG",e[e.DEBUG2=6]="DEBUG2",e[e.DEBUG3=7]="DEBUG3",e[e.DEBUG4=8]="DEBUG4",e[e.INFO=9]="INFO",e[e.INFO2=10]="INFO2",e[e.INFO3=11]="INFO3",e[e.INFO4=12]="INFO4",e[e.WARN=13]="WARN",e[e.WARN2=14]="WARN2",e[e.WARN3=15]="WARN3",e[e.WARN4=16]="WARN4",e[e.ERROR=17]="ERROR",e[e.ERROR2=18]="ERROR2",e[e.ERROR3=19]="ERROR3",e[e.ERROR4=20]="ERROR4",e[e.FATAL=21]="FATAL",e[e.FATAL2=22]="FATAL2",e[e.FATAL3=23]="FATAL3",e[e.FATAL4=24]="FATAL4"})(jIt=Uw.SeverityNumber||(Uw.SeverityNumber={}))});var K4=P(rR=>{"use strict";m();Object.defineProperty(rR,"__esModule",{value:!0});rR.NOOP_LOGGER=rR.NoopLogger=void 0;var Y4=class{emit(t){}};rR.NoopLogger=Y4;rR.NOOP_LOGGER=new Y4});var bwe=P(Wm=>{"use strict";m();Object.defineProperty(Wm,"__esModule",{value:!0});Wm.API_BACKWARDS_COMPATIBILITY_VERSION=Wm.makeGetter=Wm._global=Wm.GLOBAL_LOGS_API_KEY=void 0;Wm.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");Wm._global=globalThis;function zIt(e,t,n){return r=>r===e?t:n}Wm.makeGetter=zIt;Wm.API_BACKWARDS_COMPATIBILITY_VERSION=1});var LZ=P(oR=>{"use strict";m();Object.defineProperty(oR,"__esModule",{value:!0});oR.NOOP_LOGGER_PROVIDER=oR.NoopLoggerProvider=void 0;var HIt=K4(),J4=class{getLogger(t,n,r){return new HIt.NoopLogger}};oR.NoopLoggerProvider=J4;oR.NOOP_LOGGER_PROVIDER=new J4});var Iwe=P(Z4=>{"use strict";m();Object.defineProperty(Z4,"__esModule",{value:!0});Z4.ProxyLogger=void 0;var $It=K4(),UZ=class{constructor(t,n,r,o){this._provider=t,this.name=n,this.version=r,this.options=o}emit(t){this._getLogger().emit(t)}_getLogger(){if(this._delegate)return this._delegate;let t=this._provider._getDelegateLogger(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):$It.NOOP_LOGGER}};Z4.ProxyLogger=UZ});var Cwe=P(W4=>{"use strict";m();Object.defineProperty(W4,"__esModule",{value:!0});W4.ProxyLoggerProvider=void 0;var qIt=LZ(),VIt=Iwe(),QZ=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new VIt.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:qIt.NOOP_LOGGER_PROVIDER}_setDelegate(t){this._delegate=t}_getDelegateLogger(t,n,r){var o;return(o=this._delegate)===null||o===void 0?void 0:o.getLogger(t,n,r)}};W4.ProxyLoggerProvider=QZ});var Rwe=P(X4=>{"use strict";m();Object.defineProperty(X4,"__esModule",{value:!0});X4.LogsAPI=void 0;var ep=bwe(),YIt=LZ(),vwe=Cwe(),FZ=class e{constructor(){this._proxyLoggerProvider=new vwe.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return ep._global[ep.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(ep._global[ep.GLOBAL_LOGS_API_KEY]=(0,ep.makeGetter)(ep.API_BACKWARDS_COMPATIBILITY_VERSION,t,YIt.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=ep._global[ep.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(ep._global,ep.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete ep._global[ep.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new vwe.ProxyLoggerProvider}};X4.LogsAPI=FZ});var GZ=P(Xm=>{"use strict";m();Object.defineProperty(Xm,"__esModule",{value:!0});Xm.logs=Xm.NoopLogger=Xm.NOOP_LOGGER=Xm.SeverityNumber=void 0;var KIt=Twe();Object.defineProperty(Xm,"SeverityNumber",{enumerable:!0,get:function(){return KIt.SeverityNumber}});var xwe=K4();Object.defineProperty(Xm,"NOOP_LOGGER",{enumerable:!0,get:function(){return xwe.NOOP_LOGGER}});Object.defineProperty(Xm,"NoopLogger",{enumerable:!0,get:function(){return xwe.NoopLogger}});var JIt=Rwe();Xm.logs=JIt.LogsAPI.getInstance()});var Dwe=P(iR=>{"use strict";m();Object.defineProperty(iR,"__esModule",{value:!0});iR.disableInstrumentations=iR.enableInstrumentations=void 0;function ZIt(e,t,n,r){for(let o=0,i=e.length;o<i;o++){let s=e[o];t&&s.setTracerProvider(t),n&&s.setMeterProvider(n),r&&s.setLoggerProvider&&s.setLoggerProvider(r),s.getConfig().enabled||s.enable()}}iR.enableInstrumentations=ZIt;function WIt(e){e.forEach(t=>t.disable())}iR.disableInstrumentations=WIt});var wwe=P(e3=>{"use strict";m();Object.defineProperty(e3,"__esModule",{value:!0});e3.registerInstrumentations=void 0;var Nwe=(ze(),Le(nt)),XIt=GZ(),Bwe=Dwe();function eCt(e){let t=e.tracerProvider||Nwe.trace.getTracerProvider(),n=e.meterProvider||Nwe.metrics.getMeterProvider(),r=e.loggerProvider||XIt.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,Bwe.enableInstrumentations)(o,t,n,r),()=>{(0,Bwe.disableInstrumentations)(o)}}e3.registerInstrumentations=eCt});var Gwe=P(t3=>{"use strict";m();Object.defineProperty(t3,"__esModule",{value:!0});t3.satisfies=void 0;var $Z=(ze(),Le(nt)),Lwe=/^(?:v)?(?<version>(?<major>0|[1-9]\d*)\.(?<minor>0|[1-9]\d*)\.(?<patch>0|[1-9]\d*))(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,tCt=/^(?<op><|>|=|==|<=|>=|~|\^|~>)?\s*(?:v)?(?<version>(?<major>x|X|\*|0|[1-9]\d*)(?:\.(?<minor>x|X|\*|0|[1-9]\d*))?(?:\.(?<patch>x|X|\*|0|[1-9]\d*))?)(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,nCt={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function rCt(e,t,n){if(!oCt(e))return $Z.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=uCt(e);if(!r)return!1;let o=[],i=Uwe(r,t,o,n);return i&&!n?.includePrerelease?sCt(r,o):i}t3.satisfies=rCt;function oCt(e){return typeof e=="string"&&Lwe.test(e)}function Uwe(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(jZ(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=DCt(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!jZ(e,i,n,r))return!1;return!0}return jZ(e,t,n,r)}function jZ(e,t,n,r){if(t=aCt(t,r),t.includes(" "))return Uwe(e,t,n,r);{let o=cCt(t);return n.push(o),iCt(e,o)}}function iCt(e,t){if(t.invalid)return!1;if(!t.version||HZ(t.version))return!0;let n=kwe(e.versionSegments||[],t.versionSegments||[]);if(n===0){let r=e.prereleaseSegments||[],o=t.prereleaseSegments||[];!r.length&&!o.length?n=0:!r.length&&o.length?n=1:r.length&&!o.length?n=-1:n=kwe(r,o)}return nCt[t.op]?.includes(n)}function sCt(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function aCt(e,t){return e=e.trim(),e=RCt(e,t),e=vCt(e),e=xCt(e,t),e=e.trim(),e}function Xu(e){return!e||e.toLowerCase()==="x"||e==="*"}function uCt(e){let t=e.match(Lwe);if(!t){$Z.diag.error(`Invalid version: ${e}`);return}let n=t.groups.version,r=t.groups.prerelease,o=t.groups.build,i=n.split("."),s=r?.split(".");return{op:void 0,version:n,versionSegments:i,versionSegmentCount:i.length,prerelease:r,prereleaseSegments:s,prereleaseSegmentCount:s?s.length:0,build:o}}function cCt(e){if(!e)return{};let t=e.match(tCt);if(!t)return $Z.diag.error(`Invalid range: ${e}`),{invalid:!0};let n=t.groups.op,r=t.groups.version,o=t.groups.prerelease,i=t.groups.build,s=r.split("."),u=o?.split(".");return n==="=="&&(n="="),{op:n||"=",version:r,versionSegments:s,versionSegmentCount:s.length,prerelease:o,prereleaseSegments:u,prereleaseSegmentCount:u?u.length:0,build:i}}function HZ(e){return e==="*"||e==="x"||e==="X"}function Owe(e){let t=parseInt(e,10);return isNaN(t)?e:t}function lCt(e,t){if(typeof e==typeof t){if(typeof e=="number")return[e,t];if(typeof e=="string")return[e,t];throw new Error("Version segments can only be strings or numbers")}else return[String(e),String(t)]}function dCt(e,t){if(HZ(e)||HZ(t))return 0;let[n,r]=lCt(Owe(e),Owe(t));return n>r?1:n<r?-1:0}function kwe(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=dCt(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var Qwe="[a-zA-Z0-9-]",Fwe="0|[1-9]\\d*",pCt=`\\d*[a-zA-Z-]${Qwe}*`,fCt="((?:<|>)?=?)",Pwe=`(?:${Fwe}|${pCt})`,mCt=`(?:-(${Pwe}(?:\\.${Pwe})*))`,Mwe=`${Qwe}+`,ACt=`(?:\\+(${Mwe}(?:\\.${Mwe})*))`,zZ=`${Fwe}|x|X|\\*`,Qw=`[v=\\s]*(${zZ})(?:\\.(${zZ})(?:\\.(${zZ})(?:${mCt})?${ACt}?)?)?`,gCt=`^${fCt}\\s*${Qw}$`,hCt=new RegExp(gCt),_Ct=`^\\s*(${Qw})\\s+-\\s+(${Qw})\\s*$`,ECt=new RegExp(_Ct),yCt="(?:~>?)",SCt=`^${yCt}${Qw}$`,TCt=new RegExp(SCt),bCt="(?:\\^)",ICt=`^${bCt}${Qw}$`,CCt=new RegExp(ICt);function vCt(e){let t=TCt;return e.replace(t,(n,r,o,i,s)=>{let u;return Xu(r)?u="":Xu(o)?u=`>=${r}.0.0 <${+r+1}.0.0-0`:Xu(i)?u=`>=${r}.${o}.0 <${r}.${+o+1}.0-0`:s?u=`>=${r}.${o}.${i}-${s} <${r}.${+o+1}.0-0`:u=`>=${r}.${o}.${i} <${r}.${+o+1}.0-0`,u})}function RCt(e,t){let n=CCt,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,s,u,l)=>{let p;return Xu(i)?p="":Xu(s)?p=`>=${i}.0.0${r} <${+i+1}.0.0-0`:Xu(u)?i==="0"?p=`>=${i}.${s}.0${r} <${i}.${+s+1}.0-0`:p=`>=${i}.${s}.0${r} <${+i+1}.0.0-0`:l?i==="0"?s==="0"?p=`>=${i}.${s}.${u}-${l} <${i}.${s}.${+u+1}-0`:p=`>=${i}.${s}.${u}-${l} <${i}.${+s+1}.0-0`:p=`>=${i}.${s}.${u}-${l} <${+i+1}.0.0-0`:i==="0"?s==="0"?p=`>=${i}.${s}.${u}${r} <${i}.${s}.${+u+1}-0`:p=`>=${i}.${s}.${u}${r} <${i}.${+s+1}.0-0`:p=`>=${i}.${s}.${u} <${+i+1}.0.0-0`,p})}function xCt(e,t){let n=hCt;return e.replace(n,(r,o,i,s,u,l)=>{let p=Xu(i),h=p||Xu(s),y=h||Xu(u),S=y;return o==="="&&S&&(o=""),l=t?.includePrerelease?"-0":"",p?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&S?(h&&(s=0),u=0,o===">"?(o=">=",h?(i=+i+1,s=0,u=0):(s=+s+1,u=0)):o==="<="&&(o="<",h?i=+i+1:s=+s+1),o==="<"&&(l="-0"),r=`${o+i}.${s}.${u}${l}`):h?r=`>=${i}.0.0${l} <${+i+1}.0.0-0`:y&&(r=`>=${i}.${s}.0${l} <${i}.${+s+1}.0-0`),r})}function DCt(e,t){let n=ECt;return e.replace(n,(r,o,i,s,u,l,p,h,y,S,T,v)=>(Xu(i)?o="":Xu(s)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:Xu(u)?o=`>=${i}.${s}.0${t?.includePrerelease?"-0":""}`:l?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,Xu(y)?h="":Xu(S)?h=`<${+y+1}.0.0-0`:Xu(T)?h=`<${y}.${+S+1}.0-0`:v?h=`<=${y}.${S}.${T}-${v}`:t?.includePrerelease?h=`<${y}.${S}.${+T+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var qZ=P(Pa=>{"use strict";m();Object.defineProperty(Pa,"__esModule",{value:!0});Pa.massUnwrap=Pa.unwrap=Pa.massWrap=Pa.wrap=void 0;var ec=console.error.bind(console);function Fw(e,t,n){let r=!!e[t]&&Object.prototype.propertyIsEnumerable.call(e,t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}var NCt=(e,t,n)=>{if(!e||!e[t]){ec("no original function "+String(t)+" to wrap");return}if(!n){ec("no wrapper function"),ec(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){ec("original object and wrapper must be functions");return}let o=n(r,t);return Fw(o,"__original",r),Fw(o,"__unwrap",()=>{e[t]===o&&Fw(e,t,r)}),Fw(o,"__wrapped",!0),Fw(e,t,o),o};Pa.wrap=NCt;var BCt=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{ec("must provide one or more modules to patch"),ec(new Error().stack);return}if(!(t&&Array.isArray(t))){ec("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,Pa.wrap)(r,o,n)})})};Pa.massWrap=BCt;var wCt=(e,t)=>{if(!e||!e[t]){ec("no function to unwrap."),ec(new Error().stack);return}let n=e[t];if(!n.__unwrap)ec("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};Pa.unwrap=wCt;var OCt=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{ec("must provide one or more modules to patch"),ec(new Error().stack);return}if(!(t&&Array.isArray(t))){ec("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,Pa.unwrap)(n,r)})})};Pa.massUnwrap=OCt;function Gw(e){e&&e.logger&&(typeof e.logger!="function"?ec("new logger isn't a function, not replacing"):ec=e.logger)}Pa.default=Gw;Gw.wrap=Pa.wrap;Gw.massWrap=Pa.massWrap;Gw.unwrap=Pa.unwrap;Gw.massUnwrap=Pa.massUnwrap});var jwe=P(r3=>{"use strict";m();Object.defineProperty(r3,"__esModule",{value:!0});r3.InstrumentationAbstract=void 0;var VZ=(ze(),Le(nt)),kCt=GZ(),n3=qZ(),YZ=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=VZ.diag.createComponentLogger({namespace:t}),this._tracer=VZ.trace.getTracer(t,n),this._meter=VZ.metrics.getMeter(t,n),this._logger=kCt.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=n3.wrap;_unwrap=n3.unwrap;_massWrap=n3.massWrap;_massUnwrap=n3.massUnwrap;get meter(){return this._meter}setMeterProvider(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()}get logger(){return this._logger}setLoggerProvider(t){this._logger=t.getLogger(this.instrumentationName,this.instrumentationVersion)}getModuleDefinitions(){let t=this.init()??[];return Array.isArray(t)?t:[t]}_updateMetricInstruments(){}getConfig(){return this._config}setConfig(t){this._config={enabled:!0,...t}}setTracerProvider(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)}get tracer(){return this._tracer}_runSpanCustomizationHook(t,n,r,o){if(t)try{t(r,o)}catch(i){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:n},i)}}};r3.InstrumentationAbstract=YZ});var zwe=P(pE=>{"use strict";m();Object.defineProperty(pE,"__esModule",{value:!0});pE.ModuleNameTrie=pE.ModuleNameSeparator=void 0;pE.ModuleNameSeparator="/";var o3=class{hooks=[];children=new Map},KZ=class{_trie=new o3;_counter=0;insert(t){let n=this._trie;for(let r of t.moduleName.split(pE.ModuleNameSeparator)){let o=n.children.get(r);o||(o=new o3,n.children.set(r,o)),n=o}n.hooks.push({hook:t,insertedId:this._counter++})}search(t,{maintainInsertionOrder:n,fullOnly:r}={}){let o=this._trie,i=[],s=!0;for(let u of t.split(pE.ModuleNameSeparator)){let l=o.children.get(u);if(!l){s=!1;break}r||i.push(...l.hooks),o=l}return r&&s&&i.push(...o.hooks),i.length===0?[]:i.length===1?[i[0].hook]:(n&&i.sort((u,l)=>u.insertedId-l.insertedId),i.map(({hook:u})=>u))}};pE.ModuleNameTrie=KZ});var $we=P(i3=>{"use strict";m();Object.defineProperty(i3,"__esModule",{value:!0});i3.RequireInTheMiddleSingleton=void 0;var PCt=AS(),Hwe=Qe("path"),JZ=zwe(),MCt=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),ZZ=class e{_moduleNameTrie=new JZ.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new PCt.Hook(null,{internals:!0},(t,n,r)=>{let o=LCt(n),i=this._moduleNameTrie.search(o,{maintainInsertionOrder:!0,fullOnly:r===void 0});for(let{onRequire:s}of i)t=s(t,n,r);return t})}register(t,n){let r={moduleName:t,onRequire:n};return this._moduleNameTrie.insert(r),r}static getInstance(){return MCt?new e:this._instance=this._instance??new e}};i3.RequireInTheMiddleSingleton=ZZ;function LCt(e){return Hwe.sep!==JZ.ModuleNameSeparator?e.split(Hwe.sep).join(JZ.ModuleNameSeparator):e}});var Jwe=P(jw=>{m();var qwe=[],WZ=new WeakMap,Vwe=new WeakMap,Ywe=new Map,Kwe=[],UCt={set(e,t,n){let r=WZ.get(e),o=r&&r[t];return typeof o=="function"?o(n):!0},get(e,t){if(t===Symbol.toStringTag)return"Module";let n=Vwe.get(e)[t];if(typeof n=="function")return n()},defineProperty(e,t,n){if(!("value"in n))throw new Error("Getters/setters are not supported for exports property descriptors.");let r=WZ.get(e),o=r&&r[t];return typeof o=="function"?o(n.value):!0}};function QCt(e,t,n,r,o){Ywe.set(e,o),WZ.set(t,n),Vwe.set(t,r);let i=new Proxy(t,UCt);qwe.forEach(s=>s(e,i,o)),Kwe.push([e,i,o])}jw.register=QCt;jw.importHooks=qwe;jw.specifiers=Ywe;jw.toHook=Kwe});var nW=P((kxn,aR)=>{m();var Zwe=Qe("path"),FCt=jU(),{fileURLToPath:GCt}=Qe("url"),{MessageChannel:jCt}=Qe("worker_threads"),{isBuiltin:XZ}=Qe("module");XZ||(XZ=()=>!0);var{importHooks:eW,specifiers:zCt,toHook:HCt}=Jwe();function Wwe(e){eW.push(e),HCt.forEach(([t,n,r])=>e(t,n,r))}function Xwe(e){let t=eW.indexOf(e);t>-1&&eW.splice(t,1)}function sR(e,t,n,r){let o=e(t,n,r);o&&o!==t&&"default"in t&&(t.default=o)}var tW;function $Ct(){let{port1:e,port2:t}=new jCt,n=0,r;tW=u=>{n++,e.postMessage(u)},e.on("message",()=>{n--,r&&n<=0&&r()}).unref();function o(){let u=setInterval(()=>{},1e3),l=new Promise(p=>{r=p}).then(()=>{clearInterval(u)});return n===0&&r(),l}let i=t;return{registerOptions:{data:{addHookMessagePort:i,include:[]},transferList:[i]},addHookMessagePort:i,waitForAllMessagesAcknowledged:o}}function zw(e,t,n){if(!(this instanceof zw))return new zw(e,t,n);typeof e=="function"?(n=e,e=null,t=null):typeof t=="function"&&(n=t,t=null);let r=t?t.internals===!0:!1;tW&&Array.isArray(e)&&tW(e),this._iitmHook=(o,i,s)=>{let u=o,l=u.startsWith("node:"),p,h;if(l){let y=o.slice(5);XZ(y)&&(o=y)}else if(u.startsWith("file://")){let y=Error.stackTraceLimit;Error.stackTraceLimit=0;try{p=GCt(o),o=p}catch{}if(Error.stackTraceLimit=y,p){let S=FCt(p);S&&(o=S.name,h=S.basedir)}}if(e)for(let y of e)if(p&&y===p)sR(n,i,p,void 0);else if(y===o){if(!h)sR(n,i,o,h);else if(h.endsWith(zCt.get(u)))sR(n,i,o,h);else if(r){let S=o+Zwe.sep+Zwe.relative(h,p);sR(n,i,S,h)}}else y===s&&sR(n,i,s,h);else sR(n,i,o,h)},Wwe(this._iitmHook)}zw.prototype.unhook=function(){Xwe(this._iitmHook)};aR.exports=zw;aR.exports.Hook=zw;aR.exports.addHook=Wwe;aR.exports.removeHook=Xwe;aR.exports.createAddHookMessageChannel=$Ct});var rW=P(fE=>{"use strict";m();Object.defineProperty(fE,"__esModule",{value:!0});fE.isWrapped=fE.safeExecuteInTheMiddleAsync=fE.safeExecuteInTheMiddle=void 0;function qCt(e,t,n){let r,o;try{o=e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}fE.safeExecuteInTheMiddle=qCt;async function VCt(e,t,n){let r,o;try{o=await e()}catch(i){r=i}finally{if(await t(r,o),r&&!n)throw r;return o}}fE.safeExecuteInTheMiddleAsync=VCt;function YCt(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}fE.isWrapped=YCt});var nOe=P(s3=>{"use strict";m();Object.defineProperty(s3,"__esModule",{value:!0});s3.InstrumentationBase=void 0;var Hw=Qe("path"),eOe=Qe("util"),KCt=Gwe(),oW=qZ(),JCt=jwe(),ZCt=$we(),WCt=nW(),$w=(ze(),Le(nt)),XCt=AS(),evt=Qe("fs"),tvt=rW(),iW=class extends JCt.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=ZCt.RequireInTheMiddleSingleton.getInstance();_enabled=!1;constructor(t,n,r){super(t,n,r);let o=this.init();o&&!Array.isArray(o)&&(o=[o]),this._modules=o||[],this._config.enabled&&this.enable()}_wrap=(t,n,r)=>{if((0,tvt.isWrapped)(t[n])&&this._unwrap(t,n),eOe.types.isProxy(t)){let o=(0,oW.wrap)(Object.assign({},t),n,r);return Object.defineProperty(t,n,{value:o}),o}else return(0,oW.wrap)(t,n,r)};_unwrap=(t,n)=>eOe.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,oW.unwrap)(t,n);_massWrap=(t,n,r)=>{if(t)Array.isArray(t)||(t=[t]);else{$w.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){$w.diag.error("must provide one or more functions to wrap on modules");return}t.forEach(o=>{n.forEach(i=>{this._wrap(o,i,r)})})};_massUnwrap=(t,n)=>{if(t)Array.isArray(t)||(t=[t]);else{$w.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){$w.diag.error("must provide one or more functions to wrap on modules");return}t.forEach(r=>{n.forEach(o=>{this._unwrap(r,o)})})};_warnOnPreloadedModules(){this._modules.forEach(t=>{let{name:n}=t;try{let r=Qe.resolve(n);Qe.cache[r]&&this._diag.warn(`Module ${n} has been loaded before ${this.instrumentationName} so it might not work, please initialize it before requiring ${n}`)}catch{}})}_extractPackageVersion(t){try{let n=(0,evt.readFileSync)(Hw.join(t,"package.json"),{encoding:"utf8"}),r=JSON.parse(n).version;return typeof r=="string"?r:void 0}catch{$w.diag.warn("Failed extracting version",t)}}_onRequire(t,n,r,o){if(!o)return typeof t.patch=="function"&&(t.moduleExports=n,this._enabled)?(this._diag.debug("Applying instrumentation patch for nodejs core module on require hook",{module:t.name}),t.patch(n)):n;let i=this._extractPackageVersion(o);if(t.moduleVersion=i,t.name===r)return tOe(t.supportedVersions,i,t.includePrerelease)&&typeof t.patch=="function"&&(t.moduleExports=n,this._enabled)?(this._diag.debug("Applying instrumentation patch for module on require hook",{module:t.name,version:t.moduleVersion,baseDir:o}),t.patch(n,t.moduleVersion)):n;let s=t.files??[],u=Hw.normalize(r);return s.filter(p=>p.name===u&&tOe(p.supportedVersions,i,t.includePrerelease)).reduce((p,h)=>(h.moduleExports=p,this._enabled?(this._diag.debug("Applying instrumentation patch for nodejs module file on require hook",{module:t.name,version:t.moduleVersion,fileName:h.name,baseDir:o}),h.patch(p,t.moduleVersion)):p),n)}enable(){if(!this._enabled){if(this._enabled=!0,this._hooks.length>0){for(let t of this._modules){typeof t.patch=="function"&&t.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module on instrumentation enabled",{module:t.name,version:t.moduleVersion}),t.patch(t.moduleExports,t.moduleVersion));for(let n of t.files)n.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module file on instrumentation enabled",{module:t.name,version:t.moduleVersion,fileName:n.name}),n.patch(n.moduleExports,t.moduleVersion))}return}this._warnOnPreloadedModules();for(let t of this._modules){let n=(s,u,l)=>{if(!l&&Hw.isAbsolute(u)){let p=Hw.parse(u);u=p.name,l=p.dir}return this._onRequire(t,s,u,l)},r=(s,u,l)=>this._onRequire(t,s,u,l),o=Hw.isAbsolute(t.name)?new XCt.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new WCt.Hook([t.name],{internals:!0},n);this._hooks.push(i)}}}disable(){if(this._enabled){this._enabled=!1;for(let t of this._modules){typeof t.unpatch=="function"&&t.moduleExports&&(this._diag.debug("Removing instrumentation patch for nodejs module on instrumentation disabled",{module:t.name,version:t.moduleVersion}),t.unpatch(t.moduleExports,t.moduleVersion));for(let n of t.files)n.moduleExports&&(this._diag.debug("Removing instrumentation patch for nodejs module file on instrumentation disabled",{module:t.name,version:t.moduleVersion,fileName:n.name}),n.unpatch(n.moduleExports,t.moduleVersion))}}}isEnabled(){return this._enabled}};s3.InstrumentationBase=iW;function tOe(e,t,n){return typeof t>"u"?e.includes("*"):e.some(r=>(0,KCt.satisfies)(t,r,{includePrerelease:n}))}});var rOe=P(a3=>{"use strict";m();Object.defineProperty(a3,"__esModule",{value:!0});a3.normalize=void 0;var nvt=Qe("path");Object.defineProperty(a3,"normalize",{enumerable:!0,get:function(){return nvt.normalize}})});var oOe=P(uR=>{"use strict";m();Object.defineProperty(uR,"__esModule",{value:!0});uR.normalize=uR.InstrumentationBase=void 0;var rvt=nOe();Object.defineProperty(uR,"InstrumentationBase",{enumerable:!0,get:function(){return rvt.InstrumentationBase}});var ovt=rOe();Object.defineProperty(uR,"normalize",{enumerable:!0,get:function(){return ovt.normalize}})});var sW=P(cR=>{"use strict";m();Object.defineProperty(cR,"__esModule",{value:!0});cR.normalize=cR.InstrumentationBase=void 0;var iOe=oOe();Object.defineProperty(cR,"InstrumentationBase",{enumerable:!0,get:function(){return iOe.InstrumentationBase}});Object.defineProperty(cR,"normalize",{enumerable:!0,get:function(){return iOe.normalize}})});var sOe=P(u3=>{"use strict";m();Object.defineProperty(u3,"__esModule",{value:!0});u3.InstrumentationNodeModuleDefinition=void 0;var aW=class{files;name;supportedVersions;patch;unpatch;constructor(t,n,r,o,i){this.files=i||[],this.name=t,this.supportedVersions=n,this.patch=r,this.unpatch=o}};u3.InstrumentationNodeModuleDefinition=aW});var aOe=P(c3=>{"use strict";m();Object.defineProperty(c3,"__esModule",{value:!0});c3.InstrumentationNodeModuleFile=void 0;var ivt=sW(),uW=class{name;supportedVersions;patch;unpatch;constructor(t,n,r,o){this.name=(0,ivt.normalize)(t),this.supportedVersions=n,this.patch=r,this.unpatch=o}};c3.InstrumentationNodeModuleFile=uW});var uOe=P($S=>{"use strict";m();Object.defineProperty($S,"__esModule",{value:!0});$S.semconvStabilityFromStr=$S.SemconvStability=void 0;var l3;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(l3=$S.SemconvStability||($S.SemconvStability={}));function svt(e,t){let n=l3.OLD,r=t?.split(",").map(o=>o.trim()).filter(o=>o!=="");for(let o of r??[])if(o.toLowerCase()===e+"/dup"){n=l3.DUPLICATE;break}else o.toLowerCase()===e&&(n=l3.STABLE);return n}$S.semconvStabilityFromStr=svt});var lOe=P(ss=>{"use strict";m();Object.defineProperty(ss,"__esModule",{value:!0});ss.semconvStabilityFromStr=ss.SemconvStability=ss.safeExecuteInTheMiddleAsync=ss.safeExecuteInTheMiddle=ss.isWrapped=ss.InstrumentationNodeModuleFile=ss.InstrumentationNodeModuleDefinition=ss.InstrumentationBase=ss.registerInstrumentations=void 0;var avt=wwe();Object.defineProperty(ss,"registerInstrumentations",{enumerable:!0,get:function(){return avt.registerInstrumentations}});var uvt=sW();Object.defineProperty(ss,"InstrumentationBase",{enumerable:!0,get:function(){return uvt.InstrumentationBase}});var cvt=sOe();Object.defineProperty(ss,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return cvt.InstrumentationNodeModuleDefinition}});var lvt=aOe();Object.defineProperty(ss,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return lvt.InstrumentationNodeModuleFile}});var cW=rW();Object.defineProperty(ss,"isWrapped",{enumerable:!0,get:function(){return cW.isWrapped}});Object.defineProperty(ss,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return cW.safeExecuteInTheMiddle}});Object.defineProperty(ss,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return cW.safeExecuteInTheMiddleAsync}});var cOe=uOe();Object.defineProperty(ss,"SemconvStability",{enumerable:!0,get:function(){return cOe.SemconvStability}});Object.defineProperty(ss,"semconvStabilityFromStr",{enumerable:!0,get:function(){return cOe.semconvStabilityFromStr}})});var dOe=P((tDn,dvt)=>{dvt.exports={name:"@fastify/otel",version:"0.18.0",description:"Official Fastify OpenTelemetry Instrumentation",main:"index.js",type:"commonjs",types:"types/index.d.ts",scripts:{lint:"eslint","lint:fix":"eslint --fix",test:"npm run test:all && npm run test:typescript","test:unit":"c8 --100 node --test","test:all":"npm run test:v4 && npm run test:v5","test:v4":"cross-env FASTIFY_VERSION=fastifyv4 npm run test:unit","test:v5":"cross-env FASTIFY_VERSION=fastify npm run test:unit","test:coverage":"c8 node --test && c8 report --reporter=html","test:typescript":"tsd"},repository:{type:"git",url:"git+https://github.com/fastify/otel.git"},keywords:["plugin","helper","fastify","instrumentation","otel","opentelemetry"],author:"Carlos Fuentes - @metcoder95 (https://metcoder.dev)",license:"MIT",bugs:{url:"https://github.com/fastify/otel/issues"},homepage:"https://github.com/fastify/otel#readme",funding:[{type:"github",url:"https://github.com/sponsors/fastify"},{type:"opencollective",url:"https://opencollective.com/fastify"}],devDependencies:{"@fastify/type-provider-typebox":"^6.1.0","@opentelemetry/context-async-hooks":"^2.0.0","@opentelemetry/contrib-test-utils":"^0.59.0","@opentelemetry/instrumentation-http":"^0.212.0","@opentelemetry/propagator-jaeger":"^2.0.0","@opentelemetry/sdk-trace-base":"^2.0.0","@opentelemetry/sdk-trace-node":"^2.2.0","@types/node":"^25.0.3",c8:"^11.0.0","cross-env":"^10.0.0",eslint:"^9.16.0",fastify:"^5.1.0","fastify-plugin":"^5.1.0",fastifyv4:"npm:fastify@^4.0.0",neostandard:"^0.12.0",tsd:"^0.33.0"},dependencies:{"@opentelemetry/core":"^2.0.0","@opentelemetry/instrumentation":"^0.212.0","@opentelemetry/semantic-conventions":"^1.28.0",minimatch:"^10.2.4"},peerDependencies:{"@opentelemetry/api":"^1.9.0"},tsd:{directory:"types"}}});var fOe=P(qS=>{"use strict";m();Object.defineProperty(qS,"__esModule",{value:!0});qS.range=qS.balanced=void 0;var pvt=(e,t,n)=>{let r=e instanceof RegExp?pOe(e,n):e,o=t instanceof RegExp?pOe(t,n):t,i=r!==null&&o!=null&&(0,qS.range)(r,o,n);return i&&{start:i[0],end:i[1],pre:n.slice(0,i[0]),body:n.slice(i[0]+r.length,i[1]),post:n.slice(i[1]+o.length)}};qS.balanced=pvt;var pOe=(e,t)=>{let n=t.match(e);return n?n[0]:null},fvt=(e,t,n)=>{let r,o,i,s,u,l=n.indexOf(e),p=n.indexOf(t,l+1),h=l;if(l>=0&&p>0){if(e===t)return[l,p];for(r=[],i=n.length;h>=0&&!u;){if(h===l)r.push(h),l=n.indexOf(e,h+1);else if(r.length===1){let y=r.pop();y!==void 0&&(u=[y,p])}else o=r.pop(),o!==void 0&&o<i&&(i=o,s=p),p=n.indexOf(t,h+1);h=l<p&&l>=0?l:p}r.length&&s!==void 0&&(u=[i,s])}return u};qS.range=fvt});var yOe=P(lR=>{"use strict";m();Object.defineProperty(lR,"__esModule",{value:!0});lR.EXPANSION_MAX=void 0;lR.expand=vvt;var mOe=fOe(),AOe="\0SLASH"+Math.random()+"\0",gOe="\0OPEN"+Math.random()+"\0",dW="\0CLOSE"+Math.random()+"\0",hOe="\0COMMA"+Math.random()+"\0",_Oe="\0PERIOD"+Math.random()+"\0",mvt=new RegExp(AOe,"g"),Avt=new RegExp(gOe,"g"),gvt=new RegExp(dW,"g"),hvt=new RegExp(hOe,"g"),_vt=new RegExp(_Oe,"g"),Evt=/\\\\/g,yvt=/\\{/g,Svt=/\\}/g,Tvt=/\\,/g,bvt=/\\\./g;lR.EXPANSION_MAX=1e5;function lW(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function Ivt(e){return e.replace(Evt,AOe).replace(yvt,gOe).replace(Svt,dW).replace(Tvt,hOe).replace(bvt,_Oe)}function Cvt(e){return e.replace(mvt,"\\").replace(Avt,"{").replace(gvt,"}").replace(hvt,",").replace(_vt,".")}function EOe(e){if(!e)return[""];let t=[],n=(0,mOe.balanced)("{","}",e);if(!n)return e.split(",");let{pre:r,body:o,post:i}=n,s=r.split(",");s[s.length-1]+="{"+o+"}";let u=EOe(i);return i.length&&(s[s.length-1]+=u.shift(),s.push.apply(s,u)),t.push.apply(t,s),t}function vvt(e,t={}){if(!e)return[];let{max:n=lR.EXPANSION_MAX}=t;return e.slice(0,2)==="{}"&&(e="\\{\\}"+e.slice(2)),qw(Ivt(e),n,!0).map(Cvt)}function Rvt(e){return"{"+e+"}"}function xvt(e){return/^-?0\d/.test(e)}function Dvt(e,t){return e<=t}function Nvt(e,t){return e>=t}function qw(e,t,n){let r=[],o=(0,mOe.balanced)("{","}",e);if(!o)return[e];let i=o.pre,s=o.post.length?qw(o.post,t,!1):[""];if(/\$$/.test(o.pre))for(let u=0;u<s.length&&u<t;u++){let l=i+"{"+o.body+"}"+s[u];r.push(l)}else{let u=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body),l=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body),p=u||l,h=o.body.indexOf(",")>=0;if(!p&&!h)return o.post.match(/,(?!,).*\}/)?(e=o.pre+"{"+o.body+dW+o.post,qw(e,t,!0)):[e];let y;if(p)y=o.body.split(/\.\./);else if(y=EOe(o.body),y.length===1&&y[0]!==void 0&&(y=qw(y[0],t,!1).map(Rvt),y.length===1))return s.map(T=>o.pre+y[0]+T);let S;if(p&&y[0]!==void 0&&y[1]!==void 0){let T=lW(y[0]),v=lW(y[1]),R=Math.max(y[0].length,y[1].length),x=y.length===3&&y[2]!==void 0?Math.max(Math.abs(lW(y[2])),1):1,O=Dvt;v<T&&(x*=-1,O=Nvt);let j=y.some(xvt);S=[];for(let G=T;O(G,v)&&S.length<t;G+=x){let H;if(l)H=String.fromCharCode(G),H==="\\"&&(H="");else if(H=String(G),j){let V=R-H.length;if(V>0){let ae=new Array(V+1).join("0");G<0?H="-"+ae+H.slice(1):H=ae+H}}S.push(H)}}else{S=[];for(let T=0;T<y.length;T++)S.push.apply(S,qw(y[T],t,!1))}for(let T=0;T<S.length;T++)for(let v=0;v<s.length&&r.length<t;v++){let R=i+S[T]+s[v];(!n||p||R)&&r.push(R)}}return r}});var SOe=P(d3=>{"use strict";m();Object.defineProperty(d3,"__esModule",{value:!0});d3.assertValidPattern=void 0;var Bvt=1024*64,wvt=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>Bvt)throw new TypeError("pattern is too long")};d3.assertValidPattern=wvt});var bOe=P(p3=>{"use strict";m();Object.defineProperty(p3,"__esModule",{value:!0});p3.parseClass=void 0;var Ovt={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},Vw=e=>e.replace(/[[\]\\-]/g,"\\$&"),kvt=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),TOe=e=>e.join(""),Pvt=(e,t)=>{let n=t;if(e.charAt(n)!=="[")throw new Error("not in a brace expression");let r=[],o=[],i=n+1,s=!1,u=!1,l=!1,p=!1,h=n,y="";e:for(;i<e.length;){let R=e.charAt(i);if((R==="!"||R==="^")&&i===n+1){p=!0,i++;continue}if(R==="]"&&s&&!l){h=i+1;break}if(s=!0,R==="\\"&&!l){l=!0,i++;continue}if(R==="["&&!l){for(let[x,[O,M,j]]of Object.entries(Ovt))if(e.startsWith(x,i)){if(y)return["$.",!1,e.length-n,!0];i+=x.length,j?o.push(O):r.push(O),u=u||M;continue e}}if(l=!1,y){R>y?r.push(Vw(y)+"-"+Vw(R)):R===y&&r.push(Vw(R)),y="",i++;continue}if(e.startsWith("-]",i+1)){r.push(Vw(R+"-")),i+=2;continue}if(e.startsWith("-",i+1)){y=R,i+=2;continue}r.push(Vw(R)),i++}if(h<i)return["",!1,0,!1];if(!r.length&&!o.length)return["$.",!1,e.length-n,!0];if(o.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!p){let R=r[0].length===2?r[0].slice(-1):r[0];return[kvt(R),!1,h-n,!1]}let S="["+(p?"^":"")+TOe(r)+"]",T="["+(p?"":"^")+TOe(o)+"]";return[r.length&&o.length?"("+S+"|"+T+")":r.length?S:T,u,h-n,!0]};p3.parseClass=Pvt});var m3=P(f3=>{"use strict";m();Object.defineProperty(f3,"__esModule",{value:!0});f3.unescape=void 0;var Mvt=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!0}={})=>n?t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"):t?e.replace(/\[([^\/\\{}])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\{}])\]/g,"$1$2").replace(/\\([^\/{}])/g,"$1");f3.unescape=Mvt});var mW=P(_3=>{"use strict";m();var Vc;Object.defineProperty(_3,"__esModule",{value:!0});_3.AST=void 0;var Lvt=bOe(),A3=m3(),Uvt=new Set(["!","?","+","*","@"]),pW=e=>Uvt.has(e),IOe=e=>pW(e.type),Qvt=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),Fvt=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),Gvt=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),COe=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),jvt="(?!(?:^|/)\\.\\.?(?:$|/))",g3="(?!\\.)",zvt=new Set(["[","."]),Hvt=new Set(["..","."]),$vt=new Set("().*{}+?[]^$\\!"),qvt=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),fW="[^/]",vOe=fW+"*?",ROe=fW+"+?",Vvt=0,h3=class{type;#n;#r;#o=!1;#e=[];#t;#a;#c;#u=!1;#i;#s;#l=!1;id=++Vvt;get depth(){return(this.#t?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#n.id,parent:this.#t?.id,depth:this.depth,partsLength:this.#e.length,parts:this.#e}}constructor(t,n,r={}){this.type=t,t&&(this.#r=!0),this.#t=n,this.#n=this.#t?this.#t.#n:this,this.#i=this.#n===this?r:this.#n.#i,this.#c=this.#n===this?[]:this.#n.#c,t==="!"&&!this.#n.#u&&this.#c.push(this),this.#a=this.#t?this.#t.#e.length:0}get hasMagic(){if(this.#r!==void 0)return this.#r;for(let t of this.#e)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#r=!0;return this.#r}toString(){return this.#s!==void 0?this.#s:this.type?this.#s=this.type+"("+this.#e.map(t=>String(t)).join("|")+")":this.#s=this.#e.map(t=>String(t)).join("")}#h(){if(this!==this.#n)throw new Error("should only call on root");if(this.#u)return this;this.toString(),this.#u=!0;let t;for(;t=this.#c.pop();){if(t.type!=="!")continue;let n=t,r=n.#t;for(;r;){for(let o=n.#a+1;!r.type&&o<r.#e.length;o++)for(let i of t.#e){if(typeof i=="string")throw new Error("string part in extglob AST??");i.copyIn(r.#e[o])}n=r,r=n.#t}}return this}push(...t){for(let n of t)if(n!==""){if(typeof n!="string"&&!(n instanceof Vc&&n.#t===this))throw new Error("invalid part: "+n);this.#e.push(n)}}toJSON(){let t=this.type===null?this.#e.slice().map(n=>typeof n=="string"?n:n.toJSON()):[this.type,...this.#e.map(n=>n.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#n||this.#n.#u&&this.#t?.type==="!")&&t.push({}),t}isStart(){if(this.#n===this)return!0;if(!this.#t?.isStart())return!1;if(this.#a===0)return!0;let t=this.#t;for(let n=0;n<this.#a;n++){let r=t.#e[n];if(!(r instanceof Vc&&r.type==="!"))return!1}return!0}isEnd(){if(this.#n===this||this.#t?.type==="!")return!0;if(!this.#t?.isEnd())return!1;if(!this.type)return this.#t?.isEnd();let t=this.#t?this.#t.#e.length:0;return this.#a===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let n=new Vc(this.type,t);for(let r of this.#e)n.copyIn(r);return n}static#d(t,n,r,o,i){let s=o.maxExtglobRecursion??2,u=!1,l=!1,p=-1,h=!1;if(n.type===null){let R=r,x="";for(;R<t.length;){let O=t.charAt(R++);if(u||O==="\\"){u=!u,x+=O;continue}if(l){R===p+1?(O==="^"||O==="!")&&(h=!0):O==="]"&&!(R===p+2&&h)&&(l=!1),x+=O;continue}else if(O==="["){l=!0,p=R,h=!1,x+=O;continue}if(!o.noext&&pW(O)&&t.charAt(R)==="("&&i<=s){n.push(x),x="";let j=new Vc(O,n);R=Vc.#d(t,j,R,o,i+1),n.push(j);continue}x+=O}return n.push(x),R}let y=r+1,S=new Vc(null,n),T=[],v="";for(;y<t.length;){let R=t.charAt(y++);if(u||R==="\\"){u=!u,v+=R;continue}if(l){y===p+1?(R==="^"||R==="!")&&(h=!0):R==="]"&&!(y===p+2&&h)&&(l=!1),v+=R;continue}else if(R==="["){l=!0,p=y,h=!1,v+=R;continue}if(!o.noext&&pW(R)&&t.charAt(y)==="("&&(i<=s||n&&n.#p(R))){let O=n&&n.#p(R)?0:1;S.push(v),v="";let M=new Vc(R,S);S.push(M),y=Vc.#d(t,M,y,o,i+O);continue}if(R==="|"){S.push(v),v="",T.push(S),S=new Vc(null,n);continue}if(R===")")return v===""&&n.#e.length===0&&(n.#l=!0),S.push(v),v="",n.push(...T,S),y;v+=R}return n.type=null,n.#r=void 0,n.#e=[t.substring(r-1)],y}#_(t){return this.#m(t,Fvt)}#m(t,n=Qvt){if(!t||typeof t!="object"||t.type!==null||t.#e.length!==1||this.type===null)return!1;let r=t.#e[0];return!r||typeof r!="object"||r.type===null?!1:this.#p(r.type,n)}#p(t,n=Gvt){return!!n.get(this.type)?.includes(t)}#E(t,n){let r=t.#e[0],o=new Vc(null,r,this.options);o.#e.push(""),r.push(o),this.#A(t,n)}#A(t,n){let r=t.#e[0];this.#e.splice(n,1,...r.#e);for(let o of r.#e)typeof o=="object"&&(o.#t=this);this.#s=void 0}#y(t){return!!COe.get(this.type)?.has(t)}#S(t){if(!t||typeof t!="object"||t.type!==null||t.#e.length!==1||this.type===null||this.#e.length!==1)return!1;let n=t.#e[0];return!n||typeof n!="object"||n.type===null?!1:this.#y(n.type)}#T(t){let n=COe.get(this.type),r=t.#e[0],o=n?.get(r.type);if(!o)return!1;this.#e=r.#e;for(let i of this.#e)typeof i=="object"&&(i.#t=this);this.type=o,this.#s=void 0,this.#l=!1}static fromGlob(t,n={}){let r=new Vc(null,void 0,n);return Vc.#d(t,r,0,n,0),r}toMMPattern(){if(this!==this.#n)return this.#n.toMMPattern();let t=this.toString(),[n,r,o,i]=this.toRegExpSource();if(!(o||this.#r||this.#i.nocase&&!this.#i.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return r;let u=(this.#i.nocase?"i":"")+(i?"u":"");return Object.assign(new RegExp(`^${n}$`,u),{_src:n,_glob:t})}get options(){return this.#i}toRegExpSource(t){let n=t??!!this.#i.dot;if(this.#n===this&&(this.#f(),this.#h()),!IOe(this)){let l=this.isStart()&&this.isEnd()&&!this.#e.some(T=>typeof T!="string"),p=this.#e.map(T=>{let[v,R,x,O]=typeof T=="string"?Vc.#b(T,this.#r,l):T.toRegExpSource(t);return this.#r=this.#r||x,this.#o=this.#o||O,v}).join(""),h="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&Hvt.has(this.#e[0]))){let v=zvt,R=n&&v.has(p.charAt(0))||p.startsWith("\\.")&&v.has(p.charAt(2))||p.startsWith("\\.\\.")&&v.has(p.charAt(4)),x=!n&&!t&&v.has(p.charAt(0));h=R?jvt:x?g3:""}let y="";return this.isEnd()&&this.#n.#u&&this.#t?.type==="!"&&(y="(?:$|\\/)"),[h+p+y,(0,A3.unescape)(p),this.#r=!!this.#r,this.#o]}let r=this.type==="*"||this.type==="+",o=this.type==="!"?"(?:(?!(?:":"(?:",i=this.#g(n);if(this.isStart()&&this.isEnd()&&!i&&this.type!=="!"){let l=this.toString(),p=this;return p.#e=[l],p.type=null,p.#r=void 0,[l,(0,A3.unescape)(this.toString()),!1,!1]}let s=!r||t||n||!g3?"":this.#g(!0);s===i&&(s=""),s&&(i=`(?:${i})(?:${s})*?`);let u="";if(this.type==="!"&&this.#l)u=(this.isStart()&&!n?g3:"")+ROe;else{let l=this.type==="!"?"))"+(this.isStart()&&!n&&!t?g3:"")+vOe+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&s?")":this.type==="*"&&s?")?":`)${this.type}`;u=o+i+l}return[u,(0,A3.unescape)(i),this.#r=!!this.#r,this.#o]}#f(){if(IOe(this)){let t=0,n=!1;do{n=!0;for(let r=0;r<this.#e.length;r++){let o=this.#e[r];typeof o=="object"&&(o.#f(),this.#m(o)?(n=!1,this.#A(o,r)):this.#_(o)?(n=!1,this.#E(o,r)):this.#S(o)&&(n=!1,this.#T(o)))}}while(!n&&++t<10)}else for(let t of this.#e)typeof t=="object"&&t.#f();this.#s=void 0}#g(t){return this.#e.map(n=>{if(typeof n=="string")throw new Error("string type in extglob ast??");let[r,o,i,s]=n.toRegExpSource(t);return this.#o=this.#o||s,r}).filter(n=>!(this.isStart()&&this.isEnd())||!!n).join("|")}static#b(t,n,r=!1){let o=!1,i="",s=!1,u=!1;for(let l=0;l<t.length;l++){let p=t.charAt(l);if(o){o=!1,i+=($vt.has(p)?"\\":"")+p;continue}if(p==="*"){if(u)continue;u=!0,i+=r&&/^[*]+$/.test(t)?ROe:vOe,n=!0;continue}else u=!1;if(p==="\\"){l===t.length-1?i+="\\\\":o=!0;continue}if(p==="["){let[h,y,S,T]=(0,Lvt.parseClass)(t,l);if(S){i+=h,s=s||y,l+=S-1,n=n||T;continue}}if(p==="?"){i+=fW,n=!0;continue}i+=qvt(p)}return[i,(0,A3.unescape)(t),!!n,s]}};_3.AST=h3;Vc=h3});var AW=P(E3=>{"use strict";m();Object.defineProperty(E3,"__esModule",{value:!0});E3.escape=void 0;var Yvt=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!1}={})=>n?t?e.replace(/[?*()[\]{}]/g,"[$&]"):e.replace(/[?*()[\]\\{}]/g,"\\$&"):t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");E3.escape=Yvt});var kOe=P(At=>{"use strict";m();Object.defineProperty(At,"__esModule",{value:!0});At.unescape=At.escape=At.AST=At.Minimatch=At.match=At.makeRe=At.braceExpand=At.defaults=At.filter=At.GLOBSTAR=At.sep=At.minimatch=void 0;var Kvt=yOe(),y3=SOe(),NOe=mW(),Jvt=AW(),Zvt=m3(),Wvt=(e,t,n={})=>((0,y3.assertValidPattern)(t),!n.nocomment&&t.charAt(0)==="#"?!1:new VS(t,n).match(e));At.minimatch=Wvt;var Xvt=/^\*+([^+@!?\*\[\(]*)$/,eRt=e=>t=>!t.startsWith(".")&&t.endsWith(e),tRt=e=>t=>t.endsWith(e),nRt=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),rRt=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),oRt=/^\*+\.\*+$/,iRt=e=>!e.startsWith(".")&&e.includes("."),sRt=e=>e!=="."&&e!==".."&&e.includes("."),aRt=/^\.\*+$/,uRt=e=>e!=="."&&e!==".."&&e.startsWith("."),cRt=/^\*+$/,lRt=e=>e.length!==0&&!e.startsWith("."),dRt=e=>e.length!==0&&e!=="."&&e!=="..",pRt=/^\?+([^+@!?\*\[\(]*)?$/,fRt=([e,t=""])=>{let n=BOe([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},mRt=([e,t=""])=>{let n=wOe([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},ARt=([e,t=""])=>{let n=wOe([e]);return t?r=>n(r)&&r.endsWith(t):n},gRt=([e,t=""])=>{let n=BOe([e]);return t?r=>n(r)&&r.endsWith(t):n},BOe=([e])=>{let t=e.length;return n=>n.length===t&&!n.startsWith(".")},wOe=([e])=>{let t=e.length;return n=>n.length===t&&n!=="."&&n!==".."},OOe=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",xOe={win32:{sep:"\\"},posix:{sep:"/"}};At.sep=OOe==="win32"?xOe.win32.sep:xOe.posix.sep;At.minimatch.sep=At.sep;At.GLOBSTAR=Symbol("globstar **");At.minimatch.GLOBSTAR=At.GLOBSTAR;var hRt="[^/]",_Rt=hRt+"*?",ERt="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",yRt="(?:(?!(?:\\/|^)\\.).)*?",SRt=(e,t={})=>n=>(0,At.minimatch)(n,e,t);At.filter=SRt;At.minimatch.filter=At.filter;var tp=(e,t={})=>Object.assign({},e,t),TRt=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return At.minimatch;let t=At.minimatch;return Object.assign((r,o,i={})=>t(r,o,tp(e,i)),{Minimatch:class extends t.Minimatch{constructor(o,i={}){super(o,tp(e,i))}static defaults(o){return t.defaults(tp(e,o)).Minimatch}},AST:class extends t.AST{constructor(o,i,s={}){super(o,i,tp(e,s))}static fromGlob(o,i={}){return t.AST.fromGlob(o,tp(e,i))}},unescape:(r,o={})=>t.unescape(r,tp(e,o)),escape:(r,o={})=>t.escape(r,tp(e,o)),filter:(r,o={})=>t.filter(r,tp(e,o)),defaults:r=>t.defaults(tp(e,r)),makeRe:(r,o={})=>t.makeRe(r,tp(e,o)),braceExpand:(r,o={})=>t.braceExpand(r,tp(e,o)),match:(r,o,i={})=>t.match(r,o,tp(e,i)),sep:t.sep,GLOBSTAR:At.GLOBSTAR})};At.defaults=TRt;At.minimatch.defaults=At.defaults;var bRt=(e,t={})=>((0,y3.assertValidPattern)(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,Kvt.expand)(e,{max:t.braceExpandMax}));At.braceExpand=bRt;At.minimatch.braceExpand=At.braceExpand;var IRt=(e,t={})=>new VS(e,t).makeRe();At.makeRe=IRt;At.minimatch.makeRe=At.makeRe;var CRt=(e,t,n={})=>{let r=new VS(t,n);return e=e.filter(o=>r.match(o)),r.options.nonull&&!e.length&&e.push(t),e};At.match=CRt;At.minimatch.match=At.match;var DOe=/[?*]|[+@!]\(.*?\)|\[|\]/,vRt=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),VS=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(t,n={}){(0,y3.assertValidPattern)(t),n=n||{},this.options=n,this.maxGlobstarRecursion=n.maxGlobstarRecursion??200,this.pattern=t,this.platform=n.platform||OOe,this.isWindows=this.platform==="win32";let r="allowWindowsEscape";this.windowsPathsNoEscape=!!n.windowsPathsNoEscape||n[r]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!n.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!n.nonegate,this.comment=!1,this.empty=!1,this.partial=!!n.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=n.windowsNoMagicRoot!==void 0?n.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let n of t)if(typeof n!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,n=this.options;if(!n.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],n.debug&&(this.debug=(...i)=>console.error(...i)),this.debug(this.pattern,this.globSet);let r=this.globSet.map(i=>this.slashSplit(i));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let o=this.globParts.map((i,s,u)=>{if(this.isWindows&&this.windowsNoMagicRoot){let l=i[0]===""&&i[1]===""&&(i[2]==="?"||!DOe.test(i[2]))&&!DOe.test(i[3]),p=/^[a-z]:/i.test(i[0]);if(l)return[...i.slice(0,4),...i.slice(4).map(h=>this.parse(h))];if(p)return[i[0],...i.slice(1).map(h=>this.parse(h))]}return i.map(l=>this.parse(l))});if(this.debug(this.pattern,o),this.set=o.filter(i=>i.indexOf(!1)===-1),this.isWindows)for(let i=0;i<this.set.length;i++){let s=this.set[i];s[0]===""&&s[1]===""&&this.globParts[i][2]==="?"&&typeof s[3]=="string"&&/^[a-z]:$/i.test(s[3])&&(s[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let r=0;r<t.length;r++)for(let o=0;o<t[r].length;o++)t[r][o]==="**"&&(t[r][o]="*");let{optimizationLevel:n=1}=this.options;return n>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):n>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(n=>{let r=-1;for(;(r=n.indexOf("**",r+1))!==-1;){let o=r;for(;n[o+1]==="**";)o++;o!==r&&n.splice(r,o-r)}return n})}levelOneOptimize(t){return t.map(n=>(n=n.reduce((r,o)=>{let i=r[r.length-1];return o==="**"&&i==="**"?r:o===".."&&i&&i!==".."&&i!=="."&&i!=="**"?(r.pop(),r):(r.push(o),r)},[]),n.length===0?[""]:n))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let n=!1;do{if(n=!1,!this.preserveMultipleSlashes){for(let o=1;o<t.length-1;o++){let i=t[o];o===1&&i===""&&t[0]===""||(i==="."||i==="")&&(n=!0,t.splice(o,1),o--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(n=!0,t.pop())}let r=0;for(;(r=t.indexOf("..",r+1))!==-1;){let o=t[r-1];o&&o!=="."&&o!==".."&&o!=="**"&&(n=!0,t.splice(r-1,2),r-=2)}}while(n);return t.length===0?[""]:t}firstPhasePreProcess(t){let n=!1;do{n=!1;for(let r of t){let o=-1;for(;(o=r.indexOf("**",o+1))!==-1;){let s=o;for(;r[s+1]==="**";)s++;s>o&&r.splice(o+1,s-o);let u=r[o+1],l=r[o+2],p=r[o+3];if(u!==".."||!l||l==="."||l===".."||!p||p==="."||p==="..")continue;n=!0,r.splice(o,1);let h=r.slice(0);h[o]="**",t.push(h),o--}if(!this.preserveMultipleSlashes){for(let s=1;s<r.length-1;s++){let u=r[s];s===1&&u===""&&r[0]===""||(u==="."||u==="")&&(n=!0,r.splice(s,1),s--)}r[0]==="."&&r.length===2&&(r[1]==="."||r[1]==="")&&(n=!0,r.pop())}let i=0;for(;(i=r.indexOf("..",i+1))!==-1;){let s=r[i-1];if(s&&s!=="."&&s!==".."&&s!=="**"){n=!0;let l=i===1&&r[i+1]==="**"?["."]:[];r.splice(i-1,2,...l),r.length===0&&r.push(""),i-=2}}}}while(n);return t}secondPhasePreProcess(t){for(let n=0;n<t.length-1;n++)for(let r=n+1;r<t.length;r++){let o=this.partsMatch(t[n],t[r],!this.preserveMultipleSlashes);if(o){t[n]=[],t[r]=o;break}}return t.filter(n=>n.length)}partsMatch(t,n,r=!1){let o=0,i=0,s=[],u="";for(;o<t.length&&i<n.length;)if(t[o]===n[i])s.push(u==="b"?n[i]:t[o]),o++,i++;else if(r&&t[o]==="**"&&n[i]===t[o+1])s.push(t[o]),o++;else if(r&&n[i]==="**"&&t[o]===n[i+1])s.push(n[i]),i++;else if(t[o]==="*"&&n[i]&&(this.options.dot||!n[i].startsWith("."))&&n[i]!=="**"){if(u==="b")return!1;u="a",s.push(t[o]),o++,i++}else if(n[i]==="*"&&t[o]&&(this.options.dot||!t[o].startsWith("."))&&t[o]!=="**"){if(u==="a")return!1;u="b",s.push(n[i]),o++,i++}else return!1;return t.length===n.length&&s}parseNegate(){if(this.nonegate)return;let t=this.pattern,n=!1,r=0;for(let o=0;o<t.length&&t.charAt(o)==="!";o++)n=!n,r++;r&&(this.pattern=t.slice(r)),this.negate=n}matchOne(t,n,r=!1){let o=0,i=0;if(this.isWindows){let u=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),l=!u&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),p=typeof n[0]=="string"&&/^[a-z]:$/i.test(n[0]),h=!p&&n[0]===""&&n[1]===""&&n[2]==="?"&&typeof n[3]=="string"&&/^[a-z]:$/i.test(n[3]),y=l?3:u?0:void 0,S=h?3:p?0:void 0;if(typeof y=="number"&&typeof S=="number"){let[T,v]=[t[y],n[S]];T.toLowerCase()===v.toLowerCase()&&(n[S]=T,i=S,o=y)}}let{optimizationLevel:s=1}=this.options;return s>=2&&(t=this.levelTwoFileOptimize(t)),n.includes(At.GLOBSTAR)?this.#n(t,n,r,o,i):this.#o(t,n,r,o,i)}#n(t,n,r,o,i){let s=n.indexOf(At.GLOBSTAR,i),u=n.lastIndexOf(At.GLOBSTAR),[l,p,h]=r?[n.slice(i,s),n.slice(s+1),[]]:[n.slice(i,s),n.slice(s+1,u),n.slice(u+1)];if(l.length){let M=t.slice(o,o+l.length);if(!this.#o(M,l,r,0,0))return!1;o+=l.length,i+=l.length}let y=0;if(h.length){if(h.length+o>t.length)return!1;let M=t.length-h.length;if(this.#o(t,h,r,M,0))y=h.length;else{if(t[t.length-1]!==""||o+h.length===t.length||(M--,!this.#o(t,h,r,M,0)))return!1;y=h.length+1}}if(!p.length){let M=!!y;for(let j=o;j<t.length-y;j++){let G=String(t[j]);if(M=!0,G==="."||G===".."||!this.options.dot&&G.startsWith("."))return!1}return r||M}let S=[[[],0]],T=S[0],v=0,R=[0];for(let M of p)M===At.GLOBSTAR?(R.push(v),T=[[],0],S.push(T)):(T[0].push(M),v++);let x=S.length-1,O=t.length-y;for(let M of S)M[1]=O-(R[x--]+M[0].length);return!!this.#r(t,S,o,0,r,0,!!y)}#r(t,n,r,o,i,s,u){let l=n[o];if(!l){for(let y=r;y<t.length;y++){u=!0;let S=t[y];if(S==="."||S===".."||!this.options.dot&&S.startsWith("."))return!1}return u}let[p,h]=l;for(;r<=h;){if(this.#o(t.slice(0,r+p.length),p,i,r,0)&&s<this.maxGlobstarRecursion){let T=this.#r(t,n,r+p.length,o+1,i,s+1,u);if(T!==!1)return T}let S=t[r];if(S==="."||S===".."||!this.options.dot&&S.startsWith("."))return!1;r++}return i||null}#o(t,n,r,o,i){let s,u,l,p;for(s=o,u=i,p=t.length,l=n.length;s<p&&u<l;s++,u++){this.debug("matchOne loop");let h=n[u],y=t[s];if(this.debug(n,h,y),h===!1||h===At.GLOBSTAR)return!1;let S;if(typeof h=="string"?(S=y===h,this.debug("string match",h,y,S)):(S=h.test(y),this.debug("pattern match",h,y,S)),!S)return!1}if(s===p&&u===l)return!0;if(s===p)return r;if(u===l)return s===p-1&&t[s]==="";throw new Error("wtf?")}braceExpand(){return(0,At.braceExpand)(this.pattern,this.options)}parse(t){(0,y3.assertValidPattern)(t);let n=this.options;if(t==="**")return At.GLOBSTAR;if(t==="")return"";let r,o=null;(r=t.match(cRt))?o=n.dot?dRt:lRt:(r=t.match(Xvt))?o=(n.nocase?n.dot?rRt:nRt:n.dot?tRt:eRt)(r[1]):(r=t.match(pRt))?o=(n.nocase?n.dot?mRt:fRt:n.dot?ARt:gRt)(r):(r=t.match(oRt))?o=n.dot?sRt:iRt:(r=t.match(aRt))&&(o=uRt);let i=NOe.AST.fromGlob(t,this.options).toMMPattern();return o&&typeof i=="object"&&Reflect.defineProperty(i,"test",{value:o}),i}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let n=this.options,r=n.noglobstar?_Rt:n.dot?ERt:yRt,o=new Set(n.nocase?["i"]:[]),i=t.map(l=>{let p=l.map(y=>{if(y instanceof RegExp)for(let S of y.flags.split(""))o.add(S);return typeof y=="string"?vRt(y):y===At.GLOBSTAR?At.GLOBSTAR:y._src});p.forEach((y,S)=>{let T=p[S+1],v=p[S-1];y!==At.GLOBSTAR||v===At.GLOBSTAR||(v===void 0?T!==void 0&&T!==At.GLOBSTAR?p[S+1]="(?:\\/|"+r+"\\/)?"+T:p[S]=r:T===void 0?p[S-1]=v+"(?:\\/|\\/"+r+")?":T!==At.GLOBSTAR&&(p[S-1]=v+"(?:\\/|\\/"+r+"\\/)"+T,p[S+1]=At.GLOBSTAR))});let h=p.filter(y=>y!==At.GLOBSTAR);if(this.partial&&h.length>=1){let y=[];for(let S=1;S<=h.length;S++)y.push(h.slice(0,S).join("/"));return"(?:"+y.join("|")+")"}return h.join("/")}).join("|"),[s,u]=t.length>1?["(?:",")"]:["",""];i="^"+s+i+u+"$",this.partial&&(i="^(?:\\/|"+s+i.slice(1,-1)+u+")$"),this.negate&&(i="^(?!"+i+").+$");try{this.regexp=new RegExp(i,[...o].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,n=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&n)return!0;let r=this.options;this.isWindows&&(t=t.split("\\").join("/"));let o=this.slashSplit(t);this.debug(this.pattern,"split",o);let i=this.set;this.debug(this.pattern,"set",i);let s=o[o.length-1];if(!s)for(let u=o.length-2;!s&&u>=0;u--)s=o[u];for(let u=0;u<i.length;u++){let l=i[u],p=o;if(r.matchBase&&l.length===1&&(p=[s]),this.matchOne(p,l,n))return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate}static defaults(t){return At.minimatch.defaults(t).Minimatch}};At.Minimatch=VS;var RRt=mW();Object.defineProperty(At,"AST",{enumerable:!0,get:function(){return RRt.AST}});var xRt=AW();Object.defineProperty(At,"escape",{enumerable:!0,get:function(){return xRt.escape}});var DRt=m3();Object.defineProperty(At,"unescape",{enumerable:!0,get:function(){return DRt.unescape}});At.minimatch.AST=NOe.AST;At.minimatch.Minimatch=VS;At.minimatch.escape=Jvt.escape;At.minimatch.unescape=Zvt.unescape});var GOe=P((yDn,_W)=>{"use strict";m();var POe=Qe("node:diagnostics_channel"),{context:S3,trace:gW,SpanStatusCode:T3,propagation:hW,diag:NRt}=(ze(),Le(nt)),{getRPCMetadata:BRt,RPCType:wRt}=Cr(),{ATTR_HTTP_ROUTE:b3,ATTR_HTTP_RESPONSE_STATUS_CODE:MOe,ATTR_HTTP_REQUEST_METHOD:ORt,ATTR_URL_PATH:kRt}=(Xn(),Le(Gr)),{InstrumentationBase:PRt}=lOe(),{version:MRt,name:LOe}=dOe(),LRt=">=4.0.0 <6",UOe=["onRequest","preParsing","preValidation","preHandler","preSerialization","onSend","onResponse","onError"],bo={HOOK_NAME:"hook.name",FASTIFY_TYPE:"fastify.type",HOOK_CALLBACK_NAME:"hook.callback.name",ROOT:"fastify.root"},mE={ROUTE:"route-hook",INSTANCE:"hook",HANDLER:"request-handler"},Vg="anonymous",AE=Symbol("fastify otel instance"),gE=Symbol("fastify otel request spans"),Yw=Symbol("fastify otel request context"),QOe=Symbol("fastify otel addhook original"),FOe=Symbol("fastify otel setnotfound original"),Kw=Symbol("fastify otel ignore path"),Jw=Symbol("fastify otel record exceptions"),I3=class extends PRt{logger=null;_requestHook=null;_lifecycleHook=null;constructor(t){if(super(LOe,MRt,t),this.logger=NRt.createComponentLogger({namespace:LOe}),this[Kw]=null,this[Jw]=!0,t?.recordExceptions!=null){if(typeof t.recordExceptions!="boolean")throw new TypeError("recordExceptions must be a boolean");this[Jw]=t.recordExceptions}if(typeof t?.requestHook=="function"&&(this._requestHook=t.requestHook),typeof t?.lifecycleHook=="function"&&(this._lifecycleHook=t.lifecycleHook),t?.ignorePaths!=null||process.env.OTEL_FASTIFY_IGNORE_PATHS!=null){let n=t?.ignorePaths??process.env.OTEL_FASTIFY_IGNORE_PATHS;if((typeof n!="string"||n.length===0)&&typeof n!="function")throw new TypeError("ignorePaths must be a string or a function");let r=null;this[Kw]=o=>typeof n=="function"?n(o):(r==null&&(r=kOe().minimatch),r(o.url,n))}}enable(){return this._handleInitialization===void 0&&this.getConfig().registerOnInitialization&&(this._handleInitialization=t=>{this.plugin()(t.fastify,void 0,()=>{});let n=(r,o,i)=>{i()};n[Symbol.for("skip-override")]=!0,n[Symbol.for("fastify.display-name")]="@fastify/otel",t.fastify.register(n)},POe.subscribe("fastify.initialization",this._handleInitialization)),super.enable()}disable(){return this._handleInitialization&&(POe.unsubscribe("fastify.initialization",this._handleInitialization),this._handleInitialization=void 0),super.disable()}init(){return[]}plugin(){let t=this;return n[Symbol.for("skip-override")]=!0,n[Symbol.for("fastify.display-name")]="@fastify/otel",n[Symbol.for("plugin-meta")]={fastify:LRt,name:"@fastify/otel"},n;function n(r,o,i){r.decorate(AE,t),r.decorate(QOe,r.addHook),r.decorate(FOe,r.setNotFoundHandler),r.decorateRequest("opentelemetry",function(){let T=this[Yw],v=this[gE];return{enabled:this.routeOptions.config?.otel!==!1,span:v,tracer:t.tracer,context:T,inject:(R,x)=>hW.inject(T,R,x),extract:(R,x)=>hW.extract(T,R,x)}}),r.decorateRequest(gE,null),r.decorateRequest(Yw,null),r.addHook("onRoute",function(T){if(t[Kw]?.(T)===!0){t.logger.debug(`Ignoring route instrumentation ${T.method} ${T.url} because it matches the ignore path`);return}if(T.config?.otel===!1){t.logger.debug(`Ignoring route instrumentation ${T.method} ${T.url} because it is disabled`);return}for(let v of UOe)if(T[v]!=null){let R=T[v];if(typeof R=="function")T[v]=y(R,v,{[bo.HOOK_NAME]:`${this.pluginName} - route -> ${v}`,[bo.FASTIFY_TYPE]:mE.ROUTE,[b3]:T.url,[bo.HOOK_CALLBACK_NAME]:R.name?.length>0?R.name:Vg});else if(Array.isArray(R)){let x=[];for(let O of R)x.push(y(O,v,{[bo.HOOK_NAME]:`${this.pluginName} - route -> ${v}`,[bo.FASTIFY_TYPE]:mE.ROUTE,[b3]:T.url,[bo.HOOK_CALLBACK_NAME]:O.name?.length>0?O.name:Vg}));T[v]=x}}T.onSend!=null?T.onSend=Array.isArray(T.onSend)?[...T.onSend,s]:[T.onSend,s]:T.onSend=s,T.onError!=null?T.onError=Array.isArray(T.onError)?[...T.onError,u]:[T.onError,u]:T.onError=u,T.handler=y(T.handler,"handler",{[bo.HOOK_NAME]:`${this.pluginName} - route-handler`,[bo.FASTIFY_TYPE]:mE.HANDLER,[b3]:T.url,[bo.HOOK_CALLBACK_NAME]:T.handler.name.length>0?T.handler.name:Vg})}),r.addHook("onRequest",function(T,v,R){if(this[AE].isEnabled()===!1||T.routeOptions.config?.otel===!1)return R();if(this[AE][Kw]?.({url:T.url,method:T.method})===!0)return this[AE].logger.debug(`Ignoring request ${T.method} ${T.url} because it matches the ignore path`),R();let x=S3.active();gW.getSpan(x)==null&&(x=hW.extract(x,T.headers));let O=BRt(x);T.routeOptions.url!=null&&O?.type===wRt.HTTP&&(O.route=T.routeOptions.url);let M={[bo.ROOT]:"@fastify/otel",[ORt]:T.method,[kRt]:T.url};T.routeOptions.url!=null&&(M[b3]=T.routeOptions.url);let j=this[AE].tracer.startSpan("request",{attributes:M},x);try{this[AE]._requestHook?.(j,T)}catch(G){this[AE].logger.error({err:G},"requestHook threw")}T[Yw]=gW.setSpan(x,j),T[gE]=j,S3.with(T[Yw],()=>{R()})}),r.addHook("onResponse",function(T,v,R){let x=T[gE];x!=null&&(x.setAttributes({[MOe]:v.statusCode}),x.end()),T[gE]=null,R()}),r.addHook=l,r.setNotFoundHandler=p,i();function s(S,T,v,R){let x=S[gE];x!=null&&(T.statusCode>=500&&x.setStatus({code:T3.ERROR}),x.setAttributes({[MOe]:T.statusCode}),x.end()),S[gE]=null,R(null,v)}function u(S,T,v,R){let x=S[gE];x!=null&&(x.setStatus({code:T3.ERROR,message:v.message}),t[Jw]!==!1&&x.recordException(v)),R()}function l(S,T){let v=this[QOe];return UOe.includes(S)?v.call(this,S,y(T,S,{[bo.HOOK_NAME]:`${this.pluginName} - ${S}`,[bo.FASTIFY_TYPE]:mE.INSTANCE,[bo.HOOK_CALLBACK_NAME]:T.name?.length>0?T.name:Vg})):v.call(this,S,T)}function p(S,T){let v=this[FOe];typeof S=="function"?(T=y(S,"notFoundHandler",{[bo.HOOK_NAME]:`${this.pluginName} - not-found-handler`,[bo.FASTIFY_TYPE]:mE.INSTANCE,[bo.HOOK_CALLBACK_NAME]:S.name?.length>0?S.name:Vg}),v.call(this,T)):(S.preValidation!=null&&(S.preValidation=y(S.preValidation,"notFoundHandler - preValidation",{[bo.HOOK_NAME]:`${this.pluginName} - not-found-handler - preValidation`,[bo.FASTIFY_TYPE]:mE.INSTANCE,[bo.HOOK_CALLBACK_NAME]:S.preValidation.name?.length>0?S.preValidation.name:Vg})),S.preHandler!=null&&(S.preHandler=y(S.preHandler,"notFoundHandler - preHandler",{[bo.HOOK_NAME]:`${this.pluginName} - not-found-handler - preHandler`,[bo.FASTIFY_TYPE]:mE.INSTANCE,[bo.HOOK_CALLBACK_NAME]:S.preHandler.name?.length>0?S.preHandler.name:Vg})),T=y(T,"notFoundHandler",{[bo.HOOK_NAME]:`${this.pluginName} - not-found-handler`,[bo.FASTIFY_TYPE]:mE.INSTANCE,[bo.HOOK_CALLBACK_NAME]:T.name?.length>0?T.name:Vg}),v.call(this,S,T))}function h(S){for(let T of S)if(T?.routeOptions&&T.url&&T.method)return T;return null}function y(S,T,v={}){return function(...x){let O=this[AE],M=h(x);if(M===null)return O.logger.debug(`Ignoring route instrumentation because ${T} was called without a Fastify request argument`),S.call(this,...x);if(O.isEnabled()===!1||M.routeOptions.config?.otel===!1)return O.logger.debug(`Ignoring route instrumentation ${M.routeOptions.method} ${M.routeOptions.url} because it is disabled`),S.call(this,...x);if(O[Kw]?.({url:M.url,method:M.method})===!0)return O.logger.debug(`Ignoring route instrumentation ${M.routeOptions.method} ${M.routeOptions.url} because it matches the ignore path`),S.call(this,...x);let j=M[Yw]??S3.active(),G=S.name?.length>0?S.name:this.pluginName??Vg,H=O.tracer.startSpan(`${T} - ${G}`,{attributes:v},j);if(O._lifecycleHook!=null)try{O._lifecycleHook(H,{hookName:T,request:M,handler:G})}catch(V){O.logger.error({err:V},"Execution of lifecycleHook failed")}return S3.with(gW.setSpan(j,H),function(){try{let V=S.call(this,...x);return typeof V?.then=="function"?V.then(ae=>(H.end(),ae),ae=>(H.setStatus({code:T3.ERROR,message:ae.message}),O[Jw]!==!1&&H.recordException(ae),H.end(),Promise.reject(ae))):(H.end(),V)}catch(V){throw H.setStatus({code:T3.ERROR,message:V.message}),O[Jw]!==!1&&H.recordException(V),H.end(),V}},this)}}}}};_W.exports=I3;_W.exports.FastifyOtelInstrumentation=I3});var Yg,Zw,Ww,jOe=w(()=>{m();(function(e){let t="fastify.name";e.FASTIFY_NAME=t;let n="fastify.type";e.FASTIFY_TYPE=n;let r="hook.name";e.HOOK_NAME=r;let o="plugin.name";e.PLUGIN_NAME=o})(Yg||(Yg={}));(function(e){let t="middleware";e.MIDDLEWARE=t;let n="request_handler";e.REQUEST_HANDLER=n})(Zw||(Zw={}));(function(e){let t="middleware";e.MIDDLEWARE=t;let n="request handler";e.REQUEST_HANDLER=n})(Ww||(Ww={}))});var Xw,zOe=w(()=>{m();Xw=Symbol("opentelemetry.instrumentation.fastify.request_active_span")});function EW(e,t,n,r={}){let o=t.startSpan(n,{attributes:r}),i=e[Xw]||[];return i.push(o),Object.defineProperty(e,Xw,{enumerable:!1,configurable:!0,value:i}),o}function C3(e,t){let n=e[Xw]||[];n.length&&(n.forEach(r=>{t&&(r.setStatus({code:Ai.ERROR,message:t.message}),r.recordException(t)),r.end()}),delete e[Xw])}function $Oe(e,t,n){let r,o;try{o=e(),HOe(o)&&o.then(i=>t(void 0,i),i=>t(i))}catch(i){r=i}finally{if(!HOe(o)&&(t(r,o),r))throw r;return o}}function HOe(e){return typeof e=="object"&&e&&typeof Object.getOwnPropertyDescriptor(e,"then")?.value=="function"||!1}var qOe=w(()=>{m();ze();zOe()});function GRt(){let e=_t();e&&e.on("spanStart",t=>{YOe(t)})}function YOe(e){let t=kt(e).data,n=t["fastify.type"];if(t[Xt]||!n)return;e.setAttributes({[Pt]:"auto.http.otel.fastify",[Xt]:`${n}.fastify`});let r=t["fastify.name"]||t["plugin.name"]||t["hook.name"];if(typeof r=="string"){let o=r.replace(/^fastify -> /,"").replace(/^@fastify\/otel -> /,"");e.updateName(o)}}var R3,YS,URt,QRt,VOe,FRt,v3,KOe=w(()=>{m();ze();R3=ue(Cr(),1),YS=ue(sn(),1);Xn();mt();jOe();qOe();URt="0.1.0",QRt="@sentry/instrumentation-fastify-v3",VOe="anonymous",FRt=new Set(["onTimeout","onRequest","preParsing","preValidation","preSerialization","preHandler","onSend","onResponse","onError"]),v3=class extends YS.InstrumentationBase{constructor(t={}){super(QRt,URt,t)}init(){return[new YS.InstrumentationNodeModuleDefinition("fastify",[">=3.0.0 <4"],t=>this._patchConstructor(t))]}_hookOnRequest(){let t=this;return function(r,o,i){if(!t.isEnabled())return i();t._wrap(o,"send",t._patchSend());let s=r,u=(0,R3.getRPCMetadata)(Xe.active()),l=s.routeOptions?s.routeOptions.url:r.routerPath;l&&u?.type===R3.RPCType.HTTP&&(u.route=l);let p=r.method||"GET";Rn().setTransactionName(`${p} ${l}`),i()}}_wrapHandler(t,n,r,o){let i=this;return this._diag.debug("Patching fastify route.handler function"),function(...s){if(!i.isEnabled())return r.apply(this,s);let u=r.name||t||VOe,l=`${Ww.MIDDLEWARE} - ${u}`,p=s[1],h=EW(p,i.tracer,l,{[Yg.FASTIFY_TYPE]:Zw.MIDDLEWARE,[Yg.PLUGIN_NAME]:t,[Yg.HOOK_NAME]:n}),y=o&&s[s.length-1];return y&&(s[s.length-1]=function(...S){C3(p),y.apply(this,S)}),Xe.with(qt.setSpan(Xe.active(),h),()=>$Oe(()=>r.apply(this,s),S=>{S instanceof Error&&(h.setStatus({code:Ai.ERROR,message:S.message}),h.recordException(S)),o||C3(p)}))}}_wrapAddHook(){let t=this;return this._diag.debug("Patching fastify server.addHook function"),function(n){return function(...o){let i=o[0],s=o[1],u=this.pluginName;if(!FRt.has(i))return n.apply(this,o);let l=typeof o[o.length-1]=="function"&&s.constructor.name!=="AsyncFunction";return n.apply(this,[i,t._wrapHandler(u,i,s,l)])}}}_patchConstructor(t){let n=this;function r(...o){let i=t.fastify.apply(this,o);return i.addHook("onRequest",n._hookOnRequest()),i.addHook("preHandler",n._hookPreHandler()),GRt(),n._wrap(i,"addHook",n._wrapAddHook()),i}return t.errorCodes!==void 0&&(r.errorCodes=t.errorCodes),r.fastify=r,r.default=r,r}_patchSend(){let t=this;return this._diag.debug("Patching fastify reply.send function"),function(r){return function(...i){let s=i[0];return t.isEnabled()?(0,YS.safeExecuteInTheMiddle)(()=>r.apply(this,i),u=>{!u&&s instanceof Error&&(u=s),C3(this,u)}):r.apply(this,i)}}}_hookPreHandler(){let t=this;return this._diag.debug("Patching fastify preHandler function"),function(r,o,i){if(!t.isEnabled())return i();let s=r,u=s.routeOptions?.handler||s.context?.handler,l=u?.name.startsWith("bound ")?u.name.substring(6):u?.name,p=`${Ww.REQUEST_HANDLER} - ${l||this.pluginName||VOe}`,h={[Yg.PLUGIN_NAME]:this.pluginName,[Yg.FASTIFY_TYPE]:Zw.REQUEST_HANDLER,[uV]:s.routeOptions?s.routeOptions.url:r.routerPath};l&&(h[Yg.FASTIFY_NAME]=l);let y=EW(o,t.tracer,p,h);YOe(y);let{requestHook:S}=t.getConfig();return S&&(0,YS.safeExecuteInTheMiddle)(()=>S(y,{request:r}),T=>{T&&t._diag.error("request hook failed",T)},!0),Xe.with(qt.setSpan(Xe.active(),y),()=>{i()})}}}});import*as yW from"node:diagnostics_channel";function jRt(){let e=_t();if(e)return e.getIntegrationByName(x3)}function JOe(e,t,n,r){let o=jRt()?.getShouldHandleError()||tke;if(r==="diagnostics-channel"&&(this.diagnosticsChannelExists=!0),this.diagnosticsChannelExists&&r==="onError-hook"){xs&&W.warn("Fastify error handler was already registered via diagnostics channel.","You can safely remove `setupFastifyErrorHandler` call and set `shouldHandleError` on the integration options.");return}o(e,t,n)&&nn(e,{mechanism:{handled:!1,type:"auto.function.fastify"}})}function tke(e,t,n){let r=n.statusCode;return r>=500||r<=299}function nke(e){let t=kt(e),n=t.description,r=t.data,o=r["fastify.type"],i=o==="hook",s=o===n?.startsWith("handler -"),u=n==="request"||o==="request-handler";if(r[Xt]||!s&&!u&&!i)return;let l=i?"hook":s?"middleware":u?"request_handler":"<unknown>";e.setAttributes({[Pt]:"auto.http.otel.fastify",[Xt]:`${l}.fastify`});let p=r["fastify.name"]||r["plugin.name"]||r["hook.name"];if(typeof p=="string"){let h=p.replace(/^fastify -> /,"").replace(/^@fastify\/otel -> /,"");e.updateName(h)}}function HRt(){let e=_t();e&&e.on("spanStart",t=>{nke(t)})}function $Rt(e){e.addHook("onRequest",async(t,n)=>{if(t.opentelemetry){let{span:i}=t.opentelemetry();i&&nke(i)}let r=t.routeOptions?.url,o=t.method||"GET";Rn().setTransactionName(`${o} ${r}`)})}var ZOe,x3,WOe,XOe,zRt,eke,rke=w(()=>{m();ZOe=ue(GOe(),1);mt();_r();HS();KOe();x3="Fastify",WOe=ut(`${x3}.v3`,()=>new v3);XOe=ut(`${x3}.v5`,()=>{let e=new ZOe.FastifyOtelInstrumentation,t=e.plugin();return yW.subscribe("fastify.initialization",n=>{let r=n.fastify;r?.register(t).after(o=>{o?xs&&W.error("Failed to setup Fastify instrumentation",o):(HRt(),r&&$Rt(r))})}),yW.subscribe("tracing:fastify.request.handler:error",n=>{let{error:r,request:o,reply:i}=n;JOe.call(JOe,r,o,i,"diagnostics-channel")}),e}),zRt=(({shouldHandleError:e})=>{let t;return{name:x3,setupOnce(){t=e||tke,WOe(),XOe()},getShouldHandleError(){return t},setShouldHandleError(n){t=n}}}),eke=(e={})=>zRt(e)});var SW=P(bf=>{"use strict";m();Object.defineProperty(bf,"__esModule",{value:!0});bf.SpanNames=bf.TokenKind=bf.AllowedOperationTypes=void 0;var qRt;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(qRt=bf.AllowedOperationTypes||(bf.AllowedOperationTypes={}));var VRt;(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(VRt=bf.TokenKind||(bf.TokenKind={}));var YRt;(function(e){e.EXECUTE="graphql.execute",e.PARSE="graphql.parse",e.RESOLVE="graphql.resolve",e.VALIDATE="graphql.validate",e.SCHEMA_VALIDATE="graphql.validateSchema",e.SCHEMA_PARSE="graphql.parseSchema"})(YRt=bf.SpanNames||(bf.SpanNames={}))});var TW=P(eO=>{"use strict";m();Object.defineProperty(eO,"__esModule",{value:!0});eO.AttributeNames=void 0;var KRt;(function(e){e.SOURCE="graphql.source",e.FIELD_NAME="graphql.field.name",e.FIELD_PATH="graphql.field.path",e.FIELD_TYPE="graphql.field.type",e.PARENT_NAME="graphql.parent.name",e.OPERATION_TYPE="graphql.operation.type",e.OPERATION_NAME="graphql.operation.name",e.VARIABLES="graphql.variables.",e.ERROR_VALIDATION_NAME="graphql.validation.error"})(KRt=eO.AttributeNames||(eO.AttributeNames={}))});var D3=P(dR=>{"use strict";m();Object.defineProperty(dR,"__esModule",{value:!0});dR.OTEL_GRAPHQL_DATA_SYMBOL=dR.OTEL_PATCHED_SYMBOL=void 0;dR.OTEL_PATCHED_SYMBOL=Symbol.for("opentelemetry.patched");dR.OTEL_GRAPHQL_DATA_SYMBOL=Symbol.for("opentelemetry.graphql_data")});var oke=P(N3=>{"use strict";m();Object.defineProperty(N3,"__esModule",{value:!0});N3.OPERATION_NOT_SUPPORTED=void 0;var KDn=D3();N3.OPERATION_NOT_SUPPORTED="Operation$operationName$not supported"});var _ke=P(Ds=>{"use strict";m();Object.defineProperty(Ds,"__esModule",{value:!0});Ds.wrapFieldResolver=Ds.wrapFields=Ds.getSourceFromLocation=Ds.getOperation=Ds.endSpan=Ds.addSpanSource=Ds.addInputVariableAttributes=Ds.isPromise=void 0;var pR=(ze(),Le(nt)),hE=SW(),KS=TW(),Kg=D3(),ike=Object.values(hE.AllowedOperationTypes),JRt=e=>typeof e?.then=="function";Ds.isPromise=JRt;var ZRt=e=>typeof e=="object"&&e!==null;function bW(e,t,n){Array.isArray(n)?n.forEach((r,o)=>{bW(e,`${t}.${o}`,r)}):n instanceof Object?Object.entries(n).forEach(([r,o])=>{bW(e,`${t}.${r}`,o)}):e.setAttribute(`${KS.AttributeNames.VARIABLES}${String(t)}`,n)}function WRt(e,t){Object.entries(t).forEach(([n,r])=>{bW(e,n,r)})}Ds.addInputVariableAttributes=WRt;function cke(e,t,n,r,o){let i=mke(t,n,r,o);e.setAttribute(KS.AttributeNames.SOURCE,i)}Ds.addSpanSource=cke;function XRt(e,t,n,r,o){let i=lke(n,o);if(i)return{field:i,spanAdded:!1};let u=t().flatResolveSpans?pke(n):dke(n,o);return i={span:ext(e,t,n,r,o,u)},rxt(n,o,i),{field:i,spanAdded:!0}}function ext(e,t,n,r,o,i){let s={[KS.AttributeNames.FIELD_NAME]:r.fieldName,[KS.AttributeNames.FIELD_PATH]:o.join("."),[KS.AttributeNames.FIELD_TYPE]:r.returnType.toString(),[KS.AttributeNames.PARENT_NAME]:r.parentType.name},u=e.startSpan(`${hE.SpanNames.RESOLVE} ${s[KS.AttributeNames.FIELD_PATH]}`,{attributes:s},i?pR.trace.setSpan(pR.context.active(),i):void 0),l=n[Kg.OTEL_GRAPHQL_DATA_SYMBOL].source,p=r.fieldNodes.find(h=>h.kind==="Field");return p&&cke(u,l.loc,t().allowValues,p.loc?.start,p.loc?.end),u}function txt(e,t){t&&e.recordException(t),e.end()}Ds.endSpan=txt;function nxt(e,t){if(!(!e||!Array.isArray(e.definitions)))return t?e.definitions.filter(n=>ike.indexOf(n?.operation)!==-1).find(n=>t===n?.name?.value):e.definitions.find(n=>ike.indexOf(n?.operation)!==-1)}Ds.getOperation=nxt;function rxt(e,t,n){return e[Kg.OTEL_GRAPHQL_DATA_SYMBOL].fields[t.join(".")]=n}function lke(e,t){return e[Kg.OTEL_GRAPHQL_DATA_SYMBOL].fields[t.join(".")]}function dke(e,t){for(let n=t.length-1;n>0;n--){let r=lke(e,t.slice(0,n));if(r)return r.span}return pke(e)}function pke(e){return e[Kg.OTEL_GRAPHQL_DATA_SYMBOL].span}function oxt(e,t){let n=[],r=t;for(;r;){let o=r.key;e&&typeof o=="number"&&(o="*"),n.push(String(o)),r=r.prev}return n.reverse()}function ixt(e){return fke(`
37
37
  `,e)}function ske(e){return fke(" ",e)}function fke(e,t){let n="";for(let r=0;r<t;r++)n+=e;return n}var sxt=[hE.TokenKind.FLOAT,hE.TokenKind.STRING,hE.TokenKind.INT,hE.TokenKind.BLOCK_STRING];function mke(e,t=!1,n,r){let o="";if(e?.startToken){let i=typeof n=="number"?n:e.start,s=typeof r=="number"?r:e.end,u=e.startToken.next,l=1;for(;u;){if(u.start<i){u=u.next,l=u?.line;continue}if(u.end>s){u=u.next,l=u?.line;continue}let p=u.value||u.kind,h="";!t&&sxt.indexOf(u.kind)>=0&&(p="*"),u.kind===hE.TokenKind.STRING&&(p=`"${p}"`),u.kind===hE.TokenKind.EOF&&(p=""),u.line>l?(o+=ixt(u.line-l),l=u.line,h=ske(u.column-1)):u.line===u.prev?.line&&(h=ske(u.start-(u.prev?.end||0))),o+=h+p,u&&(u=u.next)}}return o}Ds.getSourceFromLocation=mke;function Ake(e,t,n){if(!e||e[Kg.OTEL_PATCHED_SYMBOL])return;let r=e.getFields();e[Kg.OTEL_PATCHED_SYMBOL]=!0,Object.keys(r).forEach(o=>{let i=r[o];if(i&&(i.resolve&&(i.resolve=hke(t,n,i.resolve)),i.type)){let s=gke(i.type);for(let u of s)Ake(u,t,n)}})}Ds.wrapFields=Ake;function gke(e){return"ofType"in e?gke(e.ofType):axt(e)?e.getTypes():uxt(e)?[e]:[]}function axt(e){return"getTypes"in e&&typeof e.getTypes=="function"}function uxt(e){return"getFields"in e&&typeof e.getFields=="function"}var ake=(e,t,n)=>{n&&(e.recordException(t),e.setStatus({code:pR.SpanStatusCode.ERROR,message:t.message}),e.end())},uke=(e,t)=>{t&&e.end()};function hke(e,t,n,r=!1){if(o[Kg.OTEL_PATCHED_SYMBOL]||typeof n!="function")return n;function o(i,s,u,l){if(!n)return;let p=t();if(p.ignoreTrivialResolveSpans&&r&&(ZRt(i)||typeof i=="function")&&typeof i[l.fieldName]!="function")return n.call(this,i,s,u,l);if(!u[Kg.OTEL_GRAPHQL_DATA_SYMBOL])return n.call(this,i,s,u,l);let h=oxt(p.mergeItems,l&&l.path),y=h.filter(v=>typeof v=="string").length,S,T=!1;if(p.depth>=0&&p.depth<y)S=dke(u,h);else{let{field:v,spanAdded:R}=XRt(e,t,u,l,h);S=v.span,T=R}return pR.context.with(pR.trace.setSpan(pR.context.active(),S),()=>{try{let v=n.call(this,i,s,u,l);return(0,Ds.isPromise)(v)?v.then(R=>(uke(S,T),R),R=>{throw ake(S,R,T),R}):(uke(S,T),v)}catch(v){throw ake(S,v,T),v}})}return o[Kg.OTEL_PATCHED_SYMBOL]=!0,o}Ds.wrapFieldResolver=hke});var Eke=P(fR=>{"use strict";m();Object.defineProperty(fR,"__esModule",{value:!0});fR.PACKAGE_NAME=fR.PACKAGE_VERSION=void 0;fR.PACKAGE_VERSION="0.62.0";fR.PACKAGE_NAME="@opentelemetry/instrumentation-graphql"});var Tke=P(O3=>{"use strict";m();Object.defineProperty(O3,"__esModule",{value:!0});O3.GraphQLInstrumentation=void 0;var Jg=(ze(),Le(nt)),np=sn(),tO=SW(),B3=TW(),IW=D3(),cxt=oke(),fu=_ke(),yke=Eke(),Ske={mergeItems:!1,depth:-1,allowValues:!1,ignoreResolveSpans:!1},w3=[">=14.0.0 <17"],CW=class extends np.InstrumentationBase{constructor(t={}){super(yke.PACKAGE_NAME,yke.PACKAGE_VERSION,{...Ske,...t})}setConfig(t={}){super.setConfig({...Ske,...t})}init(){let t=new np.InstrumentationNodeModuleDefinition("graphql",w3);return t.files.push(this._addPatchingExecute()),t.files.push(this._addPatchingParser()),t.files.push(this._addPatchingValidate()),t}_addPatchingExecute(){return new np.InstrumentationNodeModuleFile("graphql/execution/execute.js",w3,t=>((0,np.isWrapped)(t.execute)&&this._unwrap(t,"execute"),this._wrap(t,"execute",this._patchExecute(t.defaultFieldResolver)),t),t=>{t&&this._unwrap(t,"execute")})}_addPatchingParser(){return new np.InstrumentationNodeModuleFile("graphql/language/parser.js",w3,t=>((0,np.isWrapped)(t.parse)&&this._unwrap(t,"parse"),this._wrap(t,"parse",this._patchParse()),t),t=>{t&&this._unwrap(t,"parse")})}_addPatchingValidate(){return new np.InstrumentationNodeModuleFile("graphql/validation/validate.js",w3,t=>((0,np.isWrapped)(t.validate)&&this._unwrap(t,"validate"),this._wrap(t,"validate",this._patchValidate()),t),t=>{t&&this._unwrap(t,"validate")})}_patchExecute(t){let n=this;return function(o){return function(){let s;if(arguments.length>=2){let p=arguments;s=n._wrapExecuteArgs(p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],t)}else{let p=arguments[0];s=n._wrapExecuteArgs(p.schema,p.document,p.rootValue,p.contextValue,p.variableValues,p.operationName,p.fieldResolver,p.typeResolver,t)}let u=(0,fu.getOperation)(s.document,s.operationName),l=n._createExecuteSpan(u,s);return s.contextValue[IW.OTEL_GRAPHQL_DATA_SYMBOL]={source:s.document?s.document||s.document[IW.OTEL_GRAPHQL_DATA_SYMBOL]:void 0,span:l,fields:{}},Jg.context.with(Jg.trace.setSpan(Jg.context.active(),l),()=>(0,np.safeExecuteInTheMiddle)(()=>o.apply(this,[s]),(p,h)=>{n._handleExecutionResult(l,p,h)}))}}}_handleExecutionResult(t,n,r){let o=this.getConfig();if(r===void 0||n){(0,fu.endSpan)(t,n);return}if((0,fu.isPromise)(r))r.then(i=>{if(typeof o.responseHook!="function"){(0,fu.endSpan)(t);return}this._executeResponseHook(t,i)},i=>{(0,fu.endSpan)(t,i)});else{if(typeof o.responseHook!="function"){(0,fu.endSpan)(t);return}this._executeResponseHook(t,r)}}_executeResponseHook(t,n){let{responseHook:r}=this.getConfig();r&&(0,np.safeExecuteInTheMiddle)(()=>{r(t,n)},o=>{o&&this._diag.error("Error running response hook",o),(0,fu.endSpan)(t,void 0)},!0)}_patchParse(){let t=this;return function(r){return function(i,s){return t._parse(this,r,i,s)}}}_patchValidate(){let t=this;return function(r){return function(i,s,u,l,p){return t._validate(this,r,i,s,u,p,l)}}}_parse(t,n,r,o){let i=this.getConfig(),s=this.tracer.startSpan(tO.SpanNames.PARSE);return Jg.context.with(Jg.trace.setSpan(Jg.context.active(),s),()=>(0,np.safeExecuteInTheMiddle)(()=>n.call(t,r,o),(u,l)=>{l&&((0,fu.getOperation)(l)?l.loc&&(0,fu.addSpanSource)(s,l.loc,i.allowValues):s.updateName(tO.SpanNames.SCHEMA_PARSE)),(0,fu.endSpan)(s,u)}))}_validate(t,n,r,o,i,s,u){let l=this.tracer.startSpan(tO.SpanNames.VALIDATE,{});return Jg.context.with(Jg.trace.setSpan(Jg.context.active(),l),()=>(0,np.safeExecuteInTheMiddle)(()=>n.call(t,r,o,i,u,s),(p,h)=>{o.loc||l.updateName(tO.SpanNames.SCHEMA_VALIDATE),h&&h.length&&l.recordException({name:B3.AttributeNames.ERROR_VALIDATION_NAME,message:JSON.stringify(h)}),(0,fu.endSpan)(l,p)}))}_createExecuteSpan(t,n){let r=this.getConfig(),o=this.tracer.startSpan(tO.SpanNames.EXECUTE,{});if(t){let{operation:i,name:s}=t;o.setAttribute(B3.AttributeNames.OPERATION_TYPE,i);let u=s?.value;u?(o.setAttribute(B3.AttributeNames.OPERATION_NAME,u),o.updateName(`${i} ${u}`)):o.updateName(i)}else{let i=" ";n.operationName&&(i=` "${n.operationName}" `),i=cxt.OPERATION_NOT_SUPPORTED.replace("$operationName$",i),o.setAttribute(B3.AttributeNames.OPERATION_NAME,i)}return n.document?.loc&&(0,fu.addSpanSource)(o,n.document.loc,r.allowValues),n.variableValues&&r.allowValues&&(0,fu.addInputVariableAttributes)(o,n.variableValues),o}_wrapExecuteArgs(t,n,r,o,i,s,u,l,p){if(o||(o={}),o[IW.OTEL_GRAPHQL_DATA_SYMBOL]||this.getConfig().ignoreResolveSpans)return{schema:t,document:n,rootValue:r,contextValue:o,variableValues:i,operationName:s,fieldResolver:u,typeResolver:l};let h=u==null,y=u??p;return u=(0,fu.wrapFieldResolver)(this.tracer,()=>this.getConfig(),y,h),t&&((0,fu.wrapFields)(t.getQueryType(),this.tracer,()=>this.getConfig()),(0,fu.wrapFields)(t.getMutationType(),this.tracer,()=>this.getConfig())),{schema:t,document:n,rootValue:r,contextValue:o,variableValues:i,operationName:s,fieldResolver:u,typeResolver:l}}};O3.GraphQLInstrumentation=CW});var bke=P(k3=>{"use strict";m();Object.defineProperty(k3,"__esModule",{value:!0});k3.GraphQLInstrumentation=void 0;var lxt=Tke();Object.defineProperty(k3,"GraphQLInstrumentation",{enumerable:!0,get:function(){return lxt.GraphQLInstrumentation}})});function xke(e){return{ignoreResolveSpans:!0,ignoreTrivialResolveSpans:!0,useOperationNameForRootSpan:!0,...e}}function pxt(e){if(Array.isArray(e)){let t=e.slice().sort();return t.length<=5?t.join(", "):`${t.slice(0,5).join(", ")}, +${t.length-5}`}return`${e}`}var Ike,Cke,vke,dxt,Rke,Dke=w(()=>{m();ze();Ike=ue(bke(),1);mt();_r();Zv();Cke="Graphql",vke=ut(Cke,Ike.GraphQLInstrumentation,e=>{let t=xke(e);return{...t,responseHook(n,r){zr(n,"auto.graphql.otel.graphql"),r.errors?.length&&!kt(n).status&&n.setStatus({code:Ai.ERROR});let i=kt(n).data,s=i["graphql.operation.type"],u=i["graphql.operation.name"];if(t.useOperationNameForRootSpan&&s){let l=gi(n),h=kt(l).data[Kv]||[],y=u?`${s} ${u}`:`${s}`;Array.isArray(h)?(h.push(y),l.setAttribute(Kv,h)):typeof h=="string"?l.setAttribute(Kv,[h,y]):l.setAttribute(Kv,y),kt(l).data["original-description"]||l.setAttribute("original-description",kt(l).description),l.updateName(`${kt(l).data["original-description"]} (${pxt(h)})`)}}}}),dxt=((e={})=>({name:Cke,setupOnce(){vke(xke(e))}})),Rke=dxt});var Nke=P(P3=>{"use strict";m();Object.defineProperty(P3,"__esModule",{value:!0});P3.EVENT_LISTENERS_SET=void 0;P3.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.kafkajs.eventListenersSet")});var Bke=P(M3=>{"use strict";m();Object.defineProperty(M3,"__esModule",{value:!0});M3.bufferTextMapGetter=void 0;M3.bufferTextMapGetter={get(e,t){if(!e)return;let n=Object.keys(e);for(let r of n)if(r===t||r.toLowerCase()===t)return e[r]?.toString()},keys(e){return e?Object.keys(e):[]}}});var wke=P(or=>{"use strict";m();Object.defineProperty(or,"__esModule",{value:!0});or.METRIC_MESSAGING_PROCESS_DURATION=or.METRIC_MESSAGING_CLIENT_SENT_MESSAGES=or.METRIC_MESSAGING_CLIENT_OPERATION_DURATION=or.METRIC_MESSAGING_CLIENT_CONSUMED_MESSAGES=or.MESSAGING_SYSTEM_VALUE_KAFKA=or.MESSAGING_OPERATION_TYPE_VALUE_SEND=or.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE=or.MESSAGING_OPERATION_TYPE_VALUE_PROCESS=or.ATTR_MESSAGING_SYSTEM=or.ATTR_MESSAGING_OPERATION_TYPE=or.ATTR_MESSAGING_OPERATION_NAME=or.ATTR_MESSAGING_KAFKA_OFFSET=or.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE=or.ATTR_MESSAGING_KAFKA_MESSAGE_KEY=or.ATTR_MESSAGING_DESTINATION_PARTITION_ID=or.ATTR_MESSAGING_DESTINATION_NAME=or.ATTR_MESSAGING_BATCH_MESSAGE_COUNT=void 0;or.ATTR_MESSAGING_BATCH_MESSAGE_COUNT="messaging.batch.message_count";or.ATTR_MESSAGING_DESTINATION_NAME="messaging.destination.name";or.ATTR_MESSAGING_DESTINATION_PARTITION_ID="messaging.destination.partition.id";or.ATTR_MESSAGING_KAFKA_MESSAGE_KEY="messaging.kafka.message.key";or.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE="messaging.kafka.message.tombstone";or.ATTR_MESSAGING_KAFKA_OFFSET="messaging.kafka.offset";or.ATTR_MESSAGING_OPERATION_NAME="messaging.operation.name";or.ATTR_MESSAGING_OPERATION_TYPE="messaging.operation.type";or.ATTR_MESSAGING_SYSTEM="messaging.system";or.MESSAGING_OPERATION_TYPE_VALUE_PROCESS="process";or.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE="receive";or.MESSAGING_OPERATION_TYPE_VALUE_SEND="send";or.MESSAGING_SYSTEM_VALUE_KAFKA="kafka";or.METRIC_MESSAGING_CLIENT_CONSUMED_MESSAGES="messaging.client.consumed.messages";or.METRIC_MESSAGING_CLIENT_OPERATION_DURATION="messaging.client.operation.duration";or.METRIC_MESSAGING_CLIENT_SENT_MESSAGES="messaging.client.sent.messages";or.METRIC_MESSAGING_PROCESS_DURATION="messaging.process.duration"});var Oke=P(mR=>{"use strict";m();Object.defineProperty(mR,"__esModule",{value:!0});mR.PACKAGE_NAME=mR.PACKAGE_VERSION=void 0;mR.PACKAGE_VERSION="0.23.0";mR.PACKAGE_NAME="@opentelemetry/instrumentation-kafkajs"});var Qke=P(U3=>{"use strict";m();Object.defineProperty(U3,"__esModule",{value:!0});U3.KafkaJsInstrumentation=void 0;var Hr=(ze(),Le(nt)),rp=sn(),AR=(Xn(),Le(Gr)),kke=Nke(),Pke=Bke(),gt=wke(),Mke=Oke();function L3(e,t,n){return r=>{e.add(t,{...n,...r?{[AR.ATTR_ERROR_TYPE]:r}:{}})}}function Lke(e,t,n){return r=>{e.record((Date.now()-t)/1e3,{...n,...r?{[AR.ATTR_ERROR_TYPE]:r}:{}})}}var Uke=[.005,.01,.025,.05,.075,.1,.25,.5,.75,1,2.5,5,7.5,10],vW=class extends rp.InstrumentationBase{constructor(t={}){super(Mke.PACKAGE_NAME,Mke.PACKAGE_VERSION,t)}_updateMetricInstruments(){this._clientDuration=this.meter.createHistogram(gt.METRIC_MESSAGING_CLIENT_OPERATION_DURATION,{advice:{explicitBucketBoundaries:Uke}}),this._sentMessages=this.meter.createCounter(gt.METRIC_MESSAGING_CLIENT_SENT_MESSAGES),this._consumedMessages=this.meter.createCounter(gt.METRIC_MESSAGING_CLIENT_CONSUMED_MESSAGES),this._processDuration=this.meter.createHistogram(gt.METRIC_MESSAGING_PROCESS_DURATION,{advice:{explicitBucketBoundaries:Uke}})}init(){let t=r=>{(0,rp.isWrapped)(r?.Kafka?.prototype.producer)&&this._unwrap(r.Kafka.prototype,"producer"),(0,rp.isWrapped)(r?.Kafka?.prototype.consumer)&&this._unwrap(r.Kafka.prototype,"consumer")};return new rp.InstrumentationNodeModuleDefinition("kafkajs",[">=0.3.0 <3"],r=>(t(r),this._wrap(r?.Kafka?.prototype,"producer",this._getProducerPatch()),this._wrap(r?.Kafka?.prototype,"consumer",this._getConsumerPatch()),r),t)}_getConsumerPatch(){let t=this;return n=>function(...o){let i=n.apply(this,o);return(0,rp.isWrapped)(i.run)&&t._unwrap(i,"run"),t._wrap(i,"run",t._getConsumerRunPatch()),t._setKafkaEventListeners(i),i}}_setKafkaEventListeners(t){t[kke.EVENT_LISTENERS_SET]||(t.events?.REQUEST&&t.on(t.events.REQUEST,this._recordClientDurationMetric.bind(this)),t[kke.EVENT_LISTENERS_SET]=!0)}_recordClientDurationMetric(t){let[n,r]=t.payload.broker.split(":");this._clientDuration.record(t.payload.duration/1e3,{[gt.ATTR_MESSAGING_SYSTEM]:gt.MESSAGING_SYSTEM_VALUE_KAFKA,[gt.ATTR_MESSAGING_OPERATION_NAME]:`${t.payload.apiName}`,[AR.ATTR_SERVER_ADDRESS]:n,[AR.ATTR_SERVER_PORT]:Number.parseInt(r,10)})}_getProducerPatch(){let t=this;return n=>function(...o){let i=n.apply(this,o);return(0,rp.isWrapped)(i.sendBatch)&&t._unwrap(i,"sendBatch"),t._wrap(i,"sendBatch",t._getSendBatchPatch()),(0,rp.isWrapped)(i.send)&&t._unwrap(i,"send"),t._wrap(i,"send",t._getSendPatch()),(0,rp.isWrapped)(i.transaction)&&t._unwrap(i,"transaction"),t._wrap(i,"transaction",t._getProducerTransactionPatch()),t._setKafkaEventListeners(i),i}}_getConsumerRunPatch(){let t=this;return n=>function(...o){let i=o[0];return i?.eachMessage&&((0,rp.isWrapped)(i.eachMessage)&&t._unwrap(i,"eachMessage"),t._wrap(i,"eachMessage",t._getConsumerEachMessagePatch())),i?.eachBatch&&((0,rp.isWrapped)(i.eachBatch)&&t._unwrap(i,"eachBatch"),t._wrap(i,"eachBatch",t._getConsumerEachBatchPatch())),n.call(this,i)}}_getConsumerEachMessagePatch(){let t=this;return n=>function(...o){let i=o[0],s=Hr.propagation.extract(Hr.ROOT_CONTEXT,i.message.headers,Pke.bufferTextMapGetter),u=t._startConsumerSpan({topic:i.topic,message:i.message,operationType:gt.MESSAGING_OPERATION_TYPE_VALUE_PROCESS,ctx:s,attributes:{[gt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.partition)}}),l=[Lke(t._processDuration,Date.now(),{[gt.ATTR_MESSAGING_SYSTEM]:gt.MESSAGING_SYSTEM_VALUE_KAFKA,[gt.ATTR_MESSAGING_OPERATION_NAME]:"process",[gt.ATTR_MESSAGING_DESTINATION_NAME]:i.topic,[gt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.partition)}),L3(t._consumedMessages,1,{[gt.ATTR_MESSAGING_SYSTEM]:gt.MESSAGING_SYSTEM_VALUE_KAFKA,[gt.ATTR_MESSAGING_OPERATION_NAME]:"process",[gt.ATTR_MESSAGING_DESTINATION_NAME]:i.topic,[gt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.partition)})],p=Hr.context.with(Hr.trace.setSpan(s,u),()=>n.apply(this,o));return t._endSpansOnPromise([u],l,p)}}_getConsumerEachBatchPatch(){return t=>{let n=this;return function(...o){let i=o[0],s=n._startConsumerSpan({topic:i.batch.topic,message:void 0,operationType:gt.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE,ctx:Hr.ROOT_CONTEXT,attributes:{[gt.ATTR_MESSAGING_BATCH_MESSAGE_COUNT]:i.batch.messages.length,[gt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)}});return Hr.context.with(Hr.trace.setSpan(Hr.context.active(),s),()=>{let u=Date.now(),l=[],p=[L3(n._consumedMessages,i.batch.messages.length,{[gt.ATTR_MESSAGING_SYSTEM]:gt.MESSAGING_SYSTEM_VALUE_KAFKA,[gt.ATTR_MESSAGING_OPERATION_NAME]:"process",[gt.ATTR_MESSAGING_DESTINATION_NAME]:i.batch.topic,[gt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)})];i.batch.messages.forEach(y=>{let S=Hr.propagation.extract(Hr.ROOT_CONTEXT,y.headers,Pke.bufferTextMapGetter),T=Hr.trace.getSpan(S)?.spanContext(),v;T&&(v={context:T}),l.push(n._startConsumerSpan({topic:i.batch.topic,message:y,operationType:gt.MESSAGING_OPERATION_TYPE_VALUE_PROCESS,link:v,attributes:{[gt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)}})),p.push(Lke(n._processDuration,u,{[gt.ATTR_MESSAGING_SYSTEM]:gt.MESSAGING_SYSTEM_VALUE_KAFKA,[gt.ATTR_MESSAGING_OPERATION_NAME]:"process",[gt.ATTR_MESSAGING_DESTINATION_NAME]:i.batch.topic,[gt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)}))});let h=t.apply(this,o);return l.unshift(s),n._endSpansOnPromise(l,p,h)})}}}_getProducerTransactionPatch(){let t=this;return n=>function(...o){let i=t.tracer.startSpan("transaction"),s=n.apply(this,o);return s.then(u=>{let l=u.send;u.send=function(...T){return Hr.context.with(Hr.trace.setSpan(Hr.context.active(),i),()=>t._getSendPatch()(l).apply(this,T).catch(R=>{throw i.setStatus({code:Hr.SpanStatusCode.ERROR,message:R?.message}),i.recordException(R),R}))};let p=u.sendBatch;u.sendBatch=function(...T){return Hr.context.with(Hr.trace.setSpan(Hr.context.active(),i),()=>t._getSendBatchPatch()(p).apply(this,T).catch(R=>{throw i.setStatus({code:Hr.SpanStatusCode.ERROR,message:R?.message}),i.recordException(R),R}))};let h=u.commit;u.commit=function(...T){let v=h.apply(this,T).then(()=>{i.setStatus({code:Hr.SpanStatusCode.OK})});return t._endSpansOnPromise([i],[],v)};let y=u.abort;u.abort=function(...T){let v=y.apply(this,T);return t._endSpansOnPromise([i],[],v)}}).catch(u=>{i.setStatus({code:Hr.SpanStatusCode.ERROR,message:u?.message}),i.recordException(u),i.end()}),s}}_getSendBatchPatch(){let t=this;return n=>function(...o){let s=o[0].topicMessages||[],u=[],l=[];s.forEach(h=>{h.messages.forEach(y=>{u.push(t._startProducerSpan(h.topic,y)),l.push(L3(t._sentMessages,1,{[gt.ATTR_MESSAGING_SYSTEM]:gt.MESSAGING_SYSTEM_VALUE_KAFKA,[gt.ATTR_MESSAGING_OPERATION_NAME]:"send",[gt.ATTR_MESSAGING_DESTINATION_NAME]:h.topic,...y.partition!==void 0?{[gt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(y.partition)}:{}}))})});let p=n.apply(this,o);return t._endSpansOnPromise(u,l,p)}}_getSendPatch(){let t=this;return n=>function(...o){let i=o[0],s=i.messages.map(p=>t._startProducerSpan(i.topic,p)),u=i.messages.map(p=>L3(t._sentMessages,1,{[gt.ATTR_MESSAGING_SYSTEM]:gt.MESSAGING_SYSTEM_VALUE_KAFKA,[gt.ATTR_MESSAGING_OPERATION_NAME]:"send",[gt.ATTR_MESSAGING_DESTINATION_NAME]:i.topic,...p.partition!==void 0?{[gt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(p.partition)}:{}})),l=n.apply(this,o);return t._endSpansOnPromise(s,u,l)}}_endSpansOnPromise(t,n,r){return Promise.resolve(r).then(o=>(n.forEach(i=>i()),o)).catch(o=>{let i,s=AR.ERROR_TYPE_VALUE_OTHER;throw typeof o=="string"||o===void 0?i=o:typeof o=="object"&&Object.prototype.hasOwnProperty.call(o,"message")&&(i=o.message,s=o.constructor.name),n.forEach(u=>u(s)),t.forEach(u=>{u.setAttribute(AR.ATTR_ERROR_TYPE,s),u.setStatus({code:Hr.SpanStatusCode.ERROR,message:i})}),o}).finally(()=>{t.forEach(o=>o.end())})}_startConsumerSpan({topic:t,message:n,operationType:r,ctx:o,link:i,attributes:s}){let u=r===gt.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE?"poll":r,l=this.tracer.startSpan(`${u} ${t}`,{kind:r===gt.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE?Hr.SpanKind.CLIENT:Hr.SpanKind.CONSUMER,attributes:{...s,[gt.ATTR_MESSAGING_SYSTEM]:gt.MESSAGING_SYSTEM_VALUE_KAFKA,[gt.ATTR_MESSAGING_DESTINATION_NAME]:t,[gt.ATTR_MESSAGING_OPERATION_TYPE]:r,[gt.ATTR_MESSAGING_OPERATION_NAME]:u,[gt.ATTR_MESSAGING_KAFKA_MESSAGE_KEY]:n?.key?String(n.key):void 0,[gt.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE]:n?.key&&n.value===null?!0:void 0,[gt.ATTR_MESSAGING_KAFKA_OFFSET]:n?.offset},links:i?[i]:[]},o),{consumerHook:p}=this.getConfig();return p&&n&&(0,rp.safeExecuteInTheMiddle)(()=>p(l,{topic:t,message:n}),h=>{h&&this._diag.error("consumerHook error",h)},!0),l}_startProducerSpan(t,n){let r=this.tracer.startSpan(`send ${t}`,{kind:Hr.SpanKind.PRODUCER,attributes:{[gt.ATTR_MESSAGING_SYSTEM]:gt.MESSAGING_SYSTEM_VALUE_KAFKA,[gt.ATTR_MESSAGING_DESTINATION_NAME]:t,[gt.ATTR_MESSAGING_KAFKA_MESSAGE_KEY]:n.key?String(n.key):void 0,[gt.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE]:n.key&&n.value===null?!0:void 0,[gt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:n.partition!==void 0?String(n.partition):void 0,[gt.ATTR_MESSAGING_OPERATION_NAME]:"send",[gt.ATTR_MESSAGING_OPERATION_TYPE]:gt.MESSAGING_OPERATION_TYPE_VALUE_SEND}});n.headers=n.headers??{},Hr.propagation.inject(Hr.trace.setSpan(Hr.context.active(),r),n.headers);let{producerHook:o}=this.getConfig();return o&&(0,rp.safeExecuteInTheMiddle)(()=>o(r,{topic:t,message:n}),i=>{i&&this._diag.error("producerHook error",i)},!0),r}};U3.KafkaJsInstrumentation=vW});var Fke=P(Q3=>{"use strict";m();Object.defineProperty(Q3,"__esModule",{value:!0});Q3.KafkaJsInstrumentation=void 0;var fxt=Qke();Object.defineProperty(Q3,"KafkaJsInstrumentation",{enumerable:!0,get:function(){return fxt.KafkaJsInstrumentation}})});var Gke,jke,zke,mxt,Hke,$ke=w(()=>{m();Gke=ue(Fke(),1);_r();jke="Kafka",zke=ut(jke,()=>new Gke.KafkaJsInstrumentation({consumerHook(e){zr(e,"auto.kafkajs.otel.consumer")},producerHook(e){zr(e,"auto.kafkajs.otel.producer")}})),mxt=(()=>({name:jke,setupOnce(){zke()}})),Hke=mxt});var qke=P(gR=>{"use strict";m();Object.defineProperty(gR,"__esModule",{value:!0});gR.PACKAGE_NAME=gR.PACKAGE_VERSION=void 0;gR.PACKAGE_VERSION="0.58.0";gR.PACKAGE_NAME="@opentelemetry/instrumentation-lru-memoizer"});var Jke=P(F3=>{"use strict";m();Object.defineProperty(F3,"__esModule",{value:!0});F3.LruMemoizerInstrumentation=void 0;var Vke=(ze(),Le(nt)),Yke=sn(),Kke=qke(),RW=class extends Yke.InstrumentationBase{constructor(t={}){super(Kke.PACKAGE_NAME,Kke.PACKAGE_VERSION,t)}init(){return[new Yke.InstrumentationNodeModuleDefinition("lru-memoizer",[">=1.3 <4"],t=>{let n=function(){let r=t.apply(this,arguments);return function(){let o=[...arguments],i=o.pop(),s=typeof i=="function"?Vke.context.bind(Vke.context.active(),i):i;return o.push(s),r.apply(this,o)}};return n.sync=t.sync,n},void 0)]}};F3.LruMemoizerInstrumentation=RW});var Zke=P(G3=>{"use strict";m();Object.defineProperty(G3,"__esModule",{value:!0});G3.LruMemoizerInstrumentation=void 0;var Axt=Jke();Object.defineProperty(G3,"LruMemoizerInstrumentation",{enumerable:!0,get:function(){return Axt.LruMemoizerInstrumentation}})});var Wke,Xke,ePe,gxt,tPe,nPe=w(()=>{m();Wke=ue(Zke(),1);_r();Xke="LruMemoizer",ePe=ut(Xke,()=>new Wke.LruMemoizerInstrumentation),gxt=(()=>({name:Xke,setupOnce(){ePe()}})),tPe=gxt});var rPe=P(Po=>{"use strict";m();Object.defineProperty(Po,"__esModule",{value:!0});Po.METRIC_DB_CLIENT_CONNECTIONS_USAGE=Po.DB_SYSTEM_VALUE_MONGODB=Po.DB_SYSTEM_NAME_VALUE_MONGODB=Po.ATTR_NET_PEER_PORT=Po.ATTR_NET_PEER_NAME=Po.ATTR_DB_SYSTEM=Po.ATTR_DB_STATEMENT=Po.ATTR_DB_OPERATION=Po.ATTR_DB_NAME=Po.ATTR_DB_MONGODB_COLLECTION=Po.ATTR_DB_CONNECTION_STRING=void 0;Po.ATTR_DB_CONNECTION_STRING="db.connection_string";Po.ATTR_DB_MONGODB_COLLECTION="db.mongodb.collection";Po.ATTR_DB_NAME="db.name";Po.ATTR_DB_OPERATION="db.operation";Po.ATTR_DB_STATEMENT="db.statement";Po.ATTR_DB_SYSTEM="db.system";Po.ATTR_NET_PEER_NAME="net.peer.name";Po.ATTR_NET_PEER_PORT="net.peer.port";Po.DB_SYSTEM_NAME_VALUE_MONGODB="mongodb";Po.DB_SYSTEM_VALUE_MONGODB="mongodb";Po.METRIC_DB_CLIENT_CONNECTIONS_USAGE="db.client.connections.usage"});var oPe=P(nO=>{"use strict";m();Object.defineProperty(nO,"__esModule",{value:!0});nO.MongodbCommandType=void 0;var hxt;(function(e){e.CREATE_INDEXES="createIndexes",e.FIND_AND_MODIFY="findAndModify",e.IS_MASTER="isMaster",e.COUNT="count",e.AGGREGATE="aggregate",e.UNKNOWN="unknown"})(hxt=nO.MongodbCommandType||(nO.MongodbCommandType={}))});var iPe=P(hR=>{"use strict";m();Object.defineProperty(hR,"__esModule",{value:!0});hR.PACKAGE_NAME=hR.PACKAGE_VERSION=void 0;hR.PACKAGE_VERSION="0.67.0";hR.PACKAGE_NAME="@opentelemetry/instrumentation-mongodb"});var uPe=P(j3=>{"use strict";m();Object.defineProperty(j3,"__esModule",{value:!0});j3.MongoDBInstrumentation=void 0;var ei=(ze(),Le(nt)),ir=sn(),Zg=(Xn(),Le(Gr)),Jl=rPe(),JS=oPe(),sPe=iPe(),aPe={requireParentSpan:!0},xW=class e extends ir.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(sPe.PACKAGE_NAME,sPe.PACKAGE_VERSION,{...aPe,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,ir.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,ir.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...aPe,...t})}_updateMetricInstruments(){this._connectionsUsage=this.meter.createUpDownCounter(Jl.METRIC_DB_CLIENT_CONNECTIONS_USAGE,{description:"The number of connections that are currently in state described by the state attribute.",unit:"{connection}"})}_connCountAdd(t,n,r){this._connectionsUsage?.add(t,{"pool.name":n,state:r})}init(){let{v3PatchConnection:t,v3UnpatchConnection:n}=this._getV3ConnectionPatches(),{v4PatchConnect:r,v4UnpatchConnect:o}=this._getV4ConnectPatches(),{v4PatchConnectionCallback:i,v4PatchConnectionPromise:s,v4UnpatchConnection:u}=this._getV4ConnectionPatches(),{v4PatchConnectionPool:l,v4UnpatchConnectionPool:p}=this._getV4ConnectionPoolPatches(),{v4PatchSessions:h,v4UnpatchSessions:y}=this._getV4SessionsPatches();return[new ir.InstrumentationNodeModuleDefinition("mongodb",[">=3.3.0 <4"],void 0,void 0,[new ir.InstrumentationNodeModuleFile("mongodb/lib/core/wireprotocol/index.js",[">=3.3.0 <4"],t,n)]),new ir.InstrumentationNodeModuleDefinition("mongodb",[">=4.0.0 <8"],void 0,void 0,[new ir.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection.js",[">=4.0.0 <6.4"],i,u),new ir.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection.js",[">=6.4.0 <8"],s,u),new ir.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection_pool.js",[">=4.0.0 <6.4"],l,p),new ir.InstrumentationNodeModuleFile("mongodb/lib/cmap/connect.js",[">=4.0.0 <8"],r,o),new ir.InstrumentationNodeModuleFile("mongodb/lib/sessions.js",[">=4.0.0 <8"],h,y)])]}_getV3ConnectionPatches(){return{v3PatchConnection:t=>((0,ir.isWrapped)(t.insert)&&this._unwrap(t,"insert"),this._wrap(t,"insert",this._getV3PatchOperation("insert")),(0,ir.isWrapped)(t.remove)&&this._unwrap(t,"remove"),this._wrap(t,"remove",this._getV3PatchOperation("remove")),(0,ir.isWrapped)(t.update)&&this._unwrap(t,"update"),this._wrap(t,"update",this._getV3PatchOperation("update")),(0,ir.isWrapped)(t.command)&&this._unwrap(t,"command"),this._wrap(t,"command",this._getV3PatchCommand()),(0,ir.isWrapped)(t.query)&&this._unwrap(t,"query"),this._wrap(t,"query",this._getV3PatchFind()),(0,ir.isWrapped)(t.getMore)&&this._unwrap(t,"getMore"),this._wrap(t,"getMore",this._getV3PatchCursor()),t),v3UnpatchConnection:t=>{t!==void 0&&(this._unwrap(t,"insert"),this._unwrap(t,"remove"),this._unwrap(t,"update"),this._unwrap(t,"command"),this._unwrap(t,"query"),this._unwrap(t,"getMore"))}}}_getV4SessionsPatches(){return{v4PatchSessions:t=>((0,ir.isWrapped)(t.acquire)&&this._unwrap(t,"acquire"),this._wrap(t.ServerSessionPool.prototype,"acquire",this._getV4AcquireCommand()),(0,ir.isWrapped)(t.release)&&this._unwrap(t,"release"),this._wrap(t.ServerSessionPool.prototype,"release",this._getV4ReleaseCommand()),t),v4UnpatchSessions:t=>{t!==void 0&&((0,ir.isWrapped)(t.acquire)&&this._unwrap(t,"acquire"),(0,ir.isWrapped)(t.release)&&this._unwrap(t,"release"))}}}_getV4AcquireCommand(){let t=this;return n=>function(){let o=this.sessions.length,i=n.call(this),s=this.sessions.length;return o===s?t._connCountAdd(1,t._poolName,"used"):o-1===s&&(t._connCountAdd(-1,t._poolName,"idle"),t._connCountAdd(1,t._poolName,"used")),i}}_getV4ReleaseCommand(){let t=this;return n=>function(o){let i=n.call(this,o);return t._connCountAdd(-1,t._poolName,"used"),t._connCountAdd(1,t._poolName,"idle"),i}}_getV4ConnectionPoolPatches(){return{v4PatchConnectionPool:t=>{let n=t.ConnectionPool.prototype;return(0,ir.isWrapped)(n.checkOut)&&this._unwrap(n,"checkOut"),this._wrap(n,"checkOut",this._getV4ConnectionPoolCheckOut()),t},v4UnpatchConnectionPool:t=>{t!==void 0&&this._unwrap(t.ConnectionPool.prototype,"checkOut")}}}_getV4ConnectPatches(){return{v4PatchConnect:t=>((0,ir.isWrapped)(t.connect)&&this._unwrap(t,"connect"),this._wrap(t,"connect",this._getV4ConnectCommand()),t),v4UnpatchConnect:t=>{t!==void 0&&this._unwrap(t,"connect")}}}_getV4ConnectionPoolCheckOut(){return t=>function(r){let o=ei.context.bind(ei.context.active(),r);return t.call(this,o)}}_getV4ConnectCommand(){let t=this;return n=>function(o,i){if(n.length===1){let u=n.call(this,o);return u&&typeof u.then=="function"&&u.then(()=>t.setPoolName(o),()=>{}),u}let s=function(u,l){if(u||!l){i(u,l);return}t.setPoolName(o),i(u,l)};return n.call(this,o,s)}}_getV4ConnectionPatches(){return{v4PatchConnectionCallback:t=>((0,ir.isWrapped)(t.Connection.prototype.command)&&this._unwrap(t.Connection.prototype,"command"),this._wrap(t.Connection.prototype,"command",this._getV4PatchCommandCallback()),t),v4PatchConnectionPromise:t=>((0,ir.isWrapped)(t.Connection.prototype.command)&&this._unwrap(t.Connection.prototype,"command"),this._wrap(t.Connection.prototype,"command",this._getV4PatchCommandPromise()),t),v4UnpatchConnection:t=>{t!==void 0&&this._unwrap(t.Connection.prototype,"command")}}}_getV3PatchOperation(t){let n=this;return r=>function(i,s,u,l,p){let h=ei.trace.getSpan(ei.context.active()),y=n._checkSkipInstrumentation(h),S=typeof l=="function"?l:p;if(y||typeof S!="function"||typeof u!="object")return typeof l=="function"?r.call(this,i,s,u,l):r.call(this,i,s,u,l,p);let T=n._getV3SpanAttributes(s,i,u[0],t),v=n._spanNameFromAttrs(T),R=n.tracer.startSpan(v,{kind:ei.SpanKind.CLIENT,attributes:T}),x=n._patchEnd(R,S);return typeof l=="function"?r.call(this,i,s,u,x):r.call(this,i,s,u,l,x)}}_getV3PatchCommand(){let t=this;return n=>function(o,i,s,u,l){let p=ei.trace.getSpan(ei.context.active()),h=t._checkSkipInstrumentation(p),y=typeof u=="function"?u:l;if(h||typeof y!="function"||typeof s!="object")return typeof u=="function"?n.call(this,o,i,s,u):n.call(this,o,i,s,u,l);let S=e._getCommandType(s),T=S===JS.MongodbCommandType.UNKNOWN?void 0:S,v=t._getV3SpanAttributes(i,o,s,T),R=t._spanNameFromAttrs(v),x=t.tracer.startSpan(R,{kind:ei.SpanKind.CLIENT,attributes:v}),O=t._patchEnd(x,y);return typeof u=="function"?n.call(this,o,i,s,O):n.call(this,o,i,s,u,O)}}_getV4PatchCommandCallback(){let t=this;return n=>function(o,i,s,u){let l=ei.trace.getSpan(ei.context.active()),p=t._checkSkipInstrumentation(l),h=u,y=Object.keys(i)[0];if(typeof i!="object"||i.ismaster||i.hello)return n.call(this,o,i,s,u);let S;if(!p){let v=t._getV4SpanAttributes(this,o,i,y),R=t._spanNameFromAttrs(v);S=t.tracer.startSpan(R,{kind:ei.SpanKind.CLIENT,attributes:v})}let T=t._patchEnd(S,h,this.id,y);return n.call(this,o,i,s,T)}}_getV4PatchCommandPromise(){let t=this;return n=>function(...o){let[i,s]=o,u=ei.trace.getSpan(ei.context.active()),l=t._checkSkipInstrumentation(u),p=Object.keys(s)[0],h=()=>{};if(typeof s!="object"||s.ismaster||s.hello)return n.apply(this,o);let y;if(!l){let v=t._getV4SpanAttributes(this,i,s,p),R=t._spanNameFromAttrs(v);y=t.tracer.startSpan(R,{kind:ei.SpanKind.CLIENT,attributes:v})}let S=t._patchEnd(y,h,this.id,p),T=n.apply(this,o);return T.then(v=>S(null,v),v=>S(v)),T}}_getV3PatchFind(){let t=this;return n=>function(o,i,s,u,l,p){let h=ei.trace.getSpan(ei.context.active()),y=t._checkSkipInstrumentation(h),S=typeof l=="function"?l:p;if(y||typeof S!="function"||typeof s!="object")return typeof l=="function"?n.call(this,o,i,s,u,l):n.call(this,o,i,s,u,l,p);let T=t._getV3SpanAttributes(i,o,s,"find"),v=t._spanNameFromAttrs(T),R=t.tracer.startSpan(v,{kind:ei.SpanKind.CLIENT,attributes:T}),x=t._patchEnd(R,S);return typeof l=="function"?n.call(this,o,i,s,u,x):n.call(this,o,i,s,u,l,x)}}_getV3PatchCursor(){let t=this;return n=>function(o,i,s,u,l,p){let h=ei.trace.getSpan(ei.context.active()),y=t._checkSkipInstrumentation(h),S=typeof l=="function"?l:p;if(y||typeof S!="function")return typeof l=="function"?n.call(this,o,i,s,u,l):n.call(this,o,i,s,u,l,p);let T=t._getV3SpanAttributes(i,o,s.cmd,"getMore"),v=t._spanNameFromAttrs(T),R=t.tracer.startSpan(v,{kind:ei.SpanKind.CLIENT,attributes:T}),x=t._patchEnd(R,S);return typeof l=="function"?n.call(this,o,i,s,u,x):n.call(this,o,i,s,u,l,x)}}static _getCommandType(t){return t.createIndexes!==void 0?JS.MongodbCommandType.CREATE_INDEXES:t.findandmodify!==void 0?JS.MongodbCommandType.FIND_AND_MODIFY:t.ismaster!==void 0?JS.MongodbCommandType.IS_MASTER:t.count!==void 0?JS.MongodbCommandType.COUNT:t.aggregate!==void 0?JS.MongodbCommandType.AGGREGATE:JS.MongodbCommandType.UNKNOWN}_getV4SpanAttributes(t,n,r,o){let i,s;if(t){let l=typeof t.address=="string"?t.address.split(":"):"";l.length===2&&(i=l[0],s=l[1])}let u;return r?.documents&&r.documents[0]?u=r.documents[0]:r?.cursors?u=r.cursors:u=r,this._getSpanAttributes(n.db,n.collection,i,s,u,o)}_getV3SpanAttributes(t,n,r,o){let i,s;if(n&&n.s&&(i=n.s.options?.host??n.s.host,s=(n.s.options?.port??n.s.port)?.toString(),i==null||s==null)){let h=n.description?.address;if(h){let y=h.split(":");i=y[0],s=y[1]}}let[u,l]=t.toString().split("."),p=r?.query??r?.q??r;return this._getSpanAttributes(u,l,i,s,p,o)}_getSpanAttributes(t,n,r,o,i,s){let u={};if(this._dbSemconvStability&ir.SemconvStability.OLD&&(u[Jl.ATTR_DB_SYSTEM]=Jl.DB_SYSTEM_VALUE_MONGODB,u[Jl.ATTR_DB_NAME]=t,u[Jl.ATTR_DB_MONGODB_COLLECTION]=n,u[Jl.ATTR_DB_OPERATION]=s,u[Jl.ATTR_DB_CONNECTION_STRING]=`mongodb://${r}:${o}/${t}`),this._dbSemconvStability&ir.SemconvStability.STABLE&&(u[Zg.ATTR_DB_SYSTEM_NAME]=Jl.DB_SYSTEM_NAME_VALUE_MONGODB,u[Zg.ATTR_DB_NAMESPACE]=t,u[Zg.ATTR_DB_OPERATION_NAME]=s,u[Zg.ATTR_DB_COLLECTION_NAME]=n),r&&o){this._netSemconvStability&ir.SemconvStability.OLD&&(u[Jl.ATTR_NET_PEER_NAME]=r),this._netSemconvStability&ir.SemconvStability.STABLE&&(u[Zg.ATTR_SERVER_ADDRESS]=r);let l=parseInt(o,10);isNaN(l)||(this._netSemconvStability&ir.SemconvStability.OLD&&(u[Jl.ATTR_NET_PEER_PORT]=l),this._netSemconvStability&ir.SemconvStability.STABLE&&(u[Zg.ATTR_SERVER_PORT]=l))}if(i){let{dbStatementSerializer:l}=this.getConfig(),p=typeof l=="function"?l:this._defaultDbStatementSerializer.bind(this);(0,ir.safeExecuteInTheMiddle)(()=>{let h=p(i);this._dbSemconvStability&ir.SemconvStability.OLD&&(u[Jl.ATTR_DB_STATEMENT]=h),this._dbSemconvStability&ir.SemconvStability.STABLE&&(u[Zg.ATTR_DB_QUERY_TEXT]=h)},h=>{h&&this._diag.error("Error running dbStatementSerializer hook",h)},!0)}return u}_spanNameFromAttrs(t){let n;return this._dbSemconvStability&ir.SemconvStability.STABLE?n=[t[Zg.ATTR_DB_OPERATION_NAME],t[Zg.ATTR_DB_COLLECTION_NAME]].filter(r=>r).join(" ")||Jl.DB_SYSTEM_NAME_VALUE_MONGODB:n=`mongodb.${t[Jl.ATTR_DB_OPERATION]||"command"}`,n}_getDefaultDbStatementReplacer(){let t=new WeakSet;return(n,r)=>typeof r!="object"||!r?"?":t.has(r)?"[Circular]":(t.add(r),r)}_defaultDbStatementSerializer(t){let{enhancedDatabaseReporting:n}=this.getConfig();return n?JSON.stringify(t):JSON.stringify(t,this._getDefaultDbStatementReplacer())}_handleExecutionResult(t,n){let{responseHook:r}=this.getConfig();typeof r=="function"&&(0,ir.safeExecuteInTheMiddle)(()=>{r(t,{data:n})},o=>{o&&this._diag.error("Error running response hook",o)},!0)}_patchEnd(t,n,r,o){let i=ei.context.active(),s=this,u=!1;return function(...p){if(!u){u=!0;let h=p[0];if(t){if(h instanceof Error)t.setStatus({code:ei.SpanStatusCode.ERROR,message:h.message});else{let y=p[1];s._handleExecutionResult(t,y)}t.end()}o==="endSessions"&&s._connCountAdd(-1,s._poolName,"idle")}return ei.context.with(i,()=>n.apply(this,p))}}setPoolName(t){let n=t.hostAddress?.host,r=t.hostAddress?.port,o=t.dbName,i=`mongodb://${n}:${r}/${o}`;this._poolName=i}_checkSkipInstrumentation(t){return this.getConfig().requireParentSpan===!0&&t===void 0}};j3.MongoDBInstrumentation=xW});var cPe=P(rO=>{"use strict";m();Object.defineProperty(rO,"__esModule",{value:!0});rO.MongodbCommandType=void 0;var _xt;(function(e){e.CREATE_INDEXES="createIndexes",e.FIND_AND_MODIFY="findAndModify",e.IS_MASTER="isMaster",e.COUNT="count",e.UNKNOWN="unknown"})(_xt=rO.MongodbCommandType||(rO.MongodbCommandType={}))});var lPe=P(_R=>{"use strict";m();Object.defineProperty(_R,"__esModule",{value:!0});_R.MongodbCommandType=_R.MongoDBInstrumentation=void 0;var Ext=uPe();Object.defineProperty(_R,"MongoDBInstrumentation",{enumerable:!0,get:function(){return Ext.MongoDBInstrumentation}});var yxt=cPe();Object.defineProperty(_R,"MongodbCommandType",{enumerable:!0,get:function(){return yxt.MongodbCommandType}})});function Sxt(e){let t=DW(e);return JSON.stringify(t)}function DW(e){if(Array.isArray(e))return e.map(t=>DW(t));if(Txt(e)){let t={};return Object.entries(e).map(([n,r])=>[n,DW(r)]).reduce((n,r)=>(Ixt(r)&&(n[r[0]]=r[1]),n),t)}return"?"}function Txt(e){return typeof e=="object"&&e!==null&&!bxt(e)}function bxt(e){let t=!1;return typeof Buffer<"u"&&(t=Buffer.isBuffer(e)),t}function Ixt(e){return Array.isArray(e)}var dPe,pPe,fPe,Cxt,mPe,APe=w(()=>{m();dPe=ue(lPe(),1);_r();pPe="Mongo",fPe=ut(pPe,()=>new dPe.MongoDBInstrumentation({dbStatementSerializer:Sxt,responseHook(e){zr(e,"auto.db.otel.mongo")}}));Cxt=(()=>({name:pPe,setupOnce(){fPe()}})),mPe=Cxt});var NW=P(as=>{"use strict";m();Object.defineProperty(as,"__esModule",{value:!0});as.DB_SYSTEM_NAME_VALUE_MONGODB=as.ATTR_NET_PEER_PORT=as.ATTR_NET_PEER_NAME=as.ATTR_DB_USER=as.ATTR_DB_SYSTEM=as.ATTR_DB_STATEMENT=as.ATTR_DB_OPERATION=as.ATTR_DB_NAME=as.ATTR_DB_MONGODB_COLLECTION=void 0;as.ATTR_DB_MONGODB_COLLECTION="db.mongodb.collection";as.ATTR_DB_NAME="db.name";as.ATTR_DB_OPERATION="db.operation";as.ATTR_DB_STATEMENT="db.statement";as.ATTR_DB_SYSTEM="db.system";as.ATTR_DB_USER="db.user";as.ATTR_NET_PEER_NAME="net.peer.name";as.ATTR_NET_PEER_PORT="net.peer.port";as.DB_SYSTEM_NAME_VALUE_MONGODB="mongodb"});var _Pe=P(_E=>{"use strict";m();Object.defineProperty(_E,"__esModule",{value:!0});_E.handleCallbackResponse=_E.handlePromiseResponse=_E.getAttributesFromCollection=void 0;var gPe=(ze(),Le(nt)),iO=sn(),oO=NW(),z3=(Xn(),Le(Gr));function vxt(e,t,n){let r={};return t&iO.SemconvStability.OLD&&(r[oO.ATTR_DB_MONGODB_COLLECTION]=e.name,r[oO.ATTR_DB_NAME]=e.conn.name,r[oO.ATTR_DB_USER]=e.conn.user),t&iO.SemconvStability.STABLE&&(r[z3.ATTR_DB_COLLECTION_NAME]=e.name,r[z3.ATTR_DB_NAMESPACE]=e.conn.name),n&iO.SemconvStability.OLD&&(r[oO.ATTR_NET_PEER_NAME]=e.conn.host,r[oO.ATTR_NET_PEER_PORT]=e.conn.port),n&iO.SemconvStability.STABLE&&(r[z3.ATTR_SERVER_ADDRESS]=e.conn.host,r[z3.ATTR_SERVER_PORT]=e.conn.port),r}_E.getAttributesFromCollection=vxt;function hPe(e,t={}){e.recordException(t),e.setStatus({code:gPe.SpanStatusCode.ERROR,message:`${t.message} ${t.code?`
38
- Mongoose Error Code: ${t.code}`:""}`})}function BW(e,t,n,r=void 0){n&&(0,iO.safeExecuteInTheMiddle)(()=>n(e,{moduleVersion:r,response:t}),o=>{o&&gPe.diag.error("mongoose instrumentation: responseHook error",o)},!0)}function Rxt(e,t,n,r=void 0){return e instanceof Promise?e.then(o=>(BW(t,o,n,r),o)).catch(o=>{throw hPe(t,o),o}).finally(()=>t.end()):(BW(t,e,n,r),t.end(),e)}_E.handlePromiseResponse=Rxt;function xxt(e,t,n,r,o,i,s=void 0){let u=0;return o.length===2?u=1:o.length===3&&(u=2),o[u]=(l,p)=>(l?hPe(r,l):BW(r,p,i,s),r.end(),e(l,p)),t.apply(n,o)}_E.handleCallbackResponse=xxt});var EPe=P(ER=>{"use strict";m();Object.defineProperty(ER,"__esModule",{value:!0});ER.PACKAGE_NAME=ER.PACKAGE_VERSION=void 0;ER.PACKAGE_VERSION="0.60.0";ER.PACKAGE_NAME="@opentelemetry/instrumentation-mongoose"});var IPe=P(Yc=>{"use strict";m();Object.defineProperty(Yc,"__esModule",{value:!0});Yc.MongooseInstrumentation=Yc._ALREADY_INSTRUMENTED=Yc._STORED_PARENT_SPAN=void 0;var Ns=(ze(),Le(nt)),Dxt=Cr(),wW=_Pe(),Ma=sn(),yPe=EPe(),EE=NW(),ZS=(Xn(),Le(Gr)),H3=["deleteOne","deleteMany","find","findOne","estimatedDocumentCount","countDocuments","distinct","where","$where","findOneAndUpdate","findOneAndDelete","findOneAndReplace"],Nxt=["remove","count","findOneAndRemove",...H3],Bxt=["count","findOneAndRemove",...H3],wxt=[...H3];function SPe(e){return e?e.startsWith("6.")||e.startsWith("5.")?Nxt:e.startsWith("7.")?Bxt:wxt:H3}function TPe(e){return e&&(e.startsWith("5.")||e.startsWith("6."))||!1}function bPe(e){return!e||!e.startsWith("8.")?!1:parseInt(e.split(".")[1],10)>=21}Yc._STORED_PARENT_SPAN=Symbol("stored-parent-span");Yc._ALREADY_INSTRUMENTED=Symbol("already-instrumented");var OW=class extends Ma.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(yPe.PACKAGE_NAME,yPe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Ma.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Ma.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new Ma.InstrumentationNodeModuleDefinition("mongoose",[">=5.9.7 <10"],this.patch.bind(this),this.unpatch.bind(this))}patch(t,n){let r=t[Symbol.toStringTag]==="Module"?t.default:t;return this._wrap(r.Model.prototype,"save",this.patchOnModelMethods("save",n)),r.Model.prototype.$save=r.Model.prototype.save,TPe(n)&&this._wrap(r.Model.prototype,"remove",this.patchOnModelMethods("remove",n)),bPe(n)&&(this._wrap(r.Model.prototype,"updateOne",this._patchDocumentUpdateMethods("updateOne",n)),this._wrap(r.Model.prototype,"deleteOne",this._patchDocumentUpdateMethods("deleteOne",n))),this._wrap(r.Query.prototype,"exec",this.patchQueryExec(n)),this._wrap(r.Aggregate.prototype,"exec",this.patchAggregateExec(n)),SPe(n).forEach(i=>{this._wrap(r.Query.prototype,i,this.patchAndCaptureSpanContext(i))}),this._wrap(r.Model,"aggregate",this.patchModelAggregate()),this._wrap(r.Model,"insertMany",this.patchModelStatic("insertMany",n)),this._wrap(r.Model,"bulkWrite",this.patchModelStatic("bulkWrite",n)),r}unpatch(t,n){let r=t[Symbol.toStringTag]==="Module"?t.default:t,o=SPe(n);this._unwrap(r.Model.prototype,"save"),r.Model.prototype.$save=r.Model.prototype.save,TPe(n)&&this._unwrap(r.Model.prototype,"remove"),bPe(n)&&(this._unwrap(r.Model.prototype,"updateOne"),this._unwrap(r.Model.prototype,"deleteOne")),this._unwrap(r.Query.prototype,"exec"),this._unwrap(r.Aggregate.prototype,"exec"),o.forEach(i=>{this._unwrap(r.Query.prototype,i)}),this._unwrap(r.Model,"aggregate"),this._unwrap(r.Model,"insertMany"),this._unwrap(r.Model,"bulkWrite")}patchAggregateExec(t){let n=this;return r=>function(i){if(n.getConfig().requireParentSpan&&Ns.trace.getSpan(Ns.context.active())===void 0)return r.apply(this,arguments);let s=this[Yc._STORED_PARENT_SPAN],u={},{dbStatementSerializer:l}=n.getConfig();if(l){let h=l("aggregate",{options:this.options,aggregatePipeline:this._pipeline});n._dbSemconvStability&Ma.SemconvStability.OLD&&(u[EE.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&Ma.SemconvStability.STABLE&&(u[ZS.ATTR_DB_QUERY_TEXT]=h)}let p=n._startSpan(this._model.collection,this._model?.modelName,"aggregate",u,s);return n._handleResponse(p,r,this,arguments,i,t)}}patchQueryExec(t){let n=this;return r=>function(i){if(this[Yc._ALREADY_INSTRUMENTED])return r.apply(this,arguments);if(n.getConfig().requireParentSpan&&Ns.trace.getSpan(Ns.context.active())===void 0)return r.apply(this,arguments);let s=this[Yc._STORED_PARENT_SPAN],u={},{dbStatementSerializer:l}=n.getConfig();if(l){let h=l(this.op,{condition:this.getFilter?.()??this._conditions,updates:this._update,options:this.getOptions?.()??this.options,fields:this._fields});n._dbSemconvStability&Ma.SemconvStability.OLD&&(u[EE.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&Ma.SemconvStability.STABLE&&(u[ZS.ATTR_DB_QUERY_TEXT]=h)}let p=n._startSpan(this.mongooseCollection,this.model.modelName,this.op,u,s);return n._handleResponse(p,r,this,arguments,i,t)}}patchOnModelMethods(t,n){let r=this;return o=>function(s,u){if(r.getConfig().requireParentSpan&&Ns.trace.getSpan(Ns.context.active())===void 0)return o.apply(this,arguments);let l={document:this};s&&!(s instanceof Function)&&(l.options=s);let p={},{dbStatementSerializer:h}=r.getConfig();if(h){let S=h(t,l);r._dbSemconvStability&Ma.SemconvStability.OLD&&(p[EE.ATTR_DB_STATEMENT]=S),r._dbSemconvStability&Ma.SemconvStability.STABLE&&(p[ZS.ATTR_DB_QUERY_TEXT]=S)}let y=r._startSpan(this.constructor.collection,this.constructor.modelName,t,p);return s instanceof Function&&(u=s,s=void 0),r._handleResponse(y,o,this,arguments,u,n)}}_patchDocumentUpdateMethods(t,n){let r=this;return o=>function(s,u,l){if(r.getConfig().requireParentSpan&&Ns.trace.getSpan(Ns.context.active())===void 0)return o.apply(this,arguments);let p=l,h=s,y=u;typeof s=="function"?(p=s,h=void 0,y=void 0):typeof u=="function"&&(p=u,y=void 0);let S={},T=r.getConfig().dbStatementSerializer;if(T){let x=T(t,{condition:{_id:this._id},updates:h,options:y});r._dbSemconvStability&Ma.SemconvStability.OLD&&(S[EE.ATTR_DB_STATEMENT]=x),r._dbSemconvStability&Ma.SemconvStability.STABLE&&(S[ZS.ATTR_DB_QUERY_TEXT]=x)}let v=r._startSpan(this.constructor.collection,this.constructor.modelName,t,S),R=r._handleResponse(v,o,this,arguments,p,n);return R&&typeof R=="object"&&(R[Yc._ALREADY_INSTRUMENTED]=!0),R}}patchModelStatic(t,n){let r=this;return o=>function(s,u,l){if(r.getConfig().requireParentSpan&&Ns.trace.getSpan(Ns.context.active())===void 0)return o.apply(this,arguments);typeof u=="function"&&(l=u,u=void 0);let p={};switch(t){case"insertMany":p.documents=s;break;case"bulkWrite":p.operations=s;break;default:p.document=s;break}u!==void 0&&(p.options=u);let h={},{dbStatementSerializer:y}=r.getConfig();if(y){let T=y(t,p);r._dbSemconvStability&Ma.SemconvStability.OLD&&(h[EE.ATTR_DB_STATEMENT]=T),r._dbSemconvStability&Ma.SemconvStability.STABLE&&(h[ZS.ATTR_DB_QUERY_TEXT]=T)}let S=r._startSpan(this.collection,this.modelName,t,h);return r._handleResponse(S,o,this,arguments,l,n)}}patchModelAggregate(){let t=this;return n=>function(){let o=Ns.trace.getSpan(Ns.context.active()),i=t._callOriginalFunction(()=>n.apply(this,arguments));return i&&(i[Yc._STORED_PARENT_SPAN]=o),i}}patchAndCaptureSpanContext(t){let n=this;return r=>function(){return this[Yc._STORED_PARENT_SPAN]=Ns.trace.getSpan(Ns.context.active()),n._callOriginalFunction(()=>r.apply(this,arguments))}}_startSpan(t,n,r,o,i){let s={...o,...(0,wW.getAttributesFromCollection)(t,this._dbSemconvStability,this._netSemconvStability)};this._dbSemconvStability&Ma.SemconvStability.OLD&&(s[EE.ATTR_DB_OPERATION]=r,s[EE.ATTR_DB_SYSTEM]="mongoose"),this._dbSemconvStability&Ma.SemconvStability.STABLE&&(s[ZS.ATTR_DB_OPERATION_NAME]=r,s[ZS.ATTR_DB_SYSTEM_NAME]=EE.DB_SYSTEM_NAME_VALUE_MONGODB);let u=this._dbSemconvStability&Ma.SemconvStability.STABLE?`${r} ${t.name}`:`mongoose.${n}.${r}`;return this.tracer.startSpan(u,{kind:Ns.SpanKind.CLIENT,attributes:s},i?Ns.trace.setSpan(Ns.context.active(),i):void 0)}_handleResponse(t,n,r,o,i,s=void 0){let u=this;if(i instanceof Function)return u._callOriginalFunction(()=>(0,wW.handleCallbackResponse)(i,n,r,t,o,u.getConfig().responseHook,s));{let l=u._callOriginalFunction(()=>n.apply(r,o));return(0,wW.handlePromiseResponse)(l,t,u.getConfig().responseHook,s)}}_callOriginalFunction(t){return this.getConfig().suppressInternalInstrumentation?Ns.context.with((0,Dxt.suppressTracing)(Ns.context.active()),t):t()}};Yc.MongooseInstrumentation=OW});var CPe=P($3=>{"use strict";m();Object.defineProperty($3,"__esModule",{value:!0});$3.MongooseInstrumentation=void 0;var Oxt=IPe();Object.defineProperty($3,"MongooseInstrumentation",{enumerable:!0,get:function(){return Oxt.MongooseInstrumentation}})});var vPe,RPe,xPe,kxt,DPe,NPe=w(()=>{m();vPe=ue(CPe(),1);_r();RPe="Mongoose",xPe=ut(RPe,()=>new vPe.MongooseInstrumentation({responseHook(e){zr(e,"auto.db.otel.mongoose")}})),kxt=(()=>({name:RPe,setupOnce(){xPe()}})),DPe=kxt});var BPe=P(us=>{"use strict";m();Object.defineProperty(us,"__esModule",{value:!0});us.METRIC_DB_CLIENT_CONNECTIONS_USAGE=us.DB_SYSTEM_VALUE_MYSQL=us.ATTR_NET_PEER_PORT=us.ATTR_NET_PEER_NAME=us.ATTR_DB_USER=us.ATTR_DB_SYSTEM=us.ATTR_DB_STATEMENT=us.ATTR_DB_NAME=us.ATTR_DB_CONNECTION_STRING=void 0;us.ATTR_DB_CONNECTION_STRING="db.connection_string";us.ATTR_DB_NAME="db.name";us.ATTR_DB_STATEMENT="db.statement";us.ATTR_DB_SYSTEM="db.system";us.ATTR_DB_USER="db.user";us.ATTR_NET_PEER_NAME="net.peer.name";us.ATTR_NET_PEER_PORT="net.peer.port";us.DB_SYSTEM_VALUE_MYSQL="mysql";us.METRIC_DB_CLIENT_CONNECTIONS_USAGE="db.client.connections.usage"});var wPe=P(sO=>{"use strict";m();Object.defineProperty(sO,"__esModule",{value:!0});sO.AttributeNames=void 0;var Pxt;(function(e){e.MYSQL_VALUES="db.mysql.values"})(Pxt=sO.AttributeNames||(sO.AttributeNames={}))});var OPe=P(mu=>{"use strict";m();Object.defineProperty(mu,"__esModule",{value:!0});mu.getPoolNameOld=mu.arrayStringifyHelper=mu.getSpanName=mu.getDbValues=mu.getDbQueryText=mu.getJDBCString=mu.getConfig=void 0;function Mxt(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}mu.getConfig=Mxt;function Lxt(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}mu.getJDBCString=Lxt;function Uxt(e){return typeof e=="string"?e:e.sql}mu.getDbQueryText=Uxt;function Qxt(e,t){return kW(typeof e=="string"?t:t||e.values)}mu.getDbValues=Qxt;function Fxt(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}mu.getSpanName=Fxt;function kW(e){return e?`[${e.toString()}]`:""}mu.arrayStringifyHelper=kW;function Gxt(e){let t=e.config.connectionConfig,n="";return n+=t.host?`host: '${t.host}', `:"",n+=t.port?`port: ${t.port}, `:"",n+=t.database?`database: '${t.database}', `:"",n+=t.user?`user: '${t.user}'`:"",t.user||(n=n.substring(0,n.length-2)),n.trim()}mu.getPoolNameOld=Gxt});var kPe=P(yR=>{"use strict";m();Object.defineProperty(yR,"__esModule",{value:!0});yR.PACKAGE_NAME=yR.PACKAGE_VERSION=void 0;yR.PACKAGE_VERSION="0.60.0";yR.PACKAGE_NAME="@opentelemetry/instrumentation-mysql"});var MPe=P(q3=>{"use strict";m();Object.defineProperty(q3,"__esModule",{value:!0});q3.MySQLInstrumentation=void 0;var Kc=(ze(),Le(nt)),op=sn(),SR=(Xn(),Le(Gr)),Wg=BPe(),jxt=wPe(),WS=OPe(),PPe=kPe(),PW=class extends op.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(PPe.PACKAGE_NAME,PPe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,op.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,op.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._connectionsUsageOld=this.meter.createUpDownCounter(Wg.METRIC_DB_CLIENT_CONNECTIONS_USAGE,{description:"The number of connections that are currently in state described by the state attribute.",unit:"{connection}"})}_connCountAdd(t,n,r){this._connectionsUsageOld?.add(t,{state:r,name:n})}init(){return[new op.InstrumentationNodeModuleDefinition("mysql",[">=2.0.0 <3"],t=>((0,op.isWrapped)(t.createConnection)&&this._unwrap(t,"createConnection"),this._wrap(t,"createConnection",this._patchCreateConnection()),(0,op.isWrapped)(t.createPool)&&this._unwrap(t,"createPool"),this._wrap(t,"createPool",this._patchCreatePool()),(0,op.isWrapped)(t.createPoolCluster)&&this._unwrap(t,"createPoolCluster"),this._wrap(t,"createPoolCluster",this._patchCreatePoolCluster()),t),t=>{t!==void 0&&(this._unwrap(t,"createConnection"),this._unwrap(t,"createPool"),this._unwrap(t,"createPoolCluster"))})]}_patchCreateConnection(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"query",n._patchQuery(i)),i}}}_patchCreatePool(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"query",n._patchQuery(i)),n._wrap(i,"getConnection",n._patchGetConnection(i)),n._wrap(i,"end",n._patchPoolEnd(i)),n._setPoolCallbacks(i,""),i}}}_patchPoolEnd(t){return n=>{let r=this;return function(i){let s=t._allConnections.length,u=t._freeConnections.length,l=s-u,p=(0,WS.getPoolNameOld)(t);r._connCountAdd(-l,p,"used"),r._connCountAdd(-u,p,"idle"),n.apply(t,arguments)}}}_patchCreatePoolCluster(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"getConnection",n._patchGetConnection(i)),n._wrap(i,"add",n._patchAdd(i)),i}}}_patchAdd(t){return n=>{let r=this;return function(i,s){if(!r._enabled)return r._unwrap(t,"add"),n.apply(t,arguments);n.apply(t,arguments);let u=t._nodes;if(u){let l=typeof i=="object"?"CLUSTER::"+t._lastId:String(i),p=u[l].pool;r._setPoolCallbacks(p,i)}}}}_patchGetConnection(t){return n=>{let r=this;return function(i,s,u){if(!r._enabled)return r._unwrap(t,"getConnection"),n.apply(t,arguments);if(arguments.length===1&&typeof i=="function"){let l=r._getConnectionCallbackPatchFn(i);return n.call(t,l)}if(arguments.length===2&&typeof s=="function"){let l=r._getConnectionCallbackPatchFn(s);return n.call(t,i,l)}if(arguments.length===3&&typeof u=="function"){let l=r._getConnectionCallbackPatchFn(u);return n.call(t,i,s,l)}return n.apply(t,arguments)}}}_getConnectionCallbackPatchFn(t){let n=this,r=Kc.context.active();return function(o,i){i&&((0,op.isWrapped)(i.query)||n._wrap(i,"query",n._patchQuery(i))),typeof t=="function"&&Kc.context.with(r,t,this,o,i)}}_patchQuery(t){return n=>{let r=this;return function(o,i,s){if(!r._enabled)return r._unwrap(t,"query"),n.apply(t,arguments);let u={},{host:l,port:p,database:h,user:y}=(0,WS.getConfig)(t.config),S=parseInt(p,10),T=(0,WS.getDbQueryText)(o);r._dbSemconvStability&op.SemconvStability.OLD&&(u[Wg.ATTR_DB_SYSTEM]=Wg.DB_SYSTEM_VALUE_MYSQL,u[Wg.ATTR_DB_CONNECTION_STRING]=(0,WS.getJDBCString)(l,p,h),u[Wg.ATTR_DB_NAME]=h,u[Wg.ATTR_DB_USER]=y,u[Wg.ATTR_DB_STATEMENT]=T),r._dbSemconvStability&op.SemconvStability.STABLE&&(u[SR.ATTR_DB_SYSTEM_NAME]=SR.DB_SYSTEM_NAME_VALUE_MYSQL,u[SR.ATTR_DB_NAMESPACE]=h,u[SR.ATTR_DB_QUERY_TEXT]=T),r._netSemconvStability&op.SemconvStability.OLD&&(u[Wg.ATTR_NET_PEER_NAME]=l,isNaN(S)||(u[Wg.ATTR_NET_PEER_PORT]=S)),r._netSemconvStability&op.SemconvStability.STABLE&&(u[SR.ATTR_SERVER_ADDRESS]=l,isNaN(S)||(u[SR.ATTR_SERVER_PORT]=S));let v=r.tracer.startSpan((0,WS.getSpanName)(o),{kind:Kc.SpanKind.CLIENT,attributes:u});if(r.getConfig().enhancedDatabaseReporting){let O;Array.isArray(i)?O=i:arguments[2]&&(O=[i]),v.setAttribute(jxt.AttributeNames.MYSQL_VALUES,(0,WS.getDbValues)(o,O))}let R=Array.from(arguments).findIndex(O=>typeof O=="function"),x=Kc.context.active();if(R===-1){let O=Kc.context.with(Kc.trace.setSpan(Kc.context.active(),v),()=>n.apply(t,arguments));return Kc.context.bind(x,O),O.on("error",M=>v.setStatus({code:Kc.SpanStatusCode.ERROR,message:M.message})).on("end",()=>{v.end()})}else return r._wrap(arguments,R,r._patchCallbackQuery(v,x)),Kc.context.with(Kc.trace.setSpan(Kc.context.active(),v),()=>n.apply(t,arguments))}}}_patchCallbackQuery(t,n){return r=>function(o,i,s){return o&&t.setStatus({code:Kc.SpanStatusCode.ERROR,message:o.message}),t.end(),Kc.context.with(n,()=>r(...arguments))}}_setPoolCallbacks(t,n){let r=n||(0,WS.getPoolNameOld)(t);t.on("connection",o=>{this._connCountAdd(1,r,"idle")}),t.on("acquire",o=>{this._connCountAdd(-1,r,"idle"),this._connCountAdd(1,r,"used")}),t.on("release",o=>{this._connCountAdd(1,r,"idle"),this._connCountAdd(-1,r,"used")})}};q3.MySQLInstrumentation=PW});var LPe=P(V3=>{"use strict";m();Object.defineProperty(V3,"__esModule",{value:!0});V3.MySQLInstrumentation=void 0;var zxt=MPe();Object.defineProperty(V3,"MySQLInstrumentation",{enumerable:!0,get:function(){return zxt.MySQLInstrumentation}})});var UPe,QPe,FPe,Hxt,GPe,jPe=w(()=>{m();UPe=ue(LPe(),1);_r();QPe="Mysql",FPe=ut(QPe,()=>new UPe.MySQLInstrumentation({})),Hxt=(()=>({name:QPe,setupOnce(){FPe()}})),GPe=Hxt});var MW=P(aa=>{"use strict";m();Object.defineProperty(aa,"__esModule",{value:!0});aa.DB_SYSTEM_VALUE_MYSQL=aa.ATTR_NET_PEER_PORT=aa.ATTR_NET_PEER_NAME=aa.ATTR_DB_USER=aa.ATTR_DB_SYSTEM=aa.ATTR_DB_STATEMENT=aa.ATTR_DB_NAME=aa.ATTR_DB_CONNECTION_STRING=void 0;aa.ATTR_DB_CONNECTION_STRING="db.connection_string";aa.ATTR_DB_NAME="db.name";aa.ATTR_DB_STATEMENT="db.statement";aa.ATTR_DB_SYSTEM="db.system";aa.ATTR_DB_USER="db.user";aa.ATTR_NET_PEER_NAME="net.peer.name";aa.ATTR_NET_PEER_PORT="net.peer.port";aa.DB_SYSTEM_VALUE_MYSQL="mysql"});var UW=P(Y3=>{"use strict";m();Object.defineProperty(Y3,"__esModule",{value:!0});Y3.addSqlCommenterComment=void 0;var LW=(ze(),Le(nt)),$xt=Cr();function qxt(e){let t=e.indexOf("--");if(t>=0)return!0;if(e.indexOf("/*")<0)return!1;let r=e.indexOf("*/");return t<r}function Vxt(e){return encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}function Yxt(e,t){if(typeof t!="string"||t.length===0||qxt(t))return t;let n=new $xt.W3CTraceContextPropagator,r={};n.inject(LW.trace.setSpan(LW.ROOT_CONTEXT,e),r,LW.defaultTextMapSetter);let o=Object.keys(r).sort();if(o.length===0)return t;let i=o.map(s=>{let u=Vxt(r[s]);return`${s}='${u}'`}).join(",");return`${t} /*${i}*/`}Y3.addSqlCommenterComment=Yxt});var zPe=P(ip=>{"use strict";m();Object.defineProperty(ip,"__esModule",{value:!0});ip.getConnectionPrototypeToInstrument=ip.once=ip.getSpanName=ip.getQueryText=ip.getConnectionAttributes=void 0;var aO=MW(),K3=sn(),QW=(Xn(),Le(Gr));function Kxt(e,t,n){let{host:r,port:o,database:i,user:s}=Jxt(e),u={};t&K3.SemconvStability.OLD&&(u[aO.ATTR_DB_CONNECTION_STRING]=Zxt(r,o,i),u[aO.ATTR_DB_NAME]=i,u[aO.ATTR_DB_USER]=s),t&K3.SemconvStability.STABLE&&(u[QW.ATTR_DB_NAMESPACE]=i);let l=parseInt(o,10);return n&K3.SemconvStability.OLD&&(u[aO.ATTR_NET_PEER_NAME]=r,isNaN(l)||(u[aO.ATTR_NET_PEER_PORT]=l)),n&K3.SemconvStability.STABLE&&(u[QW.ATTR_SERVER_ADDRESS]=r,isNaN(l)||(u[QW.ATTR_SERVER_PORT]=l)),u}ip.getConnectionAttributes=Kxt;function Jxt(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}function Zxt(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}function Wxt(e,t,n,r=!1,o=Xxt){let[i,s]=typeof e=="string"?[e,n]:[e.sql,eDt(e)?n||e.values:n];try{return r?o(i):t&&s?t(i,s):i}catch{return"Could not determine the query due to an error in masking or formatting"}}ip.getQueryText=Wxt;function Xxt(e){return e.replace(/\b\d+\b/g,"?").replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,"?")}function eDt(e){return"values"in e}function tDt(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}ip.getSpanName=tDt;var nDt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};ip.once=nDt;function rDt(e){let t=e.prototype,n=Object.getPrototypeOf(t);return typeof n?.query=="function"&&typeof n?.execute=="function"?n:t}ip.getConnectionPrototypeToInstrument=rDt});var HPe=P(TR=>{"use strict";m();Object.defineProperty(TR,"__esModule",{value:!0});TR.PACKAGE_NAME=TR.PACKAGE_VERSION=void 0;TR.PACKAGE_VERSION="0.60.0";TR.PACKAGE_NAME="@opentelemetry/instrumentation-mysql2"});var YPe=P(J3=>{"use strict";m();Object.defineProperty(J3,"__esModule",{value:!0});J3.MySQL2Instrumentation=void 0;var $Pe=(ze(),Le(nt)),If=sn(),FW=MW(),qPe=UW(),bR=zPe(),VPe=HPe(),GW=(Xn(),Le(Gr)),jW=[">=1.4.2 <4"],zW=class extends If.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(VPe.PACKAGE_NAME,VPe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,If.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,If.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){let t;function n(i){!t&&i.format&&(t=i.format)}let r=i=>{(0,If.isWrapped)(i.query)&&this._unwrap(i,"query"),this._wrap(i,"query",this._patchQuery(t,!1)),(0,If.isWrapped)(i.execute)&&this._unwrap(i,"execute"),this._wrap(i,"execute",this._patchQuery(t,!0))},o=i=>{this._unwrap(i,"query"),this._unwrap(i,"execute")};return[new If.InstrumentationNodeModuleDefinition("mysql2",jW,i=>(n(i),i),()=>{},[new If.InstrumentationNodeModuleFile("mysql2/promise.js",jW,i=>(n(i),i),()=>{}),new If.InstrumentationNodeModuleFile("mysql2/lib/connection.js",jW,i=>{let s=(0,bR.getConnectionPrototypeToInstrument)(i);return r(s),i},i=>{if(i===void 0)return;let s=(0,bR.getConnectionPrototypeToInstrument)(i);o(s)})])]}_patchQuery(t,n){return r=>{let o=this;return function(i,s,u){let l;Array.isArray(s)?l=s:arguments[2]&&(l=[s]);let{maskStatement:p,maskStatementHook:h,responseHook:y}=o.getConfig(),S=(0,bR.getConnectionAttributes)(this.config,o._dbSemconvStability,o._netSemconvStability),T=(0,bR.getQueryText)(i,t,l,p,h);o._dbSemconvStability&If.SemconvStability.OLD&&(S[FW.ATTR_DB_SYSTEM]=FW.DB_SYSTEM_VALUE_MYSQL,S[FW.ATTR_DB_STATEMENT]=T),o._dbSemconvStability&If.SemconvStability.STABLE&&(S[GW.ATTR_DB_SYSTEM_NAME]=GW.DB_SYSTEM_NAME_VALUE_MYSQL,S[GW.ATTR_DB_QUERY_TEXT]=T);let v=o.tracer.startSpan((0,bR.getSpanName)(i),{kind:$Pe.SpanKind.CLIENT,attributes:S});!n&&o.getConfig().addSqlCommenterCommentToQueries&&(arguments[0]=i=typeof i=="string"?(0,qPe.addSqlCommenterComment)(v,i):Object.assign(i,{sql:(0,qPe.addSqlCommenterComment)(v,i.sql)}));let R=(0,bR.once)((x,O)=>{x?v.setStatus({code:$Pe.SpanStatusCode.ERROR,message:x.message}):typeof y=="function"&&(0,If.safeExecuteInTheMiddle)(()=>{y(v,{queryResults:O})},M=>{M&&o._diag.warn("Failed executing responseHook",M)},!0),v.end()});if(arguments.length===1){typeof i.onResult=="function"&&o._wrap(i,"onResult",o._patchCallbackQuery(R));let x=r.apply(this,arguments);return x.once("error",O=>{R(O)}).once("result",O=>{R(void 0,O)}),x}return typeof arguments[1]=="function"?o._wrap(arguments,1,o._patchCallbackQuery(R)):typeof arguments[2]=="function"&&o._wrap(arguments,2,o._patchCallbackQuery(R)),r.apply(this,arguments)}}}_patchCallbackQuery(t){return n=>function(r,o,i){return t(r,o),n(...arguments)}}};J3.MySQL2Instrumentation=zW});var KPe=P(Z3=>{"use strict";m();Object.defineProperty(Z3,"__esModule",{value:!0});Z3.MySQL2Instrumentation=void 0;var oDt=YPe();Object.defineProperty(Z3,"MySQL2Instrumentation",{enumerable:!0,get:function(){return oDt.MySQL2Instrumentation}})});var JPe,ZPe,WPe,iDt,XPe,eMe=w(()=>{m();JPe=ue(KPe(),1);_r();ZPe="Mysql2",WPe=ut(ZPe,()=>new JPe.MySQL2Instrumentation({responseHook(e){zr(e,"auto.db.otel.mysql2")}})),iDt=(()=>({name:ZPe,setupOnce(){WPe()}})),XPe=iDt});var tMe=P(Au=>{"use strict";m();Object.defineProperty(Au,"__esModule",{value:!0});Au.DB_SYSTEM_VALUE_REDIS=Au.DB_SYSTEM_NAME_VALUE_REDIS=Au.ATTR_NET_PEER_PORT=Au.ATTR_NET_PEER_NAME=Au.ATTR_DB_SYSTEM=Au.ATTR_DB_STATEMENT=Au.ATTR_DB_CONNECTION_STRING=void 0;Au.ATTR_DB_CONNECTION_STRING="db.connection_string";Au.ATTR_DB_STATEMENT="db.statement";Au.ATTR_DB_SYSTEM="db.system";Au.ATTR_NET_PEER_NAME="net.peer.name";Au.ATTR_NET_PEER_PORT="net.peer.port";Au.DB_SYSTEM_NAME_VALUE_REDIS="redis";Au.DB_SYSTEM_VALUE_REDIS="redis"});var nMe=P(W3=>{"use strict";m();Object.defineProperty(W3,"__esModule",{value:!0});W3.endSpan=void 0;var sDt=(ze(),Le(nt)),aDt=(e,t)=>{t&&(e.recordException(t),e.setStatus({code:sDt.SpanStatusCode.ERROR,message:t.message})),e.end()};W3.endSpan=aDt});var e6=P(X3=>{"use strict";m();Object.defineProperty(X3,"__esModule",{value:!0});X3.defaultDbStatementSerializer=void 0;var uDt=[{regex:/^ECHO/i,args:0},{regex:/^(LPUSH|MSET|PFA|PUBLISH|RPUSH|SADD|SET|SPUBLISH|XADD|ZADD)/i,args:1},{regex:/^(HSET|HMSET|LSET|LINSERT)/i,args:2},{regex:/^(ACL|BIT|B[LRZ]|CLIENT|CLUSTER|CONFIG|COMMAND|DECR|DEL|EVAL|EX|FUNCTION|GEO|GET|HINCR|HMGET|HSCAN|INCR|L[TRLM]|MEMORY|P[EFISTU]|RPOP|S[CDIMORSU]|XACK|X[CDGILPRT]|Z[CDILMPRS])/i,args:-1}],cDt=(e,t)=>{if(Array.isArray(t)&&t.length){let n=uDt.find(({regex:o})=>o.test(e))?.args??0,r=n>=0?t.slice(0,n):t;return t.length>r.length&&r.push(`[${t.length-n} other arguments]`),`${e} ${r.join(" ")}`}return e};X3.defaultDbStatementSerializer=cDt});var rMe=P(IR=>{"use strict";m();Object.defineProperty(IR,"__esModule",{value:!0});IR.PACKAGE_NAME=IR.PACKAGE_VERSION=void 0;IR.PACKAGE_VERSION="0.62.0";IR.PACKAGE_NAME="@opentelemetry/instrumentation-ioredis"});var aMe=P(t6=>{"use strict";m();Object.defineProperty(t6,"__esModule",{value:!0});t6.IORedisInstrumentation=void 0;var yE=(ze(),Le(nt)),Jc=sn(),SE=(Xn(),Le(Gr)),Zc=tMe(),oMe=sn(),uO=nMe(),lDt=e6(),iMe=rMe(),sMe={requireParentSpan:!0},HW=class extends Jc.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(iMe.PACKAGE_NAME,iMe.PACKAGE_VERSION,{...sMe,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Jc.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Jc.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...sMe,...t})}init(){return[new Jc.InstrumentationNodeModuleDefinition("ioredis",[">=2.0.0 <6"],(t,n)=>{let r=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,Jc.isWrapped)(r.prototype.sendCommand)&&this._unwrap(r.prototype,"sendCommand"),this._wrap(r.prototype,"sendCommand",this._patchSendCommand(n)),(0,Jc.isWrapped)(r.prototype.connect)&&this._unwrap(r.prototype,"connect"),this._wrap(r.prototype,"connect",this._patchConnection()),t},t=>{if(t===void 0)return;let n=t[Symbol.toStringTag]==="Module"?t.default:t;this._unwrap(n.prototype,"sendCommand"),this._unwrap(n.prototype,"connect")})]}_patchSendCommand(t){return n=>this._traceSendCommand(n,t)}_patchConnection(){return t=>this._traceConnection(t)}_traceSendCommand(t,n){let r=this;return function(o){if(arguments.length<1||typeof o!="object")return t.apply(this,arguments);let i=r.getConfig(),s=i.dbStatementSerializer||lDt.defaultDbStatementSerializer,u=yE.trace.getSpan(yE.context.active())===void 0;if(i.requireParentSpan===!0&&u)return t.apply(this,arguments);let l={},{host:p,port:h}=this.options,y=s(o.name,o.args);r._dbSemconvStability&Jc.SemconvStability.OLD&&(l[Zc.ATTR_DB_SYSTEM]=Zc.DB_SYSTEM_VALUE_REDIS,l[Zc.ATTR_DB_STATEMENT]=y,l[Zc.ATTR_DB_CONNECTION_STRING]=`redis://${p}:${h}`),r._dbSemconvStability&Jc.SemconvStability.STABLE&&(l[SE.ATTR_DB_SYSTEM_NAME]=Zc.DB_SYSTEM_NAME_VALUE_REDIS,l[SE.ATTR_DB_QUERY_TEXT]=y),r._netSemconvStability&Jc.SemconvStability.OLD&&(l[Zc.ATTR_NET_PEER_NAME]=p,l[Zc.ATTR_NET_PEER_PORT]=h),r._netSemconvStability&Jc.SemconvStability.STABLE&&(l[SE.ATTR_SERVER_ADDRESS]=p,l[SE.ATTR_SERVER_PORT]=h);let S=r.tracer.startSpan(o.name,{kind:yE.SpanKind.CLIENT,attributes:l}),{requestHook:T}=i;T&&(0,oMe.safeExecuteInTheMiddle)(()=>T(S,{moduleVersion:n,cmdName:o.name,cmdArgs:o.args}),v=>{v&&yE.diag.error("ioredis instrumentation: request hook failed",v)},!0);try{let v=t.apply(this,arguments),R=o.resolve;o.resolve=function(O){(0,oMe.safeExecuteInTheMiddle)(()=>i.responseHook?.(S,o.name,o.args,O),M=>{M&&yE.diag.error("ioredis instrumentation: response hook failed",M)},!0),(0,uO.endSpan)(S,null),R(O)};let x=o.reject;return o.reject=function(O){(0,uO.endSpan)(S,O),x(O)},v}catch(v){throw(0,uO.endSpan)(S,v),v}}}_traceConnection(t){let n=this;return function(){let r=yE.trace.getSpan(yE.context.active())===void 0;if(n.getConfig().requireParentSpan===!0&&r)return t.apply(this,arguments);let o={},{host:i,port:s}=this.options;n._dbSemconvStability&Jc.SemconvStability.OLD&&(o[Zc.ATTR_DB_SYSTEM]=Zc.DB_SYSTEM_VALUE_REDIS,o[Zc.ATTR_DB_STATEMENT]="connect",o[Zc.ATTR_DB_CONNECTION_STRING]=`redis://${i}:${s}`),n._dbSemconvStability&Jc.SemconvStability.STABLE&&(o[SE.ATTR_DB_SYSTEM_NAME]=Zc.DB_SYSTEM_NAME_VALUE_REDIS,o[SE.ATTR_DB_QUERY_TEXT]="connect"),n._netSemconvStability&Jc.SemconvStability.OLD&&(o[Zc.ATTR_NET_PEER_NAME]=i,o[Zc.ATTR_NET_PEER_PORT]=s),n._netSemconvStability&Jc.SemconvStability.STABLE&&(o[SE.ATTR_SERVER_ADDRESS]=i,o[SE.ATTR_SERVER_PORT]=s);let u=n.tracer.startSpan("connect",{kind:yE.SpanKind.CLIENT,attributes:o});try{let l=t.apply(this,arguments);return(0,uO.endSpan)(u,null),l}catch(l){throw(0,uO.endSpan)(u,l),l}}}};t6.IORedisInstrumentation=HW});var uMe=P(n6=>{"use strict";m();Object.defineProperty(n6,"__esModule",{value:!0});n6.IORedisInstrumentation=void 0;var dDt=aMe();Object.defineProperty(n6,"IORedisInstrumentation",{enumerable:!0,get:function(){return dDt.IORedisInstrumentation}})});var r6=P(CR=>{"use strict";m();Object.defineProperty(CR,"__esModule",{value:!0});CR.PACKAGE_NAME=CR.PACKAGE_VERSION=void 0;CR.PACKAGE_VERSION="0.62.0";CR.PACKAGE_NAME="@opentelemetry/instrumentation-redis"});var cMe=P(TE=>{"use strict";m();Object.defineProperty(TE,"__esModule",{value:!0});TE.getTracedCreateStreamTrace=TE.getTracedCreateClient=TE.endSpan=void 0;var cO=(ze(),Le(nt)),pDt=(e,t)=>{t&&e.setStatus({code:cO.SpanStatusCode.ERROR,message:t.message}),e.end()};TE.endSpan=pDt;var fDt=e=>function(){let n=e.apply(this,arguments);return cO.context.bind(cO.context.active(),n)};TE.getTracedCreateClient=fDt;var mDt=e=>function(){return Object.prototype.hasOwnProperty.call(this,"stream")||Object.defineProperty(this,"stream",{get(){return this._patched_redis_stream},set(n){cO.context.bind(cO.context.active(),n),this._patched_redis_stream=n}}),e.apply(this,arguments)};TE.getTracedCreateStreamTrace=mDt});var o6=P(gu=>{"use strict";m();Object.defineProperty(gu,"__esModule",{value:!0});gu.DB_SYSTEM_VALUE_REDIS=gu.DB_SYSTEM_NAME_VALUE_REDIS=gu.ATTR_NET_PEER_PORT=gu.ATTR_NET_PEER_NAME=gu.ATTR_DB_SYSTEM=gu.ATTR_DB_STATEMENT=gu.ATTR_DB_CONNECTION_STRING=void 0;gu.ATTR_DB_CONNECTION_STRING="db.connection_string";gu.ATTR_DB_STATEMENT="db.statement";gu.ATTR_DB_SYSTEM="db.system";gu.ATTR_NET_PEER_NAME="net.peer.name";gu.ATTR_NET_PEER_PORT="net.peer.port";gu.DB_SYSTEM_NAME_VALUE_REDIS="redis";gu.DB_SYSTEM_VALUE_REDIS="redis"});var dMe=P(s6=>{"use strict";m();Object.defineProperty(s6,"__esModule",{value:!0});s6.RedisInstrumentationV2_V3=void 0;var Zl=sn(),i6=cMe(),lMe=r6(),lO=(ze(),Le(nt)),dO=(Xn(),Le(Gr)),XS=o6(),ADt=e6(),$W=class e extends Zl.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(lMe.PACKAGE_NAME,lMe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Zl.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Zl.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new Zl.InstrumentationNodeModuleDefinition("redis",[">=2.6.0 <4"],t=>((0,Zl.isWrapped)(t.RedisClient.prototype.internal_send_command)&&this._unwrap(t.RedisClient.prototype,"internal_send_command"),this._wrap(t.RedisClient.prototype,"internal_send_command",this._getPatchInternalSendCommand()),(0,Zl.isWrapped)(t.RedisClient.prototype.create_stream)&&this._unwrap(t.RedisClient.prototype,"create_stream"),this._wrap(t.RedisClient.prototype,"create_stream",this._getPatchCreateStream()),(0,Zl.isWrapped)(t.createClient)&&this._unwrap(t,"createClient"),this._wrap(t,"createClient",this._getPatchCreateClient()),t),t=>{t!==void 0&&(this._unwrap(t.RedisClient.prototype,"internal_send_command"),this._unwrap(t.RedisClient.prototype,"create_stream"),this._unwrap(t,"createClient"))})]}_getPatchInternalSendCommand(){let t=this;return function(r){return function(i){if(arguments.length!==1||typeof i!="object")return r.apply(this,arguments);let s=t.getConfig(),u=lO.trace.getSpan(lO.context.active())===void 0;if(s.requireParentSpan===!0&&u)return r.apply(this,arguments);let l=s?.dbStatementSerializer||ADt.defaultDbStatementSerializer,p={};t._semconvStability&Zl.SemconvStability.OLD&&Object.assign(p,{[XS.ATTR_DB_SYSTEM]:XS.DB_SYSTEM_VALUE_REDIS,[XS.ATTR_DB_STATEMENT]:l(i.command,i.args)}),t._semconvStability&Zl.SemconvStability.STABLE&&Object.assign(p,{[dO.ATTR_DB_SYSTEM_NAME]:XS.DB_SYSTEM_NAME_VALUE_REDIS,[dO.ATTR_DB_OPERATION_NAME]:i.command,[dO.ATTR_DB_QUERY_TEXT]:l(i.command,i.args)});let h=t.tracer.startSpan(`${e.COMPONENT}-${i.command}`,{kind:lO.SpanKind.CLIENT,attributes:p});if(this.connection_options){let S={};t._semconvStability&Zl.SemconvStability.OLD&&Object.assign(S,{[XS.ATTR_NET_PEER_NAME]:this.connection_options.host,[XS.ATTR_NET_PEER_PORT]:this.connection_options.port}),t._semconvStability&Zl.SemconvStability.STABLE&&Object.assign(S,{[dO.ATTR_SERVER_ADDRESS]:this.connection_options.host,[dO.ATTR_SERVER_PORT]:this.connection_options.port}),h.setAttributes(S)}this.address&&t._semconvStability&Zl.SemconvStability.OLD&&h.setAttribute(XS.ATTR_DB_CONNECTION_STRING,`redis://${this.address}`);let y=arguments[0].callback;if(y){let S=lO.context.active();arguments[0].callback=function(v,R){if(s?.responseHook){let x=s.responseHook;(0,Zl.safeExecuteInTheMiddle)(()=>{x(h,i.command,i.args,R)},O=>{O&&t._diag.error("Error executing responseHook",O)},!0)}return(0,i6.endSpan)(h,v),lO.context.with(S,y,this,...arguments)}}try{return r.apply(this,arguments)}catch(S){throw(0,i6.endSpan)(h,S),S}}}}_getPatchCreateClient(){return function(n){return(0,i6.getTracedCreateClient)(n)}}_getPatchCreateStream(){return function(n){return(0,i6.getTracedCreateStreamTrace)(n)}}};s6.RedisInstrumentationV2_V3=$W});var fMe=P(a6=>{"use strict";m();Object.defineProperty(a6,"__esModule",{value:!0});a6.getClientAttributes=void 0;var qW=(Xn(),Le(Gr)),vR=o6(),pMe=sn();function gDt(e,t,n){let r={};return n&pMe.SemconvStability.OLD&&Object.assign(r,{[vR.ATTR_DB_SYSTEM]:vR.DB_SYSTEM_VALUE_REDIS,[vR.ATTR_NET_PEER_NAME]:t?.socket?.host,[vR.ATTR_NET_PEER_PORT]:t?.socket?.port,[vR.ATTR_DB_CONNECTION_STRING]:hDt(e,t?.url)}),n&pMe.SemconvStability.STABLE&&Object.assign(r,{[qW.ATTR_DB_SYSTEM_NAME]:vR.DB_SYSTEM_NAME_VALUE_REDIS,[qW.ATTR_SERVER_ADDRESS]:t?.socket?.host,[qW.ATTR_SERVER_PORT]:t?.socket?.port}),r}a6.getClientAttributes=gDt;function hDt(e,t){if(!(typeof t!="string"||!t))try{let n=new URL(t);return n.searchParams.delete("user_pwd"),n.username="",n.password="",n.href}catch(n){e.error("failed to sanitize redis connection url",n)}}});var hMe=P(u6=>{"use strict";m();Object.defineProperty(u6,"__esModule",{value:!0});u6.RedisInstrumentationV4_V5=void 0;var sp=(ze(),Le(nt)),Io=sn(),mMe=fMe(),_Dt=e6(),AMe=r6(),VW=(Xn(),Le(Gr)),EDt=o6(),pO=Symbol("opentelemetry.instrumentation.redis.open_spans"),gMe=Symbol("opentelemetry.instrumentation.redis.multi_command_options"),YW=class e extends Io.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(AMe.PACKAGE_NAME,AMe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Io.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Io.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[this._getInstrumentationNodeModuleDefinition("@redis/client"),this._getInstrumentationNodeModuleDefinition("@node-redis/client")]}_getInstrumentationNodeModuleDefinition(t){let n=new Io.InstrumentationNodeModuleFile(`${t}/dist/lib/commander.js`,["^1.0.0"],(i,s)=>{let u=i.transformCommandArguments;if(!u)return this._diag.error("internal instrumentation error, missing transformCommandArguments function"),i;let l=s?.startsWith("1.0.")?"extendWithCommands":"attachCommands";return(0,Io.isWrapped)(i?.[l])&&this._unwrap(i,l),this._wrap(i,l,this._getPatchExtendWithCommands(u)),i},i=>{(0,Io.isWrapped)(i?.extendWithCommands)&&this._unwrap(i,"extendWithCommands"),(0,Io.isWrapped)(i?.attachCommands)&&this._unwrap(i,"attachCommands")}),r=new Io.InstrumentationNodeModuleFile(`${t}/dist/lib/client/multi-command.js`,["^1.0.0","^5.0.0"],i=>{let s=i?.default?.prototype;return(0,Io.isWrapped)(s?.exec)&&this._unwrap(s,"exec"),this._wrap(s,"exec",this._getPatchMultiCommandsExec(!1)),(0,Io.isWrapped)(s?.execAsPipeline)&&this._unwrap(s,"execAsPipeline"),this._wrap(s,"execAsPipeline",this._getPatchMultiCommandsExec(!0)),(0,Io.isWrapped)(s?.addCommand)&&this._unwrap(s,"addCommand"),this._wrap(s,"addCommand",this._getPatchMultiCommandsAddCommand()),i},i=>{let s=i?.default?.prototype;(0,Io.isWrapped)(s?.exec)&&this._unwrap(s,"exec"),(0,Io.isWrapped)(s?.addCommand)&&this._unwrap(s,"addCommand")}),o=new Io.InstrumentationNodeModuleFile(`${t}/dist/lib/client/index.js`,["^1.0.0","^5.0.0"],i=>{let s=i?.default?.prototype;return s?.multi&&((0,Io.isWrapped)(s?.multi)&&this._unwrap(s,"multi"),this._wrap(s,"multi",this._getPatchRedisClientMulti())),s?.MULTI&&((0,Io.isWrapped)(s?.MULTI)&&this._unwrap(s,"MULTI"),this._wrap(s,"MULTI",this._getPatchRedisClientMulti())),(0,Io.isWrapped)(s?.sendCommand)&&this._unwrap(s,"sendCommand"),this._wrap(s,"sendCommand",this._getPatchRedisClientSendCommand()),this._wrap(s,"connect",this._getPatchedClientConnect()),i},i=>{let s=i?.default?.prototype;(0,Io.isWrapped)(s?.multi)&&this._unwrap(s,"multi"),(0,Io.isWrapped)(s?.MULTI)&&this._unwrap(s,"MULTI"),(0,Io.isWrapped)(s?.sendCommand)&&this._unwrap(s,"sendCommand")});return new Io.InstrumentationNodeModuleDefinition(t,["^1.0.0","^5.0.0"],i=>i,()=>{},[n,r,o])}_getPatchExtendWithCommands(t){let n=this;return function(o){return function(s){if(s?.BaseClass?.name!=="RedisClient")return o.apply(this,arguments);let u=s.executor;return s.executor=function(l,p){let h=t(l,p).args;return n._traceClientCommand(u,this,arguments,h)},o.apply(this,arguments)}}}_getPatchMultiCommandsExec(t){let n=this;return function(o){return function(){let s=o.apply(this,arguments);return typeof s?.then!="function"?(n._diag.error("non-promise result when patching exec/execAsPipeline"),s):s.then(u=>{let l=this[pO];return n._endSpansWithRedisReplies(l,u,t),u}).catch(u=>{let l=this[pO];if(!l)n._diag.error("cannot find open spans to end for multi/pipeline");else{let p=u.constructor.name==="MultiErrorReply"?u.replies:new Array(l.length).fill(u);n._endSpansWithRedisReplies(l,p,t)}return Promise.reject(u)})}}}_getPatchMultiCommandsAddCommand(){let t=this;return function(r){return function(i){return t._traceClientCommand(r,this,arguments,i)}}}_getPatchRedisClientMulti(){return function(n){return function(){let o=n.apply(this,arguments);return o[gMe]=this.options,o}}}_getPatchRedisClientSendCommand(){let t=this;return function(r){return function(i){return t._traceClientCommand(r,this,arguments,i)}}}_getPatchedClientConnect(){let t=this;return function(r){return function(){let i=this.options,s=(0,mMe.getClientAttributes)(t._diag,i,t._semconvStability),u=t.tracer.startSpan(`${e.COMPONENT}-connect`,{kind:sp.SpanKind.CLIENT,attributes:s});return sp.context.with(sp.trace.setSpan(sp.context.active(),u),()=>r.apply(this)).then(p=>(u.end(),p)).catch(p=>(u.recordException(p),u.setStatus({code:sp.SpanStatusCode.ERROR,message:p.message}),u.end(),Promise.reject(p)))}}}_traceClientCommand(t,n,r,o){if(sp.trace.getSpan(sp.context.active())===void 0&&this.getConfig().requireParentSpan)return t.apply(n,r);let s=n.options||n[gMe],u=o[0],l=o.slice(1),p=this.getConfig().dbStatementSerializer||_Dt.defaultDbStatementSerializer,h=(0,mMe.getClientAttributes)(this._diag,s,this._semconvStability);this._semconvStability&Io.SemconvStability.STABLE&&(h[VW.ATTR_DB_OPERATION_NAME]=u);try{let T=p(u,l);T!=null&&(this._semconvStability&Io.SemconvStability.OLD&&(h[EDt.ATTR_DB_STATEMENT]=T),this._semconvStability&Io.SemconvStability.STABLE&&(h[VW.ATTR_DB_QUERY_TEXT]=T))}catch(T){this._diag.error("dbStatementSerializer throw an exception",T,{commandName:u})}let y=this.tracer.startSpan(`${e.COMPONENT}-${u}`,{kind:sp.SpanKind.CLIENT,attributes:h}),S=sp.context.with(sp.trace.setSpan(sp.context.active(),y),()=>t.apply(n,r));if(typeof S?.then=="function")S.then(T=>{this._endSpanWithResponse(y,u,l,T,void 0)},T=>{this._endSpanWithResponse(y,u,l,null,T)});else{let T=S;T[pO]=T[pO]||[],T[pO].push({span:y,commandName:u,commandArgs:l})}return S}_endSpansWithRedisReplies(t,n,r=!1){if(!t)return this._diag.error("cannot find open spans to end for redis multi/pipeline");if(n.length!==t.length)return this._diag.error("number of multi command spans does not match response from redis");let o=t.map(u=>u.commandName),s=o.every(u=>u===o[0])?(r?"PIPELINE ":"MULTI ")+o[0]:r?"PIPELINE":"MULTI";for(let u=0;u<t.length;u++){let{span:l,commandArgs:p}=t[u],h=n[u],[y,S]=h instanceof Error?[null,h]:[h,void 0];this._semconvStability&Io.SemconvStability.STABLE&&l.setAttribute(VW.ATTR_DB_OPERATION_NAME,s),this._endSpanWithResponse(l,o[u],p,y,S)}}_endSpanWithResponse(t,n,r,o,i){let{responseHook:s}=this.getConfig();if(!i&&s)try{s(t,n,r,o)}catch(u){this._diag.error("responseHook throw an exception",u)}i&&(t.recordException(i),t.setStatus({code:sp.SpanStatusCode.ERROR,message:i?.message})),t.end()}};u6.RedisInstrumentationV4_V5=YW});var yMe=P(c6=>{"use strict";m();Object.defineProperty(c6,"__esModule",{value:!0});c6.RedisInstrumentation=void 0;var yDt=sn(),_Me=r6(),SDt=dMe(),TDt=hMe(),EMe={requireParentSpan:!1},KW=class extends yDt.InstrumentationBase{instrumentationV2_V3;instrumentationV4_V5;initialized=!1;constructor(t={}){let n={...EMe,...t};super(_Me.PACKAGE_NAME,_Me.PACKAGE_VERSION,n),this.instrumentationV2_V3=new SDt.RedisInstrumentationV2_V3(this.getConfig()),this.instrumentationV4_V5=new TDt.RedisInstrumentationV4_V5(this.getConfig()),this.initialized=!0}setConfig(t={}){let n={...EMe,...t};super.setConfig(n),this.initialized&&(this.instrumentationV2_V3.setConfig(n),this.instrumentationV4_V5.setConfig(n))}init(){}getModuleDefinitions(){return[...this.instrumentationV2_V3.getModuleDefinitions(),...this.instrumentationV4_V5.getModuleDefinitions()]}setTracerProvider(t){super.setTracerProvider(t),this.initialized&&(this.instrumentationV2_V3.setTracerProvider(t),this.instrumentationV4_V5.setTracerProvider(t))}enable(){super.enable(),this.initialized&&(this.instrumentationV2_V3.enable(),this.instrumentationV4_V5.enable())}disable(){super.disable(),this.initialized&&(this.instrumentationV2_V3.disable(),this.instrumentationV4_V5.disable())}};c6.RedisInstrumentation=KW});var SMe=P(l6=>{"use strict";m();Object.defineProperty(l6,"__esModule",{value:!0});l6.RedisInstrumentation=void 0;var bDt=yMe();Object.defineProperty(l6,"RedisInstrumentation",{enumerable:!0,get:function(){return bDt.RedisInstrumentation}})});function fO(e,t){return e.includes(t.toLowerCase())}function ZW(e){return fO(JW,e)?"cache.get":fO(CDt,e)?"cache.put":void 0}function vDt(e,t){return t.some(n=>e.startsWith(n))}function bMe(e,t){try{if(t.length===0)return;let n=o=>typeof o=="string"||typeof o=="number"||Buffer.isBuffer(o)?[o.toString()]:Array.isArray(o)?TMe(o.map(i=>n(i))):["<unknown>"],r=t[0];return fO(IDt,e)&&r!=null?n(r):TMe(t.map(o=>n(o)))}catch{return}}function IMe(e,t,n){if(!ZW(e))return!1;for(let r of t)if(vDt(r,n))return!0;return!1}function CMe(e){let t=n=>{try{return Buffer.isBuffer(n)?n.byteLength:typeof n=="string"?n.length:typeof n=="number"?n.toString().length:n==null?0:JSON.stringify(n).length}catch{return}};return Array.isArray(e)?e.reduce((n,r)=>{let o=t(r);return typeof o=="number"?n!==void 0?n+o:o:n},0):t(e)}function TMe(e){let t=[],n=r=>{r.forEach(o=>{Array.isArray(o)?n(o):t.push(o)})};return n(e),t}var IDt,JW,CDt,vMe=w(()=>{m();IDt=["get","set","setex"],JW=["get","mget"],CDt=["set","setex"]});var RMe,xMe,d6,mO,DMe,RDt,xDt,NMe,DDt,BMe,wMe=w(()=>{m();RMe=ue(uMe(),1),xMe=ue(SMe(),1);mt();_r();vMe();d6="Redis",mO={},DMe=(e,t,n,r)=>{e.setAttribute(Pt,"auto.db.otel.redis");let o=bMe(t,n),i=ZW(t);if(!o||!i||!mO.cachePrefixes||!IMe(t,o,mO.cachePrefixes))return;let s=kt(e).data["net.peer.name"],u=kt(e).data["net.peer.port"];u&&s&&e.setAttributes({"network.peer.address":s,"network.peer.port":u});let l=CMe(r);l&&e.setAttribute(tY,l),fO(JW,t)&&l!==void 0&&e.setAttribute(X7,l>0),e.setAttributes({[Xt]:i,[eY]:o});let p=o.join(", ");e.updateName(mO.maxCacheKeyLength?L_(p,mO.maxCacheKeyLength):p)},RDt=ut(`${d6}.IORedis`,()=>new RMe.IORedisInstrumentation({responseHook:DMe})),xDt=ut(`${d6}.Redis`,()=>new xMe.RedisInstrumentation({responseHook:DMe})),NMe=Object.assign(()=>{RDt(),xDt()},{id:d6}),DDt=((e={})=>({name:d6,setupOnce(){mO=e,NMe()}})),BMe=DDt});var OMe=P(p6=>{"use strict";m();Object.defineProperty(p6,"__esModule",{value:!0});p6.EVENT_LISTENERS_SET=void 0;p6.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.pg.eventListenersSet")});var WW=P(AO=>{"use strict";m();Object.defineProperty(AO,"__esModule",{value:!0});AO.AttributeNames=void 0;var NDt;(function(e){e.PG_VALUES="db.postgresql.values",e.PG_PLAN="db.postgresql.plan",e.IDLE_TIMEOUT_MILLIS="db.postgresql.idle.timeout.millis",e.MAX_CLIENT="db.postgresql.max.client"})(NDt=AO.AttributeNames||(AO.AttributeNames={}))});var XW=P(wr=>{"use strict";m();Object.defineProperty(wr,"__esModule",{value:!0});wr.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS=wr.METRIC_DB_CLIENT_CONNECTION_COUNT=wr.DB_SYSTEM_VALUE_POSTGRESQL=wr.DB_CLIENT_CONNECTION_STATE_VALUE_USED=wr.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE=wr.ATTR_NET_PEER_PORT=wr.ATTR_NET_PEER_NAME=wr.ATTR_DB_USER=wr.ATTR_DB_SYSTEM=wr.ATTR_DB_STATEMENT=wr.ATTR_DB_NAME=wr.ATTR_DB_CONNECTION_STRING=wr.ATTR_DB_CLIENT_CONNECTION_STATE=wr.ATTR_DB_CLIENT_CONNECTION_POOL_NAME=void 0;wr.ATTR_DB_CLIENT_CONNECTION_POOL_NAME="db.client.connection.pool.name";wr.ATTR_DB_CLIENT_CONNECTION_STATE="db.client.connection.state";wr.ATTR_DB_CONNECTION_STRING="db.connection_string";wr.ATTR_DB_NAME="db.name";wr.ATTR_DB_STATEMENT="db.statement";wr.ATTR_DB_SYSTEM="db.system";wr.ATTR_DB_USER="db.user";wr.ATTR_NET_PEER_NAME="net.peer.name";wr.ATTR_NET_PEER_PORT="net.peer.port";wr.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE="idle";wr.DB_CLIENT_CONNECTION_STATE_VALUE_USED="used";wr.DB_SYSTEM_VALUE_POSTGRESQL="postgresql";wr.METRIC_DB_CLIENT_CONNECTION_COUNT="db.client.connection.count";wr.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS="db.client.connection.pending_requests"});var eX=P(gO=>{"use strict";m();Object.defineProperty(gO,"__esModule",{value:!0});gO.SpanNames=void 0;var BDt;(function(e){e.QUERY_PREFIX="pg.query",e.CONNECT="pg.connect",e.POOL_CONNECT="pg-pool.connect"})(BDt=gO.SpanNames||(gO.SpanNames={}))});var FMe=P(sr=>{"use strict";m();Object.defineProperty(sr,"__esModule",{value:!0});sr.sanitizedErrorMessage=sr.isObjectWithTextString=sr.getErrorMessage=sr.patchClientConnectCallback=sr.patchCallbackPGPool=sr.updateCounter=sr.getPoolName=sr.patchCallback=sr.handleExecutionResult=sr.handleConfigQuery=sr.shouldSkipInstrumentation=sr.getSemanticAttributesFromPoolConnection=sr.getSemanticAttributesFromConnection=sr.getConnectionString=sr.parseAndMaskConnectionString=sr.parseNormalizedOperationName=sr.getQuerySpanName=void 0;var bE=(ze(),Le(nt)),f6=WW(),ap=(Xn(),Le(Gr)),Ei=XW(),eT=sn(),kMe=eX();function PMe(e,t){if(!t)return kMe.SpanNames.QUERY_PREFIX;let n=typeof t.name=="string"&&t.name?t.name:MMe(t.text);return`${kMe.SpanNames.QUERY_PREFIX}:${n}${e?` ${e}`:""}`}sr.getQuerySpanName=PMe;function MMe(e){let t=e.trim(),n=t.indexOf(" "),r=n===-1?t:t.slice(0,n);return r=r.toUpperCase(),r.endsWith(";")?r.slice(0,-1):r}sr.parseNormalizedOperationName=MMe;function LMe(e){try{let t=new URL(e);return t.username="",t.password="",t.toString()}catch{return"postgresql://localhost:5432/"}}sr.parseAndMaskConnectionString=LMe;function tX(e){if("connectionString"in e&&e.connectionString)return LMe(e.connectionString);let t=e.host||"localhost",n=e.port||5432,r=e.database||"";return`postgresql://${t}:${n}/${r}`}sr.getConnectionString=tX;function m6(e){if(Number.isInteger(e))return e}function UMe(e,t){let n={};return t&eT.SemconvStability.OLD&&(n={...n,[Ei.ATTR_DB_SYSTEM]:Ei.DB_SYSTEM_VALUE_POSTGRESQL,[Ei.ATTR_DB_NAME]:e.database,[Ei.ATTR_DB_CONNECTION_STRING]:tX(e),[Ei.ATTR_DB_USER]:e.user,[Ei.ATTR_NET_PEER_NAME]:e.host,[Ei.ATTR_NET_PEER_PORT]:m6(e.port)}),t&eT.SemconvStability.STABLE&&(n={...n,[ap.ATTR_DB_SYSTEM_NAME]:ap.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[ap.ATTR_DB_NAMESPACE]:e.namespace,[ap.ATTR_SERVER_ADDRESS]:e.host,[ap.ATTR_SERVER_PORT]:m6(e.port)}),n}sr.getSemanticAttributesFromConnection=UMe;function wDt(e,t){let n;try{n=e.connectionString?new URL(e.connectionString):void 0}catch{n=void 0}let r={[f6.AttributeNames.IDLE_TIMEOUT_MILLIS]:e.idleTimeoutMillis,[f6.AttributeNames.MAX_CLIENT]:e.maxClient};return t&eT.SemconvStability.OLD&&(r={...r,[Ei.ATTR_DB_SYSTEM]:Ei.DB_SYSTEM_VALUE_POSTGRESQL,[Ei.ATTR_DB_NAME]:n?.pathname.slice(1)??e.database,[Ei.ATTR_DB_CONNECTION_STRING]:tX(e),[Ei.ATTR_NET_PEER_NAME]:n?.hostname??e.host,[Ei.ATTR_NET_PEER_PORT]:Number(n?.port)||m6(e.port),[Ei.ATTR_DB_USER]:n?.username??e.user}),t&eT.SemconvStability.STABLE&&(r={...r,[ap.ATTR_DB_SYSTEM_NAME]:ap.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[ap.ATTR_DB_NAMESPACE]:e.namespace,[ap.ATTR_SERVER_ADDRESS]:n?.hostname??e.host,[ap.ATTR_SERVER_PORT]:Number(n?.port)||m6(e.port)}),r}sr.getSemanticAttributesFromPoolConnection=wDt;function ODt(e){return e.requireParentSpan===!0&&bE.trace.getSpan(bE.context.active())===void 0}sr.shouldSkipInstrumentation=ODt;function kDt(e,t,n,r){let{connectionParameters:o}=this,i=o.database,s=PMe(i,r),u=e.startSpan(s,{kind:bE.SpanKind.CLIENT,attributes:UMe(o,n)});if(!r)return u;if(r.text&&(n&eT.SemconvStability.OLD&&u.setAttribute(Ei.ATTR_DB_STATEMENT,r.text),n&eT.SemconvStability.STABLE&&u.setAttribute(ap.ATTR_DB_QUERY_TEXT,r.text)),t.enhancedDatabaseReporting&&Array.isArray(r.values))try{let l=r.values.map(p=>p==null?"null":p instanceof Buffer?p.toString():typeof p=="object"?typeof p.toPostgres=="function"?p.toPostgres():JSON.stringify(p):p.toString());u.setAttribute(f6.AttributeNames.PG_VALUES,l)}catch(l){bE.diag.error("failed to stringify ",r.values,l)}return typeof r.name=="string"&&u.setAttribute(f6.AttributeNames.PG_PLAN,r.name),u}sr.handleConfigQuery=kDt;function QMe(e,t,n){typeof e.responseHook=="function"&&(0,eT.safeExecuteInTheMiddle)(()=>{e.responseHook(t,{data:n})},r=>{r&&bE.diag.error("Error running response hook",r)},!0)}sr.handleExecutionResult=QMe;function PDt(e,t,n,r,o){return function(s,u){s?(Object.prototype.hasOwnProperty.call(s,"code")&&(r[ap.ATTR_ERROR_TYPE]=s.code),s instanceof Error&&t.recordException(A6(s)),t.setStatus({code:bE.SpanStatusCode.ERROR,message:s.message})):QMe(e,t,u),o(),t.end(),n.call(this,s,u)}}sr.patchCallback=PDt;function MDt(e){let t="";return t+=(e?.host?`${e.host}`:"unknown_host")+":",t+=(e?.port?`${e.port}`:"unknown_port")+"/",t+=e?.database?`${e.database}`:"unknown_database",t.trim()}sr.getPoolName=MDt;function LDt(e,t,n,r,o){let i=t.totalCount,s=t.waitingCount,u=t.idleCount,l=i-u;return n.add(l-o.used,{[Ei.ATTR_DB_CLIENT_CONNECTION_STATE]:Ei.DB_CLIENT_CONNECTION_STATE_VALUE_USED,[Ei.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),n.add(u-o.idle,{[Ei.ATTR_DB_CLIENT_CONNECTION_STATE]:Ei.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE,[Ei.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),r.add(s-o.pending,{[Ei.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),{used:l,idle:u,pending:s}}sr.updateCounter=LDt;function UDt(e,t){return function(r,o,i){r&&(r instanceof Error&&e.recordException(A6(r)),e.setStatus({code:bE.SpanStatusCode.ERROR,message:r.message})),e.end(),t.call(this,r,o,i)}}sr.patchCallbackPGPool=UDt;function QDt(e,t){return function(r){r&&(r instanceof Error&&e.recordException(A6(r)),e.setStatus({code:bE.SpanStatusCode.ERROR,message:r.message})),e.end(),t.apply(this,arguments)}}sr.patchClientConnectCallback=QDt;function FDt(e){return typeof e=="object"&&e!==null&&"message"in e?String(e.message):void 0}sr.getErrorMessage=FDt;function GDt(e){return typeof e=="object"&&typeof e?.text=="string"}sr.isObjectWithTextString=GDt;function A6(e){let t=e?.name??"PostgreSQLError",n=e?.code??"UNKNOWN";return`PostgreSQL error of type '${t}' occurred (code: ${n})`}sr.sanitizedErrorMessage=A6});var GMe=P(RR=>{"use strict";m();Object.defineProperty(RR,"__esModule",{value:!0});RR.PACKAGE_NAME=RR.PACKAGE_VERSION=void 0;RR.PACKAGE_VERSION="0.66.0";RR.PACKAGE_NAME="@opentelemetry/instrumentation-pg"});var VMe=P(h6=>{"use strict";m();Object.defineProperty(h6,"__esModule",{value:!0});h6.PgInstrumentation=void 0;var tc=sn(),$r=(ze(),Le(nt)),jMe=OMe(),ti=FMe(),zMe=UW(),HMe=GMe(),$Me=eX(),g6=Cr(),Cf=(Xn(),Le(Gr)),hO=XW();function xR(e){return e[Symbol.toStringTag]==="Module"?e.default:e}var nX=class extends tc.InstrumentationBase{_connectionsCounter={used:0,idle:0,pending:0};_semconvStability;constructor(t={}){super(HMe.PACKAGE_NAME,HMe.PACKAGE_VERSION,t),this._semconvStability=(0,tc.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._operationDuration=this.meter.createHistogram(Cf.METRIC_DB_CLIENT_OPERATION_DURATION,{description:"Duration of database client operations.",unit:"s",valueType:$r.ValueType.DOUBLE,advice:{explicitBucketBoundaries:[.001,.005,.01,.05,.1,.5,1,5,10]}}),this._connectionsCounter={idle:0,pending:0,used:0},this._connectionsCount=this.meter.createUpDownCounter(hO.METRIC_DB_CLIENT_CONNECTION_COUNT,{description:"The number of connections that are currently in state described by the state attribute.",unit:"{connection}"}),this._connectionPendingRequests=this.meter.createUpDownCounter(hO.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS,{description:"The number of current pending requests for an open connection.",unit:"{connection}"})}init(){let t=[">=8.0.3 <9"],n=[">=2.0.0 <4"],r=new tc.InstrumentationNodeModuleFile("pg/lib/native/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),o=new tc.InstrumentationNodeModuleFile("pg/lib/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),i=new tc.InstrumentationNodeModuleDefinition("pg",t,u=>{let l=xR(u);return this._patchPgClient(l.Client),u},u=>{let l=xR(u);return this._unpatchPgClient(l.Client),u},[o,r]),s=new tc.InstrumentationNodeModuleDefinition("pg-pool",n,u=>{let l=xR(u);return(0,tc.isWrapped)(l.prototype.connect)&&this._unwrap(l.prototype,"connect"),this._wrap(l.prototype,"connect",this._getPoolConnectPatch()),l},u=>{let l=xR(u);(0,tc.isWrapped)(l.prototype.connect)&&this._unwrap(l.prototype,"connect")});return[i,s]}_patchPgClient(t){if(!t)return;let n=xR(t);return(0,tc.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,tc.isWrapped)(n.prototype.connect)&&this._unwrap(n.prototype,"connect"),this._wrap(n.prototype,"query",this._getClientQueryPatch()),this._wrap(n.prototype,"connect",this._getClientConnectPatch()),t}_unpatchPgClient(t){let n=xR(t);return(0,tc.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,tc.isWrapped)(n.prototype.connect)&&this._unwrap(n.prototype,"connect"),t}_getClientConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(ti.shouldSkipInstrumentation(i)||i.ignoreConnectSpans)return n.call(this,o);let s=t.tracer.startSpan($Me.SpanNames.CONNECT,{kind:$r.SpanKind.CLIENT,attributes:ti.getSemanticAttributesFromConnection(this,t._semconvStability)});if(o){let l=$r.trace.getSpan($r.context.active());o=ti.patchClientConnectCallback(s,o),l&&(o=$r.context.bind($r.context.active(),o))}let u=$r.context.with($r.trace.setSpan($r.context.active(),s),()=>n.call(this,o));return qMe(s,u)}}recordOperationDuration(t,n){let r={},o=[Cf.ATTR_DB_NAMESPACE,Cf.ATTR_ERROR_TYPE,Cf.ATTR_SERVER_PORT,Cf.ATTR_SERVER_ADDRESS,Cf.ATTR_DB_OPERATION_NAME];this._semconvStability&tc.SemconvStability.OLD&&o.push(hO.ATTR_DB_SYSTEM),this._semconvStability&tc.SemconvStability.STABLE&&o.push(Cf.ATTR_DB_SYSTEM_NAME),o.forEach(s=>{s in t&&(r[s]=t[s])});let i=(0,g6.hrTimeToMilliseconds)((0,g6.hrTimeDuration)(n,(0,g6.hrTime)()))/1e3;this._operationDuration.record(i,r)}_getClientQueryPatch(){let t=this;return n=>(this._diag.debug("Patching pg.Client.prototype.query"),function(...o){if(ti.shouldSkipInstrumentation(t.getConfig()))return n.apply(this,o);let i=(0,g6.hrTime)(),s=o[0],u=typeof s=="string",l=ti.isObjectWithTextString(s),p=u?{text:s,values:Array.isArray(o[1])?o[1]:void 0}:l?{...s,name:s.name,text:s.text,values:s.values??(Array.isArray(o[1])?o[1]:void 0)}:void 0,h={[hO.ATTR_DB_SYSTEM]:hO.DB_SYSTEM_VALUE_POSTGRESQL,[Cf.ATTR_DB_NAMESPACE]:this.database,[Cf.ATTR_SERVER_PORT]:this.connectionParameters.port,[Cf.ATTR_SERVER_ADDRESS]:this.connectionParameters.host};p?.text&&(h[Cf.ATTR_DB_OPERATION_NAME]=ti.parseNormalizedOperationName(p?.text));let y=()=>{t.recordOperationDuration(h,i)},S=t.getConfig(),T=ti.handleConfigQuery.call(this,t.tracer,S,t._semconvStability,p);if(S.addSqlCommenterCommentToQueries&&(u?o[0]=(0,zMe.addSqlCommenterComment)(T,s):l&&!("name"in s)&&(o[0]={...s,text:(0,zMe.addSqlCommenterComment)(T,s.text)})),o.length>0){let x=$r.trace.getSpan($r.context.active());if(typeof o[o.length-1]=="function")o[o.length-1]=ti.patchCallback(S,T,o[o.length-1],h,y),x&&(o[o.length-1]=$r.context.bind($r.context.active(),o[o.length-1]));else if(typeof p?.callback=="function"){let O=ti.patchCallback(t.getConfig(),T,p.callback,h,y);x&&(O=$r.context.bind($r.context.active(),O)),o[0].callback=O}}let{requestHook:v}=S;typeof v=="function"&&p&&(0,tc.safeExecuteInTheMiddle)(()=>{let{database:x,host:O,port:M,user:j}=this.connectionParameters;v(T,{connection:{database:x,host:O,port:M,user:j},query:{text:p.text,values:p.values,name:p.name}})},x=>{x&&t._diag.error("Error running query hook",x)},!0);let R;try{R=n.apply(this,o)}catch(x){throw x instanceof Error&&T.recordException(ti.sanitizedErrorMessage(x)),T.setStatus({code:$r.SpanStatusCode.ERROR,message:ti.getErrorMessage(x)}),T.end(),x}return R instanceof Promise?R.then(x=>new Promise(O=>{ti.handleExecutionResult(t.getConfig(),T,x),y(),T.end(),O(x)})).catch(x=>new Promise((O,M)=>{x instanceof Error&&T.recordException(ti.sanitizedErrorMessage(x)),T.setStatus({code:$r.SpanStatusCode.ERROR,message:x.message}),y(),T.end(),M(x)})):R})}_setPoolConnectEventListeners(t){if(t[jMe.EVENT_LISTENERS_SET])return;let n=ti.getPoolName(t.options);t.on("connect",()=>{this._connectionsCounter=ti.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("acquire",()=>{this._connectionsCounter=ti.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("remove",()=>{this._connectionsCounter=ti.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("release",()=>{this._connectionsCounter=ti.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t[jMe.EVENT_LISTENERS_SET]=!0}_getPoolConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(ti.shouldSkipInstrumentation(i))return n.call(this,o);if(t._setPoolConnectEventListeners(this),i.ignoreConnectSpans)return n.call(this,o);let s=t.tracer.startSpan($Me.SpanNames.POOL_CONNECT,{kind:$r.SpanKind.CLIENT,attributes:ti.getSemanticAttributesFromPoolConnection(this.options,t._semconvStability)});if(o){let l=$r.trace.getSpan($r.context.active());o=ti.patchCallbackPGPool(s,o),l&&(o=$r.context.bind($r.context.active(),o))}let u=$r.context.with($r.trace.setSpan($r.context.active(),s),()=>n.call(this,o));return qMe(s,u)}}};h6.PgInstrumentation=nX;function qMe(e,t){if(!(t instanceof Promise))return t;let n=t;return $r.context.bind($r.context.active(),n.then(r=>(e.end(),r)).catch(r=>(r instanceof Error&&e.recordException(ti.sanitizedErrorMessage(r)),e.setStatus({code:$r.SpanStatusCode.ERROR,message:ti.getErrorMessage(r)}),e.end(),Promise.reject(r))))}});var YMe=P(DR=>{"use strict";m();Object.defineProperty(DR,"__esModule",{value:!0});DR.AttributeNames=DR.PgInstrumentation=void 0;var jDt=VMe();Object.defineProperty(DR,"PgInstrumentation",{enumerable:!0,get:function(){return jDt.PgInstrumentation}});var zDt=WW();Object.defineProperty(DR,"AttributeNames",{enumerable:!0,get:function(){return zDt.AttributeNames}})});var KMe,JMe,ZMe,HDt,WMe,XMe=w(()=>{m();KMe=ue(YMe(),1);_r();JMe="Postgres",ZMe=ut(JMe,KMe.PgInstrumentation,e=>({requireParentSpan:!0,requestHook(t){zr(t,"auto.db.otel.postgres")},ignoreConnectSpans:e?.ignoreConnectSpans??!1})),HDt=(e=>({name:JMe,setupOnce(){ZMe(e)}})),WMe=HDt});var IE,oX,e2e,$Dt,qDt,t2e,rX,VDt,n2e,r2e=w(()=>{m();ze();IE=ue(sn(),1);Xn();mt();_r();HS();oX="PostgresJs",e2e=[">=3.0.0 <4"],$Dt=/^(SELECT|INSERT|UPDATE|DELETE|CREATE|DROP|ALTER)/i,qDt=Symbol.for("sentry.query.from.instrumented.sql"),t2e=ut(oX,e=>new rX({requireParentSpan:e?.requireParentSpan??!0,requestHook:e?.requestHook})),rX=class extends IE.InstrumentationBase{constructor(t){super("sentry-postgres-js",er,t)}init(){let t=new IE.InstrumentationNodeModuleDefinition("postgres",e2e,n=>{try{return this._patchPostgres(n)}catch(r){return xs&&W.error("Failed to patch postgres module:",r),n}},n=>n);return["src","cf/src","cjs/src"].forEach(n=>{t.files.push(new IE.InstrumentationNodeModuleFile(`postgres/${n}/query.js`,e2e,this._patchQueryPrototype.bind(this),this._unpatchQueryPrototype.bind(this)))}),t}_patchPostgres(t){let n=typeof t=="function",r=n?t:t.default;if(typeof r!="function")return xs&&W.warn("postgres module does not export a function. Skipping instrumentation."),t;let o=this,i=function(...s){let u=Reflect.construct(r,s);if(!u||typeof u!="function")return xs&&W.warn("postgres() did not return a valid instance"),u;let l=o.getConfig();return rK(u,{requireParentSpan:l.requireParentSpan,requestHook:l.requestHook})};Object.setPrototypeOf(i,r),Object.setPrototypeOf(i.prototype,r.prototype);for(let s of Object.getOwnPropertyNames(r))if(!["length","name","prototype"].includes(s)){let u=Object.getOwnPropertyDescriptor(r,s);u&&Object.defineProperty(i,s,u)}return n?i:(pw(t,"default",i),t)}_shouldCreateSpans(){let t=this.getConfig();return qt.getSpan(Xe.active())!==void 0||!t.requireParentSpan}_setOperationName(t,n,r){if(r){t.setAttribute(PC,r);return}let o=n?.match($Dt);o?.[1]&&t.setAttribute(PC,o[1].toUpperCase())}_reconstructQuery(t){if(t?.length)return t.length===1?t[0]||void 0:t.reduce((n,r,o)=>o===0?r:`${n}$${o}${r}`,"")}_sanitizeSqlQuery(t){return t?t.replace(/--.*$/gm,"").replace(/\/\*[\s\S]*?\*\//g,"").replace(/;\s*$/,"").replace(/\s+/g," ").trim().replace(/\bX'[0-9A-Fa-f]*'/gi,"?").replace(/\bB'[01]*'/gi,"?").replace(/'(?:[^']|'')*'/g,"?").replace(/\b0x[0-9A-Fa-f]+/gi,"?").replace(/\b(?:TRUE|FALSE)\b/gi,"?").replace(/-?\b\d+\.?\d*[eE][+-]?\d+\b/g,"?").replace(/-?\b\d+\.\d+\b/g,"?").replace(/-?\.\d+\b/g,"?").replace(/(?<!\$)-?\b\d+\b/g,"?").replace(/\bIN\b\s*\(\s*\?(?:\s*,\s*\?)*\s*\)/gi,"IN (?)").replace(/\bIN\b\s*\(\s*\$\d+(?:\s*,\s*\$\d+)*\s*\)/gi,"IN ($?)"):"Unknown SQL Query"}_patchQueryPrototype(t){let n=this,r=t.Query.prototype.handle;return t.Query.prototype.handle=async function(...o){if(this[qDt])return r.apply(this,o);if(!n._shouldCreateSpans())return r.apply(this,o);let i=n._reconstructQuery(this.strings),s=n._sanitizeSqlQuery(i);return ra({name:s||"postgresjs.query",op:"db"},u=>{zr(u,"auto.db.postgresjs"),u.setAttributes({[cS]:"postgres",[AV]:s});let l=n.getConfig(),{requestHook:p}=l;p&&(0,IE.safeExecuteInTheMiddle)(()=>p(u,s,void 0),S=>{S&&(u.setAttribute("sentry.hook.error","requestHook failed"),xs&&W.error(`Error in requestHook for ${oX} integration:`,S))},!0);let h=this.resolve;this.resolve=new Proxy(h,{apply:(S,T,v)=>{try{n._setOperationName(u,s,v?.[0]?.command),u.end()}catch(R){xs&&W.error("Error ending span in resolve callback:",R)}return Reflect.apply(S,T,v)}});let y=this.reject;this.reject=new Proxy(y,{apply:(S,T,v)=>{try{u.setStatus({code:2,message:v?.[0]?.message||"unknown_error"}),u.setAttribute(gV,v?.[0]?.code||"unknown"),u.setAttribute(hV,v?.[0]?.name||"unknown"),n._setOperationName(u,s),u.end()}catch(R){xs&&W.error("Error ending span in reject callback:",R)}return Reflect.apply(S,T,v)}});try{return r.apply(this,o)}catch(S){throw u.setStatus({code:2,message:S instanceof Error?S.message:"unknown_error"}),u.end(),S}})},t.Query.prototype.handle.__sentry_original__=r,t}_unpatchQueryPrototype(t){return t.Query.prototype.handle.__sentry_original__&&(t.Query.prototype.handle=t.Query.prototype.handle.__sentry_original__),t}},VDt=(e=>({name:oX,setupOnce(){t2e(e)}})),n2e=VDt});var o2e=P(_O=>{"use strict";m();Object.defineProperty(_O,"__esModule",{value:!0});_O.SeverityNumber=void 0;var YDt;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.TRACE=1]="TRACE",e[e.TRACE2=2]="TRACE2",e[e.TRACE3=3]="TRACE3",e[e.TRACE4=4]="TRACE4",e[e.DEBUG=5]="DEBUG",e[e.DEBUG2=6]="DEBUG2",e[e.DEBUG3=7]="DEBUG3",e[e.DEBUG4=8]="DEBUG4",e[e.INFO=9]="INFO",e[e.INFO2=10]="INFO2",e[e.INFO3=11]="INFO3",e[e.INFO4=12]="INFO4",e[e.WARN=13]="WARN",e[e.WARN2=14]="WARN2",e[e.WARN3=15]="WARN3",e[e.WARN4=16]="WARN4",e[e.ERROR=17]="ERROR",e[e.ERROR2=18]="ERROR2",e[e.ERROR3=19]="ERROR3",e[e.ERROR4=20]="ERROR4",e[e.FATAL=21]="FATAL",e[e.FATAL2=22]="FATAL2",e[e.FATAL3=23]="FATAL3",e[e.FATAL4=24]="FATAL4"})(YDt=_O.SeverityNumber||(_O.SeverityNumber={}))});var E6=P(NR=>{"use strict";m();Object.defineProperty(NR,"__esModule",{value:!0});NR.NOOP_LOGGER=NR.NoopLogger=void 0;var _6=class{emit(t){}};NR.NoopLogger=_6;NR.NOOP_LOGGER=new _6});var S6=P(BR=>{"use strict";m();Object.defineProperty(BR,"__esModule",{value:!0});BR.NOOP_LOGGER_PROVIDER=BR.NoopLoggerProvider=void 0;var KDt=E6(),y6=class{getLogger(t,n,r){return new KDt.NoopLogger}};BR.NoopLoggerProvider=y6;BR.NOOP_LOGGER_PROVIDER=new y6});var sX=P(T6=>{"use strict";m();Object.defineProperty(T6,"__esModule",{value:!0});T6.ProxyLogger=void 0;var JDt=E6(),iX=class{constructor(t,n,r,o){this._provider=t,this.name=n,this.version=r,this.options=o}emit(t){this._getLogger().emit(t)}_getLogger(){if(this._delegate)return this._delegate;let t=this._provider._getDelegateLogger(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):JDt.NOOP_LOGGER}};T6.ProxyLogger=iX});var uX=P(b6=>{"use strict";m();Object.defineProperty(b6,"__esModule",{value:!0});b6.ProxyLoggerProvider=void 0;var ZDt=S6(),WDt=sX(),aX=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new WDt.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:ZDt.NOOP_LOGGER_PROVIDER}_setDelegate(t){this._delegate=t}_getDelegateLogger(t,n,r){var o;return(o=this._delegate)===null||o===void 0?void 0:o.getLogger(t,n,r)}};b6.ProxyLoggerProvider=aX});var i2e=P(I6=>{"use strict";m();Object.defineProperty(I6,"__esModule",{value:!0});I6._globalThis=void 0;I6._globalThis=typeof globalThis=="object"?globalThis:global});var s2e=P(C6=>{"use strict";m();Object.defineProperty(C6,"__esModule",{value:!0});C6._globalThis=void 0;var XDt=i2e();Object.defineProperty(C6,"_globalThis",{enumerable:!0,get:function(){return XDt._globalThis}})});var a2e=P(v6=>{"use strict";m();Object.defineProperty(v6,"__esModule",{value:!0});v6._globalThis=void 0;var e1t=s2e();Object.defineProperty(v6,"_globalThis",{enumerable:!0,get:function(){return e1t._globalThis}})});var u2e=P(eA=>{"use strict";m();Object.defineProperty(eA,"__esModule",{value:!0});eA.API_BACKWARDS_COMPATIBILITY_VERSION=eA.makeGetter=eA._global=eA.GLOBAL_LOGS_API_KEY=void 0;var t1t=a2e();eA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");eA._global=t1t._globalThis;function n1t(e,t,n){return r=>r===e?t:n}eA.makeGetter=n1t;eA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var l2e=P(R6=>{"use strict";m();Object.defineProperty(R6,"__esModule",{value:!0});R6.LogsAPI=void 0;var up=u2e(),r1t=S6(),c2e=uX(),cX=class e{constructor(){this._proxyLoggerProvider=new c2e.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return up._global[up.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(up._global[up.GLOBAL_LOGS_API_KEY]=(0,up.makeGetter)(up.API_BACKWARDS_COMPATIBILITY_VERSION,t,r1t.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=up._global[up.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(up._global,up.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete up._global[up.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new c2e.ProxyLoggerProvider}};R6.LogsAPI=cX});var lX=P(ua=>{"use strict";m();Object.defineProperty(ua,"__esModule",{value:!0});ua.logs=ua.ProxyLoggerProvider=ua.ProxyLogger=ua.NoopLoggerProvider=ua.NOOP_LOGGER_PROVIDER=ua.NoopLogger=ua.NOOP_LOGGER=ua.SeverityNumber=void 0;var o1t=o2e();Object.defineProperty(ua,"SeverityNumber",{enumerable:!0,get:function(){return o1t.SeverityNumber}});var d2e=E6();Object.defineProperty(ua,"NOOP_LOGGER",{enumerable:!0,get:function(){return d2e.NOOP_LOGGER}});Object.defineProperty(ua,"NoopLogger",{enumerable:!0,get:function(){return d2e.NoopLogger}});var p2e=S6();Object.defineProperty(ua,"NOOP_LOGGER_PROVIDER",{enumerable:!0,get:function(){return p2e.NOOP_LOGGER_PROVIDER}});Object.defineProperty(ua,"NoopLoggerProvider",{enumerable:!0,get:function(){return p2e.NoopLoggerProvider}});var i1t=sX();Object.defineProperty(ua,"ProxyLogger",{enumerable:!0,get:function(){return i1t.ProxyLogger}});var s1t=uX();Object.defineProperty(ua,"ProxyLoggerProvider",{enumerable:!0,get:function(){return s1t.ProxyLoggerProvider}});var a1t=l2e();ua.logs=a1t.LogsAPI.getInstance()});var f2e=P(wR=>{"use strict";m();Object.defineProperty(wR,"__esModule",{value:!0});wR.disableInstrumentations=wR.enableInstrumentations=void 0;function u1t(e,t,n,r){for(let o=0,i=e.length;o<i;o++){let s=e[o];t&&s.setTracerProvider(t),n&&s.setMeterProvider(n),r&&s.setLoggerProvider&&s.setLoggerProvider(r),s.getConfig().enabled||s.enable()}}wR.enableInstrumentations=u1t;function c1t(e){e.forEach(t=>t.disable())}wR.disableInstrumentations=c1t});var g2e=P(x6=>{"use strict";m();Object.defineProperty(x6,"__esModule",{value:!0});x6.registerInstrumentations=void 0;var m2e=(ze(),Le(nt)),l1t=lX(),A2e=f2e();function d1t(e){let t=e.tracerProvider||m2e.trace.getTracerProvider(),n=e.meterProvider||m2e.metrics.getMeterProvider(),r=e.loggerProvider||l1t.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,A2e.enableInstrumentations)(o,t,n,r),()=>{(0,A2e.disableInstrumentations)(o)}}x6.registerInstrumentations=d1t});var C2e=P(D6=>{"use strict";m();Object.defineProperty(D6,"__esModule",{value:!0});D6.satisfies=void 0;var mX=(ze(),Le(nt)),S2e=/^(?:v)?(?<version>(?<major>0|[1-9]\d*)\.(?<minor>0|[1-9]\d*)\.(?<patch>0|[1-9]\d*))(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,p1t=/^(?<op><|>|=|==|<=|>=|~|\^|~>)?\s*(?:v)?(?<version>(?<major>x|X|\*|0|[1-9]\d*)(?:\.(?<minor>x|X|\*|0|[1-9]\d*))?(?:\.(?<patch>x|X|\*|0|[1-9]\d*))?)(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,f1t={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function m1t(e,t,n){if(!A1t(e))return mX.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=E1t(e);if(!r)return!1;let o=[],i=T2e(r,t,o,n);return i&&!n?.includePrerelease?h1t(r,o):i}D6.satisfies=m1t;function A1t(e){return typeof e=="string"&&S2e.test(e)}function T2e(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(dX(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=F1t(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!dX(e,i,n,r))return!1;return!0}return dX(e,t,n,r)}function dX(e,t,n,r){if(t=_1t(t,r),t.includes(" "))return T2e(e,t,n,r);{let o=y1t(t);return n.push(o),g1t(e,o)}}function g1t(e,t){if(t.invalid)return!1;if(!t.version||fX(t.version))return!0;let n=_2e(e.versionSegments||[],t.versionSegments||[]);if(n===0){let r=e.prereleaseSegments||[],o=t.prereleaseSegments||[];!r.length&&!o.length?n=0:!r.length&&o.length?n=1:r.length&&!o.length?n=-1:n=_2e(r,o)}return f1t[t.op]?.includes(n)}function h1t(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function _1t(e,t){return e=e.trim(),e=U1t(e,t),e=L1t(e),e=Q1t(e,t),e=e.trim(),e}function nc(e){return!e||e.toLowerCase()==="x"||e==="*"}function E1t(e){let t=e.match(S2e);if(!t){mX.diag.error(`Invalid version: ${e}`);return}let n=t.groups.version,r=t.groups.prerelease,o=t.groups.build,i=n.split("."),s=r?.split(".");return{op:void 0,version:n,versionSegments:i,versionSegmentCount:i.length,prerelease:r,prereleaseSegments:s,prereleaseSegmentCount:s?s.length:0,build:o}}function y1t(e){if(!e)return{};let t=e.match(p1t);if(!t)return mX.diag.error(`Invalid range: ${e}`),{invalid:!0};let n=t.groups.op,r=t.groups.version,o=t.groups.prerelease,i=t.groups.build,s=r.split("."),u=o?.split(".");return n==="=="&&(n="="),{op:n||"=",version:r,versionSegments:s,versionSegmentCount:s.length,prerelease:o,prereleaseSegments:u,prereleaseSegmentCount:u?u.length:0,build:i}}function fX(e){return e==="*"||e==="x"||e==="X"}function h2e(e){let t=parseInt(e,10);return isNaN(t)?e:t}function S1t(e,t){if(typeof e==typeof t){if(typeof e=="number")return[e,t];if(typeof e=="string")return[e,t];throw new Error("Version segments can only be strings or numbers")}else return[String(e),String(t)]}function T1t(e,t){if(fX(e)||fX(t))return 0;let[n,r]=S1t(h2e(e),h2e(t));return n>r?1:n<r?-1:0}function _2e(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=T1t(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var b2e="[a-zA-Z0-9-]",I2e="0|[1-9]\\d*",b1t=`\\d*[a-zA-Z-]${b2e}*`,I1t="((?:<|>)?=?)",E2e=`(?:${I2e}|${b1t})`,C1t=`(?:-(${E2e}(?:\\.${E2e})*))`,y2e=`${b2e}+`,v1t=`(?:\\+(${y2e}(?:\\.${y2e})*))`,pX=`${I2e}|x|X|\\*`,EO=`[v=\\s]*(${pX})(?:\\.(${pX})(?:\\.(${pX})(?:${C1t})?${v1t}?)?)?`,R1t=`^${I1t}\\s*${EO}$`,x1t=new RegExp(R1t),D1t=`^\\s*(${EO})\\s+-\\s+(${EO})\\s*$`,N1t=new RegExp(D1t),B1t="(?:~>?)",w1t=`^${B1t}${EO}$`,O1t=new RegExp(w1t),k1t="(?:\\^)",P1t=`^${k1t}${EO}$`,M1t=new RegExp(P1t);function L1t(e){let t=O1t;return e.replace(t,(n,r,o,i,s)=>{let u;return nc(r)?u="":nc(o)?u=`>=${r}.0.0 <${+r+1}.0.0-0`:nc(i)?u=`>=${r}.${o}.0 <${r}.${+o+1}.0-0`:s?u=`>=${r}.${o}.${i}-${s} <${r}.${+o+1}.0-0`:u=`>=${r}.${o}.${i} <${r}.${+o+1}.0-0`,u})}function U1t(e,t){let n=M1t,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,s,u,l)=>{let p;return nc(i)?p="":nc(s)?p=`>=${i}.0.0${r} <${+i+1}.0.0-0`:nc(u)?i==="0"?p=`>=${i}.${s}.0${r} <${i}.${+s+1}.0-0`:p=`>=${i}.${s}.0${r} <${+i+1}.0.0-0`:l?i==="0"?s==="0"?p=`>=${i}.${s}.${u}-${l} <${i}.${s}.${+u+1}-0`:p=`>=${i}.${s}.${u}-${l} <${i}.${+s+1}.0-0`:p=`>=${i}.${s}.${u}-${l} <${+i+1}.0.0-0`:i==="0"?s==="0"?p=`>=${i}.${s}.${u}${r} <${i}.${s}.${+u+1}-0`:p=`>=${i}.${s}.${u}${r} <${i}.${+s+1}.0-0`:p=`>=${i}.${s}.${u} <${+i+1}.0.0-0`,p})}function Q1t(e,t){let n=x1t;return e.replace(n,(r,o,i,s,u,l)=>{let p=nc(i),h=p||nc(s),y=h||nc(u),S=y;return o==="="&&S&&(o=""),l=t?.includePrerelease?"-0":"",p?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&S?(h&&(s=0),u=0,o===">"?(o=">=",h?(i=+i+1,s=0,u=0):(s=+s+1,u=0)):o==="<="&&(o="<",h?i=+i+1:s=+s+1),o==="<"&&(l="-0"),r=`${o+i}.${s}.${u}${l}`):h?r=`>=${i}.0.0${l} <${+i+1}.0.0-0`:y&&(r=`>=${i}.${s}.0${l} <${i}.${+s+1}.0-0`),r})}function F1t(e,t){let n=N1t;return e.replace(n,(r,o,i,s,u,l,p,h,y,S,T,v)=>(nc(i)?o="":nc(s)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:nc(u)?o=`>=${i}.${s}.0${t?.includePrerelease?"-0":""}`:l?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,nc(y)?h="":nc(S)?h=`<${+y+1}.0.0-0`:nc(T)?h=`<${y}.${+S+1}.0-0`:v?h=`<=${y}.${S}.${T}-${v}`:t?.includePrerelease?h=`<${y}.${S}.${+T+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var AX=P(La=>{"use strict";m();Object.defineProperty(La,"__esModule",{value:!0});La.massUnwrap=La.unwrap=La.massWrap=La.wrap=void 0;var rc=console.error.bind(console);function yO(e,t,n){let r=!!e[t]&&Object.prototype.propertyIsEnumerable.call(e,t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}var G1t=(e,t,n)=>{if(!e||!e[t]){rc("no original function "+String(t)+" to wrap");return}if(!n){rc("no wrapper function"),rc(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){rc("original object and wrapper must be functions");return}let o=n(r,t);return yO(o,"__original",r),yO(o,"__unwrap",()=>{e[t]===o&&yO(e,t,r)}),yO(o,"__wrapped",!0),yO(e,t,o),o};La.wrap=G1t;var j1t=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{rc("must provide one or more modules to patch"),rc(new Error().stack);return}if(!(t&&Array.isArray(t))){rc("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,La.wrap)(r,o,n)})})};La.massWrap=j1t;var z1t=(e,t)=>{if(!e||!e[t]){rc("no function to unwrap."),rc(new Error().stack);return}let n=e[t];if(!n.__unwrap)rc("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};La.unwrap=z1t;var H1t=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{rc("must provide one or more modules to patch"),rc(new Error().stack);return}if(!(t&&Array.isArray(t))){rc("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,La.unwrap)(n,r)})})};La.massUnwrap=H1t;function SO(e){e&&e.logger&&(typeof e.logger!="function"?rc("new logger isn't a function, not replacing"):rc=e.logger)}La.default=SO;SO.wrap=La.wrap;SO.massWrap=La.massWrap;SO.unwrap=La.unwrap;SO.massUnwrap=La.massUnwrap});var v2e=P(B6=>{"use strict";m();Object.defineProperty(B6,"__esModule",{value:!0});B6.InstrumentationAbstract=void 0;var gX=(ze(),Le(nt)),$1t=lX(),N6=AX(),hX=class{instrumentationName;instrumentationVersion;_config={};_tracer;_meter;_logger;_diag;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=gX.diag.createComponentLogger({namespace:t}),this._tracer=gX.trace.getTracer(t,n),this._meter=gX.metrics.getMeter(t,n),this._logger=$1t.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=N6.wrap;_unwrap=N6.unwrap;_massWrap=N6.massWrap;_massUnwrap=N6.massUnwrap;get meter(){return this._meter}setMeterProvider(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()}get logger(){return this._logger}setLoggerProvider(t){this._logger=t.getLogger(this.instrumentationName,this.instrumentationVersion)}getModuleDefinitions(){let t=this.init()??[];return Array.isArray(t)?t:[t]}_updateMetricInstruments(){}getConfig(){return this._config}setConfig(t){this._config={enabled:!0,...t}}setTracerProvider(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)}get tracer(){return this._tracer}_runSpanCustomizationHook(t,n,r,o){if(t)try{t(r,o)}catch(i){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:n},i)}}};B6.InstrumentationAbstract=hX});var R2e=P(CE=>{"use strict";m();Object.defineProperty(CE,"__esModule",{value:!0});CE.ModuleNameTrie=CE.ModuleNameSeparator=void 0;CE.ModuleNameSeparator="/";var w6=class{hooks=[];children=new Map},_X=class{_trie=new w6;_counter=0;insert(t){let n=this._trie;for(let r of t.moduleName.split(CE.ModuleNameSeparator)){let o=n.children.get(r);o||(o=new w6,n.children.set(r,o)),n=o}n.hooks.push({hook:t,insertedId:this._counter++})}search(t,{maintainInsertionOrder:n,fullOnly:r}={}){let o=this._trie,i=[],s=!0;for(let u of t.split(CE.ModuleNameSeparator)){let l=o.children.get(u);if(!l){s=!1;break}r||i.push(...l.hooks),o=l}return r&&s&&i.push(...o.hooks),i.length===0?[]:i.length===1?[i[0].hook]:(n&&i.sort((u,l)=>u.insertedId-l.insertedId),i.map(({hook:u})=>u))}};CE.ModuleNameTrie=_X});var D2e=P(O6=>{"use strict";m();Object.defineProperty(O6,"__esModule",{value:!0});O6.RequireInTheMiddleSingleton=void 0;var q1t=AS(),x2e=Qe("path"),EX=R2e(),V1t=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),yX=class e{_moduleNameTrie=new EX.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new q1t.Hook(null,{internals:!0},(t,n,r)=>{let o=Y1t(n),i=this._moduleNameTrie.search(o,{maintainInsertionOrder:!0,fullOnly:r===void 0});for(let{onRequire:s}of i)t=s(t,n,r);return t})}register(t,n){let r={moduleName:t,onRequire:n};return this._moduleNameTrie.insert(r),r}static getInstance(){return V1t?new e:this._instance=this._instance??new e}};O6.RequireInTheMiddleSingleton=yX;function Y1t(e){return x2e.sep!==EX.ModuleNameSeparator?e.split(x2e.sep).join(EX.ModuleNameSeparator):e}});var SX=P(vE=>{"use strict";m();Object.defineProperty(vE,"__esModule",{value:!0});vE.isWrapped=vE.safeExecuteInTheMiddleAsync=vE.safeExecuteInTheMiddle=void 0;function K1t(e,t,n){let r,o;try{o=e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}vE.safeExecuteInTheMiddle=K1t;async function J1t(e,t,n){let r,o;try{o=await e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}vE.safeExecuteInTheMiddleAsync=J1t;function Z1t(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}vE.isWrapped=Z1t});var w2e=P(k6=>{"use strict";m();Object.defineProperty(k6,"__esModule",{value:!0});k6.InstrumentationBase=void 0;var TO=Qe("path"),N2e=Qe("util"),W1t=C2e(),TX=AX(),X1t=v2e(),eNt=D2e(),tNt=nW(),bO=(ze(),Le(nt)),nNt=AS(),rNt=Qe("fs"),oNt=SX(),bX=class extends X1t.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=eNt.RequireInTheMiddleSingleton.getInstance();_enabled=!1;constructor(t,n,r){super(t,n,r);let o=this.init();o&&!Array.isArray(o)&&(o=[o]),this._modules=o||[],this._config.enabled&&this.enable()}_wrap=(t,n,r)=>{if((0,oNt.isWrapped)(t[n])&&this._unwrap(t,n),N2e.types.isProxy(t)){let o=(0,TX.wrap)(Object.assign({},t),n,r);return Object.defineProperty(t,n,{value:o}),o}else return(0,TX.wrap)(t,n,r)};_unwrap=(t,n)=>N2e.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,TX.unwrap)(t,n);_massWrap=(t,n,r)=>{if(t)Array.isArray(t)||(t=[t]);else{bO.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){bO.diag.error("must provide one or more functions to wrap on modules");return}t.forEach(o=>{n.forEach(i=>{this._wrap(o,i,r)})})};_massUnwrap=(t,n)=>{if(t)Array.isArray(t)||(t=[t]);else{bO.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){bO.diag.error("must provide one or more functions to wrap on modules");return}t.forEach(r=>{n.forEach(o=>{this._unwrap(r,o)})})};_warnOnPreloadedModules(){this._modules.forEach(t=>{let{name:n}=t;try{let r=Qe.resolve(n);Qe.cache[r]&&this._diag.warn(`Module ${n} has been loaded before ${this.instrumentationName} so it might not work, please initialize it before requiring ${n}`)}catch{}})}_extractPackageVersion(t){try{let n=(0,rNt.readFileSync)(TO.join(t,"package.json"),{encoding:"utf8"}),r=JSON.parse(n).version;return typeof r=="string"?r:void 0}catch{bO.diag.warn("Failed extracting version",t)}}_onRequire(t,n,r,o){if(!o)return typeof t.patch=="function"&&(t.moduleExports=n,this._enabled)?(this._diag.debug("Applying instrumentation patch for nodejs core module on require hook",{module:t.name}),t.patch(n)):n;let i=this._extractPackageVersion(o);if(t.moduleVersion=i,t.name===r)return B2e(t.supportedVersions,i,t.includePrerelease)&&typeof t.patch=="function"&&(t.moduleExports=n,this._enabled)?(this._diag.debug("Applying instrumentation patch for module on require hook",{module:t.name,version:t.moduleVersion,baseDir:o}),t.patch(n,t.moduleVersion)):n;let s=t.files??[],u=TO.normalize(r);return s.filter(p=>p.name===u).filter(p=>B2e(p.supportedVersions,i,t.includePrerelease)).reduce((p,h)=>(h.moduleExports=p,this._enabled?(this._diag.debug("Applying instrumentation patch for nodejs module file on require hook",{module:t.name,version:t.moduleVersion,fileName:h.name,baseDir:o}),h.patch(p,t.moduleVersion)):p),n)}enable(){if(!this._enabled){if(this._enabled=!0,this._hooks.length>0){for(let t of this._modules){typeof t.patch=="function"&&t.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module on instrumentation enabled",{module:t.name,version:t.moduleVersion}),t.patch(t.moduleExports,t.moduleVersion));for(let n of t.files)n.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module file on instrumentation enabled",{module:t.name,version:t.moduleVersion,fileName:n.name}),n.patch(n.moduleExports,t.moduleVersion))}return}this._warnOnPreloadedModules();for(let t of this._modules){let n=(s,u,l)=>{if(!l&&TO.isAbsolute(u)){let p=TO.parse(u);u=p.name,l=p.dir}return this._onRequire(t,s,u,l)},r=(s,u,l)=>this._onRequire(t,s,u,l),o=TO.isAbsolute(t.name)?new nNt.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new tNt.Hook([t.name],{internals:!1},n);this._hooks.push(i)}}}disable(){if(this._enabled){this._enabled=!1;for(let t of this._modules){typeof t.unpatch=="function"&&t.moduleExports&&(this._diag.debug("Removing instrumentation patch for nodejs module on instrumentation disabled",{module:t.name,version:t.moduleVersion}),t.unpatch(t.moduleExports,t.moduleVersion));for(let n of t.files)n.moduleExports&&(this._diag.debug("Removing instrumentation patch for nodejs module file on instrumentation disabled",{module:t.name,version:t.moduleVersion,fileName:n.name}),n.unpatch(n.moduleExports,t.moduleVersion))}}}isEnabled(){return this._enabled}};k6.InstrumentationBase=bX;function B2e(e,t,n){return typeof t>"u"?e.includes("*"):e.some(r=>(0,W1t.satisfies)(t,r,{includePrerelease:n}))}});var O2e=P(P6=>{"use strict";m();Object.defineProperty(P6,"__esModule",{value:!0});P6.normalize=void 0;var iNt=Qe("path");Object.defineProperty(P6,"normalize",{enumerable:!0,get:function(){return iNt.normalize}})});var k2e=P(OR=>{"use strict";m();Object.defineProperty(OR,"__esModule",{value:!0});OR.normalize=OR.InstrumentationBase=void 0;var sNt=w2e();Object.defineProperty(OR,"InstrumentationBase",{enumerable:!0,get:function(){return sNt.InstrumentationBase}});var aNt=O2e();Object.defineProperty(OR,"normalize",{enumerable:!0,get:function(){return aNt.normalize}})});var IX=P(kR=>{"use strict";m();Object.defineProperty(kR,"__esModule",{value:!0});kR.normalize=kR.InstrumentationBase=void 0;var P2e=k2e();Object.defineProperty(kR,"InstrumentationBase",{enumerable:!0,get:function(){return P2e.InstrumentationBase}});Object.defineProperty(kR,"normalize",{enumerable:!0,get:function(){return P2e.normalize}})});var M2e=P(M6=>{"use strict";m();Object.defineProperty(M6,"__esModule",{value:!0});M6.InstrumentationNodeModuleDefinition=void 0;var CX=class{name;supportedVersions;patch;unpatch;files;constructor(t,n,r,o,i){this.name=t,this.supportedVersions=n,this.patch=r,this.unpatch=o,this.files=i||[]}};M6.InstrumentationNodeModuleDefinition=CX});var L2e=P(L6=>{"use strict";m();Object.defineProperty(L6,"__esModule",{value:!0});L6.InstrumentationNodeModuleFile=void 0;var uNt=IX(),vX=class{supportedVersions;patch;unpatch;name;constructor(t,n,r,o){this.supportedVersions=n,this.patch=r,this.unpatch=o,this.name=(0,uNt.normalize)(t)}};L6.InstrumentationNodeModuleFile=vX});var U2e=P(tT=>{"use strict";m();Object.defineProperty(tT,"__esModule",{value:!0});tT.semconvStabilityFromStr=tT.SemconvStability=void 0;var U6;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(U6=tT.SemconvStability||(tT.SemconvStability={}));function cNt(e,t){let n=U6.OLD,r=t?.split(",").map(o=>o.trim()).filter(o=>o!=="");for(let o of r??[])if(o.toLowerCase()===e+"/dup"){n=U6.DUPLICATE;break}else o.toLowerCase()===e&&(n=U6.STABLE);return n}tT.semconvStabilityFromStr=cNt});var F2e=P(cs=>{"use strict";m();Object.defineProperty(cs,"__esModule",{value:!0});cs.semconvStabilityFromStr=cs.SemconvStability=cs.safeExecuteInTheMiddleAsync=cs.safeExecuteInTheMiddle=cs.isWrapped=cs.InstrumentationNodeModuleFile=cs.InstrumentationNodeModuleDefinition=cs.InstrumentationBase=cs.registerInstrumentations=void 0;var lNt=g2e();Object.defineProperty(cs,"registerInstrumentations",{enumerable:!0,get:function(){return lNt.registerInstrumentations}});var dNt=IX();Object.defineProperty(cs,"InstrumentationBase",{enumerable:!0,get:function(){return dNt.InstrumentationBase}});var pNt=M2e();Object.defineProperty(cs,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return pNt.InstrumentationNodeModuleDefinition}});var fNt=L2e();Object.defineProperty(cs,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return fNt.InstrumentationNodeModuleFile}});var RX=SX();Object.defineProperty(cs,"isWrapped",{enumerable:!0,get:function(){return RX.isWrapped}});Object.defineProperty(cs,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return RX.safeExecuteInTheMiddle}});Object.defineProperty(cs,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return RX.safeExecuteInTheMiddleAsync}});var Q2e=U2e();Object.defineProperty(cs,"SemconvStability",{enumerable:!0,get:function(){return Q2e.SemconvStability}});Object.defineProperty(cs,"semconvStabilityFromStr",{enumerable:!0,get:function(){return Q2e.semconvStabilityFromStr}})});function gNt(){let e=PR[DX];return e?.helper?e.helper:PR[xX]?.helper}function hNt(e){let t={helper:e};PR[DX]=t,PR[xX]=t}function _Nt(){delete PR[DX],delete PR[xX]}function SNt(e){return e==="client"?po.CLIENT:po.INTERNAL}function z2e(e,t,n,r,o){if(H2e(t.name,o))return;let i={attributes:t.attributes,kind:SNt(t.kind),startTime:t.startTime};e.startActiveSpan(t.name,i,s=>{r.set(t.id,s.spanContext().spanId),t.links&&s.addLinks(t.links.flatMap(l=>{let p=r.get(l);return p?{context:{spanId:p,traceId:s.spanContext().traceId,traceFlags:s.spanContext().traceFlags}}:[]}));let u=n.filter(l=>l.parentId===t.id);for(let l of u)z2e(e,l,n,r,o);s.end(t.endTime)})}function G2e(e,t){return bNt(t)?t.then(n=>(e.end(),n),n=>{throw e.end(),n}):(e.end(),t)}function bNt(e){return e!=null&&typeof e.then=="function"}function H2e(e,t){return t.some(n=>typeof n=="string"?n===e:n.test(e))}var Q6,mNt,ANt,xX,DX,PR,ENt,yNt,TNt,$2e,j2e,INt,CNt,q2e,V2e=w(()=>{m();ze();Q6=ue(F2e(),1);ze();mNt={name:"@prisma/instrumentation-contract",version:"7.6.0",description:"Shared types and utilities for Prisma instrumentation",main:"dist/index.js",module:"dist/index.mjs",types:"dist/index.d.ts",exports:{".":{require:{types:"./dist/index.d.ts",default:"./dist/index.js"},import:{types:"./dist/index.d.mts",default:"./dist/index.mjs"}}},license:"Apache-2.0",homepage:"https://www.prisma.io",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/instrumentation-contract"},bugs:"https://github.com/prisma/prisma/issues",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",prepublishOnly:"pnpm run build",test:"vitest run"},files:["dist"],sideEffects:!1,devDependencies:{"@opentelemetry/api":"1.9.0"},peerDependencies:{"@opentelemetry/api":"^1.8"}},ANt=mNt.version.split(".")[0],xX="PRISMA_INSTRUMENTATION",DX=`V${ANt}_PRISMA_INSTRUMENTATION`,PR=globalThis;ENt=process.env.PRISMA_SHOW_ALL_TRACES==="true",yNt="00-10-10-00";TNt=class{tracerProvider;ignoreSpanTypes;constructor({tracerProvider:e,ignoreSpanTypes:t}){this.tracerProvider=e,this.ignoreSpanTypes=t}isEnabled(){return!0}getTraceParent(e){let t=qt.getSpanContext(e??Xe.active());return t?`00-${t.traceId}-${t.spanId}-0${t.traceFlags}`:yNt}dispatchEngineSpans(e){let t=this.tracerProvider.getTracer("prisma"),n=new Map,r=e.filter(o=>o.parentId===null);for(let o of r)z2e(t,o,e,n,this.ignoreSpanTypes)}getActiveContext(){return Xe.active()}runInChildSpan(e,t){if(typeof e=="string"&&(e={name:e}),e.internal&&!ENt)return t();let n=this.tracerProvider.getTracer("prisma"),r=e.context??this.getActiveContext(),o=`prisma:client:${e.name}`;if(H2e(o,this.ignoreSpanTypes))return t();if(e.active===!1){let i=n.startSpan(o,e,r);return G2e(i,t(i,r))}return n.startActiveSpan(o,e,i=>G2e(i,t(i,r)))}};$2e={name:"@prisma/instrumentation",version:"7.6.0",description:"OpenTelemetry compliant instrumentation for Prisma Client",main:"dist/index.js",module:"dist/index.mjs",types:"dist/index.d.ts",exports:{".":{require:{types:"./dist/index.d.ts",default:"./dist/index.js"},import:{types:"./dist/index.d.ts",default:"./dist/index.mjs"}}},license:"Apache-2.0",homepage:"https://www.prisma.io",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/instrumentation"},bugs:"https://github.com/prisma/prisma/issues",devDependencies:{"@opentelemetry/api":"1.9.0","@prisma/instrumentation-contract":"workspace:*","@types/node":"~20.19.24",typescript:"5.4.5"},dependencies:{"@opentelemetry/instrumentation":"^0.207.0"},peerDependencies:{"@opentelemetry/api":"^1.8"},files:["dist"],keywords:["prisma","instrumentation","opentelemetry","otel"],scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",prepublishOnly:"pnpm run build",test:"vitest run"},sideEffects:!1},j2e=$2e.version,INt=$2e.name,CNt="@prisma/client",q2e=class extends Q6.InstrumentationBase{tracerProvider;constructor(e={}){super(INt,j2e,e)}setTracerProvider(e){this.tracerProvider=e}init(){return[new Q6.InstrumentationNodeModuleDefinition(CNt,[j2e])]}enable(){let e=this._config;hNt(new TNt({tracerProvider:this.tracerProvider??qt.getTracerProvider(),ignoreSpanTypes:e.ignoreSpanTypes??[]}))}disable(){_Nt()}isEnabled(){return gNt()!==void 0}}});function vNt(e){return!!e&&typeof e=="object"&&"dispatchEngineSpans"in e}function K2e(){let e=globalThis.PRISMA_INSTRUMENTATION;return e&&typeof e=="object"&&"helper"in e?e.helper:void 0}function RNt(e){return e==="client"?po.CLIENT:po.INTERNAL}var Y2e,NX,xNt,J2e,Z2e=w(()=>{m();ze();V2e();mt();_r();Y2e="Prisma";NX=class extends q2e{constructor(t){super(t?.instrumentationConfig)}enable(){super.enable();let t=K2e();vNt(t)&&(t.createEngineSpan=n=>{let r=qt.getTracer("prismaV5Compatibility"),o=r._idGenerator;if(!o){Wo(()=>{console.warn("[Sentry] Could not find _idGenerator on tracer, skipping Prisma v5 compatibility - some Prisma spans may be missing!")});return}try{n.spans.forEach(i=>{let s=RNt(i.kind),u=i.parent_span_id,l=i.span_id,p=i.trace_id,h=i.links?.map(S=>({context:{traceId:S.trace_id,spanId:S.span_id,traceFlags:ou.SAMPLED}})),y=qt.setSpanContext(Xe.active(),{traceId:p,spanId:u,traceFlags:ou.SAMPLED});Xe.with(y,()=>{let S={generateTraceId:()=>p,generateSpanId:()=>l};r._idGenerator=S,r.startSpan(i.name,{kind:s,links:h,startTime:i.start_time,attributes:i.attributes}).end(i.end_time),r._idGenerator=o})})}finally{r._idGenerator=o}})}};xNt=ut(Y2e,e=>new NX(e)),J2e=e=>({name:Y2e,setupOnce(){xNt(e)},setup(t){K2e()&&t.on("spanStart",n=>{let r=kt(n);r.description?.startsWith("prisma:")&&n.setAttribute(Pt,"auto.db.otel.prisma"),r.description==="prisma:engine:db_query"&&r.data["db.query.text"]&&n.updateName(r.data["db.query.text"]),r.description==="prisma:engine:db_query"&&!r.data["db.system"]&&n.setAttribute("db.system","prisma")})}})});var W2e=P(MR=>{"use strict";m();Object.defineProperty(MR,"__esModule",{value:!0});MR.PACKAGE_NAME=MR.PACKAGE_VERSION=void 0;MR.PACKAGE_VERSION="0.60.0";MR.PACKAGE_NAME="@opentelemetry/instrumentation-hapi"});var BX=P(tA=>{"use strict";m();Object.defineProperty(tA,"__esModule",{value:!0});tA.HapiLifecycleMethodNames=tA.HapiLayerType=tA.handlerPatched=tA.HapiComponentName=void 0;tA.HapiComponentName="@hapi/hapi";tA.handlerPatched=Symbol("hapi-handler-patched");tA.HapiLayerType={ROUTER:"router",PLUGIN:"plugin",EXT:"server.ext"};tA.HapiLifecycleMethodNames=new Set(["onPreAuth","onCredentials","onPostAuth","onPreHandler","onPostHandler","onPreResponse","onRequest"])});var X2e=P(F6=>{"use strict";m();Object.defineProperty(F6,"__esModule",{value:!0});F6.ATTR_HTTP_METHOD=void 0;F6.ATTR_HTTP_METHOD="http.method"});var wX=P(IO=>{"use strict";m();Object.defineProperty(IO,"__esModule",{value:!0});IO.AttributeNames=void 0;var DNt;(function(e){e.HAPI_TYPE="hapi.type",e.PLUGIN_NAME="hapi.plugin.name",e.EXT_TYPE="server.ext.type"})(DNt=IO.AttributeNames||(IO.AttributeNames={}))});var nLe=P(ls=>{"use strict";m();Object.defineProperty(ls,"__esModule",{value:!0});ls.getPluginFromInput=ls.getExtMetadata=ls.getRouteMetadata=ls.isPatchableExtMethod=ls.isDirectExtInput=ls.isLifecycleExtEventObj=ls.isLifecycleExtType=ls.getPluginName=void 0;var eLe=(Xn(),Le(Gr)),NNt=X2e(),CO=BX(),RE=wX(),tLe=sn();function BNt(e){return e.name?e.name:e.pkg.name}ls.getPluginName=BNt;var wNt=e=>typeof e=="string"&&CO.HapiLifecycleMethodNames.has(e);ls.isLifecycleExtType=wNt;var ONt=e=>{let t=e?.type;return t!==void 0&&(0,ls.isLifecycleExtType)(t)};ls.isLifecycleExtEventObj=ONt;var kNt=e=>Array.isArray(e)&&e.length<=3&&(0,ls.isLifecycleExtType)(e[0])&&typeof e[1]=="function";ls.isDirectExtInput=kNt;var PNt=e=>!Array.isArray(e);ls.isPatchableExtMethod=PNt;var MNt=(e,t,n)=>{let r={[eLe.ATTR_HTTP_ROUTE]:e.path};t&tLe.SemconvStability.OLD&&(r[NNt.ATTR_HTTP_METHOD]=e.method),t&tLe.SemconvStability.STABLE&&(r[eLe.ATTR_HTTP_REQUEST_METHOD]=e.method);let o;return n?(r[RE.AttributeNames.HAPI_TYPE]=CO.HapiLayerType.PLUGIN,r[RE.AttributeNames.PLUGIN_NAME]=n,o=`${n}: route - ${e.path}`):(r[RE.AttributeNames.HAPI_TYPE]=CO.HapiLayerType.ROUTER,o=`route - ${e.path}`),{attributes:r,name:o}};ls.getRouteMetadata=MNt;var LNt=(e,t,n)=>{let r=`ext - ${e}`;return n&&n!=="method"&&(r=`ext - ${e} - ${n}`),t?{attributes:{[RE.AttributeNames.EXT_TYPE]:e,[RE.AttributeNames.HAPI_TYPE]:CO.HapiLayerType.EXT,[RE.AttributeNames.PLUGIN_NAME]:t},name:`${t}: ${r}`}:{attributes:{[RE.AttributeNames.EXT_TYPE]:e,[RE.AttributeNames.HAPI_TYPE]:CO.HapiLayerType.EXT},name:r}};ls.getExtMetadata=LNt;var UNt=e=>"plugin"in e?"plugin"in e.plugin?e.plugin.plugin:e.plugin:e;ls.getPluginFromInput=UNt});var iLe=P(G6=>{"use strict";m();Object.defineProperty(G6,"__esModule",{value:!0});G6.HapiInstrumentation=void 0;var Wl=(ze(),Le(nt)),rLe=Cr(),vO=sn(),oLe=W2e(),RO=BX(),Xg=nLe(),OX=class extends vO.InstrumentationBase{_semconvStability;constructor(t={}){super(oLe.PACKAGE_NAME,oLe.PACKAGE_VERSION,t),this._semconvStability=(0,vO.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new vO.InstrumentationNodeModuleDefinition(RO.HapiComponentName,[">=17.0.0 <22"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,vO.isWrapped)(n.server)||this._wrap(n,"server",this._getServerPatch.bind(this)),(0,vO.isWrapped)(n.Server)||this._wrap(n,"Server",this._getServerPatch.bind(this)),n},t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;this._massUnwrap([n],["server","Server"])})}_getServerPatch(t){let n=this,r=this;return function(i){let s=t.apply(this,[i]);return r._wrap(s,"route",u=>n._getServerRoutePatch.bind(n)(u)),r._wrap(s,"ext",u=>n._getServerExtPatch.bind(n)(u)),r._wrap(s,"register",n._getServerRegisterPatch.bind(n)),s}}_getServerRegisterPatch(t){let n=this;return function(o,i){if(Array.isArray(o))for(let s of o){let u=(0,Xg.getPluginFromInput)(s);n._wrapRegisterHandler(u)}else{let s=(0,Xg.getPluginFromInput)(o);n._wrapRegisterHandler(s)}return t.apply(this,[o,i])}}_getServerExtPatch(t,n){let r=this;return function(...i){if(Array.isArray(i[0])){let s=i[0];for(let u=0;u<s.length;u++){let l=s[u];if((0,Xg.isLifecycleExtType)(l.type)){let p=l,h=r._wrapExtMethods(p.method,l.type,n);p.method=h,s[u]=p}}return t.apply(this,i)}else if((0,Xg.isDirectExtInput)(i)){let s=i,u=s[1],l=r._wrapExtMethods(u,s[0],n);return t.apply(this,[s[0],l,s[2]])}else if((0,Xg.isLifecycleExtEventObj)(i[0])){let s=i[0],u=r._wrapExtMethods(s.method,s.type,n);return s.method=u,t.call(this,s)}return t.apply(this,i)}}_getServerRoutePatch(t,n){let r=this;return function(o){if(Array.isArray(o))for(let i=0;i<o.length;i++){let s=r._wrapRouteHandler.call(r,o[i],n);o[i]=s}else o=r._wrapRouteHandler.call(r,o,n);return t.apply(this,[o])}}_wrapRegisterHandler(t){let n=this,r=(0,Xg.getPluginName)(t),o=t.register,i=this,s=function(u,l){return i._wrap(u,"route",p=>n._getServerRoutePatch.bind(n)(p,r)),i._wrap(u,"ext",p=>n._getServerExtPatch.bind(n)(p,r)),o.call(this,u,l)};t.register=s}_wrapExtMethods(t,n,r){let o=this;if(t instanceof Array){for(let i=0;i<t.length;i++)t[i]=o._wrapExtMethods(t[i],n);return t}else if((0,Xg.isPatchableExtMethod)(t))return t[RO.handlerPatched]===!0?t:(t[RO.handlerPatched]=!0,async function(...s){if(Wl.trace.getSpan(Wl.context.active())===void 0)return await t.apply(this,s);let u=(0,Xg.getExtMetadata)(n,r,t.name),l=o.tracer.startSpan(u.name,{attributes:u.attributes});try{return await Wl.context.with(Wl.trace.setSpan(Wl.context.active(),l),t,void 0,...s)}catch(p){throw l.recordException(p),l.setStatus({code:Wl.SpanStatusCode.ERROR,message:p.message}),p}finally{l.end()}});return t}_wrapRouteHandler(t,n){let r=this;if(t[RO.handlerPatched]===!0)return t;t[RO.handlerPatched]=!0;let o=i=>async function(...s){if(Wl.trace.getSpan(Wl.context.active())===void 0)return await i.call(this,...s);let u=(0,rLe.getRPCMetadata)(Wl.context.active());u?.type===rLe.RPCType.HTTP&&(u.route=t.path);let l=(0,Xg.getRouteMetadata)(t,r._semconvStability,n),p=r.tracer.startSpan(l.name,{attributes:l.attributes});try{return await Wl.context.with(Wl.trace.setSpan(Wl.context.active(),p),()=>i.call(this,...s))}catch(h){throw p.recordException(h),p.setStatus({code:Wl.SpanStatusCode.ERROR,message:h.message}),h}finally{p.end()}};if(typeof t.handler=="function")t.handler=o(t.handler);else if(typeof t.options=="function"){let i=t.options;t.options=function(s){let u=i(s);return typeof u.handler=="function"&&(u.handler=o(u.handler)),u}}else typeof t.options?.handler=="function"&&(t.options.handler=o(t.options.handler));return t}};G6.HapiInstrumentation=OX});var sLe=P(LR=>{"use strict";m();Object.defineProperty(LR,"__esModule",{value:!0});LR.AttributeNames=LR.HapiInstrumentation=void 0;var QNt=iLe();Object.defineProperty(LR,"HapiInstrumentation",{enumerable:!0,get:function(){return QNt.HapiInstrumentation}});var FNt=wX();Object.defineProperty(LR,"AttributeNames",{enumerable:!0,get:function(){return FNt.AttributeNames}})});var aLe,uLe,cLe,GNt,lLe,dLe=w(()=>{m();aLe=ue(sLe(),1);_r();uLe="Hapi",cLe=ut(uLe,()=>new aLe.HapiInstrumentation),GNt=(()=>({name:uLe,setupOnce(){cLe()}})),lLe=GNt});var xE,xO,kX=w(()=>{m();xE={HONO_TYPE:"hono.type",HONO_NAME:"hono.name"},xO={MIDDLEWARE:"middleware",REQUEST_HANDLER:"request_handler"}});var z6,jNt,zNt,j6,pLe=w(()=>{m();ze();z6=ue(sn(),1);mt();kX();jNt="@sentry/instrumentation-hono",zNt="0.0.1",j6=class extends z6.InstrumentationBase{constructor(t={}){super(jNt,zNt,t)}init(){return[new z6.InstrumentationNodeModuleDefinition("hono",[">=4.0.0 <5"],t=>this._patch(t))]}_patch(t){let n=this;class r extends t.Hono{constructor(...i){super(...i),n._wrap(this,"get",n._patchHandler()),n._wrap(this,"post",n._patchHandler()),n._wrap(this,"put",n._patchHandler()),n._wrap(this,"delete",n._patchHandler()),n._wrap(this,"options",n._patchHandler()),n._wrap(this,"patch",n._patchHandler()),n._wrap(this,"all",n._patchHandler()),n._wrap(this,"on",n._patchOnHandler()),n._wrap(this,"use",n._patchMiddlewareHandler())}}try{t.Hono=r}catch{return{...t,Hono:r}}return t}_patchHandler(){let t=this;return function(n){return function(...o){if(typeof o[0]=="string"){let i=o[0];if(o.length===1)return n.apply(this,[i]);let s=o.slice(1);return n.apply(this,[i,...s.map(u=>t._wrapHandler(u))])}return n.apply(this,o.map(i=>t._wrapHandler(i)))}}}_patchOnHandler(){let t=this;return function(n){return function(...o){let i=o.slice(2);return n.apply(this,[...o.slice(0,2),...i.map(s=>t._wrapHandler(s))])}}}_patchMiddlewareHandler(){let t=this;return function(n){return function(...o){if(typeof o[0]=="string"){let i=o[0];if(o.length===1)return n.apply(this,[i]);let s=o.slice(1);return n.apply(this,[i,...s.map(u=>t._wrapHandler(u))])}return n.apply(this,o.map(i=>t._wrapHandler(i)))}}}_wrapHandler(t){let n=this;return function(r,o){if(!n.isEnabled())return t.apply(this,[r,o]);let i=r.req.path,s=n.tracer.startSpan(i);return Xe.with(qt.setSpan(Xe.active(),s),()=>n._safeExecute(()=>{let u=t.apply(this,[r,o]);if(xa(u))return u.then(l=>{let p=n._determineHandlerType(l);return s.setAttributes({[xE.HONO_TYPE]:p,[xE.HONO_NAME]:p===xO.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(s),l});{let l=n._determineHandlerType(u);return s.setAttributes({[xE.HONO_TYPE]:l,[xE.HONO_NAME]:l===xO.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(s),u}},()=>s.end(),u=>{n._handleError(s,u),s.end()}))}}_safeExecute(t,n,r){try{let o=t();return xa(o)?o.then(()=>n(),i=>r(i)):n(),o}catch(o){throw r(o),o}}_determineHandlerType(t){return t===void 0?xO.MIDDLEWARE:xO.REQUEST_HANDLER}_handleError(t,n){n instanceof Error&&(t.setStatus({code:Ai.ERROR,message:n.message}),t.recordException(n))}}});function HNt(e){let t=kt(e).data,n=t[xE.HONO_TYPE];if(t[Xt]||!n)return;e.setAttributes({[Pt]:"auto.http.otel.hono",[Xt]:`${n}.hono`});let r=t[xE.HONO_NAME];if(typeof r=="string"&&e.updateName(r),Rn()===Vd()){xs&&W.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let o=t[vg],i=t[lS];typeof o=="string"&&typeof i=="string"&&Rn().setTransactionName(`${i} ${o}`)}var fLe,mLe,$Nt,ALe,gLe=w(()=>{m();Xn();mt();_r();HS();kX();pLe();fLe="Hono";mLe=ut(fLe,()=>new j6({responseHook:e=>{HNt(e)}})),$Nt=(()=>({name:fLe,setupOnce(){mLe()}})),ALe=$Nt});var H6=P(DO=>{"use strict";m();Object.defineProperty(DO,"__esModule",{value:!0});DO.KoaLayerType=void 0;var qNt;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware"})(qNt=DO.KoaLayerType||(DO.KoaLayerType={}))});var hLe=P(UR=>{"use strict";m();Object.defineProperty(UR,"__esModule",{value:!0});UR.PACKAGE_NAME=UR.PACKAGE_VERSION=void 0;UR.PACKAGE_VERSION="0.62.0";UR.PACKAGE_NAME="@opentelemetry/instrumentation-koa"});var PX=P(NO=>{"use strict";m();Object.defineProperty(NO,"__esModule",{value:!0});NO.AttributeNames=void 0;var VNt;(function(e){e.KOA_TYPE="koa.type",e.KOA_NAME="koa.name"})(VNt=NO.AttributeNames||(NO.AttributeNames={}))});var ELe=P(QR=>{"use strict";m();Object.defineProperty(QR,"__esModule",{value:!0});QR.isLayerIgnored=QR.getMiddlewareMetadata=void 0;var _Le=H6(),$6=PX(),YNt=(Xn(),Le(Gr)),KNt=(e,t,n,r)=>n?{attributes:{[$6.AttributeNames.KOA_NAME]:r?.toString(),[$6.AttributeNames.KOA_TYPE]:_Le.KoaLayerType.ROUTER,[YNt.ATTR_HTTP_ROUTE]:r?.toString()},name:e._matchedRouteName||`router - ${r}`}:{attributes:{[$6.AttributeNames.KOA_NAME]:t.name??"middleware",[$6.AttributeNames.KOA_TYPE]:_Le.KoaLayerType.MIDDLEWARE},name:`middleware - ${t.name}`};QR.getMiddlewareMetadata=KNt;var JNt=(e,t)=>!!(Array.isArray(t?.ignoreLayersType)&&t?.ignoreLayersType?.includes(e));QR.isLayerIgnored=JNt});var yLe=P(q6=>{"use strict";m();Object.defineProperty(q6,"__esModule",{value:!0});q6.kLayerPatched=void 0;q6.kLayerPatched=Symbol("koa-layer-patched")});var vLe=P(V6=>{"use strict";m();Object.defineProperty(V6,"__esModule",{value:!0});V6.KoaInstrumentation=void 0;var nA=(ze(),Le(nt)),BO=sn(),SLe=H6(),TLe=hLe(),bLe=ELe(),ILe=Cr(),CLe=yLe(),MX=class extends BO.InstrumentationBase{constructor(t={}){super(TLe.PACKAGE_NAME,TLe.PACKAGE_VERSION,t)}init(){return new BO.InstrumentationNodeModuleDefinition("koa",[">=2.0.0 <4"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return n==null?n:((0,BO.isWrapped)(n.prototype.use)&&this._unwrap(n.prototype,"use"),this._wrap(n.prototype,"use",this._getKoaUsePatch.bind(this)),t)},t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;(0,BO.isWrapped)(n.prototype.use)&&this._unwrap(n.prototype,"use")})}_getKoaUsePatch(t){let n=this;return function(o){let i;return o.router?i=n._patchRouterDispatch(o):i=n._patchLayer(o,!1),t.apply(this,[i])}}_patchRouterDispatch(t){nA.diag.debug("Patching @koa/router dispatch");let r=t.router?.stack??[];for(let o of r){let i=o.path,s=o.stack;for(let u=0;u<s.length;u++){let l=s[u];s[u]=this._patchLayer(l,!0,i)}}return t}_patchLayer(t,n,r){let o=n?SLe.KoaLayerType.ROUTER:SLe.KoaLayerType.MIDDLEWARE;return t[CLe.kLayerPatched]===!0||(0,bLe.isLayerIgnored)(o,this.getConfig())?t:t.constructor.name==="GeneratorFunction"||t.constructor.name==="AsyncGeneratorFunction"?(nA.diag.debug("ignoring generator-based Koa middleware layer"),t):(t[CLe.kLayerPatched]=!0,nA.diag.debug("patching Koa middleware layer"),async(i,s)=>{if(nA.trace.getSpan(nA.context.active())===void 0)return t(i,s);let l=(0,bLe.getMiddlewareMetadata)(i,t,n,r),p=this.tracer.startSpan(l.name,{attributes:l.attributes}),h=(0,ILe.getRPCMetadata)(nA.context.active());h?.type===ILe.RPCType.HTTP&&i._matchedRoute&&(h.route=i._matchedRoute.toString());let{requestHook:y}=this.getConfig();y&&(0,BO.safeExecuteInTheMiddle)(()=>y(p,{context:i,middlewareLayer:t,layerType:o}),T=>{T&&nA.diag.error("koa instrumentation: request hook failed",T)},!0);let S=nA.trace.setSpan(nA.context.active(),p);return nA.context.with(S,async()=>{try{return await t(i,s)}catch(T){throw p.recordException(T),T}finally{p.end()}})})}};V6.KoaInstrumentation=MX});var RLe=P(DE=>{"use strict";m();Object.defineProperty(DE,"__esModule",{value:!0});DE.KoaLayerType=DE.AttributeNames=DE.KoaInstrumentation=void 0;var ZNt=vLe();Object.defineProperty(DE,"KoaInstrumentation",{enumerable:!0,get:function(){return ZNt.KoaInstrumentation}});var WNt=PX();Object.defineProperty(DE,"AttributeNames",{enumerable:!0,get:function(){return WNt.AttributeNames}});var XNt=H6();Object.defineProperty(DE,"KoaLayerType",{enumerable:!0,get:function(){return XNt.KoaLayerType}})});var xLe,DLe,NLe,eBt,BLe,wLe=w(()=>{m();xLe=ue(RLe(),1);Xn();mt();_r();HS();DLe="Koa",NLe=ut(DLe,xLe.KoaInstrumentation,(e={})=>({ignoreLayersType:e.ignoreLayersType,requestHook(t,n){zr(t,"auto.http.otel.koa");let r=kt(t).data,o=r["koa.type"];o&&t.setAttribute(Xt,`${o}.koa`);let i=r["koa.name"];if(typeof i=="string"&&t.updateName(i||"< unknown >"),Rn()===Vd()){xs&&W.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let s=r[vg],u=n.context?.request?.method?.toUpperCase()||"GET";s&&Rn().setTransactionName(`${u} ${s}`)}})),eBt=((e={})=>({name:DLe,setupOnce(){NLe(e)}})),BLe=eBt});var LX=P(vf=>{"use strict";m();Object.defineProperty(vf,"__esModule",{value:!0});vf.ConnectNames=vf.ConnectTypes=vf.AttributeNames=void 0;var tBt;(function(e){e.CONNECT_TYPE="connect.type",e.CONNECT_NAME="connect.name"})(tBt=vf.AttributeNames||(vf.AttributeNames={}));var nBt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(nBt=vf.ConnectTypes||(vf.ConnectTypes={}));var rBt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request handler"})(rBt=vf.ConnectNames||(vf.ConnectNames={}))});var OLe=P(FR=>{"use strict";m();Object.defineProperty(FR,"__esModule",{value:!0});FR.PACKAGE_NAME=FR.PACKAGE_VERSION=void 0;FR.PACKAGE_VERSION="0.57.0";FR.PACKAGE_NAME="@opentelemetry/instrumentation-connect"});var kLe=P(Y6=>{"use strict";m();Object.defineProperty(Y6,"__esModule",{value:!0});Y6._LAYERS_STORE_PROPERTY=void 0;Y6._LAYERS_STORE_PROPERTY=Symbol("opentelemetry.instrumentation-connect.request-route-stack")});var PLe=P(BE=>{"use strict";m();Object.defineProperty(BE,"__esModule",{value:!0});BE.generateRoute=BE.replaceCurrentStackRoute=BE.addNewStackLayer=void 0;var oBt=(ze(),Le(nt)),NE=kLe(),iBt=e=>{Array.isArray(e[NE._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(e,NE._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),e[NE._LAYERS_STORE_PROPERTY].push("/");let t=e[NE._LAYERS_STORE_PROPERTY].length;return()=>{t===e[NE._LAYERS_STORE_PROPERTY].length?e[NE._LAYERS_STORE_PROPERTY].pop():oBt.diag.warn("Connect: Trying to pop the stack multiple time")}};BE.addNewStackLayer=iBt;var sBt=(e,t)=>{t&&e[NE._LAYERS_STORE_PROPERTY].splice(-1,1,t)};BE.replaceCurrentStackRoute=sBt;var aBt=e=>e[NE._LAYERS_STORE_PROPERTY].reduce((t,n)=>t.replace(/\/+$/,"")+n);BE.generateRoute=aBt});var ULe=P(wE=>{"use strict";m();Object.defineProperty(wE,"__esModule",{value:!0});wE.ConnectInstrumentation=wE.ANONYMOUS_NAME=void 0;var uBt=(ze(),Le(nt)),MLe=Cr(),GR=LX(),LLe=OLe(),K6=sn(),cBt=(Xn(),Le(Gr)),UX=PLe();wE.ANONYMOUS_NAME="anonymous";var QX=class extends K6.InstrumentationBase{constructor(t={}){super(LLe.PACKAGE_NAME,LLe.PACKAGE_VERSION,t)}init(){return[new K6.InstrumentationNodeModuleDefinition("connect",[">=3.0.0 <4"],t=>this._patchConstructor(t))]}_patchApp(t){(0,K6.isWrapped)(t.use)||this._wrap(t,"use",this._patchUse.bind(this)),(0,K6.isWrapped)(t.handle)||this._wrap(t,"handle",this._patchHandle.bind(this))}_patchConstructor(t){let n=this;return function(...r){let o=t.apply(this,r);return n._patchApp(o),o}}_patchNext(t,n){return function(o){let i=t.apply(this,[o]);return n(),i}}_startSpan(t,n){let r,o,i;t?(r=GR.ConnectTypes.REQUEST_HANDLER,i=GR.ConnectNames.REQUEST_HANDLER,o=t):(r=GR.ConnectTypes.MIDDLEWARE,i=GR.ConnectNames.MIDDLEWARE,o=n.name||wE.ANONYMOUS_NAME);let s=`${i} - ${o}`,u={attributes:{[cBt.ATTR_HTTP_ROUTE]:t.length>0?t:"/",[GR.AttributeNames.CONNECT_TYPE]:r,[GR.AttributeNames.CONNECT_NAME]:o}};return this.tracer.startSpan(s,u)}_patchMiddleware(t,n){let r=this,o=n.length===4;function i(){if(!r.isEnabled())return n.apply(this,arguments);let[s,u,l]=o?[1,2,3]:[0,1,2],p=arguments[s],h=arguments[u],y=arguments[l];(0,UX.replaceCurrentStackRoute)(p,t);let S=(0,MLe.getRPCMetadata)(uBt.context.active());t&&S?.type===MLe.RPCType.HTTP&&(S.route=(0,UX.generateRoute)(p));let T="";t?T=`request handler - ${t}`:T=`middleware - ${n.name||wE.ANONYMOUS_NAME}`;let v=r._startSpan(t,n);r._diag.debug("start span",T);let R=!1;function x(){R?r._diag.debug(`span ${v.name} - already finished`):(R=!0,r._diag.debug(`finishing span ${v.name}`),v.end()),h.removeListener("close",x)}return h.addListener("close",x),arguments[l]=r._patchNext(y,x),n.apply(this,arguments)}return Object.defineProperty(i,"length",{value:n.length,writable:!1,configurable:!0}),i}_patchUse(t){let n=this;return function(...r){let o=r[r.length-1],i=r[r.length-2]||"";return r[r.length-1]=n._patchMiddleware(i,o),t.apply(this,r)}}_patchHandle(t){let n=this;return function(){let[r,o]=[0,2],i=arguments[r],s=arguments[o],u=(0,UX.addNewStackLayer)(i);return typeof s=="function"&&(arguments[o]=n._patchOut(s,u)),t.apply(this,arguments)}}_patchOut(t,n){return function(...o){return n(),Reflect.apply(t,this,o)}}};wE.ConnectInstrumentation=QX});var FLe=P(cp=>{"use strict";m();Object.defineProperty(cp,"__esModule",{value:!0});cp.ConnectTypes=cp.ConnectNames=cp.AttributeNames=cp.ANONYMOUS_NAME=cp.ConnectInstrumentation=void 0;var QLe=ULe();Object.defineProperty(cp,"ConnectInstrumentation",{enumerable:!0,get:function(){return QLe.ConnectInstrumentation}});Object.defineProperty(cp,"ANONYMOUS_NAME",{enumerable:!0,get:function(){return QLe.ANONYMOUS_NAME}});var FX=LX();Object.defineProperty(cp,"AttributeNames",{enumerable:!0,get:function(){return FX.AttributeNames}});Object.defineProperty(cp,"ConnectNames",{enumerable:!0,get:function(){return FX.ConnectNames}});Object.defineProperty(cp,"ConnectTypes",{enumerable:!0,get:function(){return FX.ConnectTypes}})});var GLe,jLe,zLe,lBt,HLe,$Le=w(()=>{m();GLe=ue(FLe(),1);_r();jLe="Connect",zLe=ut(jLe,()=>new GLe.ConnectInstrumentation),lBt=(()=>({name:jLe,setupOnce(){zLe()}})),HLe=lBt});var qLe=P(ca=>{"use strict";m();Object.defineProperty(ca,"__esModule",{value:!0});ca.DB_SYSTEM_VALUE_MSSQL=ca.ATTR_NET_PEER_PORT=ca.ATTR_NET_PEER_NAME=ca.ATTR_DB_USER=ca.ATTR_DB_SYSTEM=ca.ATTR_DB_STATEMENT=ca.ATTR_DB_SQL_TABLE=ca.ATTR_DB_NAME=void 0;ca.ATTR_DB_NAME="db.name";ca.ATTR_DB_SQL_TABLE="db.sql.table";ca.ATTR_DB_STATEMENT="db.statement";ca.ATTR_DB_SYSTEM="db.system";ca.ATTR_DB_USER="db.user";ca.ATTR_NET_PEER_NAME="net.peer.name";ca.ATTR_NET_PEER_PORT="net.peer.port";ca.DB_SYSTEM_VALUE_MSSQL="mssql"});var VLe=P(jR=>{"use strict";m();Object.defineProperty(jR,"__esModule",{value:!0});jR.once=jR.getSpanName=void 0;function dBt(e,t,n,r){return e==="execBulkLoad"&&r&&t?`${e} ${r} ${t}`:e==="callProcedure"?t?`${e} ${n} ${t}`:`${e} ${n}`:t?`${e} ${t}`:`${e}`}jR.getSpanName=dBt;var pBt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};jR.once=pBt});var YLe=P(zR=>{"use strict";m();Object.defineProperty(zR,"__esModule",{value:!0});zR.PACKAGE_NAME=zR.PACKAGE_VERSION=void 0;zR.PACKAGE_VERSION="0.33.0";zR.PACKAGE_NAME="@opentelemetry/instrumentation-tedious"});var XLe=P(kE=>{"use strict";m();Object.defineProperty(kE,"__esModule",{value:!0});kE.TediousInstrumentation=kE.INJECTED_CTX=void 0;var HR=(ze(),Le(nt)),fBt=Qe("events"),rA=sn(),nT=(Xn(),Le(Gr)),OE=qLe(),KLe=VLe(),JLe=YLe(),WLe=Symbol("opentelemetry.instrumentation-tedious.current-database");kE.INJECTED_CTX=Symbol("opentelemetry.instrumentation-tedious.context-info-injected");var ZLe=["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"];function J6(e){Object.defineProperty(this,WLe,{value:e,writable:!0})}var GX=class e extends rA.InstrumentationBase{static COMPONENT="tedious";_netSemconvStability;_dbSemconvStability;constructor(t={}){super(JLe.PACKAGE_NAME,JLe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,rA.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,rA.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new rA.InstrumentationNodeModuleDefinition(e.COMPONENT,[">=1.11.0 <20"],t=>{let n=t.Connection.prototype;for(let r of ZLe)(0,rA.isWrapped)(n[r])&&this._unwrap(n,r),this._wrap(n,r,this._patchQuery(r,t));return(0,rA.isWrapped)(n.connect)&&this._unwrap(n,"connect"),this._wrap(n,"connect",this._patchConnect),t},t=>{if(t===void 0)return;let n=t.Connection.prototype;for(let r of ZLe)this._unwrap(n,r);this._unwrap(n,"connect")})]}_patchConnect(t){return function(){return J6.call(this,this.config?.options?.database),this.removeListener("databaseChange",J6),this.on("databaseChange",J6),this.once("end",()=>{this.removeListener("databaseChange",J6)}),t.apply(this,arguments)}}_buildTraceparent(t){let n=t.spanContext();return`00-${n.traceId}-${n.spanId}-0${Number(n.traceFlags||HR.TraceFlags.NONE).toString(16)}`}_injectContextInfo(t,n,r){return new Promise(o=>{try{let i="set context_info @opentelemetry_traceparent",s=new n.Request(i,l=>{o()});Object.defineProperty(s,kE.INJECTED_CTX,{value:!0});let u=Buffer.from(r,"utf8");s.addParameter("opentelemetry_traceparent",n.TYPES.VarBinary,u,{length:u.length}),t.execSql(s)}catch{o()}})}_shouldInjectFor(t){return t==="execSql"||t==="execSqlBatch"||t==="callProcedure"||t==="execute"}_patchQuery(t,n){return r=>{let o=this;function i(s){if(s?.[kE.INJECTED_CTX])return r.apply(this,arguments);if(!(s instanceof fBt.EventEmitter))return o._diag.warn(`Unexpected invocation of patched ${t} method. Span not recorded`),r.apply(this,arguments);let u=0,l=0,p=()=>l++,h=()=>u++,y=this[WLe],S=(G=>G.sqlTextOrProcedure==="sp_prepare"&&G.parametersByName?.stmt?.value?G.parametersByName.stmt.value:G.sqlTextOrProcedure)(s),T={};o._dbSemconvStability&rA.SemconvStability.OLD&&(T[OE.ATTR_DB_SYSTEM]=OE.DB_SYSTEM_VALUE_MSSQL,T[OE.ATTR_DB_NAME]=y,T[OE.ATTR_DB_USER]=this.config?.userName??this.config?.authentication?.options?.userName,T[OE.ATTR_DB_STATEMENT]=S,T[OE.ATTR_DB_SQL_TABLE]=s.table),o._dbSemconvStability&rA.SemconvStability.STABLE&&(T[nT.ATTR_DB_NAMESPACE]=y,T[nT.ATTR_DB_SYSTEM_NAME]=nT.DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER,T[nT.ATTR_DB_QUERY_TEXT]=S,T[nT.ATTR_DB_COLLECTION_NAME]=s.table),o._netSemconvStability&rA.SemconvStability.OLD&&(T[OE.ATTR_NET_PEER_NAME]=this.config?.server,T[OE.ATTR_NET_PEER_PORT]=this.config?.options?.port),o._netSemconvStability&rA.SemconvStability.STABLE&&(T[nT.ATTR_SERVER_ADDRESS]=this.config?.server,T[nT.ATTR_SERVER_PORT]=this.config?.options?.port);let v=o.tracer.startSpan((0,KLe.getSpanName)(t,y,S,s.table),{kind:HR.SpanKind.CLIENT,attributes:T}),R=(0,KLe.once)(G=>{s.removeListener("done",p),s.removeListener("doneInProc",p),s.removeListener("doneProc",h),s.removeListener("error",R),this.removeListener("end",R),v.setAttribute("tedious.procedure_count",u),v.setAttribute("tedious.statement_count",l),G&&v.setStatus({code:HR.SpanStatusCode.ERROR,message:G.message}),v.end()});s.on("done",p),s.on("doneInProc",p),s.on("doneProc",h),s.once("error",R),this.on("end",R),typeof s.callback=="function"?o._wrap(s,"callback",o._patchCallbackQuery(R)):o._diag.error("Expected request.callback to be a function");let x=()=>HR.context.with(HR.trace.setSpan(HR.context.active(),v),r,this,...arguments);if(!(o.getConfig().enableTraceContextPropagation&&o._shouldInjectFor(t)))return x();let j=o._buildTraceparent(v);o._injectContextInfo(this,n,j).finally(x)}return Object.defineProperty(i,"length",{value:r.length,writable:!1}),i}}_patchCallbackQuery(t){return n=>function(r,o,i){return t(r),n.apply(this,arguments)}}};kE.TediousInstrumentation=GX});var eUe=P(Z6=>{"use strict";m();Object.defineProperty(Z6,"__esModule",{value:!0});Z6.TediousInstrumentation=void 0;var mBt=XLe();Object.defineProperty(Z6,"TediousInstrumentation",{enumerable:!0,get:function(){return mBt.TediousInstrumentation}})});var tUe,ABt,nUe,rUe,gBt,oUe,iUe=w(()=>{m();tUe=ue(eUe(),1);mt();_r();ABt=new Set(["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"]),nUe="Tedious",rUe=ut(nUe,()=>new tUe.TediousInstrumentation({})),gBt=(()=>{let e;return{name:nUe,setupOnce(){let t=rUe();e=mw(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let{description:r,data:o}=kt(n);if(!r||o["db.system"]!=="mssql")return;let i=r.split(" ")[0]||"";ABt.has(i)&&n.setAttribute(Pt,"auto.db.otel.tedious")}))}}}),oUe=gBt});var sUe=P($R=>{"use strict";m();Object.defineProperty($R,"__esModule",{value:!0});$R.PACKAGE_NAME=$R.PACKAGE_VERSION=void 0;$R.PACKAGE_VERSION="0.57.0";$R.PACKAGE_NAME="@opentelemetry/instrumentation-generic-pool"});var uUe=P(W6=>{"use strict";m();Object.defineProperty(W6,"__esModule",{value:!0});W6.GenericPoolInstrumentation=void 0;var qR=(ze(),Le(nt)),rT=sn(),aUe=sUe(),jX="generic-pool",zX=class extends rT.InstrumentationBase{_isDisabled=!1;constructor(t={}){super(aUe.PACKAGE_NAME,aUe.PACKAGE_VERSION,t)}init(){return[new rT.InstrumentationNodeModuleDefinition(jX,[">=3.0.0 <4"],t=>{let n=t.Pool;return(0,rT.isWrapped)(n.prototype.acquire)&&this._unwrap(n.prototype,"acquire"),this._wrap(n.prototype,"acquire",this._acquirePatcher.bind(this)),t},t=>{let n=t.Pool;return this._unwrap(n.prototype,"acquire"),t}),new rT.InstrumentationNodeModuleDefinition(jX,[">=2.4.0 <3"],t=>{let n=t.Pool;return(0,rT.isWrapped)(n.prototype.acquire)&&this._unwrap(n.prototype,"acquire"),this._wrap(n.prototype,"acquire",this._acquireWithCallbacksPatcher.bind(this)),t},t=>{let n=t.Pool;return this._unwrap(n.prototype,"acquire"),t}),new rT.InstrumentationNodeModuleDefinition(jX,[">=2.0.0 <2.4"],t=>(this._isDisabled=!1,(0,rT.isWrapped)(t.Pool)&&this._unwrap(t,"Pool"),this._wrap(t,"Pool",this._poolWrapper.bind(this)),t),t=>(this._isDisabled=!0,t))]}_acquirePatcher(t){let n=this;return function(...o){let i=qR.context.active(),s=n.tracer.startSpan("generic-pool.acquire",{},i);return qR.context.with(qR.trace.setSpan(i,s),()=>t.call(this,...o).then(u=>(s.end(),u),u=>{throw s.recordException(u),s.end(),u}))}}_poolWrapper(t){let n=this;return function(){let o=t.apply(this,arguments);return n._wrap(o,"acquire",n._acquireWithCallbacksPatcher.bind(n)),o}}_acquireWithCallbacksPatcher(t){let n=this;return function(o,i){if(n._isDisabled)return t.call(this,o,i);let s=qR.context.active(),u=n.tracer.startSpan("generic-pool.acquire",{},s);return qR.context.with(qR.trace.setSpan(s,u),()=>{t.call(this,(l,p)=>{if(u.end(),o)return o(l,p)},i)})}}};W6.GenericPoolInstrumentation=zX});var cUe=P(X6=>{"use strict";m();Object.defineProperty(X6,"__esModule",{value:!0});X6.GenericPoolInstrumentation=void 0;var hBt=uUe();Object.defineProperty(X6,"GenericPoolInstrumentation",{enumerable:!0,get:function(){return hBt.GenericPoolInstrumentation}})});var lUe,dUe,pUe,_Bt,fUe,mUe=w(()=>{m();lUe=ue(cUe(),1);mt();_r();dUe="GenericPool",pUe=ut(dUe,()=>new lUe.GenericPoolInstrumentation({})),_Bt=(()=>{let e;return{name:dUe,setupOnce(){let t=pUe();e=mw(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let o=kt(n).description;(o==="generic-pool.aquire"||o==="generic-pool.acquire")&&n.setAttribute(Pt,"auto.db.otel.generic_pool")}))}}}),fUe=_Bt});var HX=P(oA=>{"use strict";m();Object.defineProperty(oA,"__esModule",{value:!0});oA.ATTR_NET_PEER_PORT=oA.ATTR_NET_PEER_NAME=oA.ATTR_MESSAGING_SYSTEM=oA.ATTR_MESSAGING_OPERATION=void 0;oA.ATTR_MESSAGING_OPERATION="messaging.operation";oA.ATTR_MESSAGING_SYSTEM="messaging.system";oA.ATTR_NET_PEER_NAME="net.peer.name";oA.ATTR_NET_PEER_PORT="net.peer.port"});var $X=P(yi=>{"use strict";m();Object.defineProperty(yi,"__esModule",{value:!0});yi.ATTR_MESSAGING_CONVERSATION_ID=yi.OLD_ATTR_MESSAGING_MESSAGE_ID=yi.MESSAGING_DESTINATION_KIND_VALUE_TOPIC=yi.ATTR_MESSAGING_URL=yi.ATTR_MESSAGING_PROTOCOL_VERSION=yi.ATTR_MESSAGING_PROTOCOL=yi.MESSAGING_OPERATION_VALUE_PROCESS=yi.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY=yi.ATTR_MESSAGING_DESTINATION_KIND=yi.ATTR_MESSAGING_DESTINATION=void 0;yi.ATTR_MESSAGING_DESTINATION="messaging.destination";yi.ATTR_MESSAGING_DESTINATION_KIND="messaging.destination_kind";yi.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY="messaging.rabbitmq.routing_key";yi.MESSAGING_OPERATION_VALUE_PROCESS="process";yi.ATTR_MESSAGING_PROTOCOL="messaging.protocol";yi.ATTR_MESSAGING_PROTOCOL_VERSION="messaging.protocol_version";yi.ATTR_MESSAGING_URL="messaging.url";yi.MESSAGING_DESTINATION_KIND_VALUE_TOPIC="topic";yi.OLD_ATTR_MESSAGING_MESSAGE_ID="messaging.message_id";yi.ATTR_MESSAGING_CONVERSATION_ID="messaging.conversation_id"});var qX=P(oT=>{"use strict";m();Object.defineProperty(oT,"__esModule",{value:!0});oT.DEFAULT_CONFIG=oT.EndOperation=void 0;var EBt;(function(e){e.AutoAck="auto ack",e.Ack="ack",e.AckAll="ackAll",e.Reject="reject",e.Nack="nack",e.NackAll="nackAll",e.ChannelClosed="channel closed",e.ChannelError="channel error",e.InstrumentationTimeout="instrumentation timeout"})(EBt=oT.EndOperation||(oT.EndOperation={}));oT.DEFAULT_CONFIG={consumeTimeoutMs:1e3*60,useLinksForConsume:!1}});var _Ue=P(Si=>{"use strict";m();Object.defineProperty(Si,"__esModule",{value:!0});Si.isConfirmChannelTracing=Si.unmarkConfirmChannelTracing=Si.markConfirmChannelTracing=Si.getConnectionAttributesFromUrl=Si.getConnectionAttributesFromServer=Si.normalizeExchange=Si.CONNECTION_ATTRIBUTES=Si.CHANNEL_CONSUME_TIMEOUT_TIMER=Si.CHANNEL_SPANS_NOT_ENDED=Si.MESSAGE_STORED_SPAN=void 0;var VX=(ze(),Le(nt)),PE=sn(),eG=(Xn(),Le(Gr)),wO=HX(),tG=$X();Si.MESSAGE_STORED_SPAN=Symbol("opentelemetry.amqplib.message.stored-span");Si.CHANNEL_SPANS_NOT_ENDED=Symbol("opentelemetry.amqplib.channel.spans-not-ended");Si.CHANNEL_CONSUME_TIMEOUT_TIMER=Symbol("opentelemetry.amqplib.channel.consumer-timeout-timer");Si.CONNECTION_ATTRIBUTES=Symbol("opentelemetry.amqplib.connection.attributes");var YX=(0,VX.createContextKey)("opentelemetry.amqplib.channel.is-confirm-channel"),yBt=e=>e!==""?e:"<default>";Si.normalizeExchange=yBt;var SBt=e=>e.replace(/:[^:@/]*@/,":***@"),AUe=(e,t)=>e||(t==="AMQP"?5672:5671),gUe=e=>{let t=e||"amqp";return(t.endsWith(":")?t.substring(0,t.length-1):t).toUpperCase()},hUe=e=>e||"localhost",iA=(e,t,n,r)=>n?{[t]:n}:(VX.diag.error(`amqplib instrumentation: could not extract connection attribute ${r} from user supplied url`,{url:e}),{}),TBt=e=>{let t=e.serverProperties.product?.toLowerCase?.();return t?{[wO.ATTR_MESSAGING_SYSTEM]:t}:{}};Si.getConnectionAttributesFromServer=TBt;var bBt=(e,t)=>{let n={[tG.ATTR_MESSAGING_PROTOCOL_VERSION]:"0.9.1"};if(e=e||"amqp://localhost",typeof e=="object"){let r=e,o=gUe(r?.protocol);Object.assign(n,{...iA(e,tG.ATTR_MESSAGING_PROTOCOL,o,"protocol")});let i=hUe(r?.hostname);t&PE.SemconvStability.OLD&&Object.assign(n,{...iA(e,wO.ATTR_NET_PEER_NAME,i,"hostname")}),t&PE.SemconvStability.STABLE&&Object.assign(n,{...iA(e,eG.ATTR_SERVER_ADDRESS,i,"hostname")});let s=AUe(r.port,o);t&PE.SemconvStability.OLD&&Object.assign(n,iA(e,wO.ATTR_NET_PEER_PORT,s,"port")),t&PE.SemconvStability.STABLE&&Object.assign(n,iA(e,eG.ATTR_SERVER_PORT,s,"port"))}else{let r=SBt(e);n[tG.ATTR_MESSAGING_URL]=r;try{let o=new URL(r),i=gUe(o.protocol);Object.assign(n,{...iA(r,tG.ATTR_MESSAGING_PROTOCOL,i,"protocol")});let s=hUe(o.hostname);t&PE.SemconvStability.OLD&&Object.assign(n,{...iA(r,wO.ATTR_NET_PEER_NAME,s,"hostname")}),t&PE.SemconvStability.STABLE&&Object.assign(n,{...iA(r,eG.ATTR_SERVER_ADDRESS,s,"hostname")});let u=AUe(o.port?parseInt(o.port):void 0,i);t&PE.SemconvStability.OLD&&Object.assign(n,iA(r,wO.ATTR_NET_PEER_PORT,u,"port")),t&PE.SemconvStability.STABLE&&Object.assign(n,iA(r,eG.ATTR_SERVER_PORT,u,"port"))}catch(o){VX.diag.error("amqplib instrumentation: error while extracting connection details from connection url",{censoredUrl:r,err:o})}}return n};Si.getConnectionAttributesFromUrl=bBt;var IBt=e=>e.setValue(YX,!0);Si.markConfirmChannelTracing=IBt;var CBt=e=>e.deleteValue(YX);Si.unmarkConfirmChannelTracing=CBt;var vBt=e=>e.getValue(YX)===!0;Si.isConfirmChannelTracing=vBt});var EUe=P(VR=>{"use strict";m();Object.defineProperty(VR,"__esModule",{value:!0});VR.PACKAGE_NAME=VR.PACKAGE_VERSION=void 0;VR.PACKAGE_VERSION="0.61.0";VR.PACKAGE_NAME="@opentelemetry/instrumentation-amqplib"});var SUe=P(oG=>{"use strict";m();Object.defineProperty(oG,"__esModule",{value:!0});oG.AmqplibInstrumentation=void 0;var ni=(ze(),Le(nt)),nG=Cr(),Rr=sn(),RBt=HX(),Xl=$X(),oc=qX(),Ti=_Ue(),yUe=EUe(),rG=[">=0.5.5 <1"],KX=class extends Rr.InstrumentationBase{_netSemconvStability;constructor(t={}){super(yUe.PACKAGE_NAME,yUe.PACKAGE_VERSION,{...oc.DEFAULT_CONFIG,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Rr.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...oc.DEFAULT_CONFIG,...t})}init(){let t=new Rr.InstrumentationNodeModuleFile("amqplib/lib/channel_model.js",rG,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),n=new Rr.InstrumentationNodeModuleFile("amqplib/lib/callback_model.js",rG,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),r=new Rr.InstrumentationNodeModuleFile("amqplib/lib/connect.js",rG,this.patchConnect.bind(this),this.unpatchConnect.bind(this));return new Rr.InstrumentationNodeModuleDefinition("amqplib",rG,void 0,void 0,[t,r,n])}patchConnect(t){return t=this.unpatchConnect(t),(0,Rr.isWrapped)(t.connect)||this._wrap(t,"connect",this.getConnectPatch.bind(this)),t}unpatchConnect(t){return(0,Rr.isWrapped)(t.connect)&&this._unwrap(t,"connect"),t}patchChannelModel(t,n){return(0,Rr.isWrapped)(t.Channel.prototype.publish)||this._wrap(t.Channel.prototype,"publish",this.getPublishPatch.bind(this,n)),(0,Rr.isWrapped)(t.Channel.prototype.consume)||this._wrap(t.Channel.prototype,"consume",this.getConsumePatch.bind(this,n)),(0,Rr.isWrapped)(t.Channel.prototype.ack)||this._wrap(t.Channel.prototype,"ack",this.getAckPatch.bind(this,!1,oc.EndOperation.Ack)),(0,Rr.isWrapped)(t.Channel.prototype.nack)||this._wrap(t.Channel.prototype,"nack",this.getAckPatch.bind(this,!0,oc.EndOperation.Nack)),(0,Rr.isWrapped)(t.Channel.prototype.reject)||this._wrap(t.Channel.prototype,"reject",this.getAckPatch.bind(this,!0,oc.EndOperation.Reject)),(0,Rr.isWrapped)(t.Channel.prototype.ackAll)||this._wrap(t.Channel.prototype,"ackAll",this.getAckAllPatch.bind(this,!1,oc.EndOperation.AckAll)),(0,Rr.isWrapped)(t.Channel.prototype.nackAll)||this._wrap(t.Channel.prototype,"nackAll",this.getAckAllPatch.bind(this,!0,oc.EndOperation.NackAll)),(0,Rr.isWrapped)(t.Channel.prototype.emit)||this._wrap(t.Channel.prototype,"emit",this.getChannelEmitPatch.bind(this)),(0,Rr.isWrapped)(t.ConfirmChannel.prototype.publish)||this._wrap(t.ConfirmChannel.prototype,"publish",this.getConfirmedPublishPatch.bind(this,n)),t}unpatchChannelModel(t){return(0,Rr.isWrapped)(t.Channel.prototype.publish)&&this._unwrap(t.Channel.prototype,"publish"),(0,Rr.isWrapped)(t.Channel.prototype.consume)&&this._unwrap(t.Channel.prototype,"consume"),(0,Rr.isWrapped)(t.Channel.prototype.ack)&&this._unwrap(t.Channel.prototype,"ack"),(0,Rr.isWrapped)(t.Channel.prototype.nack)&&this._unwrap(t.Channel.prototype,"nack"),(0,Rr.isWrapped)(t.Channel.prototype.reject)&&this._unwrap(t.Channel.prototype,"reject"),(0,Rr.isWrapped)(t.Channel.prototype.ackAll)&&this._unwrap(t.Channel.prototype,"ackAll"),(0,Rr.isWrapped)(t.Channel.prototype.nackAll)&&this._unwrap(t.Channel.prototype,"nackAll"),(0,Rr.isWrapped)(t.Channel.prototype.emit)&&this._unwrap(t.Channel.prototype,"emit"),(0,Rr.isWrapped)(t.ConfirmChannel.prototype.publish)&&this._unwrap(t.ConfirmChannel.prototype,"publish"),t}getConnectPatch(t){let n=this;return function(o,i,s){return t.call(this,o,i,function(u,l){if(u==null){let p=(0,Ti.getConnectionAttributesFromUrl)(o,n._netSemconvStability),h=(0,Ti.getConnectionAttributesFromServer)(l);l[Ti.CONNECTION_ATTRIBUTES]={...p,...h}}s.apply(this,arguments)})}}getChannelEmitPatch(t){let n=this;return function(o){if(o==="close"){n.endAllSpansOnChannel(this,!0,oc.EndOperation.ChannelClosed,void 0);let i=this[Ti.CHANNEL_CONSUME_TIMEOUT_TIMER];i&&clearInterval(i),this[Ti.CHANNEL_CONSUME_TIMEOUT_TIMER]=void 0}else o==="error"&&n.endAllSpansOnChannel(this,!0,oc.EndOperation.ChannelError,void 0);return t.apply(this,arguments)}}getAckAllPatch(t,n,r){let o=this;return function(s){return o.endAllSpansOnChannel(this,t,n,s),r.apply(this,arguments)}}getAckPatch(t,n,r){let o=this;return function(s,u,l){let p=this,h=n===oc.EndOperation.Reject?u:l,y=p[Ti.CHANNEL_SPANS_NOT_ENDED]??[],S=y.findIndex(T=>T.msg===s);if(S<0)o.endConsumerSpan(s,t,n,h);else if(n!==oc.EndOperation.Reject&&u){for(let T=0;T<=S;T++)o.endConsumerSpan(y[T].msg,t,n,h);y.splice(0,S+1)}else o.endConsumerSpan(s,t,n,h),y.splice(S,1);return r.apply(this,arguments)}}getConsumePatch(t,n){let r=this;return function(i,s,u){let l=this;if(!Object.prototype.hasOwnProperty.call(l,Ti.CHANNEL_SPANS_NOT_ENDED)){let{consumeTimeoutMs:h}=r.getConfig();if(h){let y=setInterval(()=>{r.checkConsumeTimeoutOnChannel(l)},h);y.unref(),l[Ti.CHANNEL_CONSUME_TIMEOUT_TIMER]=y}l[Ti.CHANNEL_SPANS_NOT_ENDED]=[]}let p=function(h){if(!h)return s.call(this,h);let y=h.properties.headers??{},S=ni.propagation.extract(ni.ROOT_CONTEXT,y),T=h.fields?.exchange,v;if(r._config.useLinksForConsume){let M=S?ni.trace.getSpan(S)?.spanContext():void 0;S=void 0,M&&(v=[{context:M}])}let R=r.tracer.startSpan(`${i} process`,{kind:ni.SpanKind.CONSUMER,attributes:{...l?.connection?.[Ti.CONNECTION_ATTRIBUTES],[Xl.ATTR_MESSAGING_DESTINATION]:T,[Xl.ATTR_MESSAGING_DESTINATION_KIND]:Xl.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[Xl.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:h.fields?.routingKey,[RBt.ATTR_MESSAGING_OPERATION]:Xl.MESSAGING_OPERATION_VALUE_PROCESS,[Xl.OLD_ATTR_MESSAGING_MESSAGE_ID]:h?.properties.messageId,[Xl.ATTR_MESSAGING_CONVERSATION_ID]:h?.properties.correlationId},links:v},S),{consumeHook:x}=r.getConfig();x&&(0,Rr.safeExecuteInTheMiddle)(()=>x(R,{moduleVersion:t,msg:h}),M=>{M&&ni.diag.error("amqplib instrumentation: consumerHook error",M)},!0),u?.noAck||(l[Ti.CHANNEL_SPANS_NOT_ENDED].push({msg:h,timeOfConsume:(0,nG.hrTime)()}),h[Ti.MESSAGE_STORED_SPAN]=R);let O=S||ni.ROOT_CONTEXT;ni.context.with(ni.trace.setSpan(O,R),()=>{s.call(this,h)}),u?.noAck&&(r.callConsumeEndHook(R,h,!1,oc.EndOperation.AutoAck),R.end())};return arguments[1]=p,n.apply(this,arguments)}}getConfirmedPublishPatch(t,n){let r=this;return function(i,s,u,l,p){let h=this,{span:y,modifiedOptions:S}=r.createPublishSpan(r,i,s,h,l),{publishHook:T}=r.getConfig();T&&(0,Rr.safeExecuteInTheMiddle)(()=>T(y,{moduleVersion:t,exchange:i,routingKey:s,content:u,options:S,isConfirmChannel:!0}),O=>{O&&ni.diag.error("amqplib instrumentation: publishHook error",O)},!0);let v=function(O,M){try{p?.call(this,O,M)}finally{let{publishConfirmHook:j}=r.getConfig();j&&(0,Rr.safeExecuteInTheMiddle)(()=>j(y,{moduleVersion:t,exchange:i,routingKey:s,content:u,options:l,isConfirmChannel:!0,confirmError:O}),G=>{G&&ni.diag.error("amqplib instrumentation: publishConfirmHook error",G)},!0),O&&y.setStatus({code:ni.SpanStatusCode.ERROR,message:"message confirmation has been nack'ed"}),y.end()}},R=(0,Ti.markConfirmChannelTracing)(ni.context.active()),x=[...arguments];return x[3]=S,x[4]=ni.context.bind((0,Ti.unmarkConfirmChannelTracing)(ni.trace.setSpan(R,y)),v),ni.context.with(R,n.bind(this,...x))}}getPublishPatch(t,n){let r=this;return function(i,s,u,l){if((0,Ti.isConfirmChannelTracing)(ni.context.active()))return n.apply(this,arguments);{let p=this,{span:h,modifiedOptions:y}=r.createPublishSpan(r,i,s,p,l),{publishHook:S}=r.getConfig();S&&(0,Rr.safeExecuteInTheMiddle)(()=>S(h,{moduleVersion:t,exchange:i,routingKey:s,content:u,options:y,isConfirmChannel:!1}),R=>{R&&ni.diag.error("amqplib instrumentation: publishHook error",R)},!0);let T=[...arguments];T[3]=y;let v=n.apply(this,T);return h.end(),v}}}createPublishSpan(t,n,r,o,i){let s=(0,Ti.normalizeExchange)(n),u=t.tracer.startSpan(`publish ${s}`,{kind:ni.SpanKind.PRODUCER,attributes:{...o.connection[Ti.CONNECTION_ATTRIBUTES],[Xl.ATTR_MESSAGING_DESTINATION]:n,[Xl.ATTR_MESSAGING_DESTINATION_KIND]:Xl.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[Xl.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:r,[Xl.OLD_ATTR_MESSAGING_MESSAGE_ID]:i?.messageId,[Xl.ATTR_MESSAGING_CONVERSATION_ID]:i?.correlationId}}),l=i??{};return l.headers=l.headers??{},ni.propagation.inject(ni.trace.setSpan(ni.context.active(),u),l.headers),{span:u,modifiedOptions:l}}endConsumerSpan(t,n,r,o){let i=t[Ti.MESSAGE_STORED_SPAN];i&&(n!==!1&&i.setStatus({code:ni.SpanStatusCode.ERROR,message:r!==oc.EndOperation.ChannelClosed&&r!==oc.EndOperation.ChannelError?`${r} called on message${o===!0?" with requeue":o===!1?" without requeue":""}`:r}),this.callConsumeEndHook(i,t,n,r),i.end(),t[Ti.MESSAGE_STORED_SPAN]=void 0)}endAllSpansOnChannel(t,n,r,o){(t[Ti.CHANNEL_SPANS_NOT_ENDED]??[]).forEach(s=>{this.endConsumerSpan(s.msg,n,r,o)}),t[Ti.CHANNEL_SPANS_NOT_ENDED]=[]}callConsumeEndHook(t,n,r,o){let{consumeEndHook:i}=this.getConfig();i&&(0,Rr.safeExecuteInTheMiddle)(()=>i(t,{msg:n,rejected:r,endOperation:o}),s=>{s&&ni.diag.error("amqplib instrumentation: consumerEndHook error",s)},!0)}checkConsumeTimeoutOnChannel(t){let n=(0,nG.hrTime)(),r=t[Ti.CHANNEL_SPANS_NOT_ENDED]??[],o,{consumeTimeoutMs:i}=this.getConfig();for(o=0;o<r.length;o++){let s=r[o],u=(0,nG.hrTimeDuration)(s.timeOfConsume,n);if((0,nG.hrTimeToMilliseconds)(u)<i)break;this.endConsumerSpan(s.msg,null,oc.EndOperation.InstrumentationTimeout,!0)}r.splice(0,o)}};oG.AmqplibInstrumentation=KX});var bUe=P(ME=>{"use strict";m();Object.defineProperty(ME,"__esModule",{value:!0});ME.EndOperation=ME.DEFAULT_CONFIG=ME.AmqplibInstrumentation=void 0;var xBt=SUe();Object.defineProperty(ME,"AmqplibInstrumentation",{enumerable:!0,get:function(){return xBt.AmqplibInstrumentation}});var TUe=qX();Object.defineProperty(ME,"DEFAULT_CONFIG",{enumerable:!0,get:function(){return TUe.DEFAULT_CONFIG}});Object.defineProperty(ME,"EndOperation",{enumerable:!0,get:function(){return TUe.EndOperation}})});var IUe,CUe,DBt,vUe,NBt,RUe,xUe=w(()=>{m();IUe=ue(bUe(),1);_r();CUe="Amqplib",DBt={consumeEndHook:e=>{zr(e,"auto.amqplib.otel.consumer")},publishHook:e=>{zr(e,"auto.amqplib.otel.publisher")}},vUe=ut(CUe,()=>new IUe.AmqplibInstrumentation(DBt)),NBt=(()=>({name:CUe,setupOnce(){vUe()}})),RUe=NBt});var OO,JX=w(()=>{m();OO="VercelAI"});function wBt(e){if(typeof e!="object"||e===null)return!1;let t=e;return"type"in t&&"error"in t&&"toolName"in t&&"toolCallId"in t&&t.type==="tool-error"&&t.error instanceof Error}function OBt(e){if(typeof e!="object"||e===null||!("content"in e))return;let t=e;Array.isArray(t.content)&&(kBt(t.content),PBt(t.content))}function kBt(e){for(let t of e){if(!wBt(t))continue;let n=vK(t.toolCallId);n?Gl(r=>{r.setContext("trace",{trace_id:n.traceId,span_id:n.spanId}),r.setTag("vercel.ai.tool.name",t.toolName),r.setTag("vercel.ai.tool.callId",t.toolCallId),r.setLevel("error"),nn(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})}):Gl(r=>{r.setTag("vercel.ai.tool.name",t.toolName),r.setTag("vercel.ai.tool.callId",t.toolCallId),r.setLevel("error"),nn(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})})}}function PBt(e){for(let t of e)typeof t=="object"&&t!==null&&"toolCallId"in t&&typeof t.toolCallId=="string"&&RK(t.toolCallId)}function MBt(e,t,n,r){let o=e?.recordInputs!==void 0?e.recordInputs:t.recordInputs!==void 0?t.recordInputs:n===!0?!0:r,i=e?.recordOutputs!==void 0?e.recordOutputs:t.recordOutputs!==void 0?t.recordOutputs:n===!0?!0:r;return{recordInputs:o,recordOutputs:i}}var sG,BBt,DUe,iG,NUe=w(()=>{m();sG=ue(sn(),1);mt();JX();BBt=[">=3.0.0 <7"],DUe=["generateText","streamText","generateObject","streamObject","embed","embedMany","rerank"];iG=class e extends sG.InstrumentationBase{__init(){this._isPatched=!1}__init2(){this._callbacks=[]}constructor(t={}){super("@sentry/instrumentation-vercel-ai",er,t),e.prototype.__init.call(this),e.prototype.__init2.call(this)}init(){return new sG.InstrumentationNodeModuleDefinition("ai",BBt,this._patch.bind(this))}callWhenPatched(t){this._isPatched?t():this._callbacks.push(t)}_patch(t){this._isPatched=!0,this._callbacks.forEach(r=>r()),this._callbacks=[];let n=r=>new Proxy(r,{apply:(o,i,s)=>{let u=s[0].experimental_telemetry||{},l=u.isEnabled,p=_t(),h=p?.getIntegrationByName(OO),y=h?.options,S=h?!!p?.getOptions().sendDefaultPii:!1,{recordInputs:T,recordOutputs:v}=MBt(y,u,l,S);return s[0].experimental_telemetry={...u,isEnabled:l!==void 0?l:!0,recordInputs:T,recordOutputs:v},yf(()=>Reflect.apply(o,i,s),R=>{R&&typeof R=="object"&&ns(R,"_sentry_active_span",jc())},()=>{},R=>{OBt(R)})}});if(Object.prototype.toString.call(t)==="[object Module]"){for(let r of DUe)t[r]!=null&&(t[r]=n(t[r]));return t}else{let r=DUe.reduce((o,i)=>(t[i]!=null&&(o[i]=n(t[i])),o),{});return{...t,...r}}}}});function LBt(e){return!!e.getIntegrationByName("Modules")?.getModules?.()?.ai}var BUe,UBt,wUe,OUe=w(()=>{m();mt();_r();JX();NUe();BUe=ut(OO,()=>new iG({}));UBt=((e={})=>{let t;return{name:OO,options:e,setupOnce(){t=BUe()},afterAllSetup(n){e.force??LBt(n)?dF(n):t?.callWhenPatched(()=>dF(n))}}}),wUe=UBt});var uG,QBt,aG,kUe=w(()=>{m();uG=ue(sn(),1);mt();QBt=[">=4.0.0 <7"],aG=class extends uG.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-openai",er,t)}init(){return new uG.InstrumentationNodeModuleDefinition("openai",QBt,this._patch.bind(this))}_patch(t){let n=t;return n=this._patchClient(n,"OpenAI"),n=this._patchClient(n,"AzureOpenAI"),n}_patchClient(t,n){let r=t[n];if(!r)return t;let o=this.getConfig(),i=function(...s){if(RS(sE))return Reflect.construct(r,s);let u=Reflect.construct(r,s);return mF(u,o)};Object.setPrototypeOf(i,r),Object.setPrototypeOf(i.prototype,r.prototype);for(let s of Object.getOwnPropertyNames(r))if(!["length","name","prototype"].includes(s)){let u=Object.getOwnPropertyDescriptor(r,s);u&&Object.defineProperty(i,s,u)}try{t[n]=i}catch{Object.defineProperty(t,n,{value:i,writable:!0,configurable:!0,enumerable:!0})}if(t.default===r)try{t.default=i}catch{Object.defineProperty(t,"default",{value:i,writable:!0,configurable:!0,enumerable:!0})}return t}}});var PUe,FBt,MUe,LUe=w(()=>{m();mt();_r();kUe();PUe=ut(sE,e=>new aG(e)),FBt=((e={})=>({name:sE,setupOnce(){PUe(e)}})),MUe=FBt});var lG,GBt,cG,UUe=w(()=>{m();lG=ue(sn(),1);mt();GBt=[">=0.19.2 <1.0.0"],cG=class extends lG.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-anthropic-ai",er,t)}init(){return new lG.InstrumentationNodeModuleDefinition("@anthropic-ai/sdk",GBt,this._patch.bind(this))}_patch(t){let n=t.Anthropic,r=this.getConfig(),o=function(...i){if(RS(aE))return Reflect.construct(n,i);let s=Reflect.construct(n,i);return AF(s,r)};Object.setPrototypeOf(o,n),Object.setPrototypeOf(o.prototype,n.prototype);for(let i of Object.getOwnPropertyNames(n))if(!["length","name","prototype"].includes(i)){let s=Object.getOwnPropertyDescriptor(n,i);s&&Object.defineProperty(o,i,s)}try{t.Anthropic=o}catch{Object.defineProperty(t,"Anthropic",{value:o,writable:!0,configurable:!0,enumerable:!0})}if(t.default===n)try{t.default=o}catch{Object.defineProperty(t,"default",{value:o,writable:!0,configurable:!0,enumerable:!0})}return t}}});var QUe,jBt,FUe,GUe=w(()=>{m();mt();_r();UUe();QUe=ut(aE,e=>new cG(e)),jBt=((e={})=>({name:aE,options:e,setupOnce(){QUe(e)}})),FUe=jBt});var YR,jUe,dG,zUe=w(()=>{m();YR=ue(sn(),1);mt();jUe=[">=0.10.0 <2"],dG=class extends YR.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-google-genai",er,t)}init(){return new YR.InstrumentationNodeModuleDefinition("@google/genai",jUe,n=>this._patch(n),n=>n,[new YR.InstrumentationNodeModuleFile("@google/genai/dist/node/index.cjs",jUe,n=>this._patch(n),n=>n)])}_patch(t){let n=t.GoogleGenAI,r=this.getConfig();if(typeof n!="function")return t;let o=function(...i){if(RS(uE))return Reflect.construct(n,i);let s=Reflect.construct(n,i);return gF(s,r)};Object.setPrototypeOf(o,n),Object.setPrototypeOf(o.prototype,n.prototype);for(let i of Object.getOwnPropertyNames(n))if(!["length","name","prototype"].includes(i)){let s=Object.getOwnPropertyDescriptor(n,i);s&&Object.defineProperty(o,i,s)}return pw(t,"GoogleGenAI",o),t}}});var HUe,zBt,$Ue,qUe=w(()=>{m();mt();_r();zUe();HUe=ut(uE,e=>new dG(e)),zBt=((e={})=>({name:uE,setupOnce(){HUe(e)}})),$Ue=zBt});function HBt(e,t){return e?Array.isArray(e)?e.includes(t)?e:[...e,t]:typeof e=="object"?[e,t]:e:[t]}function $Bt(e,t,n){return new Proxy(e,{apply(r,o,i){let u=i[1];(!u||typeof u!="object"||Array.isArray(u))&&(u={},i[1]=u);let l=u.callbacks,p=HBt(l,t);return u.callbacks=p,Reflect.apply(r,o,i)}})}var LE,pG,fG,VUe=w(()=>{m();LE=ue(sn(),1);mt();pG=[">=0.1.0 <2.0.0"];fG=class extends LE.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langchain",er,t)}init(){let t=[],n=["@langchain/anthropic","@langchain/openai","@langchain/google-genai","@langchain/mistralai","@langchain/google-vertexai","@langchain/groq"];for(let r of n)t.push(new LE.InstrumentationNodeModuleDefinition(r,pG,this._patch.bind(this),o=>o,[new LE.InstrumentationNodeModuleFile(`${r}/dist/index.cjs`,pG,this._patch.bind(this),o=>o)]));return t.push(new LE.InstrumentationNodeModuleDefinition("langchain",pG,this._patch.bind(this),r=>r,[new LE.InstrumentationNodeModuleFile("langchain/dist/chat_models/universal.cjs",pG,this._patch.bind(this),r=>r)])),t}_patch(t){zY([sE,aE,uE]);let n=yF(this.getConfig());return this._patchRunnableMethods(t,n),t}_patchRunnableMethods(t,n){let r=["ChatAnthropic","ChatOpenAI","ChatGoogleGenerativeAI","ChatMistralAI","ChatVertexAI","ChatGroq","ConfigurableModel"],o=t.universal_exports??t,i=Object.values(o).find(l=>typeof l=="function"&&r.includes(l.name));if(!i)return;let s=i.prototype;if(s.__sentry_patched__)return;s.__sentry_patched__=!0;let u=["invoke","stream","batch"];for(let l of u){let p=s[l];typeof p=="function"&&(s[l]=$Bt(p,n))}}}});var YUe,qBt,KUe,JUe=w(()=>{m();mt();_r();VUe();YUe=ut(hF,e=>new fG(e)),qBt=((e={})=>({name:hF,setupOnce(){YUe(e)}})),KUe=qBt});var KR,ZUe,mG,WUe=w(()=>{m();KR=ue(sn(),1);mt();ZUe=[">=0.0.0 <2.0.0"],mG=class extends KR.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langgraph",er,t)}init(){return new KR.InstrumentationNodeModuleDefinition("@langchain/langgraph",ZUe,this._patch.bind(this),n=>n,[new KR.InstrumentationNodeModuleFile("@langchain/langgraph/dist/index.cjs",ZUe,this._patch.bind(this),n=>n)])}_patch(t){return t.StateGraph&&typeof t.StateGraph=="function"&&TF(t.StateGraph.prototype,this.getConfig()),t}}});var XUe,VBt,eQe,tQe=w(()=>{m();mt();_r();WUe();XUe=ut(SF,e=>new mG(e)),VBt=((e={})=>({name:SF,setupOnce(){XUe(e)}})),eQe=VBt});import*as rQe from"node:net";function oQe(e,t,n,r,o){let s=()=>{},u=o.firestoreSpanCreationHook;typeof u=="function"&&(s=h=>{(0,eh.safeExecuteInTheMiddle)(()=>u(h),y=>{y&&Ul.error(y?.message)},!0)});let l=new eh.InstrumentationNodeModuleDefinition("@firebase/firestore",t,h=>nQe(h,n,r,e,s)),p=["@firebase/firestore/dist/lite/index.node.cjs.js","@firebase/firestore/dist/lite/index.node.mjs.js","@firebase/firestore/dist/lite/index.rn.esm2017.js","@firebase/firestore/dist/lite/index.cjs.js"];for(let h of p)l.files.push(new eh.InstrumentationNodeModuleFile(h,t,y=>nQe(y,n,r,e,s),y=>iQe(y,r)));return l}function nQe(e,t,n,r,o){return iQe(e,n),t(e,"addDoc",YBt(r,o)),t(e,"getDocs",JBt(r,o)),t(e,"setDoc",ZBt(r,o)),t(e,"deleteDoc",KBt(r,o)),e}function iQe(e,t){for(let n of["addDoc","getDocs","setDoc","deleteDoc"])(0,eh.isWrapped)(e[n])&&t(e,n);return e}function YBt(e,t){return function(r){return function(o,i){let s=gG(e,"addDoc",o);return t(s),AG(s,()=>r(o,i))}}}function KBt(e,t){return function(r){return function(o){let i=gG(e,"deleteDoc",o.parent||o);return t(i),AG(i,()=>r(o))}}}function JBt(e,t){return function(r){return function(o){let i=gG(e,"getDocs",o);return t(i),AG(i,()=>r(o))}}}function ZBt(e,t){return function(r){return function(o,i,s){let u=gG(e,"setDoc",o.parent||o);return t(u),AG(u,()=>typeof s<"u"?r(o,i,s):r(o,i))}}}function AG(e,t){return Xe.with(qt.setSpan(Xe.active(),e),()=>(0,eh.safeExecuteInTheMiddle)(()=>t(),n=>{n&&e.recordException(n),e.end()},!0))}function gG(e,t,n){let r=e.startSpan(`${t} ${n.path}`,{kind:po.CLIENT});return XBt(r,n),r.setAttribute(PC,t),r}function WBt(e){let t,n;if(typeof e.host=="string")if(e.host.startsWith("[")){if(e.host.endsWith("]"))t=e.host.replace(/^\[|\]$/g,"");else if(e.host.includes("]:")){let r=e.host.lastIndexOf(":");r!==-1&&(t=e.host.slice(1,r).replace(/^\[|\]$/g,""),n=e.host.slice(r+1))}}else if(rQe.isIPv6(e.host))t=e.host;else{let r=e.host.lastIndexOf(":");r!==-1?(t=e.host.slice(0,r),n=e.host.slice(r+1)):t=e.host}return{address:t,port:n?parseInt(n,10):void 0}}function XBt(e,t){let n=t.firestore.app,r=n.options,i=(t.firestore.toJSON()||{}).settings||{},s={[fV]:t.path,[mV]:n.name,[cS]:"firebase.firestore","firebase.firestore.type":t.type,"firebase.firestore.options.projectId":r.projectId,"firebase.firestore.options.appId":r.appId,"firebase.firestore.options.messagingSenderId":r.messagingSenderId,"firebase.firestore.options.storageBucket":r.storageBucket},{address:u,port:l}=WBt(i);u&&(s[TV]=u),l&&(s[bV]=l),e.setAttributes(s)}var eh,sQe=w(()=>{m();ze();eh=ue(sn(),1);Xn()});function aQe(e,t,n,r,o){let i=()=>{},s=()=>{},u=o.functions?.errorHook,l=o.functions?.requestHook,p=o.functions?.responseHook;typeof p=="function"&&(s=(S,T)=>{(0,th.safeExecuteInTheMiddle)(()=>p(S,T),v=>{v&&Ul.error(v?.message)},!0)}),typeof l=="function"&&(i=S=>{(0,th.safeExecuteInTheMiddle)(()=>l(S),T=>{T&&Ul.error(T?.message)},!0)});let h=new th.InstrumentationNodeModuleDefinition("firebase-functions",t);return[{name:"firebase-functions/lib/v2/providers/https.js",triggerType:"function"},{name:"firebase-functions/lib/v2/providers/firestore.js",triggerType:"firestore"},{name:"firebase-functions/lib/v2/providers/scheduler.js",triggerType:"scheduler"},{name:"firebase-functions/lib/v2/storage.js",triggerType:"storage"}].forEach(({name:S,triggerType:T})=>{h.files.push(new th.InstrumentationNodeModuleFile(S,t,v=>ewt(v,n,r,e,{requestHook:i,responseHook:s,errorHook:u},T),v=>uQe(v,r)))}),h}function ic(e,t,n){return function(o){return function(...i){let s=typeof i[0]=="function"?i[0]:i[1],u=typeof i[0]=="function"?void 0:i[0];if(!s)return o.call(this,...i);let l=async function(...p){let h=process.env.FUNCTION_TARGET||process.env.K_SERVICE||"unknown",y=e.startSpan(`firebase.function.${n}`,{kind:po.SERVER}),S={"faas.name":h,"faas.trigger":n,"faas.provider":"firebase"};return process.env.GCLOUD_PROJECT&&(S["cloud.project_id"]=process.env.GCLOUD_PROJECT),process.env.EVENTARC_CLOUD_EVENT_SOURCE&&(S["cloud.event_source"]=process.env.EVENTARC_CLOUD_EVENT_SOURCE),y.setAttributes(S),t?.requestHook?.(y),Xe.with(qt.setSpan(Xe.active(),y),async()=>{let T,v;try{v=await s.apply(this,p)}catch(R){T=R}if(t?.responseHook?.(y,T),T&&y.recordException(T),y.end(),T)throw await t?.errorHook?.(y,T),T;return v})};return u?o.call(this,u,l):o.call(this,l)}}}function ewt(e,t,n,r,o,i){switch(uQe(e,n),i){case"function":t(e,"onRequest",ic(r,o,"http.request")),t(e,"onCall",ic(r,o,"http.call"));break;case"firestore":t(e,"onDocumentCreated",ic(r,o,"firestore.document.created")),t(e,"onDocumentUpdated",ic(r,o,"firestore.document.updated")),t(e,"onDocumentDeleted",ic(r,o,"firestore.document.deleted")),t(e,"onDocumentWritten",ic(r,o,"firestore.document.written")),t(e,"onDocumentCreatedWithAuthContext",ic(r,o,"firestore.document.created")),t(e,"onDocumentUpdatedWithAuthContext",ic(r,o,"firestore.document.updated")),t(e,"onDocumentDeletedWithAuthContext",ic(r,o,"firestore.document.deleted")),t(e,"onDocumentWrittenWithAuthContext",ic(r,o,"firestore.document.written"));break;case"scheduler":t(e,"onSchedule",ic(r,o,"scheduler.scheduled"));break;case"storage":t(e,"onObjectFinalized",ic(r,o,"storage.object.finalized")),t(e,"onObjectArchived",ic(r,o,"storage.object.archived")),t(e,"onObjectDeleted",ic(r,o,"storage.object.deleted")),t(e,"onObjectMetadataUpdated",ic(r,o,"storage.object.metadataUpdated"));break}return e}function uQe(e,t){let n=["onSchedule","onRequest","onCall","onObjectFinalized","onObjectArchived","onObjectDeleted","onObjectMetadataUpdated","onDocumentCreated","onDocumentUpdated","onDocumentDeleted","onDocumentWritten","onDocumentCreatedWithAuthContext","onDocumentUpdatedWithAuthContext","onDocumentDeletedWithAuthContext","onDocumentWrittenWithAuthContext"];for(let r of n)(0,th.isWrapped)(e[r])&&t(e,r);return e}var th,cQe=w(()=>{m();ze();th=ue(sn(),1)});var dQe,lQe,twt,nwt,hG,pQe=w(()=>{m();dQe=ue(sn(),1);mt();sQe();cQe();lQe={},twt=[">=3.0.0 <5"],nwt=[">=6.0.0 <7"],hG=class extends dQe.InstrumentationBase{constructor(t=lQe){super("@sentry/instrumentation-firebase",er,t)}setConfig(t={}){super.setConfig({...lQe,...t})}init(){let t=[];return t.push(oQe(this.tracer,twt,this._wrap,this._unwrap,this.getConfig())),t.push(aQe(this.tracer,nwt,this._wrap,this._unwrap,this.getConfig())),t}}});var fQe,rwt,mQe,owt,AQe,gQe=w(()=>{m();mt();_r();pQe();fQe="Firebase",rwt={firestoreSpanCreationHook:e=>{zr(e,"auto.firebase.otel.firestore"),e.setAttribute(Xt,"db.query")},functions:{requestHook:e=>{zr(e,"auto.firebase.otel.functions"),e.setAttribute(Xt,"http.request")},errorHook:async(e,t)=>{t&&(nn(t,{mechanism:{type:"auto.firebase.otel.functions",handled:!1}}),await Ev(2e3))}}},mQe=ut(fQe,()=>new hG(rwt)),owt=(()=>({name:fQe,setupOnce(){mQe()}})),AQe=owt});function hQe(){return[ywe(),eke(),Rke(),ALe(),mPe(),DPe(),GPe(),XPe(),BMe(),WMe(),J2e(),lLe(),BLe(),HLe(),oUe(),fUe(),Hke(),RUe(),tPe(),KUe(),eQe(),wUe(),MUe(),FUe(),$Ue(),n2e(),AQe()]}var _Qe=w(()=>{m();xUe();GUe();$Le();Swe();rke();gQe();mUe();qUe();Dke();dLe();gLe();$ke();wLe();JUe();tQe();nPe();APe();NPe();jPe();eMe();LUe();XMe();r2e();Z2e();wMe();iUe();OUe()});function yQe(e,t={}){e.getOptions().debug&&oZ();let[n,r]=iwt(e,t);e.traceProvider=n,e.asyncLocalStorageLookup=r}function iwt(e,t={}){let n=new EQe.BasicTracerProvider({sampler:new x4(e),resource:(0,_G.defaultResource)().merge((0,_G.resourceFromAttributes)({[IV]:"node",[pV]:"sentry",[CV]:er})),forceFlushTimeoutMillis:500,spanProcessors:[new R4({timeout:swt(e.getOptions().maxSpanWaitDuration)}),...t.spanProcessors||[]]});qt.setGlobalTracerProvider(n),lf.setGlobalPropagator(new v4);let r=new N4;return Xe.setGlobalContextManager(r),[n,r.getAsyncLocalStorageLookup()]}function swt(e){if(e!=null){if(e>ZX)return xs&&W.warn(`\`maxSpanWaitDuration\` is too high, using the maximum value of ${ZX}`),ZX;if(e<=0||Number.isNaN(e)){xs&&W.warn("`maxSpanWaitDuration` must be a positive number, using default value instead.");return}return e}}var _G,EQe,ZX,SQe=w(()=>{m();ze();_G=ue(hJ(),1),EQe=ue(zJ(),1);Xn();mt();_r();Zv();HS();ZX=1e6});function TQe(){return L4().filter(t=>t.name!=="Http"&&t.name!=="NodeFetch").concat(JBe(),iwe())}function bQe(e){return[...TQe(),...Mi(e)?hQe():[]]}function WX(e={}){return awt(e,bQe)}function awt(e={},t){xS(e,"node");let n=NZ({...e,defaultIntegrations:e.defaultIntegrations??t(e)});return n&&!e.skipOpenTelemetrySetup&&(yQe(n,{spanProcessors:e.openTelemetrySpanProcessors}),U4()),n}var IQe=w(()=>{m();mt();_r();ZBe();swe();_Qe();SQe()});var JR=w(()=>{m();IQe();mt();_r()});function Co(){return uwt}function hu(){return CQe}function vQe(){return cwt}var uwt,CQe,cwt,Wc=w(()=>{"use strict";m();uwt="prod",CQe="0.1.186",cwt=`@loredotlink/cli/${CQe}`});function mwt(e=""){if(!pwt.test(e))return e!==e.toLowerCase()}function RQe(e,t){let n=t??fwt,r=[];if(!e||typeof e!="string")return r;let o="",i,s;for(let u of e){let l=n.includes(u);if(l===!0){r.push(o),o="",i=void 0;continue}let p=mwt(u);if(s===!1){if(i===!1&&p===!0){r.push(o),o=u,i=p;continue}if(i===!0&&p===!1&&o.length>1){let h=o.at(-1);r.push(o.slice(0,Math.max(0,o.length-1))),o=h+u,i=p;continue}}o+=u,i=p,s=l}return r.push(o),r}function Awt(e){return e?e[0].toUpperCase()+e.slice(1):""}function gwt(e){return e?e[0].toLowerCase()+e.slice(1):""}function hwt(e,t){return e?(Array.isArray(e)?e:RQe(e)).map(n=>Awt(t?.normalize?n.toLowerCase():n)).join(""):""}function PO(e,t){return gwt(hwt(e||"",t))}function EG(e,t){return e?(Array.isArray(e)?e:RQe(e)).map(n=>n.toLowerCase()).join(t??"-"):""}function xQe(e){return EG(e||"","_")}var pwt,fwt,DQe=w(()=>{m();pwt=/\d/,fwt=["-","_","/","."]});import{parseArgs as _wt}from"node:util";function bG(e){return Array.isArray(e)?e:e===void 0?[]:[e]}function XX(e,t=""){let n=[];for(let r of e)for(let[o,i]of r.entries())n[o]=Math.max(n[o]||0,i.length);return e.map(r=>r.map((o,i)=>t+o[i===0?"padStart":"padEnd"](n[i])).join(" ")).join(`
38
+ Mongoose Error Code: ${t.code}`:""}`})}function BW(e,t,n,r=void 0){n&&(0,iO.safeExecuteInTheMiddle)(()=>n(e,{moduleVersion:r,response:t}),o=>{o&&gPe.diag.error("mongoose instrumentation: responseHook error",o)},!0)}function Rxt(e,t,n,r=void 0){return e instanceof Promise?e.then(o=>(BW(t,o,n,r),o)).catch(o=>{throw hPe(t,o),o}).finally(()=>t.end()):(BW(t,e,n,r),t.end(),e)}_E.handlePromiseResponse=Rxt;function xxt(e,t,n,r,o,i,s=void 0){let u=0;return o.length===2?u=1:o.length===3&&(u=2),o[u]=(l,p)=>(l?hPe(r,l):BW(r,p,i,s),r.end(),e(l,p)),t.apply(n,o)}_E.handleCallbackResponse=xxt});var EPe=P(ER=>{"use strict";m();Object.defineProperty(ER,"__esModule",{value:!0});ER.PACKAGE_NAME=ER.PACKAGE_VERSION=void 0;ER.PACKAGE_VERSION="0.60.0";ER.PACKAGE_NAME="@opentelemetry/instrumentation-mongoose"});var IPe=P(Yc=>{"use strict";m();Object.defineProperty(Yc,"__esModule",{value:!0});Yc.MongooseInstrumentation=Yc._ALREADY_INSTRUMENTED=Yc._STORED_PARENT_SPAN=void 0;var Ns=(ze(),Le(nt)),Dxt=Cr(),wW=_Pe(),Ma=sn(),yPe=EPe(),EE=NW(),ZS=(Xn(),Le(Gr)),H3=["deleteOne","deleteMany","find","findOne","estimatedDocumentCount","countDocuments","distinct","where","$where","findOneAndUpdate","findOneAndDelete","findOneAndReplace"],Nxt=["remove","count","findOneAndRemove",...H3],Bxt=["count","findOneAndRemove",...H3],wxt=[...H3];function SPe(e){return e?e.startsWith("6.")||e.startsWith("5.")?Nxt:e.startsWith("7.")?Bxt:wxt:H3}function TPe(e){return e&&(e.startsWith("5.")||e.startsWith("6."))||!1}function bPe(e){return!e||!e.startsWith("8.")?!1:parseInt(e.split(".")[1],10)>=21}Yc._STORED_PARENT_SPAN=Symbol("stored-parent-span");Yc._ALREADY_INSTRUMENTED=Symbol("already-instrumented");var OW=class extends Ma.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(yPe.PACKAGE_NAME,yPe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Ma.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Ma.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new Ma.InstrumentationNodeModuleDefinition("mongoose",[">=5.9.7 <10"],this.patch.bind(this),this.unpatch.bind(this))}patch(t,n){let r=t[Symbol.toStringTag]==="Module"?t.default:t;return this._wrap(r.Model.prototype,"save",this.patchOnModelMethods("save",n)),r.Model.prototype.$save=r.Model.prototype.save,TPe(n)&&this._wrap(r.Model.prototype,"remove",this.patchOnModelMethods("remove",n)),bPe(n)&&(this._wrap(r.Model.prototype,"updateOne",this._patchDocumentUpdateMethods("updateOne",n)),this._wrap(r.Model.prototype,"deleteOne",this._patchDocumentUpdateMethods("deleteOne",n))),this._wrap(r.Query.prototype,"exec",this.patchQueryExec(n)),this._wrap(r.Aggregate.prototype,"exec",this.patchAggregateExec(n)),SPe(n).forEach(i=>{this._wrap(r.Query.prototype,i,this.patchAndCaptureSpanContext(i))}),this._wrap(r.Model,"aggregate",this.patchModelAggregate()),this._wrap(r.Model,"insertMany",this.patchModelStatic("insertMany",n)),this._wrap(r.Model,"bulkWrite",this.patchModelStatic("bulkWrite",n)),r}unpatch(t,n){let r=t[Symbol.toStringTag]==="Module"?t.default:t,o=SPe(n);this._unwrap(r.Model.prototype,"save"),r.Model.prototype.$save=r.Model.prototype.save,TPe(n)&&this._unwrap(r.Model.prototype,"remove"),bPe(n)&&(this._unwrap(r.Model.prototype,"updateOne"),this._unwrap(r.Model.prototype,"deleteOne")),this._unwrap(r.Query.prototype,"exec"),this._unwrap(r.Aggregate.prototype,"exec"),o.forEach(i=>{this._unwrap(r.Query.prototype,i)}),this._unwrap(r.Model,"aggregate"),this._unwrap(r.Model,"insertMany"),this._unwrap(r.Model,"bulkWrite")}patchAggregateExec(t){let n=this;return r=>function(i){if(n.getConfig().requireParentSpan&&Ns.trace.getSpan(Ns.context.active())===void 0)return r.apply(this,arguments);let s=this[Yc._STORED_PARENT_SPAN],u={},{dbStatementSerializer:l}=n.getConfig();if(l){let h=l("aggregate",{options:this.options,aggregatePipeline:this._pipeline});n._dbSemconvStability&Ma.SemconvStability.OLD&&(u[EE.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&Ma.SemconvStability.STABLE&&(u[ZS.ATTR_DB_QUERY_TEXT]=h)}let p=n._startSpan(this._model.collection,this._model?.modelName,"aggregate",u,s);return n._handleResponse(p,r,this,arguments,i,t)}}patchQueryExec(t){let n=this;return r=>function(i){if(this[Yc._ALREADY_INSTRUMENTED])return r.apply(this,arguments);if(n.getConfig().requireParentSpan&&Ns.trace.getSpan(Ns.context.active())===void 0)return r.apply(this,arguments);let s=this[Yc._STORED_PARENT_SPAN],u={},{dbStatementSerializer:l}=n.getConfig();if(l){let h=l(this.op,{condition:this.getFilter?.()??this._conditions,updates:this._update,options:this.getOptions?.()??this.options,fields:this._fields});n._dbSemconvStability&Ma.SemconvStability.OLD&&(u[EE.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&Ma.SemconvStability.STABLE&&(u[ZS.ATTR_DB_QUERY_TEXT]=h)}let p=n._startSpan(this.mongooseCollection,this.model.modelName,this.op,u,s);return n._handleResponse(p,r,this,arguments,i,t)}}patchOnModelMethods(t,n){let r=this;return o=>function(s,u){if(r.getConfig().requireParentSpan&&Ns.trace.getSpan(Ns.context.active())===void 0)return o.apply(this,arguments);let l={document:this};s&&!(s instanceof Function)&&(l.options=s);let p={},{dbStatementSerializer:h}=r.getConfig();if(h){let S=h(t,l);r._dbSemconvStability&Ma.SemconvStability.OLD&&(p[EE.ATTR_DB_STATEMENT]=S),r._dbSemconvStability&Ma.SemconvStability.STABLE&&(p[ZS.ATTR_DB_QUERY_TEXT]=S)}let y=r._startSpan(this.constructor.collection,this.constructor.modelName,t,p);return s instanceof Function&&(u=s,s=void 0),r._handleResponse(y,o,this,arguments,u,n)}}_patchDocumentUpdateMethods(t,n){let r=this;return o=>function(s,u,l){if(r.getConfig().requireParentSpan&&Ns.trace.getSpan(Ns.context.active())===void 0)return o.apply(this,arguments);let p=l,h=s,y=u;typeof s=="function"?(p=s,h=void 0,y=void 0):typeof u=="function"&&(p=u,y=void 0);let S={},T=r.getConfig().dbStatementSerializer;if(T){let x=T(t,{condition:{_id:this._id},updates:h,options:y});r._dbSemconvStability&Ma.SemconvStability.OLD&&(S[EE.ATTR_DB_STATEMENT]=x),r._dbSemconvStability&Ma.SemconvStability.STABLE&&(S[ZS.ATTR_DB_QUERY_TEXT]=x)}let v=r._startSpan(this.constructor.collection,this.constructor.modelName,t,S),R=r._handleResponse(v,o,this,arguments,p,n);return R&&typeof R=="object"&&(R[Yc._ALREADY_INSTRUMENTED]=!0),R}}patchModelStatic(t,n){let r=this;return o=>function(s,u,l){if(r.getConfig().requireParentSpan&&Ns.trace.getSpan(Ns.context.active())===void 0)return o.apply(this,arguments);typeof u=="function"&&(l=u,u=void 0);let p={};switch(t){case"insertMany":p.documents=s;break;case"bulkWrite":p.operations=s;break;default:p.document=s;break}u!==void 0&&(p.options=u);let h={},{dbStatementSerializer:y}=r.getConfig();if(y){let T=y(t,p);r._dbSemconvStability&Ma.SemconvStability.OLD&&(h[EE.ATTR_DB_STATEMENT]=T),r._dbSemconvStability&Ma.SemconvStability.STABLE&&(h[ZS.ATTR_DB_QUERY_TEXT]=T)}let S=r._startSpan(this.collection,this.modelName,t,h);return r._handleResponse(S,o,this,arguments,l,n)}}patchModelAggregate(){let t=this;return n=>function(){let o=Ns.trace.getSpan(Ns.context.active()),i=t._callOriginalFunction(()=>n.apply(this,arguments));return i&&(i[Yc._STORED_PARENT_SPAN]=o),i}}patchAndCaptureSpanContext(t){let n=this;return r=>function(){return this[Yc._STORED_PARENT_SPAN]=Ns.trace.getSpan(Ns.context.active()),n._callOriginalFunction(()=>r.apply(this,arguments))}}_startSpan(t,n,r,o,i){let s={...o,...(0,wW.getAttributesFromCollection)(t,this._dbSemconvStability,this._netSemconvStability)};this._dbSemconvStability&Ma.SemconvStability.OLD&&(s[EE.ATTR_DB_OPERATION]=r,s[EE.ATTR_DB_SYSTEM]="mongoose"),this._dbSemconvStability&Ma.SemconvStability.STABLE&&(s[ZS.ATTR_DB_OPERATION_NAME]=r,s[ZS.ATTR_DB_SYSTEM_NAME]=EE.DB_SYSTEM_NAME_VALUE_MONGODB);let u=this._dbSemconvStability&Ma.SemconvStability.STABLE?`${r} ${t.name}`:`mongoose.${n}.${r}`;return this.tracer.startSpan(u,{kind:Ns.SpanKind.CLIENT,attributes:s},i?Ns.trace.setSpan(Ns.context.active(),i):void 0)}_handleResponse(t,n,r,o,i,s=void 0){let u=this;if(i instanceof Function)return u._callOriginalFunction(()=>(0,wW.handleCallbackResponse)(i,n,r,t,o,u.getConfig().responseHook,s));{let l=u._callOriginalFunction(()=>n.apply(r,o));return(0,wW.handlePromiseResponse)(l,t,u.getConfig().responseHook,s)}}_callOriginalFunction(t){return this.getConfig().suppressInternalInstrumentation?Ns.context.with((0,Dxt.suppressTracing)(Ns.context.active()),t):t()}};Yc.MongooseInstrumentation=OW});var CPe=P($3=>{"use strict";m();Object.defineProperty($3,"__esModule",{value:!0});$3.MongooseInstrumentation=void 0;var Oxt=IPe();Object.defineProperty($3,"MongooseInstrumentation",{enumerable:!0,get:function(){return Oxt.MongooseInstrumentation}})});var vPe,RPe,xPe,kxt,DPe,NPe=w(()=>{m();vPe=ue(CPe(),1);_r();RPe="Mongoose",xPe=ut(RPe,()=>new vPe.MongooseInstrumentation({responseHook(e){zr(e,"auto.db.otel.mongoose")}})),kxt=(()=>({name:RPe,setupOnce(){xPe()}})),DPe=kxt});var BPe=P(us=>{"use strict";m();Object.defineProperty(us,"__esModule",{value:!0});us.METRIC_DB_CLIENT_CONNECTIONS_USAGE=us.DB_SYSTEM_VALUE_MYSQL=us.ATTR_NET_PEER_PORT=us.ATTR_NET_PEER_NAME=us.ATTR_DB_USER=us.ATTR_DB_SYSTEM=us.ATTR_DB_STATEMENT=us.ATTR_DB_NAME=us.ATTR_DB_CONNECTION_STRING=void 0;us.ATTR_DB_CONNECTION_STRING="db.connection_string";us.ATTR_DB_NAME="db.name";us.ATTR_DB_STATEMENT="db.statement";us.ATTR_DB_SYSTEM="db.system";us.ATTR_DB_USER="db.user";us.ATTR_NET_PEER_NAME="net.peer.name";us.ATTR_NET_PEER_PORT="net.peer.port";us.DB_SYSTEM_VALUE_MYSQL="mysql";us.METRIC_DB_CLIENT_CONNECTIONS_USAGE="db.client.connections.usage"});var wPe=P(sO=>{"use strict";m();Object.defineProperty(sO,"__esModule",{value:!0});sO.AttributeNames=void 0;var Pxt;(function(e){e.MYSQL_VALUES="db.mysql.values"})(Pxt=sO.AttributeNames||(sO.AttributeNames={}))});var OPe=P(mu=>{"use strict";m();Object.defineProperty(mu,"__esModule",{value:!0});mu.getPoolNameOld=mu.arrayStringifyHelper=mu.getSpanName=mu.getDbValues=mu.getDbQueryText=mu.getJDBCString=mu.getConfig=void 0;function Mxt(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}mu.getConfig=Mxt;function Lxt(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}mu.getJDBCString=Lxt;function Uxt(e){return typeof e=="string"?e:e.sql}mu.getDbQueryText=Uxt;function Qxt(e,t){return kW(typeof e=="string"?t:t||e.values)}mu.getDbValues=Qxt;function Fxt(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}mu.getSpanName=Fxt;function kW(e){return e?`[${e.toString()}]`:""}mu.arrayStringifyHelper=kW;function Gxt(e){let t=e.config.connectionConfig,n="";return n+=t.host?`host: '${t.host}', `:"",n+=t.port?`port: ${t.port}, `:"",n+=t.database?`database: '${t.database}', `:"",n+=t.user?`user: '${t.user}'`:"",t.user||(n=n.substring(0,n.length-2)),n.trim()}mu.getPoolNameOld=Gxt});var kPe=P(yR=>{"use strict";m();Object.defineProperty(yR,"__esModule",{value:!0});yR.PACKAGE_NAME=yR.PACKAGE_VERSION=void 0;yR.PACKAGE_VERSION="0.60.0";yR.PACKAGE_NAME="@opentelemetry/instrumentation-mysql"});var MPe=P(q3=>{"use strict";m();Object.defineProperty(q3,"__esModule",{value:!0});q3.MySQLInstrumentation=void 0;var Kc=(ze(),Le(nt)),op=sn(),SR=(Xn(),Le(Gr)),Wg=BPe(),jxt=wPe(),WS=OPe(),PPe=kPe(),PW=class extends op.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(PPe.PACKAGE_NAME,PPe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,op.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,op.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._connectionsUsageOld=this.meter.createUpDownCounter(Wg.METRIC_DB_CLIENT_CONNECTIONS_USAGE,{description:"The number of connections that are currently in state described by the state attribute.",unit:"{connection}"})}_connCountAdd(t,n,r){this._connectionsUsageOld?.add(t,{state:r,name:n})}init(){return[new op.InstrumentationNodeModuleDefinition("mysql",[">=2.0.0 <3"],t=>((0,op.isWrapped)(t.createConnection)&&this._unwrap(t,"createConnection"),this._wrap(t,"createConnection",this._patchCreateConnection()),(0,op.isWrapped)(t.createPool)&&this._unwrap(t,"createPool"),this._wrap(t,"createPool",this._patchCreatePool()),(0,op.isWrapped)(t.createPoolCluster)&&this._unwrap(t,"createPoolCluster"),this._wrap(t,"createPoolCluster",this._patchCreatePoolCluster()),t),t=>{t!==void 0&&(this._unwrap(t,"createConnection"),this._unwrap(t,"createPool"),this._unwrap(t,"createPoolCluster"))})]}_patchCreateConnection(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"query",n._patchQuery(i)),i}}}_patchCreatePool(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"query",n._patchQuery(i)),n._wrap(i,"getConnection",n._patchGetConnection(i)),n._wrap(i,"end",n._patchPoolEnd(i)),n._setPoolCallbacks(i,""),i}}}_patchPoolEnd(t){return n=>{let r=this;return function(i){let s=t._allConnections.length,u=t._freeConnections.length,l=s-u,p=(0,WS.getPoolNameOld)(t);r._connCountAdd(-l,p,"used"),r._connCountAdd(-u,p,"idle"),n.apply(t,arguments)}}}_patchCreatePoolCluster(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"getConnection",n._patchGetConnection(i)),n._wrap(i,"add",n._patchAdd(i)),i}}}_patchAdd(t){return n=>{let r=this;return function(i,s){if(!r._enabled)return r._unwrap(t,"add"),n.apply(t,arguments);n.apply(t,arguments);let u=t._nodes;if(u){let l=typeof i=="object"?"CLUSTER::"+t._lastId:String(i),p=u[l].pool;r._setPoolCallbacks(p,i)}}}}_patchGetConnection(t){return n=>{let r=this;return function(i,s,u){if(!r._enabled)return r._unwrap(t,"getConnection"),n.apply(t,arguments);if(arguments.length===1&&typeof i=="function"){let l=r._getConnectionCallbackPatchFn(i);return n.call(t,l)}if(arguments.length===2&&typeof s=="function"){let l=r._getConnectionCallbackPatchFn(s);return n.call(t,i,l)}if(arguments.length===3&&typeof u=="function"){let l=r._getConnectionCallbackPatchFn(u);return n.call(t,i,s,l)}return n.apply(t,arguments)}}}_getConnectionCallbackPatchFn(t){let n=this,r=Kc.context.active();return function(o,i){i&&((0,op.isWrapped)(i.query)||n._wrap(i,"query",n._patchQuery(i))),typeof t=="function"&&Kc.context.with(r,t,this,o,i)}}_patchQuery(t){return n=>{let r=this;return function(o,i,s){if(!r._enabled)return r._unwrap(t,"query"),n.apply(t,arguments);let u={},{host:l,port:p,database:h,user:y}=(0,WS.getConfig)(t.config),S=parseInt(p,10),T=(0,WS.getDbQueryText)(o);r._dbSemconvStability&op.SemconvStability.OLD&&(u[Wg.ATTR_DB_SYSTEM]=Wg.DB_SYSTEM_VALUE_MYSQL,u[Wg.ATTR_DB_CONNECTION_STRING]=(0,WS.getJDBCString)(l,p,h),u[Wg.ATTR_DB_NAME]=h,u[Wg.ATTR_DB_USER]=y,u[Wg.ATTR_DB_STATEMENT]=T),r._dbSemconvStability&op.SemconvStability.STABLE&&(u[SR.ATTR_DB_SYSTEM_NAME]=SR.DB_SYSTEM_NAME_VALUE_MYSQL,u[SR.ATTR_DB_NAMESPACE]=h,u[SR.ATTR_DB_QUERY_TEXT]=T),r._netSemconvStability&op.SemconvStability.OLD&&(u[Wg.ATTR_NET_PEER_NAME]=l,isNaN(S)||(u[Wg.ATTR_NET_PEER_PORT]=S)),r._netSemconvStability&op.SemconvStability.STABLE&&(u[SR.ATTR_SERVER_ADDRESS]=l,isNaN(S)||(u[SR.ATTR_SERVER_PORT]=S));let v=r.tracer.startSpan((0,WS.getSpanName)(o),{kind:Kc.SpanKind.CLIENT,attributes:u});if(r.getConfig().enhancedDatabaseReporting){let O;Array.isArray(i)?O=i:arguments[2]&&(O=[i]),v.setAttribute(jxt.AttributeNames.MYSQL_VALUES,(0,WS.getDbValues)(o,O))}let R=Array.from(arguments).findIndex(O=>typeof O=="function"),x=Kc.context.active();if(R===-1){let O=Kc.context.with(Kc.trace.setSpan(Kc.context.active(),v),()=>n.apply(t,arguments));return Kc.context.bind(x,O),O.on("error",M=>v.setStatus({code:Kc.SpanStatusCode.ERROR,message:M.message})).on("end",()=>{v.end()})}else return r._wrap(arguments,R,r._patchCallbackQuery(v,x)),Kc.context.with(Kc.trace.setSpan(Kc.context.active(),v),()=>n.apply(t,arguments))}}}_patchCallbackQuery(t,n){return r=>function(o,i,s){return o&&t.setStatus({code:Kc.SpanStatusCode.ERROR,message:o.message}),t.end(),Kc.context.with(n,()=>r(...arguments))}}_setPoolCallbacks(t,n){let r=n||(0,WS.getPoolNameOld)(t);t.on("connection",o=>{this._connCountAdd(1,r,"idle")}),t.on("acquire",o=>{this._connCountAdd(-1,r,"idle"),this._connCountAdd(1,r,"used")}),t.on("release",o=>{this._connCountAdd(1,r,"idle"),this._connCountAdd(-1,r,"used")})}};q3.MySQLInstrumentation=PW});var LPe=P(V3=>{"use strict";m();Object.defineProperty(V3,"__esModule",{value:!0});V3.MySQLInstrumentation=void 0;var zxt=MPe();Object.defineProperty(V3,"MySQLInstrumentation",{enumerable:!0,get:function(){return zxt.MySQLInstrumentation}})});var UPe,QPe,FPe,Hxt,GPe,jPe=w(()=>{m();UPe=ue(LPe(),1);_r();QPe="Mysql",FPe=ut(QPe,()=>new UPe.MySQLInstrumentation({})),Hxt=(()=>({name:QPe,setupOnce(){FPe()}})),GPe=Hxt});var MW=P(aa=>{"use strict";m();Object.defineProperty(aa,"__esModule",{value:!0});aa.DB_SYSTEM_VALUE_MYSQL=aa.ATTR_NET_PEER_PORT=aa.ATTR_NET_PEER_NAME=aa.ATTR_DB_USER=aa.ATTR_DB_SYSTEM=aa.ATTR_DB_STATEMENT=aa.ATTR_DB_NAME=aa.ATTR_DB_CONNECTION_STRING=void 0;aa.ATTR_DB_CONNECTION_STRING="db.connection_string";aa.ATTR_DB_NAME="db.name";aa.ATTR_DB_STATEMENT="db.statement";aa.ATTR_DB_SYSTEM="db.system";aa.ATTR_DB_USER="db.user";aa.ATTR_NET_PEER_NAME="net.peer.name";aa.ATTR_NET_PEER_PORT="net.peer.port";aa.DB_SYSTEM_VALUE_MYSQL="mysql"});var UW=P(Y3=>{"use strict";m();Object.defineProperty(Y3,"__esModule",{value:!0});Y3.addSqlCommenterComment=void 0;var LW=(ze(),Le(nt)),$xt=Cr();function qxt(e){let t=e.indexOf("--");if(t>=0)return!0;if(e.indexOf("/*")<0)return!1;let r=e.indexOf("*/");return t<r}function Vxt(e){return encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}function Yxt(e,t){if(typeof t!="string"||t.length===0||qxt(t))return t;let n=new $xt.W3CTraceContextPropagator,r={};n.inject(LW.trace.setSpan(LW.ROOT_CONTEXT,e),r,LW.defaultTextMapSetter);let o=Object.keys(r).sort();if(o.length===0)return t;let i=o.map(s=>{let u=Vxt(r[s]);return`${s}='${u}'`}).join(",");return`${t} /*${i}*/`}Y3.addSqlCommenterComment=Yxt});var zPe=P(ip=>{"use strict";m();Object.defineProperty(ip,"__esModule",{value:!0});ip.getConnectionPrototypeToInstrument=ip.once=ip.getSpanName=ip.getQueryText=ip.getConnectionAttributes=void 0;var aO=MW(),K3=sn(),QW=(Xn(),Le(Gr));function Kxt(e,t,n){let{host:r,port:o,database:i,user:s}=Jxt(e),u={};t&K3.SemconvStability.OLD&&(u[aO.ATTR_DB_CONNECTION_STRING]=Zxt(r,o,i),u[aO.ATTR_DB_NAME]=i,u[aO.ATTR_DB_USER]=s),t&K3.SemconvStability.STABLE&&(u[QW.ATTR_DB_NAMESPACE]=i);let l=parseInt(o,10);return n&K3.SemconvStability.OLD&&(u[aO.ATTR_NET_PEER_NAME]=r,isNaN(l)||(u[aO.ATTR_NET_PEER_PORT]=l)),n&K3.SemconvStability.STABLE&&(u[QW.ATTR_SERVER_ADDRESS]=r,isNaN(l)||(u[QW.ATTR_SERVER_PORT]=l)),u}ip.getConnectionAttributes=Kxt;function Jxt(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}function Zxt(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}function Wxt(e,t,n,r=!1,o=Xxt){let[i,s]=typeof e=="string"?[e,n]:[e.sql,eDt(e)?n||e.values:n];try{return r?o(i):t&&s?t(i,s):i}catch{return"Could not determine the query due to an error in masking or formatting"}}ip.getQueryText=Wxt;function Xxt(e){return e.replace(/\b\d+\b/g,"?").replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,"?")}function eDt(e){return"values"in e}function tDt(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}ip.getSpanName=tDt;var nDt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};ip.once=nDt;function rDt(e){let t=e.prototype,n=Object.getPrototypeOf(t);return typeof n?.query=="function"&&typeof n?.execute=="function"?n:t}ip.getConnectionPrototypeToInstrument=rDt});var HPe=P(TR=>{"use strict";m();Object.defineProperty(TR,"__esModule",{value:!0});TR.PACKAGE_NAME=TR.PACKAGE_VERSION=void 0;TR.PACKAGE_VERSION="0.60.0";TR.PACKAGE_NAME="@opentelemetry/instrumentation-mysql2"});var YPe=P(J3=>{"use strict";m();Object.defineProperty(J3,"__esModule",{value:!0});J3.MySQL2Instrumentation=void 0;var $Pe=(ze(),Le(nt)),If=sn(),FW=MW(),qPe=UW(),bR=zPe(),VPe=HPe(),GW=(Xn(),Le(Gr)),jW=[">=1.4.2 <4"],zW=class extends If.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(VPe.PACKAGE_NAME,VPe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,If.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,If.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){let t;function n(i){!t&&i.format&&(t=i.format)}let r=i=>{(0,If.isWrapped)(i.query)&&this._unwrap(i,"query"),this._wrap(i,"query",this._patchQuery(t,!1)),(0,If.isWrapped)(i.execute)&&this._unwrap(i,"execute"),this._wrap(i,"execute",this._patchQuery(t,!0))},o=i=>{this._unwrap(i,"query"),this._unwrap(i,"execute")};return[new If.InstrumentationNodeModuleDefinition("mysql2",jW,i=>(n(i),i),()=>{},[new If.InstrumentationNodeModuleFile("mysql2/promise.js",jW,i=>(n(i),i),()=>{}),new If.InstrumentationNodeModuleFile("mysql2/lib/connection.js",jW,i=>{let s=(0,bR.getConnectionPrototypeToInstrument)(i);return r(s),i},i=>{if(i===void 0)return;let s=(0,bR.getConnectionPrototypeToInstrument)(i);o(s)})])]}_patchQuery(t,n){return r=>{let o=this;return function(i,s,u){let l;Array.isArray(s)?l=s:arguments[2]&&(l=[s]);let{maskStatement:p,maskStatementHook:h,responseHook:y}=o.getConfig(),S=(0,bR.getConnectionAttributes)(this.config,o._dbSemconvStability,o._netSemconvStability),T=(0,bR.getQueryText)(i,t,l,p,h);o._dbSemconvStability&If.SemconvStability.OLD&&(S[FW.ATTR_DB_SYSTEM]=FW.DB_SYSTEM_VALUE_MYSQL,S[FW.ATTR_DB_STATEMENT]=T),o._dbSemconvStability&If.SemconvStability.STABLE&&(S[GW.ATTR_DB_SYSTEM_NAME]=GW.DB_SYSTEM_NAME_VALUE_MYSQL,S[GW.ATTR_DB_QUERY_TEXT]=T);let v=o.tracer.startSpan((0,bR.getSpanName)(i),{kind:$Pe.SpanKind.CLIENT,attributes:S});!n&&o.getConfig().addSqlCommenterCommentToQueries&&(arguments[0]=i=typeof i=="string"?(0,qPe.addSqlCommenterComment)(v,i):Object.assign(i,{sql:(0,qPe.addSqlCommenterComment)(v,i.sql)}));let R=(0,bR.once)((x,O)=>{x?v.setStatus({code:$Pe.SpanStatusCode.ERROR,message:x.message}):typeof y=="function"&&(0,If.safeExecuteInTheMiddle)(()=>{y(v,{queryResults:O})},M=>{M&&o._diag.warn("Failed executing responseHook",M)},!0),v.end()});if(arguments.length===1){typeof i.onResult=="function"&&o._wrap(i,"onResult",o._patchCallbackQuery(R));let x=r.apply(this,arguments);return x.once("error",O=>{R(O)}).once("result",O=>{R(void 0,O)}),x}return typeof arguments[1]=="function"?o._wrap(arguments,1,o._patchCallbackQuery(R)):typeof arguments[2]=="function"&&o._wrap(arguments,2,o._patchCallbackQuery(R)),r.apply(this,arguments)}}}_patchCallbackQuery(t){return n=>function(r,o,i){return t(r,o),n(...arguments)}}};J3.MySQL2Instrumentation=zW});var KPe=P(Z3=>{"use strict";m();Object.defineProperty(Z3,"__esModule",{value:!0});Z3.MySQL2Instrumentation=void 0;var oDt=YPe();Object.defineProperty(Z3,"MySQL2Instrumentation",{enumerable:!0,get:function(){return oDt.MySQL2Instrumentation}})});var JPe,ZPe,WPe,iDt,XPe,eMe=w(()=>{m();JPe=ue(KPe(),1);_r();ZPe="Mysql2",WPe=ut(ZPe,()=>new JPe.MySQL2Instrumentation({responseHook(e){zr(e,"auto.db.otel.mysql2")}})),iDt=(()=>({name:ZPe,setupOnce(){WPe()}})),XPe=iDt});var tMe=P(Au=>{"use strict";m();Object.defineProperty(Au,"__esModule",{value:!0});Au.DB_SYSTEM_VALUE_REDIS=Au.DB_SYSTEM_NAME_VALUE_REDIS=Au.ATTR_NET_PEER_PORT=Au.ATTR_NET_PEER_NAME=Au.ATTR_DB_SYSTEM=Au.ATTR_DB_STATEMENT=Au.ATTR_DB_CONNECTION_STRING=void 0;Au.ATTR_DB_CONNECTION_STRING="db.connection_string";Au.ATTR_DB_STATEMENT="db.statement";Au.ATTR_DB_SYSTEM="db.system";Au.ATTR_NET_PEER_NAME="net.peer.name";Au.ATTR_NET_PEER_PORT="net.peer.port";Au.DB_SYSTEM_NAME_VALUE_REDIS="redis";Au.DB_SYSTEM_VALUE_REDIS="redis"});var nMe=P(W3=>{"use strict";m();Object.defineProperty(W3,"__esModule",{value:!0});W3.endSpan=void 0;var sDt=(ze(),Le(nt)),aDt=(e,t)=>{t&&(e.recordException(t),e.setStatus({code:sDt.SpanStatusCode.ERROR,message:t.message})),e.end()};W3.endSpan=aDt});var e6=P(X3=>{"use strict";m();Object.defineProperty(X3,"__esModule",{value:!0});X3.defaultDbStatementSerializer=void 0;var uDt=[{regex:/^ECHO/i,args:0},{regex:/^(LPUSH|MSET|PFA|PUBLISH|RPUSH|SADD|SET|SPUBLISH|XADD|ZADD)/i,args:1},{regex:/^(HSET|HMSET|LSET|LINSERT)/i,args:2},{regex:/^(ACL|BIT|B[LRZ]|CLIENT|CLUSTER|CONFIG|COMMAND|DECR|DEL|EVAL|EX|FUNCTION|GEO|GET|HINCR|HMGET|HSCAN|INCR|L[TRLM]|MEMORY|P[EFISTU]|RPOP|S[CDIMORSU]|XACK|X[CDGILPRT]|Z[CDILMPRS])/i,args:-1}],cDt=(e,t)=>{if(Array.isArray(t)&&t.length){let n=uDt.find(({regex:o})=>o.test(e))?.args??0,r=n>=0?t.slice(0,n):t;return t.length>r.length&&r.push(`[${t.length-n} other arguments]`),`${e} ${r.join(" ")}`}return e};X3.defaultDbStatementSerializer=cDt});var rMe=P(IR=>{"use strict";m();Object.defineProperty(IR,"__esModule",{value:!0});IR.PACKAGE_NAME=IR.PACKAGE_VERSION=void 0;IR.PACKAGE_VERSION="0.62.0";IR.PACKAGE_NAME="@opentelemetry/instrumentation-ioredis"});var aMe=P(t6=>{"use strict";m();Object.defineProperty(t6,"__esModule",{value:!0});t6.IORedisInstrumentation=void 0;var yE=(ze(),Le(nt)),Jc=sn(),SE=(Xn(),Le(Gr)),Zc=tMe(),oMe=sn(),uO=nMe(),lDt=e6(),iMe=rMe(),sMe={requireParentSpan:!0},HW=class extends Jc.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(iMe.PACKAGE_NAME,iMe.PACKAGE_VERSION,{...sMe,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Jc.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Jc.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...sMe,...t})}init(){return[new Jc.InstrumentationNodeModuleDefinition("ioredis",[">=2.0.0 <6"],(t,n)=>{let r=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,Jc.isWrapped)(r.prototype.sendCommand)&&this._unwrap(r.prototype,"sendCommand"),this._wrap(r.prototype,"sendCommand",this._patchSendCommand(n)),(0,Jc.isWrapped)(r.prototype.connect)&&this._unwrap(r.prototype,"connect"),this._wrap(r.prototype,"connect",this._patchConnection()),t},t=>{if(t===void 0)return;let n=t[Symbol.toStringTag]==="Module"?t.default:t;this._unwrap(n.prototype,"sendCommand"),this._unwrap(n.prototype,"connect")})]}_patchSendCommand(t){return n=>this._traceSendCommand(n,t)}_patchConnection(){return t=>this._traceConnection(t)}_traceSendCommand(t,n){let r=this;return function(o){if(arguments.length<1||typeof o!="object")return t.apply(this,arguments);let i=r.getConfig(),s=i.dbStatementSerializer||lDt.defaultDbStatementSerializer,u=yE.trace.getSpan(yE.context.active())===void 0;if(i.requireParentSpan===!0&&u)return t.apply(this,arguments);let l={},{host:p,port:h}=this.options,y=s(o.name,o.args);r._dbSemconvStability&Jc.SemconvStability.OLD&&(l[Zc.ATTR_DB_SYSTEM]=Zc.DB_SYSTEM_VALUE_REDIS,l[Zc.ATTR_DB_STATEMENT]=y,l[Zc.ATTR_DB_CONNECTION_STRING]=`redis://${p}:${h}`),r._dbSemconvStability&Jc.SemconvStability.STABLE&&(l[SE.ATTR_DB_SYSTEM_NAME]=Zc.DB_SYSTEM_NAME_VALUE_REDIS,l[SE.ATTR_DB_QUERY_TEXT]=y),r._netSemconvStability&Jc.SemconvStability.OLD&&(l[Zc.ATTR_NET_PEER_NAME]=p,l[Zc.ATTR_NET_PEER_PORT]=h),r._netSemconvStability&Jc.SemconvStability.STABLE&&(l[SE.ATTR_SERVER_ADDRESS]=p,l[SE.ATTR_SERVER_PORT]=h);let S=r.tracer.startSpan(o.name,{kind:yE.SpanKind.CLIENT,attributes:l}),{requestHook:T}=i;T&&(0,oMe.safeExecuteInTheMiddle)(()=>T(S,{moduleVersion:n,cmdName:o.name,cmdArgs:o.args}),v=>{v&&yE.diag.error("ioredis instrumentation: request hook failed",v)},!0);try{let v=t.apply(this,arguments),R=o.resolve;o.resolve=function(O){(0,oMe.safeExecuteInTheMiddle)(()=>i.responseHook?.(S,o.name,o.args,O),M=>{M&&yE.diag.error("ioredis instrumentation: response hook failed",M)},!0),(0,uO.endSpan)(S,null),R(O)};let x=o.reject;return o.reject=function(O){(0,uO.endSpan)(S,O),x(O)},v}catch(v){throw(0,uO.endSpan)(S,v),v}}}_traceConnection(t){let n=this;return function(){let r=yE.trace.getSpan(yE.context.active())===void 0;if(n.getConfig().requireParentSpan===!0&&r)return t.apply(this,arguments);let o={},{host:i,port:s}=this.options;n._dbSemconvStability&Jc.SemconvStability.OLD&&(o[Zc.ATTR_DB_SYSTEM]=Zc.DB_SYSTEM_VALUE_REDIS,o[Zc.ATTR_DB_STATEMENT]="connect",o[Zc.ATTR_DB_CONNECTION_STRING]=`redis://${i}:${s}`),n._dbSemconvStability&Jc.SemconvStability.STABLE&&(o[SE.ATTR_DB_SYSTEM_NAME]=Zc.DB_SYSTEM_NAME_VALUE_REDIS,o[SE.ATTR_DB_QUERY_TEXT]="connect"),n._netSemconvStability&Jc.SemconvStability.OLD&&(o[Zc.ATTR_NET_PEER_NAME]=i,o[Zc.ATTR_NET_PEER_PORT]=s),n._netSemconvStability&Jc.SemconvStability.STABLE&&(o[SE.ATTR_SERVER_ADDRESS]=i,o[SE.ATTR_SERVER_PORT]=s);let u=n.tracer.startSpan("connect",{kind:yE.SpanKind.CLIENT,attributes:o});try{let l=t.apply(this,arguments);return(0,uO.endSpan)(u,null),l}catch(l){throw(0,uO.endSpan)(u,l),l}}}};t6.IORedisInstrumentation=HW});var uMe=P(n6=>{"use strict";m();Object.defineProperty(n6,"__esModule",{value:!0});n6.IORedisInstrumentation=void 0;var dDt=aMe();Object.defineProperty(n6,"IORedisInstrumentation",{enumerable:!0,get:function(){return dDt.IORedisInstrumentation}})});var r6=P(CR=>{"use strict";m();Object.defineProperty(CR,"__esModule",{value:!0});CR.PACKAGE_NAME=CR.PACKAGE_VERSION=void 0;CR.PACKAGE_VERSION="0.62.0";CR.PACKAGE_NAME="@opentelemetry/instrumentation-redis"});var cMe=P(TE=>{"use strict";m();Object.defineProperty(TE,"__esModule",{value:!0});TE.getTracedCreateStreamTrace=TE.getTracedCreateClient=TE.endSpan=void 0;var cO=(ze(),Le(nt)),pDt=(e,t)=>{t&&e.setStatus({code:cO.SpanStatusCode.ERROR,message:t.message}),e.end()};TE.endSpan=pDt;var fDt=e=>function(){let n=e.apply(this,arguments);return cO.context.bind(cO.context.active(),n)};TE.getTracedCreateClient=fDt;var mDt=e=>function(){return Object.prototype.hasOwnProperty.call(this,"stream")||Object.defineProperty(this,"stream",{get(){return this._patched_redis_stream},set(n){cO.context.bind(cO.context.active(),n),this._patched_redis_stream=n}}),e.apply(this,arguments)};TE.getTracedCreateStreamTrace=mDt});var o6=P(gu=>{"use strict";m();Object.defineProperty(gu,"__esModule",{value:!0});gu.DB_SYSTEM_VALUE_REDIS=gu.DB_SYSTEM_NAME_VALUE_REDIS=gu.ATTR_NET_PEER_PORT=gu.ATTR_NET_PEER_NAME=gu.ATTR_DB_SYSTEM=gu.ATTR_DB_STATEMENT=gu.ATTR_DB_CONNECTION_STRING=void 0;gu.ATTR_DB_CONNECTION_STRING="db.connection_string";gu.ATTR_DB_STATEMENT="db.statement";gu.ATTR_DB_SYSTEM="db.system";gu.ATTR_NET_PEER_NAME="net.peer.name";gu.ATTR_NET_PEER_PORT="net.peer.port";gu.DB_SYSTEM_NAME_VALUE_REDIS="redis";gu.DB_SYSTEM_VALUE_REDIS="redis"});var dMe=P(s6=>{"use strict";m();Object.defineProperty(s6,"__esModule",{value:!0});s6.RedisInstrumentationV2_V3=void 0;var Zl=sn(),i6=cMe(),lMe=r6(),lO=(ze(),Le(nt)),dO=(Xn(),Le(Gr)),XS=o6(),ADt=e6(),$W=class e extends Zl.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(lMe.PACKAGE_NAME,lMe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Zl.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Zl.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new Zl.InstrumentationNodeModuleDefinition("redis",[">=2.6.0 <4"],t=>((0,Zl.isWrapped)(t.RedisClient.prototype.internal_send_command)&&this._unwrap(t.RedisClient.prototype,"internal_send_command"),this._wrap(t.RedisClient.prototype,"internal_send_command",this._getPatchInternalSendCommand()),(0,Zl.isWrapped)(t.RedisClient.prototype.create_stream)&&this._unwrap(t.RedisClient.prototype,"create_stream"),this._wrap(t.RedisClient.prototype,"create_stream",this._getPatchCreateStream()),(0,Zl.isWrapped)(t.createClient)&&this._unwrap(t,"createClient"),this._wrap(t,"createClient",this._getPatchCreateClient()),t),t=>{t!==void 0&&(this._unwrap(t.RedisClient.prototype,"internal_send_command"),this._unwrap(t.RedisClient.prototype,"create_stream"),this._unwrap(t,"createClient"))})]}_getPatchInternalSendCommand(){let t=this;return function(r){return function(i){if(arguments.length!==1||typeof i!="object")return r.apply(this,arguments);let s=t.getConfig(),u=lO.trace.getSpan(lO.context.active())===void 0;if(s.requireParentSpan===!0&&u)return r.apply(this,arguments);let l=s?.dbStatementSerializer||ADt.defaultDbStatementSerializer,p={};t._semconvStability&Zl.SemconvStability.OLD&&Object.assign(p,{[XS.ATTR_DB_SYSTEM]:XS.DB_SYSTEM_VALUE_REDIS,[XS.ATTR_DB_STATEMENT]:l(i.command,i.args)}),t._semconvStability&Zl.SemconvStability.STABLE&&Object.assign(p,{[dO.ATTR_DB_SYSTEM_NAME]:XS.DB_SYSTEM_NAME_VALUE_REDIS,[dO.ATTR_DB_OPERATION_NAME]:i.command,[dO.ATTR_DB_QUERY_TEXT]:l(i.command,i.args)});let h=t.tracer.startSpan(`${e.COMPONENT}-${i.command}`,{kind:lO.SpanKind.CLIENT,attributes:p});if(this.connection_options){let S={};t._semconvStability&Zl.SemconvStability.OLD&&Object.assign(S,{[XS.ATTR_NET_PEER_NAME]:this.connection_options.host,[XS.ATTR_NET_PEER_PORT]:this.connection_options.port}),t._semconvStability&Zl.SemconvStability.STABLE&&Object.assign(S,{[dO.ATTR_SERVER_ADDRESS]:this.connection_options.host,[dO.ATTR_SERVER_PORT]:this.connection_options.port}),h.setAttributes(S)}this.address&&t._semconvStability&Zl.SemconvStability.OLD&&h.setAttribute(XS.ATTR_DB_CONNECTION_STRING,`redis://${this.address}`);let y=arguments[0].callback;if(y){let S=lO.context.active();arguments[0].callback=function(v,R){if(s?.responseHook){let x=s.responseHook;(0,Zl.safeExecuteInTheMiddle)(()=>{x(h,i.command,i.args,R)},O=>{O&&t._diag.error("Error executing responseHook",O)},!0)}return(0,i6.endSpan)(h,v),lO.context.with(S,y,this,...arguments)}}try{return r.apply(this,arguments)}catch(S){throw(0,i6.endSpan)(h,S),S}}}}_getPatchCreateClient(){return function(n){return(0,i6.getTracedCreateClient)(n)}}_getPatchCreateStream(){return function(n){return(0,i6.getTracedCreateStreamTrace)(n)}}};s6.RedisInstrumentationV2_V3=$W});var fMe=P(a6=>{"use strict";m();Object.defineProperty(a6,"__esModule",{value:!0});a6.getClientAttributes=void 0;var qW=(Xn(),Le(Gr)),vR=o6(),pMe=sn();function gDt(e,t,n){let r={};return n&pMe.SemconvStability.OLD&&Object.assign(r,{[vR.ATTR_DB_SYSTEM]:vR.DB_SYSTEM_VALUE_REDIS,[vR.ATTR_NET_PEER_NAME]:t?.socket?.host,[vR.ATTR_NET_PEER_PORT]:t?.socket?.port,[vR.ATTR_DB_CONNECTION_STRING]:hDt(e,t?.url)}),n&pMe.SemconvStability.STABLE&&Object.assign(r,{[qW.ATTR_DB_SYSTEM_NAME]:vR.DB_SYSTEM_NAME_VALUE_REDIS,[qW.ATTR_SERVER_ADDRESS]:t?.socket?.host,[qW.ATTR_SERVER_PORT]:t?.socket?.port}),r}a6.getClientAttributes=gDt;function hDt(e,t){if(!(typeof t!="string"||!t))try{let n=new URL(t);return n.searchParams.delete("user_pwd"),n.username="",n.password="",n.href}catch(n){e.error("failed to sanitize redis connection url",n)}}});var hMe=P(u6=>{"use strict";m();Object.defineProperty(u6,"__esModule",{value:!0});u6.RedisInstrumentationV4_V5=void 0;var sp=(ze(),Le(nt)),Io=sn(),mMe=fMe(),_Dt=e6(),AMe=r6(),VW=(Xn(),Le(Gr)),EDt=o6(),pO=Symbol("opentelemetry.instrumentation.redis.open_spans"),gMe=Symbol("opentelemetry.instrumentation.redis.multi_command_options"),YW=class e extends Io.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(AMe.PACKAGE_NAME,AMe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Io.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Io.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[this._getInstrumentationNodeModuleDefinition("@redis/client"),this._getInstrumentationNodeModuleDefinition("@node-redis/client")]}_getInstrumentationNodeModuleDefinition(t){let n=new Io.InstrumentationNodeModuleFile(`${t}/dist/lib/commander.js`,["^1.0.0"],(i,s)=>{let u=i.transformCommandArguments;if(!u)return this._diag.error("internal instrumentation error, missing transformCommandArguments function"),i;let l=s?.startsWith("1.0.")?"extendWithCommands":"attachCommands";return(0,Io.isWrapped)(i?.[l])&&this._unwrap(i,l),this._wrap(i,l,this._getPatchExtendWithCommands(u)),i},i=>{(0,Io.isWrapped)(i?.extendWithCommands)&&this._unwrap(i,"extendWithCommands"),(0,Io.isWrapped)(i?.attachCommands)&&this._unwrap(i,"attachCommands")}),r=new Io.InstrumentationNodeModuleFile(`${t}/dist/lib/client/multi-command.js`,["^1.0.0","^5.0.0"],i=>{let s=i?.default?.prototype;return(0,Io.isWrapped)(s?.exec)&&this._unwrap(s,"exec"),this._wrap(s,"exec",this._getPatchMultiCommandsExec(!1)),(0,Io.isWrapped)(s?.execAsPipeline)&&this._unwrap(s,"execAsPipeline"),this._wrap(s,"execAsPipeline",this._getPatchMultiCommandsExec(!0)),(0,Io.isWrapped)(s?.addCommand)&&this._unwrap(s,"addCommand"),this._wrap(s,"addCommand",this._getPatchMultiCommandsAddCommand()),i},i=>{let s=i?.default?.prototype;(0,Io.isWrapped)(s?.exec)&&this._unwrap(s,"exec"),(0,Io.isWrapped)(s?.addCommand)&&this._unwrap(s,"addCommand")}),o=new Io.InstrumentationNodeModuleFile(`${t}/dist/lib/client/index.js`,["^1.0.0","^5.0.0"],i=>{let s=i?.default?.prototype;return s?.multi&&((0,Io.isWrapped)(s?.multi)&&this._unwrap(s,"multi"),this._wrap(s,"multi",this._getPatchRedisClientMulti())),s?.MULTI&&((0,Io.isWrapped)(s?.MULTI)&&this._unwrap(s,"MULTI"),this._wrap(s,"MULTI",this._getPatchRedisClientMulti())),(0,Io.isWrapped)(s?.sendCommand)&&this._unwrap(s,"sendCommand"),this._wrap(s,"sendCommand",this._getPatchRedisClientSendCommand()),this._wrap(s,"connect",this._getPatchedClientConnect()),i},i=>{let s=i?.default?.prototype;(0,Io.isWrapped)(s?.multi)&&this._unwrap(s,"multi"),(0,Io.isWrapped)(s?.MULTI)&&this._unwrap(s,"MULTI"),(0,Io.isWrapped)(s?.sendCommand)&&this._unwrap(s,"sendCommand")});return new Io.InstrumentationNodeModuleDefinition(t,["^1.0.0","^5.0.0"],i=>i,()=>{},[n,r,o])}_getPatchExtendWithCommands(t){let n=this;return function(o){return function(s){if(s?.BaseClass?.name!=="RedisClient")return o.apply(this,arguments);let u=s.executor;return s.executor=function(l,p){let h=t(l,p).args;return n._traceClientCommand(u,this,arguments,h)},o.apply(this,arguments)}}}_getPatchMultiCommandsExec(t){let n=this;return function(o){return function(){let s=o.apply(this,arguments);return typeof s?.then!="function"?(n._diag.error("non-promise result when patching exec/execAsPipeline"),s):s.then(u=>{let l=this[pO];return n._endSpansWithRedisReplies(l,u,t),u}).catch(u=>{let l=this[pO];if(!l)n._diag.error("cannot find open spans to end for multi/pipeline");else{let p=u.constructor.name==="MultiErrorReply"?u.replies:new Array(l.length).fill(u);n._endSpansWithRedisReplies(l,p,t)}return Promise.reject(u)})}}}_getPatchMultiCommandsAddCommand(){let t=this;return function(r){return function(i){return t._traceClientCommand(r,this,arguments,i)}}}_getPatchRedisClientMulti(){return function(n){return function(){let o=n.apply(this,arguments);return o[gMe]=this.options,o}}}_getPatchRedisClientSendCommand(){let t=this;return function(r){return function(i){return t._traceClientCommand(r,this,arguments,i)}}}_getPatchedClientConnect(){let t=this;return function(r){return function(){let i=this.options,s=(0,mMe.getClientAttributes)(t._diag,i,t._semconvStability),u=t.tracer.startSpan(`${e.COMPONENT}-connect`,{kind:sp.SpanKind.CLIENT,attributes:s});return sp.context.with(sp.trace.setSpan(sp.context.active(),u),()=>r.apply(this)).then(p=>(u.end(),p)).catch(p=>(u.recordException(p),u.setStatus({code:sp.SpanStatusCode.ERROR,message:p.message}),u.end(),Promise.reject(p)))}}}_traceClientCommand(t,n,r,o){if(sp.trace.getSpan(sp.context.active())===void 0&&this.getConfig().requireParentSpan)return t.apply(n,r);let s=n.options||n[gMe],u=o[0],l=o.slice(1),p=this.getConfig().dbStatementSerializer||_Dt.defaultDbStatementSerializer,h=(0,mMe.getClientAttributes)(this._diag,s,this._semconvStability);this._semconvStability&Io.SemconvStability.STABLE&&(h[VW.ATTR_DB_OPERATION_NAME]=u);try{let T=p(u,l);T!=null&&(this._semconvStability&Io.SemconvStability.OLD&&(h[EDt.ATTR_DB_STATEMENT]=T),this._semconvStability&Io.SemconvStability.STABLE&&(h[VW.ATTR_DB_QUERY_TEXT]=T))}catch(T){this._diag.error("dbStatementSerializer throw an exception",T,{commandName:u})}let y=this.tracer.startSpan(`${e.COMPONENT}-${u}`,{kind:sp.SpanKind.CLIENT,attributes:h}),S=sp.context.with(sp.trace.setSpan(sp.context.active(),y),()=>t.apply(n,r));if(typeof S?.then=="function")S.then(T=>{this._endSpanWithResponse(y,u,l,T,void 0)},T=>{this._endSpanWithResponse(y,u,l,null,T)});else{let T=S;T[pO]=T[pO]||[],T[pO].push({span:y,commandName:u,commandArgs:l})}return S}_endSpansWithRedisReplies(t,n,r=!1){if(!t)return this._diag.error("cannot find open spans to end for redis multi/pipeline");if(n.length!==t.length)return this._diag.error("number of multi command spans does not match response from redis");let o=t.map(u=>u.commandName),s=o.every(u=>u===o[0])?(r?"PIPELINE ":"MULTI ")+o[0]:r?"PIPELINE":"MULTI";for(let u=0;u<t.length;u++){let{span:l,commandArgs:p}=t[u],h=n[u],[y,S]=h instanceof Error?[null,h]:[h,void 0];this._semconvStability&Io.SemconvStability.STABLE&&l.setAttribute(VW.ATTR_DB_OPERATION_NAME,s),this._endSpanWithResponse(l,o[u],p,y,S)}}_endSpanWithResponse(t,n,r,o,i){let{responseHook:s}=this.getConfig();if(!i&&s)try{s(t,n,r,o)}catch(u){this._diag.error("responseHook throw an exception",u)}i&&(t.recordException(i),t.setStatus({code:sp.SpanStatusCode.ERROR,message:i?.message})),t.end()}};u6.RedisInstrumentationV4_V5=YW});var yMe=P(c6=>{"use strict";m();Object.defineProperty(c6,"__esModule",{value:!0});c6.RedisInstrumentation=void 0;var yDt=sn(),_Me=r6(),SDt=dMe(),TDt=hMe(),EMe={requireParentSpan:!1},KW=class extends yDt.InstrumentationBase{instrumentationV2_V3;instrumentationV4_V5;initialized=!1;constructor(t={}){let n={...EMe,...t};super(_Me.PACKAGE_NAME,_Me.PACKAGE_VERSION,n),this.instrumentationV2_V3=new SDt.RedisInstrumentationV2_V3(this.getConfig()),this.instrumentationV4_V5=new TDt.RedisInstrumentationV4_V5(this.getConfig()),this.initialized=!0}setConfig(t={}){let n={...EMe,...t};super.setConfig(n),this.initialized&&(this.instrumentationV2_V3.setConfig(n),this.instrumentationV4_V5.setConfig(n))}init(){}getModuleDefinitions(){return[...this.instrumentationV2_V3.getModuleDefinitions(),...this.instrumentationV4_V5.getModuleDefinitions()]}setTracerProvider(t){super.setTracerProvider(t),this.initialized&&(this.instrumentationV2_V3.setTracerProvider(t),this.instrumentationV4_V5.setTracerProvider(t))}enable(){super.enable(),this.initialized&&(this.instrumentationV2_V3.enable(),this.instrumentationV4_V5.enable())}disable(){super.disable(),this.initialized&&(this.instrumentationV2_V3.disable(),this.instrumentationV4_V5.disable())}};c6.RedisInstrumentation=KW});var SMe=P(l6=>{"use strict";m();Object.defineProperty(l6,"__esModule",{value:!0});l6.RedisInstrumentation=void 0;var bDt=yMe();Object.defineProperty(l6,"RedisInstrumentation",{enumerable:!0,get:function(){return bDt.RedisInstrumentation}})});function fO(e,t){return e.includes(t.toLowerCase())}function ZW(e){return fO(JW,e)?"cache.get":fO(CDt,e)?"cache.put":void 0}function vDt(e,t){return t.some(n=>e.startsWith(n))}function bMe(e,t){try{if(t.length===0)return;let n=o=>typeof o=="string"||typeof o=="number"||Buffer.isBuffer(o)?[o.toString()]:Array.isArray(o)?TMe(o.map(i=>n(i))):["<unknown>"],r=t[0];return fO(IDt,e)&&r!=null?n(r):TMe(t.map(o=>n(o)))}catch{return}}function IMe(e,t,n){if(!ZW(e))return!1;for(let r of t)if(vDt(r,n))return!0;return!1}function CMe(e){let t=n=>{try{return Buffer.isBuffer(n)?n.byteLength:typeof n=="string"?n.length:typeof n=="number"?n.toString().length:n==null?0:JSON.stringify(n).length}catch{return}};return Array.isArray(e)?e.reduce((n,r)=>{let o=t(r);return typeof o=="number"?n!==void 0?n+o:o:n},0):t(e)}function TMe(e){let t=[],n=r=>{r.forEach(o=>{Array.isArray(o)?n(o):t.push(o)})};return n(e),t}var IDt,JW,CDt,vMe=w(()=>{m();IDt=["get","set","setex"],JW=["get","mget"],CDt=["set","setex"]});var RMe,xMe,d6,mO,DMe,RDt,xDt,NMe,DDt,BMe,wMe=w(()=>{m();RMe=ue(uMe(),1),xMe=ue(SMe(),1);mt();_r();vMe();d6="Redis",mO={},DMe=(e,t,n,r)=>{e.setAttribute(Pt,"auto.db.otel.redis");let o=bMe(t,n),i=ZW(t);if(!o||!i||!mO.cachePrefixes||!IMe(t,o,mO.cachePrefixes))return;let s=kt(e).data["net.peer.name"],u=kt(e).data["net.peer.port"];u&&s&&e.setAttributes({"network.peer.address":s,"network.peer.port":u});let l=CMe(r);l&&e.setAttribute(tY,l),fO(JW,t)&&l!==void 0&&e.setAttribute(X7,l>0),e.setAttributes({[Xt]:i,[eY]:o});let p=o.join(", ");e.updateName(mO.maxCacheKeyLength?L_(p,mO.maxCacheKeyLength):p)},RDt=ut(`${d6}.IORedis`,()=>new RMe.IORedisInstrumentation({responseHook:DMe})),xDt=ut(`${d6}.Redis`,()=>new xMe.RedisInstrumentation({responseHook:DMe})),NMe=Object.assign(()=>{RDt(),xDt()},{id:d6}),DDt=((e={})=>({name:d6,setupOnce(){mO=e,NMe()}})),BMe=DDt});var OMe=P(p6=>{"use strict";m();Object.defineProperty(p6,"__esModule",{value:!0});p6.EVENT_LISTENERS_SET=void 0;p6.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.pg.eventListenersSet")});var WW=P(AO=>{"use strict";m();Object.defineProperty(AO,"__esModule",{value:!0});AO.AttributeNames=void 0;var NDt;(function(e){e.PG_VALUES="db.postgresql.values",e.PG_PLAN="db.postgresql.plan",e.IDLE_TIMEOUT_MILLIS="db.postgresql.idle.timeout.millis",e.MAX_CLIENT="db.postgresql.max.client"})(NDt=AO.AttributeNames||(AO.AttributeNames={}))});var XW=P(wr=>{"use strict";m();Object.defineProperty(wr,"__esModule",{value:!0});wr.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS=wr.METRIC_DB_CLIENT_CONNECTION_COUNT=wr.DB_SYSTEM_VALUE_POSTGRESQL=wr.DB_CLIENT_CONNECTION_STATE_VALUE_USED=wr.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE=wr.ATTR_NET_PEER_PORT=wr.ATTR_NET_PEER_NAME=wr.ATTR_DB_USER=wr.ATTR_DB_SYSTEM=wr.ATTR_DB_STATEMENT=wr.ATTR_DB_NAME=wr.ATTR_DB_CONNECTION_STRING=wr.ATTR_DB_CLIENT_CONNECTION_STATE=wr.ATTR_DB_CLIENT_CONNECTION_POOL_NAME=void 0;wr.ATTR_DB_CLIENT_CONNECTION_POOL_NAME="db.client.connection.pool.name";wr.ATTR_DB_CLIENT_CONNECTION_STATE="db.client.connection.state";wr.ATTR_DB_CONNECTION_STRING="db.connection_string";wr.ATTR_DB_NAME="db.name";wr.ATTR_DB_STATEMENT="db.statement";wr.ATTR_DB_SYSTEM="db.system";wr.ATTR_DB_USER="db.user";wr.ATTR_NET_PEER_NAME="net.peer.name";wr.ATTR_NET_PEER_PORT="net.peer.port";wr.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE="idle";wr.DB_CLIENT_CONNECTION_STATE_VALUE_USED="used";wr.DB_SYSTEM_VALUE_POSTGRESQL="postgresql";wr.METRIC_DB_CLIENT_CONNECTION_COUNT="db.client.connection.count";wr.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS="db.client.connection.pending_requests"});var eX=P(gO=>{"use strict";m();Object.defineProperty(gO,"__esModule",{value:!0});gO.SpanNames=void 0;var BDt;(function(e){e.QUERY_PREFIX="pg.query",e.CONNECT="pg.connect",e.POOL_CONNECT="pg-pool.connect"})(BDt=gO.SpanNames||(gO.SpanNames={}))});var FMe=P(sr=>{"use strict";m();Object.defineProperty(sr,"__esModule",{value:!0});sr.sanitizedErrorMessage=sr.isObjectWithTextString=sr.getErrorMessage=sr.patchClientConnectCallback=sr.patchCallbackPGPool=sr.updateCounter=sr.getPoolName=sr.patchCallback=sr.handleExecutionResult=sr.handleConfigQuery=sr.shouldSkipInstrumentation=sr.getSemanticAttributesFromPoolConnection=sr.getSemanticAttributesFromConnection=sr.getConnectionString=sr.parseAndMaskConnectionString=sr.parseNormalizedOperationName=sr.getQuerySpanName=void 0;var bE=(ze(),Le(nt)),f6=WW(),ap=(Xn(),Le(Gr)),Ei=XW(),eT=sn(),kMe=eX();function PMe(e,t){if(!t)return kMe.SpanNames.QUERY_PREFIX;let n=typeof t.name=="string"&&t.name?t.name:MMe(t.text);return`${kMe.SpanNames.QUERY_PREFIX}:${n}${e?` ${e}`:""}`}sr.getQuerySpanName=PMe;function MMe(e){let t=e.trim(),n=t.indexOf(" "),r=n===-1?t:t.slice(0,n);return r=r.toUpperCase(),r.endsWith(";")?r.slice(0,-1):r}sr.parseNormalizedOperationName=MMe;function LMe(e){try{let t=new URL(e);return t.username="",t.password="",t.toString()}catch{return"postgresql://localhost:5432/"}}sr.parseAndMaskConnectionString=LMe;function tX(e){if("connectionString"in e&&e.connectionString)return LMe(e.connectionString);let t=e.host||"localhost",n=e.port||5432,r=e.database||"";return`postgresql://${t}:${n}/${r}`}sr.getConnectionString=tX;function m6(e){if(Number.isInteger(e))return e}function UMe(e,t){let n={};return t&eT.SemconvStability.OLD&&(n={...n,[Ei.ATTR_DB_SYSTEM]:Ei.DB_SYSTEM_VALUE_POSTGRESQL,[Ei.ATTR_DB_NAME]:e.database,[Ei.ATTR_DB_CONNECTION_STRING]:tX(e),[Ei.ATTR_DB_USER]:e.user,[Ei.ATTR_NET_PEER_NAME]:e.host,[Ei.ATTR_NET_PEER_PORT]:m6(e.port)}),t&eT.SemconvStability.STABLE&&(n={...n,[ap.ATTR_DB_SYSTEM_NAME]:ap.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[ap.ATTR_DB_NAMESPACE]:e.namespace,[ap.ATTR_SERVER_ADDRESS]:e.host,[ap.ATTR_SERVER_PORT]:m6(e.port)}),n}sr.getSemanticAttributesFromConnection=UMe;function wDt(e,t){let n;try{n=e.connectionString?new URL(e.connectionString):void 0}catch{n=void 0}let r={[f6.AttributeNames.IDLE_TIMEOUT_MILLIS]:e.idleTimeoutMillis,[f6.AttributeNames.MAX_CLIENT]:e.maxClient};return t&eT.SemconvStability.OLD&&(r={...r,[Ei.ATTR_DB_SYSTEM]:Ei.DB_SYSTEM_VALUE_POSTGRESQL,[Ei.ATTR_DB_NAME]:n?.pathname.slice(1)??e.database,[Ei.ATTR_DB_CONNECTION_STRING]:tX(e),[Ei.ATTR_NET_PEER_NAME]:n?.hostname??e.host,[Ei.ATTR_NET_PEER_PORT]:Number(n?.port)||m6(e.port),[Ei.ATTR_DB_USER]:n?.username??e.user}),t&eT.SemconvStability.STABLE&&(r={...r,[ap.ATTR_DB_SYSTEM_NAME]:ap.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[ap.ATTR_DB_NAMESPACE]:e.namespace,[ap.ATTR_SERVER_ADDRESS]:n?.hostname??e.host,[ap.ATTR_SERVER_PORT]:Number(n?.port)||m6(e.port)}),r}sr.getSemanticAttributesFromPoolConnection=wDt;function ODt(e){return e.requireParentSpan===!0&&bE.trace.getSpan(bE.context.active())===void 0}sr.shouldSkipInstrumentation=ODt;function kDt(e,t,n,r){let{connectionParameters:o}=this,i=o.database,s=PMe(i,r),u=e.startSpan(s,{kind:bE.SpanKind.CLIENT,attributes:UMe(o,n)});if(!r)return u;if(r.text&&(n&eT.SemconvStability.OLD&&u.setAttribute(Ei.ATTR_DB_STATEMENT,r.text),n&eT.SemconvStability.STABLE&&u.setAttribute(ap.ATTR_DB_QUERY_TEXT,r.text)),t.enhancedDatabaseReporting&&Array.isArray(r.values))try{let l=r.values.map(p=>p==null?"null":p instanceof Buffer?p.toString():typeof p=="object"?typeof p.toPostgres=="function"?p.toPostgres():JSON.stringify(p):p.toString());u.setAttribute(f6.AttributeNames.PG_VALUES,l)}catch(l){bE.diag.error("failed to stringify ",r.values,l)}return typeof r.name=="string"&&u.setAttribute(f6.AttributeNames.PG_PLAN,r.name),u}sr.handleConfigQuery=kDt;function QMe(e,t,n){typeof e.responseHook=="function"&&(0,eT.safeExecuteInTheMiddle)(()=>{e.responseHook(t,{data:n})},r=>{r&&bE.diag.error("Error running response hook",r)},!0)}sr.handleExecutionResult=QMe;function PDt(e,t,n,r,o){return function(s,u){s?(Object.prototype.hasOwnProperty.call(s,"code")&&(r[ap.ATTR_ERROR_TYPE]=s.code),s instanceof Error&&t.recordException(A6(s)),t.setStatus({code:bE.SpanStatusCode.ERROR,message:s.message})):QMe(e,t,u),o(),t.end(),n.call(this,s,u)}}sr.patchCallback=PDt;function MDt(e){let t="";return t+=(e?.host?`${e.host}`:"unknown_host")+":",t+=(e?.port?`${e.port}`:"unknown_port")+"/",t+=e?.database?`${e.database}`:"unknown_database",t.trim()}sr.getPoolName=MDt;function LDt(e,t,n,r,o){let i=t.totalCount,s=t.waitingCount,u=t.idleCount,l=i-u;return n.add(l-o.used,{[Ei.ATTR_DB_CLIENT_CONNECTION_STATE]:Ei.DB_CLIENT_CONNECTION_STATE_VALUE_USED,[Ei.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),n.add(u-o.idle,{[Ei.ATTR_DB_CLIENT_CONNECTION_STATE]:Ei.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE,[Ei.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),r.add(s-o.pending,{[Ei.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),{used:l,idle:u,pending:s}}sr.updateCounter=LDt;function UDt(e,t){return function(r,o,i){r&&(r instanceof Error&&e.recordException(A6(r)),e.setStatus({code:bE.SpanStatusCode.ERROR,message:r.message})),e.end(),t.call(this,r,o,i)}}sr.patchCallbackPGPool=UDt;function QDt(e,t){return function(r){r&&(r instanceof Error&&e.recordException(A6(r)),e.setStatus({code:bE.SpanStatusCode.ERROR,message:r.message})),e.end(),t.apply(this,arguments)}}sr.patchClientConnectCallback=QDt;function FDt(e){return typeof e=="object"&&e!==null&&"message"in e?String(e.message):void 0}sr.getErrorMessage=FDt;function GDt(e){return typeof e=="object"&&typeof e?.text=="string"}sr.isObjectWithTextString=GDt;function A6(e){let t=e?.name??"PostgreSQLError",n=e?.code??"UNKNOWN";return`PostgreSQL error of type '${t}' occurred (code: ${n})`}sr.sanitizedErrorMessage=A6});var GMe=P(RR=>{"use strict";m();Object.defineProperty(RR,"__esModule",{value:!0});RR.PACKAGE_NAME=RR.PACKAGE_VERSION=void 0;RR.PACKAGE_VERSION="0.66.0";RR.PACKAGE_NAME="@opentelemetry/instrumentation-pg"});var VMe=P(h6=>{"use strict";m();Object.defineProperty(h6,"__esModule",{value:!0});h6.PgInstrumentation=void 0;var tc=sn(),$r=(ze(),Le(nt)),jMe=OMe(),ti=FMe(),zMe=UW(),HMe=GMe(),$Me=eX(),g6=Cr(),Cf=(Xn(),Le(Gr)),hO=XW();function xR(e){return e[Symbol.toStringTag]==="Module"?e.default:e}var nX=class extends tc.InstrumentationBase{_connectionsCounter={used:0,idle:0,pending:0};_semconvStability;constructor(t={}){super(HMe.PACKAGE_NAME,HMe.PACKAGE_VERSION,t),this._semconvStability=(0,tc.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._operationDuration=this.meter.createHistogram(Cf.METRIC_DB_CLIENT_OPERATION_DURATION,{description:"Duration of database client operations.",unit:"s",valueType:$r.ValueType.DOUBLE,advice:{explicitBucketBoundaries:[.001,.005,.01,.05,.1,.5,1,5,10]}}),this._connectionsCounter={idle:0,pending:0,used:0},this._connectionsCount=this.meter.createUpDownCounter(hO.METRIC_DB_CLIENT_CONNECTION_COUNT,{description:"The number of connections that are currently in state described by the state attribute.",unit:"{connection}"}),this._connectionPendingRequests=this.meter.createUpDownCounter(hO.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS,{description:"The number of current pending requests for an open connection.",unit:"{connection}"})}init(){let t=[">=8.0.3 <9"],n=[">=2.0.0 <4"],r=new tc.InstrumentationNodeModuleFile("pg/lib/native/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),o=new tc.InstrumentationNodeModuleFile("pg/lib/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),i=new tc.InstrumentationNodeModuleDefinition("pg",t,u=>{let l=xR(u);return this._patchPgClient(l.Client),u},u=>{let l=xR(u);return this._unpatchPgClient(l.Client),u},[o,r]),s=new tc.InstrumentationNodeModuleDefinition("pg-pool",n,u=>{let l=xR(u);return(0,tc.isWrapped)(l.prototype.connect)&&this._unwrap(l.prototype,"connect"),this._wrap(l.prototype,"connect",this._getPoolConnectPatch()),l},u=>{let l=xR(u);(0,tc.isWrapped)(l.prototype.connect)&&this._unwrap(l.prototype,"connect")});return[i,s]}_patchPgClient(t){if(!t)return;let n=xR(t);return(0,tc.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,tc.isWrapped)(n.prototype.connect)&&this._unwrap(n.prototype,"connect"),this._wrap(n.prototype,"query",this._getClientQueryPatch()),this._wrap(n.prototype,"connect",this._getClientConnectPatch()),t}_unpatchPgClient(t){let n=xR(t);return(0,tc.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,tc.isWrapped)(n.prototype.connect)&&this._unwrap(n.prototype,"connect"),t}_getClientConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(ti.shouldSkipInstrumentation(i)||i.ignoreConnectSpans)return n.call(this,o);let s=t.tracer.startSpan($Me.SpanNames.CONNECT,{kind:$r.SpanKind.CLIENT,attributes:ti.getSemanticAttributesFromConnection(this,t._semconvStability)});if(o){let l=$r.trace.getSpan($r.context.active());o=ti.patchClientConnectCallback(s,o),l&&(o=$r.context.bind($r.context.active(),o))}let u=$r.context.with($r.trace.setSpan($r.context.active(),s),()=>n.call(this,o));return qMe(s,u)}}recordOperationDuration(t,n){let r={},o=[Cf.ATTR_DB_NAMESPACE,Cf.ATTR_ERROR_TYPE,Cf.ATTR_SERVER_PORT,Cf.ATTR_SERVER_ADDRESS,Cf.ATTR_DB_OPERATION_NAME];this._semconvStability&tc.SemconvStability.OLD&&o.push(hO.ATTR_DB_SYSTEM),this._semconvStability&tc.SemconvStability.STABLE&&o.push(Cf.ATTR_DB_SYSTEM_NAME),o.forEach(s=>{s in t&&(r[s]=t[s])});let i=(0,g6.hrTimeToMilliseconds)((0,g6.hrTimeDuration)(n,(0,g6.hrTime)()))/1e3;this._operationDuration.record(i,r)}_getClientQueryPatch(){let t=this;return n=>(this._diag.debug("Patching pg.Client.prototype.query"),function(...o){if(ti.shouldSkipInstrumentation(t.getConfig()))return n.apply(this,o);let i=(0,g6.hrTime)(),s=o[0],u=typeof s=="string",l=ti.isObjectWithTextString(s),p=u?{text:s,values:Array.isArray(o[1])?o[1]:void 0}:l?{...s,name:s.name,text:s.text,values:s.values??(Array.isArray(o[1])?o[1]:void 0)}:void 0,h={[hO.ATTR_DB_SYSTEM]:hO.DB_SYSTEM_VALUE_POSTGRESQL,[Cf.ATTR_DB_NAMESPACE]:this.database,[Cf.ATTR_SERVER_PORT]:this.connectionParameters.port,[Cf.ATTR_SERVER_ADDRESS]:this.connectionParameters.host};p?.text&&(h[Cf.ATTR_DB_OPERATION_NAME]=ti.parseNormalizedOperationName(p?.text));let y=()=>{t.recordOperationDuration(h,i)},S=t.getConfig(),T=ti.handleConfigQuery.call(this,t.tracer,S,t._semconvStability,p);if(S.addSqlCommenterCommentToQueries&&(u?o[0]=(0,zMe.addSqlCommenterComment)(T,s):l&&!("name"in s)&&(o[0]={...s,text:(0,zMe.addSqlCommenterComment)(T,s.text)})),o.length>0){let x=$r.trace.getSpan($r.context.active());if(typeof o[o.length-1]=="function")o[o.length-1]=ti.patchCallback(S,T,o[o.length-1],h,y),x&&(o[o.length-1]=$r.context.bind($r.context.active(),o[o.length-1]));else if(typeof p?.callback=="function"){let O=ti.patchCallback(t.getConfig(),T,p.callback,h,y);x&&(O=$r.context.bind($r.context.active(),O)),o[0].callback=O}}let{requestHook:v}=S;typeof v=="function"&&p&&(0,tc.safeExecuteInTheMiddle)(()=>{let{database:x,host:O,port:M,user:j}=this.connectionParameters;v(T,{connection:{database:x,host:O,port:M,user:j},query:{text:p.text,values:p.values,name:p.name}})},x=>{x&&t._diag.error("Error running query hook",x)},!0);let R;try{R=n.apply(this,o)}catch(x){throw x instanceof Error&&T.recordException(ti.sanitizedErrorMessage(x)),T.setStatus({code:$r.SpanStatusCode.ERROR,message:ti.getErrorMessage(x)}),T.end(),x}return R instanceof Promise?R.then(x=>new Promise(O=>{ti.handleExecutionResult(t.getConfig(),T,x),y(),T.end(),O(x)})).catch(x=>new Promise((O,M)=>{x instanceof Error&&T.recordException(ti.sanitizedErrorMessage(x)),T.setStatus({code:$r.SpanStatusCode.ERROR,message:x.message}),y(),T.end(),M(x)})):R})}_setPoolConnectEventListeners(t){if(t[jMe.EVENT_LISTENERS_SET])return;let n=ti.getPoolName(t.options);t.on("connect",()=>{this._connectionsCounter=ti.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("acquire",()=>{this._connectionsCounter=ti.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("remove",()=>{this._connectionsCounter=ti.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("release",()=>{this._connectionsCounter=ti.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t[jMe.EVENT_LISTENERS_SET]=!0}_getPoolConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(ti.shouldSkipInstrumentation(i))return n.call(this,o);if(t._setPoolConnectEventListeners(this),i.ignoreConnectSpans)return n.call(this,o);let s=t.tracer.startSpan($Me.SpanNames.POOL_CONNECT,{kind:$r.SpanKind.CLIENT,attributes:ti.getSemanticAttributesFromPoolConnection(this.options,t._semconvStability)});if(o){let l=$r.trace.getSpan($r.context.active());o=ti.patchCallbackPGPool(s,o),l&&(o=$r.context.bind($r.context.active(),o))}let u=$r.context.with($r.trace.setSpan($r.context.active(),s),()=>n.call(this,o));return qMe(s,u)}}};h6.PgInstrumentation=nX;function qMe(e,t){if(!(t instanceof Promise))return t;let n=t;return $r.context.bind($r.context.active(),n.then(r=>(e.end(),r)).catch(r=>(r instanceof Error&&e.recordException(ti.sanitizedErrorMessage(r)),e.setStatus({code:$r.SpanStatusCode.ERROR,message:ti.getErrorMessage(r)}),e.end(),Promise.reject(r))))}});var YMe=P(DR=>{"use strict";m();Object.defineProperty(DR,"__esModule",{value:!0});DR.AttributeNames=DR.PgInstrumentation=void 0;var jDt=VMe();Object.defineProperty(DR,"PgInstrumentation",{enumerable:!0,get:function(){return jDt.PgInstrumentation}});var zDt=WW();Object.defineProperty(DR,"AttributeNames",{enumerable:!0,get:function(){return zDt.AttributeNames}})});var KMe,JMe,ZMe,HDt,WMe,XMe=w(()=>{m();KMe=ue(YMe(),1);_r();JMe="Postgres",ZMe=ut(JMe,KMe.PgInstrumentation,e=>({requireParentSpan:!0,requestHook(t){zr(t,"auto.db.otel.postgres")},ignoreConnectSpans:e?.ignoreConnectSpans??!1})),HDt=(e=>({name:JMe,setupOnce(){ZMe(e)}})),WMe=HDt});var IE,oX,e2e,$Dt,qDt,t2e,rX,VDt,n2e,r2e=w(()=>{m();ze();IE=ue(sn(),1);Xn();mt();_r();HS();oX="PostgresJs",e2e=[">=3.0.0 <4"],$Dt=/^(SELECT|INSERT|UPDATE|DELETE|CREATE|DROP|ALTER)/i,qDt=Symbol.for("sentry.query.from.instrumented.sql"),t2e=ut(oX,e=>new rX({requireParentSpan:e?.requireParentSpan??!0,requestHook:e?.requestHook})),rX=class extends IE.InstrumentationBase{constructor(t){super("sentry-postgres-js",er,t)}init(){let t=new IE.InstrumentationNodeModuleDefinition("postgres",e2e,n=>{try{return this._patchPostgres(n)}catch(r){return xs&&W.error("Failed to patch postgres module:",r),n}},n=>n);return["src","cf/src","cjs/src"].forEach(n=>{t.files.push(new IE.InstrumentationNodeModuleFile(`postgres/${n}/query.js`,e2e,this._patchQueryPrototype.bind(this),this._unpatchQueryPrototype.bind(this)))}),t}_patchPostgres(t){let n=typeof t=="function",r=n?t:t.default;if(typeof r!="function")return xs&&W.warn("postgres module does not export a function. Skipping instrumentation."),t;let o=this,i=function(...s){let u=Reflect.construct(r,s);if(!u||typeof u!="function")return xs&&W.warn("postgres() did not return a valid instance"),u;let l=o.getConfig();return rK(u,{requireParentSpan:l.requireParentSpan,requestHook:l.requestHook})};Object.setPrototypeOf(i,r),Object.setPrototypeOf(i.prototype,r.prototype);for(let s of Object.getOwnPropertyNames(r))if(!["length","name","prototype"].includes(s)){let u=Object.getOwnPropertyDescriptor(r,s);u&&Object.defineProperty(i,s,u)}return n?i:(pw(t,"default",i),t)}_shouldCreateSpans(){let t=this.getConfig();return qt.getSpan(Xe.active())!==void 0||!t.requireParentSpan}_setOperationName(t,n,r){if(r){t.setAttribute(PC,r);return}let o=n?.match($Dt);o?.[1]&&t.setAttribute(PC,o[1].toUpperCase())}_reconstructQuery(t){if(t?.length)return t.length===1?t[0]||void 0:t.reduce((n,r,o)=>o===0?r:`${n}$${o}${r}`,"")}_sanitizeSqlQuery(t){return t?t.replace(/--.*$/gm,"").replace(/\/\*[\s\S]*?\*\//g,"").replace(/;\s*$/,"").replace(/\s+/g," ").trim().replace(/\bX'[0-9A-Fa-f]*'/gi,"?").replace(/\bB'[01]*'/gi,"?").replace(/'(?:[^']|'')*'/g,"?").replace(/\b0x[0-9A-Fa-f]+/gi,"?").replace(/\b(?:TRUE|FALSE)\b/gi,"?").replace(/-?\b\d+\.?\d*[eE][+-]?\d+\b/g,"?").replace(/-?\b\d+\.\d+\b/g,"?").replace(/-?\.\d+\b/g,"?").replace(/(?<!\$)-?\b\d+\b/g,"?").replace(/\bIN\b\s*\(\s*\?(?:\s*,\s*\?)*\s*\)/gi,"IN (?)").replace(/\bIN\b\s*\(\s*\$\d+(?:\s*,\s*\$\d+)*\s*\)/gi,"IN ($?)"):"Unknown SQL Query"}_patchQueryPrototype(t){let n=this,r=t.Query.prototype.handle;return t.Query.prototype.handle=async function(...o){if(this[qDt])return r.apply(this,o);if(!n._shouldCreateSpans())return r.apply(this,o);let i=n._reconstructQuery(this.strings),s=n._sanitizeSqlQuery(i);return ra({name:s||"postgresjs.query",op:"db"},u=>{zr(u,"auto.db.postgresjs"),u.setAttributes({[cS]:"postgres",[AV]:s});let l=n.getConfig(),{requestHook:p}=l;p&&(0,IE.safeExecuteInTheMiddle)(()=>p(u,s,void 0),S=>{S&&(u.setAttribute("sentry.hook.error","requestHook failed"),xs&&W.error(`Error in requestHook for ${oX} integration:`,S))},!0);let h=this.resolve;this.resolve=new Proxy(h,{apply:(S,T,v)=>{try{n._setOperationName(u,s,v?.[0]?.command),u.end()}catch(R){xs&&W.error("Error ending span in resolve callback:",R)}return Reflect.apply(S,T,v)}});let y=this.reject;this.reject=new Proxy(y,{apply:(S,T,v)=>{try{u.setStatus({code:2,message:v?.[0]?.message||"unknown_error"}),u.setAttribute(gV,v?.[0]?.code||"unknown"),u.setAttribute(hV,v?.[0]?.name||"unknown"),n._setOperationName(u,s),u.end()}catch(R){xs&&W.error("Error ending span in reject callback:",R)}return Reflect.apply(S,T,v)}});try{return r.apply(this,o)}catch(S){throw u.setStatus({code:2,message:S instanceof Error?S.message:"unknown_error"}),u.end(),S}})},t.Query.prototype.handle.__sentry_original__=r,t}_unpatchQueryPrototype(t){return t.Query.prototype.handle.__sentry_original__&&(t.Query.prototype.handle=t.Query.prototype.handle.__sentry_original__),t}},VDt=(e=>({name:oX,setupOnce(){t2e(e)}})),n2e=VDt});var o2e=P(_O=>{"use strict";m();Object.defineProperty(_O,"__esModule",{value:!0});_O.SeverityNumber=void 0;var YDt;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.TRACE=1]="TRACE",e[e.TRACE2=2]="TRACE2",e[e.TRACE3=3]="TRACE3",e[e.TRACE4=4]="TRACE4",e[e.DEBUG=5]="DEBUG",e[e.DEBUG2=6]="DEBUG2",e[e.DEBUG3=7]="DEBUG3",e[e.DEBUG4=8]="DEBUG4",e[e.INFO=9]="INFO",e[e.INFO2=10]="INFO2",e[e.INFO3=11]="INFO3",e[e.INFO4=12]="INFO4",e[e.WARN=13]="WARN",e[e.WARN2=14]="WARN2",e[e.WARN3=15]="WARN3",e[e.WARN4=16]="WARN4",e[e.ERROR=17]="ERROR",e[e.ERROR2=18]="ERROR2",e[e.ERROR3=19]="ERROR3",e[e.ERROR4=20]="ERROR4",e[e.FATAL=21]="FATAL",e[e.FATAL2=22]="FATAL2",e[e.FATAL3=23]="FATAL3",e[e.FATAL4=24]="FATAL4"})(YDt=_O.SeverityNumber||(_O.SeverityNumber={}))});var E6=P(NR=>{"use strict";m();Object.defineProperty(NR,"__esModule",{value:!0});NR.NOOP_LOGGER=NR.NoopLogger=void 0;var _6=class{emit(t){}};NR.NoopLogger=_6;NR.NOOP_LOGGER=new _6});var S6=P(BR=>{"use strict";m();Object.defineProperty(BR,"__esModule",{value:!0});BR.NOOP_LOGGER_PROVIDER=BR.NoopLoggerProvider=void 0;var KDt=E6(),y6=class{getLogger(t,n,r){return new KDt.NoopLogger}};BR.NoopLoggerProvider=y6;BR.NOOP_LOGGER_PROVIDER=new y6});var sX=P(T6=>{"use strict";m();Object.defineProperty(T6,"__esModule",{value:!0});T6.ProxyLogger=void 0;var JDt=E6(),iX=class{constructor(t,n,r,o){this._provider=t,this.name=n,this.version=r,this.options=o}emit(t){this._getLogger().emit(t)}_getLogger(){if(this._delegate)return this._delegate;let t=this._provider._getDelegateLogger(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):JDt.NOOP_LOGGER}};T6.ProxyLogger=iX});var uX=P(b6=>{"use strict";m();Object.defineProperty(b6,"__esModule",{value:!0});b6.ProxyLoggerProvider=void 0;var ZDt=S6(),WDt=sX(),aX=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new WDt.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:ZDt.NOOP_LOGGER_PROVIDER}_setDelegate(t){this._delegate=t}_getDelegateLogger(t,n,r){var o;return(o=this._delegate)===null||o===void 0?void 0:o.getLogger(t,n,r)}};b6.ProxyLoggerProvider=aX});var i2e=P(I6=>{"use strict";m();Object.defineProperty(I6,"__esModule",{value:!0});I6._globalThis=void 0;I6._globalThis=typeof globalThis=="object"?globalThis:global});var s2e=P(C6=>{"use strict";m();Object.defineProperty(C6,"__esModule",{value:!0});C6._globalThis=void 0;var XDt=i2e();Object.defineProperty(C6,"_globalThis",{enumerable:!0,get:function(){return XDt._globalThis}})});var a2e=P(v6=>{"use strict";m();Object.defineProperty(v6,"__esModule",{value:!0});v6._globalThis=void 0;var e1t=s2e();Object.defineProperty(v6,"_globalThis",{enumerable:!0,get:function(){return e1t._globalThis}})});var u2e=P(eA=>{"use strict";m();Object.defineProperty(eA,"__esModule",{value:!0});eA.API_BACKWARDS_COMPATIBILITY_VERSION=eA.makeGetter=eA._global=eA.GLOBAL_LOGS_API_KEY=void 0;var t1t=a2e();eA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");eA._global=t1t._globalThis;function n1t(e,t,n){return r=>r===e?t:n}eA.makeGetter=n1t;eA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var l2e=P(R6=>{"use strict";m();Object.defineProperty(R6,"__esModule",{value:!0});R6.LogsAPI=void 0;var up=u2e(),r1t=S6(),c2e=uX(),cX=class e{constructor(){this._proxyLoggerProvider=new c2e.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return up._global[up.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(up._global[up.GLOBAL_LOGS_API_KEY]=(0,up.makeGetter)(up.API_BACKWARDS_COMPATIBILITY_VERSION,t,r1t.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=up._global[up.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(up._global,up.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete up._global[up.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new c2e.ProxyLoggerProvider}};R6.LogsAPI=cX});var lX=P(ua=>{"use strict";m();Object.defineProperty(ua,"__esModule",{value:!0});ua.logs=ua.ProxyLoggerProvider=ua.ProxyLogger=ua.NoopLoggerProvider=ua.NOOP_LOGGER_PROVIDER=ua.NoopLogger=ua.NOOP_LOGGER=ua.SeverityNumber=void 0;var o1t=o2e();Object.defineProperty(ua,"SeverityNumber",{enumerable:!0,get:function(){return o1t.SeverityNumber}});var d2e=E6();Object.defineProperty(ua,"NOOP_LOGGER",{enumerable:!0,get:function(){return d2e.NOOP_LOGGER}});Object.defineProperty(ua,"NoopLogger",{enumerable:!0,get:function(){return d2e.NoopLogger}});var p2e=S6();Object.defineProperty(ua,"NOOP_LOGGER_PROVIDER",{enumerable:!0,get:function(){return p2e.NOOP_LOGGER_PROVIDER}});Object.defineProperty(ua,"NoopLoggerProvider",{enumerable:!0,get:function(){return p2e.NoopLoggerProvider}});var i1t=sX();Object.defineProperty(ua,"ProxyLogger",{enumerable:!0,get:function(){return i1t.ProxyLogger}});var s1t=uX();Object.defineProperty(ua,"ProxyLoggerProvider",{enumerable:!0,get:function(){return s1t.ProxyLoggerProvider}});var a1t=l2e();ua.logs=a1t.LogsAPI.getInstance()});var f2e=P(wR=>{"use strict";m();Object.defineProperty(wR,"__esModule",{value:!0});wR.disableInstrumentations=wR.enableInstrumentations=void 0;function u1t(e,t,n,r){for(let o=0,i=e.length;o<i;o++){let s=e[o];t&&s.setTracerProvider(t),n&&s.setMeterProvider(n),r&&s.setLoggerProvider&&s.setLoggerProvider(r),s.getConfig().enabled||s.enable()}}wR.enableInstrumentations=u1t;function c1t(e){e.forEach(t=>t.disable())}wR.disableInstrumentations=c1t});var g2e=P(x6=>{"use strict";m();Object.defineProperty(x6,"__esModule",{value:!0});x6.registerInstrumentations=void 0;var m2e=(ze(),Le(nt)),l1t=lX(),A2e=f2e();function d1t(e){let t=e.tracerProvider||m2e.trace.getTracerProvider(),n=e.meterProvider||m2e.metrics.getMeterProvider(),r=e.loggerProvider||l1t.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,A2e.enableInstrumentations)(o,t,n,r),()=>{(0,A2e.disableInstrumentations)(o)}}x6.registerInstrumentations=d1t});var C2e=P(D6=>{"use strict";m();Object.defineProperty(D6,"__esModule",{value:!0});D6.satisfies=void 0;var mX=(ze(),Le(nt)),S2e=/^(?:v)?(?<version>(?<major>0|[1-9]\d*)\.(?<minor>0|[1-9]\d*)\.(?<patch>0|[1-9]\d*))(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,p1t=/^(?<op><|>|=|==|<=|>=|~|\^|~>)?\s*(?:v)?(?<version>(?<major>x|X|\*|0|[1-9]\d*)(?:\.(?<minor>x|X|\*|0|[1-9]\d*))?(?:\.(?<patch>x|X|\*|0|[1-9]\d*))?)(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,f1t={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function m1t(e,t,n){if(!A1t(e))return mX.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=E1t(e);if(!r)return!1;let o=[],i=T2e(r,t,o,n);return i&&!n?.includePrerelease?h1t(r,o):i}D6.satisfies=m1t;function A1t(e){return typeof e=="string"&&S2e.test(e)}function T2e(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(dX(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=F1t(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!dX(e,i,n,r))return!1;return!0}return dX(e,t,n,r)}function dX(e,t,n,r){if(t=_1t(t,r),t.includes(" "))return T2e(e,t,n,r);{let o=y1t(t);return n.push(o),g1t(e,o)}}function g1t(e,t){if(t.invalid)return!1;if(!t.version||fX(t.version))return!0;let n=_2e(e.versionSegments||[],t.versionSegments||[]);if(n===0){let r=e.prereleaseSegments||[],o=t.prereleaseSegments||[];!r.length&&!o.length?n=0:!r.length&&o.length?n=1:r.length&&!o.length?n=-1:n=_2e(r,o)}return f1t[t.op]?.includes(n)}function h1t(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function _1t(e,t){return e=e.trim(),e=U1t(e,t),e=L1t(e),e=Q1t(e,t),e=e.trim(),e}function nc(e){return!e||e.toLowerCase()==="x"||e==="*"}function E1t(e){let t=e.match(S2e);if(!t){mX.diag.error(`Invalid version: ${e}`);return}let n=t.groups.version,r=t.groups.prerelease,o=t.groups.build,i=n.split("."),s=r?.split(".");return{op:void 0,version:n,versionSegments:i,versionSegmentCount:i.length,prerelease:r,prereleaseSegments:s,prereleaseSegmentCount:s?s.length:0,build:o}}function y1t(e){if(!e)return{};let t=e.match(p1t);if(!t)return mX.diag.error(`Invalid range: ${e}`),{invalid:!0};let n=t.groups.op,r=t.groups.version,o=t.groups.prerelease,i=t.groups.build,s=r.split("."),u=o?.split(".");return n==="=="&&(n="="),{op:n||"=",version:r,versionSegments:s,versionSegmentCount:s.length,prerelease:o,prereleaseSegments:u,prereleaseSegmentCount:u?u.length:0,build:i}}function fX(e){return e==="*"||e==="x"||e==="X"}function h2e(e){let t=parseInt(e,10);return isNaN(t)?e:t}function S1t(e,t){if(typeof e==typeof t){if(typeof e=="number")return[e,t];if(typeof e=="string")return[e,t];throw new Error("Version segments can only be strings or numbers")}else return[String(e),String(t)]}function T1t(e,t){if(fX(e)||fX(t))return 0;let[n,r]=S1t(h2e(e),h2e(t));return n>r?1:n<r?-1:0}function _2e(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=T1t(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var b2e="[a-zA-Z0-9-]",I2e="0|[1-9]\\d*",b1t=`\\d*[a-zA-Z-]${b2e}*`,I1t="((?:<|>)?=?)",E2e=`(?:${I2e}|${b1t})`,C1t=`(?:-(${E2e}(?:\\.${E2e})*))`,y2e=`${b2e}+`,v1t=`(?:\\+(${y2e}(?:\\.${y2e})*))`,pX=`${I2e}|x|X|\\*`,EO=`[v=\\s]*(${pX})(?:\\.(${pX})(?:\\.(${pX})(?:${C1t})?${v1t}?)?)?`,R1t=`^${I1t}\\s*${EO}$`,x1t=new RegExp(R1t),D1t=`^\\s*(${EO})\\s+-\\s+(${EO})\\s*$`,N1t=new RegExp(D1t),B1t="(?:~>?)",w1t=`^${B1t}${EO}$`,O1t=new RegExp(w1t),k1t="(?:\\^)",P1t=`^${k1t}${EO}$`,M1t=new RegExp(P1t);function L1t(e){let t=O1t;return e.replace(t,(n,r,o,i,s)=>{let u;return nc(r)?u="":nc(o)?u=`>=${r}.0.0 <${+r+1}.0.0-0`:nc(i)?u=`>=${r}.${o}.0 <${r}.${+o+1}.0-0`:s?u=`>=${r}.${o}.${i}-${s} <${r}.${+o+1}.0-0`:u=`>=${r}.${o}.${i} <${r}.${+o+1}.0-0`,u})}function U1t(e,t){let n=M1t,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,s,u,l)=>{let p;return nc(i)?p="":nc(s)?p=`>=${i}.0.0${r} <${+i+1}.0.0-0`:nc(u)?i==="0"?p=`>=${i}.${s}.0${r} <${i}.${+s+1}.0-0`:p=`>=${i}.${s}.0${r} <${+i+1}.0.0-0`:l?i==="0"?s==="0"?p=`>=${i}.${s}.${u}-${l} <${i}.${s}.${+u+1}-0`:p=`>=${i}.${s}.${u}-${l} <${i}.${+s+1}.0-0`:p=`>=${i}.${s}.${u}-${l} <${+i+1}.0.0-0`:i==="0"?s==="0"?p=`>=${i}.${s}.${u}${r} <${i}.${s}.${+u+1}-0`:p=`>=${i}.${s}.${u}${r} <${i}.${+s+1}.0-0`:p=`>=${i}.${s}.${u} <${+i+1}.0.0-0`,p})}function Q1t(e,t){let n=x1t;return e.replace(n,(r,o,i,s,u,l)=>{let p=nc(i),h=p||nc(s),y=h||nc(u),S=y;return o==="="&&S&&(o=""),l=t?.includePrerelease?"-0":"",p?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&S?(h&&(s=0),u=0,o===">"?(o=">=",h?(i=+i+1,s=0,u=0):(s=+s+1,u=0)):o==="<="&&(o="<",h?i=+i+1:s=+s+1),o==="<"&&(l="-0"),r=`${o+i}.${s}.${u}${l}`):h?r=`>=${i}.0.0${l} <${+i+1}.0.0-0`:y&&(r=`>=${i}.${s}.0${l} <${i}.${+s+1}.0-0`),r})}function F1t(e,t){let n=N1t;return e.replace(n,(r,o,i,s,u,l,p,h,y,S,T,v)=>(nc(i)?o="":nc(s)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:nc(u)?o=`>=${i}.${s}.0${t?.includePrerelease?"-0":""}`:l?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,nc(y)?h="":nc(S)?h=`<${+y+1}.0.0-0`:nc(T)?h=`<${y}.${+S+1}.0-0`:v?h=`<=${y}.${S}.${T}-${v}`:t?.includePrerelease?h=`<${y}.${S}.${+T+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var AX=P(La=>{"use strict";m();Object.defineProperty(La,"__esModule",{value:!0});La.massUnwrap=La.unwrap=La.massWrap=La.wrap=void 0;var rc=console.error.bind(console);function yO(e,t,n){let r=!!e[t]&&Object.prototype.propertyIsEnumerable.call(e,t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}var G1t=(e,t,n)=>{if(!e||!e[t]){rc("no original function "+String(t)+" to wrap");return}if(!n){rc("no wrapper function"),rc(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){rc("original object and wrapper must be functions");return}let o=n(r,t);return yO(o,"__original",r),yO(o,"__unwrap",()=>{e[t]===o&&yO(e,t,r)}),yO(o,"__wrapped",!0),yO(e,t,o),o};La.wrap=G1t;var j1t=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{rc("must provide one or more modules to patch"),rc(new Error().stack);return}if(!(t&&Array.isArray(t))){rc("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,La.wrap)(r,o,n)})})};La.massWrap=j1t;var z1t=(e,t)=>{if(!e||!e[t]){rc("no function to unwrap."),rc(new Error().stack);return}let n=e[t];if(!n.__unwrap)rc("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};La.unwrap=z1t;var H1t=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{rc("must provide one or more modules to patch"),rc(new Error().stack);return}if(!(t&&Array.isArray(t))){rc("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,La.unwrap)(n,r)})})};La.massUnwrap=H1t;function SO(e){e&&e.logger&&(typeof e.logger!="function"?rc("new logger isn't a function, not replacing"):rc=e.logger)}La.default=SO;SO.wrap=La.wrap;SO.massWrap=La.massWrap;SO.unwrap=La.unwrap;SO.massUnwrap=La.massUnwrap});var v2e=P(B6=>{"use strict";m();Object.defineProperty(B6,"__esModule",{value:!0});B6.InstrumentationAbstract=void 0;var gX=(ze(),Le(nt)),$1t=lX(),N6=AX(),hX=class{instrumentationName;instrumentationVersion;_config={};_tracer;_meter;_logger;_diag;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=gX.diag.createComponentLogger({namespace:t}),this._tracer=gX.trace.getTracer(t,n),this._meter=gX.metrics.getMeter(t,n),this._logger=$1t.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=N6.wrap;_unwrap=N6.unwrap;_massWrap=N6.massWrap;_massUnwrap=N6.massUnwrap;get meter(){return this._meter}setMeterProvider(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()}get logger(){return this._logger}setLoggerProvider(t){this._logger=t.getLogger(this.instrumentationName,this.instrumentationVersion)}getModuleDefinitions(){let t=this.init()??[];return Array.isArray(t)?t:[t]}_updateMetricInstruments(){}getConfig(){return this._config}setConfig(t){this._config={enabled:!0,...t}}setTracerProvider(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)}get tracer(){return this._tracer}_runSpanCustomizationHook(t,n,r,o){if(t)try{t(r,o)}catch(i){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:n},i)}}};B6.InstrumentationAbstract=hX});var R2e=P(CE=>{"use strict";m();Object.defineProperty(CE,"__esModule",{value:!0});CE.ModuleNameTrie=CE.ModuleNameSeparator=void 0;CE.ModuleNameSeparator="/";var w6=class{hooks=[];children=new Map},_X=class{_trie=new w6;_counter=0;insert(t){let n=this._trie;for(let r of t.moduleName.split(CE.ModuleNameSeparator)){let o=n.children.get(r);o||(o=new w6,n.children.set(r,o)),n=o}n.hooks.push({hook:t,insertedId:this._counter++})}search(t,{maintainInsertionOrder:n,fullOnly:r}={}){let o=this._trie,i=[],s=!0;for(let u of t.split(CE.ModuleNameSeparator)){let l=o.children.get(u);if(!l){s=!1;break}r||i.push(...l.hooks),o=l}return r&&s&&i.push(...o.hooks),i.length===0?[]:i.length===1?[i[0].hook]:(n&&i.sort((u,l)=>u.insertedId-l.insertedId),i.map(({hook:u})=>u))}};CE.ModuleNameTrie=_X});var D2e=P(O6=>{"use strict";m();Object.defineProperty(O6,"__esModule",{value:!0});O6.RequireInTheMiddleSingleton=void 0;var q1t=AS(),x2e=Qe("path"),EX=R2e(),V1t=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),yX=class e{_moduleNameTrie=new EX.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new q1t.Hook(null,{internals:!0},(t,n,r)=>{let o=Y1t(n),i=this._moduleNameTrie.search(o,{maintainInsertionOrder:!0,fullOnly:r===void 0});for(let{onRequire:s}of i)t=s(t,n,r);return t})}register(t,n){let r={moduleName:t,onRequire:n};return this._moduleNameTrie.insert(r),r}static getInstance(){return V1t?new e:this._instance=this._instance??new e}};O6.RequireInTheMiddleSingleton=yX;function Y1t(e){return x2e.sep!==EX.ModuleNameSeparator?e.split(x2e.sep).join(EX.ModuleNameSeparator):e}});var SX=P(vE=>{"use strict";m();Object.defineProperty(vE,"__esModule",{value:!0});vE.isWrapped=vE.safeExecuteInTheMiddleAsync=vE.safeExecuteInTheMiddle=void 0;function K1t(e,t,n){let r,o;try{o=e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}vE.safeExecuteInTheMiddle=K1t;async function J1t(e,t,n){let r,o;try{o=await e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}vE.safeExecuteInTheMiddleAsync=J1t;function Z1t(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}vE.isWrapped=Z1t});var w2e=P(k6=>{"use strict";m();Object.defineProperty(k6,"__esModule",{value:!0});k6.InstrumentationBase=void 0;var TO=Qe("path"),N2e=Qe("util"),W1t=C2e(),TX=AX(),X1t=v2e(),eNt=D2e(),tNt=nW(),bO=(ze(),Le(nt)),nNt=AS(),rNt=Qe("fs"),oNt=SX(),bX=class extends X1t.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=eNt.RequireInTheMiddleSingleton.getInstance();_enabled=!1;constructor(t,n,r){super(t,n,r);let o=this.init();o&&!Array.isArray(o)&&(o=[o]),this._modules=o||[],this._config.enabled&&this.enable()}_wrap=(t,n,r)=>{if((0,oNt.isWrapped)(t[n])&&this._unwrap(t,n),N2e.types.isProxy(t)){let o=(0,TX.wrap)(Object.assign({},t),n,r);return Object.defineProperty(t,n,{value:o}),o}else return(0,TX.wrap)(t,n,r)};_unwrap=(t,n)=>N2e.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,TX.unwrap)(t,n);_massWrap=(t,n,r)=>{if(t)Array.isArray(t)||(t=[t]);else{bO.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){bO.diag.error("must provide one or more functions to wrap on modules");return}t.forEach(o=>{n.forEach(i=>{this._wrap(o,i,r)})})};_massUnwrap=(t,n)=>{if(t)Array.isArray(t)||(t=[t]);else{bO.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){bO.diag.error("must provide one or more functions to wrap on modules");return}t.forEach(r=>{n.forEach(o=>{this._unwrap(r,o)})})};_warnOnPreloadedModules(){this._modules.forEach(t=>{let{name:n}=t;try{let r=Qe.resolve(n);Qe.cache[r]&&this._diag.warn(`Module ${n} has been loaded before ${this.instrumentationName} so it might not work, please initialize it before requiring ${n}`)}catch{}})}_extractPackageVersion(t){try{let n=(0,rNt.readFileSync)(TO.join(t,"package.json"),{encoding:"utf8"}),r=JSON.parse(n).version;return typeof r=="string"?r:void 0}catch{bO.diag.warn("Failed extracting version",t)}}_onRequire(t,n,r,o){if(!o)return typeof t.patch=="function"&&(t.moduleExports=n,this._enabled)?(this._diag.debug("Applying instrumentation patch for nodejs core module on require hook",{module:t.name}),t.patch(n)):n;let i=this._extractPackageVersion(o);if(t.moduleVersion=i,t.name===r)return B2e(t.supportedVersions,i,t.includePrerelease)&&typeof t.patch=="function"&&(t.moduleExports=n,this._enabled)?(this._diag.debug("Applying instrumentation patch for module on require hook",{module:t.name,version:t.moduleVersion,baseDir:o}),t.patch(n,t.moduleVersion)):n;let s=t.files??[],u=TO.normalize(r);return s.filter(p=>p.name===u).filter(p=>B2e(p.supportedVersions,i,t.includePrerelease)).reduce((p,h)=>(h.moduleExports=p,this._enabled?(this._diag.debug("Applying instrumentation patch for nodejs module file on require hook",{module:t.name,version:t.moduleVersion,fileName:h.name,baseDir:o}),h.patch(p,t.moduleVersion)):p),n)}enable(){if(!this._enabled){if(this._enabled=!0,this._hooks.length>0){for(let t of this._modules){typeof t.patch=="function"&&t.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module on instrumentation enabled",{module:t.name,version:t.moduleVersion}),t.patch(t.moduleExports,t.moduleVersion));for(let n of t.files)n.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module file on instrumentation enabled",{module:t.name,version:t.moduleVersion,fileName:n.name}),n.patch(n.moduleExports,t.moduleVersion))}return}this._warnOnPreloadedModules();for(let t of this._modules){let n=(s,u,l)=>{if(!l&&TO.isAbsolute(u)){let p=TO.parse(u);u=p.name,l=p.dir}return this._onRequire(t,s,u,l)},r=(s,u,l)=>this._onRequire(t,s,u,l),o=TO.isAbsolute(t.name)?new nNt.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new tNt.Hook([t.name],{internals:!1},n);this._hooks.push(i)}}}disable(){if(this._enabled){this._enabled=!1;for(let t of this._modules){typeof t.unpatch=="function"&&t.moduleExports&&(this._diag.debug("Removing instrumentation patch for nodejs module on instrumentation disabled",{module:t.name,version:t.moduleVersion}),t.unpatch(t.moduleExports,t.moduleVersion));for(let n of t.files)n.moduleExports&&(this._diag.debug("Removing instrumentation patch for nodejs module file on instrumentation disabled",{module:t.name,version:t.moduleVersion,fileName:n.name}),n.unpatch(n.moduleExports,t.moduleVersion))}}}isEnabled(){return this._enabled}};k6.InstrumentationBase=bX;function B2e(e,t,n){return typeof t>"u"?e.includes("*"):e.some(r=>(0,W1t.satisfies)(t,r,{includePrerelease:n}))}});var O2e=P(P6=>{"use strict";m();Object.defineProperty(P6,"__esModule",{value:!0});P6.normalize=void 0;var iNt=Qe("path");Object.defineProperty(P6,"normalize",{enumerable:!0,get:function(){return iNt.normalize}})});var k2e=P(OR=>{"use strict";m();Object.defineProperty(OR,"__esModule",{value:!0});OR.normalize=OR.InstrumentationBase=void 0;var sNt=w2e();Object.defineProperty(OR,"InstrumentationBase",{enumerable:!0,get:function(){return sNt.InstrumentationBase}});var aNt=O2e();Object.defineProperty(OR,"normalize",{enumerable:!0,get:function(){return aNt.normalize}})});var IX=P(kR=>{"use strict";m();Object.defineProperty(kR,"__esModule",{value:!0});kR.normalize=kR.InstrumentationBase=void 0;var P2e=k2e();Object.defineProperty(kR,"InstrumentationBase",{enumerable:!0,get:function(){return P2e.InstrumentationBase}});Object.defineProperty(kR,"normalize",{enumerable:!0,get:function(){return P2e.normalize}})});var M2e=P(M6=>{"use strict";m();Object.defineProperty(M6,"__esModule",{value:!0});M6.InstrumentationNodeModuleDefinition=void 0;var CX=class{name;supportedVersions;patch;unpatch;files;constructor(t,n,r,o,i){this.name=t,this.supportedVersions=n,this.patch=r,this.unpatch=o,this.files=i||[]}};M6.InstrumentationNodeModuleDefinition=CX});var L2e=P(L6=>{"use strict";m();Object.defineProperty(L6,"__esModule",{value:!0});L6.InstrumentationNodeModuleFile=void 0;var uNt=IX(),vX=class{supportedVersions;patch;unpatch;name;constructor(t,n,r,o){this.supportedVersions=n,this.patch=r,this.unpatch=o,this.name=(0,uNt.normalize)(t)}};L6.InstrumentationNodeModuleFile=vX});var U2e=P(tT=>{"use strict";m();Object.defineProperty(tT,"__esModule",{value:!0});tT.semconvStabilityFromStr=tT.SemconvStability=void 0;var U6;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(U6=tT.SemconvStability||(tT.SemconvStability={}));function cNt(e,t){let n=U6.OLD,r=t?.split(",").map(o=>o.trim()).filter(o=>o!=="");for(let o of r??[])if(o.toLowerCase()===e+"/dup"){n=U6.DUPLICATE;break}else o.toLowerCase()===e&&(n=U6.STABLE);return n}tT.semconvStabilityFromStr=cNt});var F2e=P(cs=>{"use strict";m();Object.defineProperty(cs,"__esModule",{value:!0});cs.semconvStabilityFromStr=cs.SemconvStability=cs.safeExecuteInTheMiddleAsync=cs.safeExecuteInTheMiddle=cs.isWrapped=cs.InstrumentationNodeModuleFile=cs.InstrumentationNodeModuleDefinition=cs.InstrumentationBase=cs.registerInstrumentations=void 0;var lNt=g2e();Object.defineProperty(cs,"registerInstrumentations",{enumerable:!0,get:function(){return lNt.registerInstrumentations}});var dNt=IX();Object.defineProperty(cs,"InstrumentationBase",{enumerable:!0,get:function(){return dNt.InstrumentationBase}});var pNt=M2e();Object.defineProperty(cs,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return pNt.InstrumentationNodeModuleDefinition}});var fNt=L2e();Object.defineProperty(cs,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return fNt.InstrumentationNodeModuleFile}});var RX=SX();Object.defineProperty(cs,"isWrapped",{enumerable:!0,get:function(){return RX.isWrapped}});Object.defineProperty(cs,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return RX.safeExecuteInTheMiddle}});Object.defineProperty(cs,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return RX.safeExecuteInTheMiddleAsync}});var Q2e=U2e();Object.defineProperty(cs,"SemconvStability",{enumerable:!0,get:function(){return Q2e.SemconvStability}});Object.defineProperty(cs,"semconvStabilityFromStr",{enumerable:!0,get:function(){return Q2e.semconvStabilityFromStr}})});function gNt(){let e=PR[DX];return e?.helper?e.helper:PR[xX]?.helper}function hNt(e){let t={helper:e};PR[DX]=t,PR[xX]=t}function _Nt(){delete PR[DX],delete PR[xX]}function SNt(e){return e==="client"?po.CLIENT:po.INTERNAL}function z2e(e,t,n,r,o){if(H2e(t.name,o))return;let i={attributes:t.attributes,kind:SNt(t.kind),startTime:t.startTime};e.startActiveSpan(t.name,i,s=>{r.set(t.id,s.spanContext().spanId),t.links&&s.addLinks(t.links.flatMap(l=>{let p=r.get(l);return p?{context:{spanId:p,traceId:s.spanContext().traceId,traceFlags:s.spanContext().traceFlags}}:[]}));let u=n.filter(l=>l.parentId===t.id);for(let l of u)z2e(e,l,n,r,o);s.end(t.endTime)})}function G2e(e,t){return bNt(t)?t.then(n=>(e.end(),n),n=>{throw e.end(),n}):(e.end(),t)}function bNt(e){return e!=null&&typeof e.then=="function"}function H2e(e,t){return t.some(n=>typeof n=="string"?n===e:n.test(e))}var Q6,mNt,ANt,xX,DX,PR,ENt,yNt,TNt,$2e,j2e,INt,CNt,q2e,V2e=w(()=>{m();ze();Q6=ue(F2e(),1);ze();mNt={name:"@prisma/instrumentation-contract",version:"7.6.0",description:"Shared types and utilities for Prisma instrumentation",main:"dist/index.js",module:"dist/index.mjs",types:"dist/index.d.ts",exports:{".":{require:{types:"./dist/index.d.ts",default:"./dist/index.js"},import:{types:"./dist/index.d.mts",default:"./dist/index.mjs"}}},license:"Apache-2.0",homepage:"https://www.prisma.io",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/instrumentation-contract"},bugs:"https://github.com/prisma/prisma/issues",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",prepublishOnly:"pnpm run build",test:"vitest run"},files:["dist"],sideEffects:!1,devDependencies:{"@opentelemetry/api":"1.9.0"},peerDependencies:{"@opentelemetry/api":"^1.8"}},ANt=mNt.version.split(".")[0],xX="PRISMA_INSTRUMENTATION",DX=`V${ANt}_PRISMA_INSTRUMENTATION`,PR=globalThis;ENt=process.env.PRISMA_SHOW_ALL_TRACES==="true",yNt="00-10-10-00";TNt=class{tracerProvider;ignoreSpanTypes;constructor({tracerProvider:e,ignoreSpanTypes:t}){this.tracerProvider=e,this.ignoreSpanTypes=t}isEnabled(){return!0}getTraceParent(e){let t=qt.getSpanContext(e??Xe.active());return t?`00-${t.traceId}-${t.spanId}-0${t.traceFlags}`:yNt}dispatchEngineSpans(e){let t=this.tracerProvider.getTracer("prisma"),n=new Map,r=e.filter(o=>o.parentId===null);for(let o of r)z2e(t,o,e,n,this.ignoreSpanTypes)}getActiveContext(){return Xe.active()}runInChildSpan(e,t){if(typeof e=="string"&&(e={name:e}),e.internal&&!ENt)return t();let n=this.tracerProvider.getTracer("prisma"),r=e.context??this.getActiveContext(),o=`prisma:client:${e.name}`;if(H2e(o,this.ignoreSpanTypes))return t();if(e.active===!1){let i=n.startSpan(o,e,r);return G2e(i,t(i,r))}return n.startActiveSpan(o,e,i=>G2e(i,t(i,r)))}};$2e={name:"@prisma/instrumentation",version:"7.6.0",description:"OpenTelemetry compliant instrumentation for Prisma Client",main:"dist/index.js",module:"dist/index.mjs",types:"dist/index.d.ts",exports:{".":{require:{types:"./dist/index.d.ts",default:"./dist/index.js"},import:{types:"./dist/index.d.ts",default:"./dist/index.mjs"}}},license:"Apache-2.0",homepage:"https://www.prisma.io",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/instrumentation"},bugs:"https://github.com/prisma/prisma/issues",devDependencies:{"@opentelemetry/api":"1.9.0","@prisma/instrumentation-contract":"workspace:*","@types/node":"~20.19.24",typescript:"5.4.5"},dependencies:{"@opentelemetry/instrumentation":"^0.207.0"},peerDependencies:{"@opentelemetry/api":"^1.8"},files:["dist"],keywords:["prisma","instrumentation","opentelemetry","otel"],scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",prepublishOnly:"pnpm run build",test:"vitest run"},sideEffects:!1},j2e=$2e.version,INt=$2e.name,CNt="@prisma/client",q2e=class extends Q6.InstrumentationBase{tracerProvider;constructor(e={}){super(INt,j2e,e)}setTracerProvider(e){this.tracerProvider=e}init(){return[new Q6.InstrumentationNodeModuleDefinition(CNt,[j2e])]}enable(){let e=this._config;hNt(new TNt({tracerProvider:this.tracerProvider??qt.getTracerProvider(),ignoreSpanTypes:e.ignoreSpanTypes??[]}))}disable(){_Nt()}isEnabled(){return gNt()!==void 0}}});function vNt(e){return!!e&&typeof e=="object"&&"dispatchEngineSpans"in e}function K2e(){let e=globalThis.PRISMA_INSTRUMENTATION;return e&&typeof e=="object"&&"helper"in e?e.helper:void 0}function RNt(e){return e==="client"?po.CLIENT:po.INTERNAL}var Y2e,NX,xNt,J2e,Z2e=w(()=>{m();ze();V2e();mt();_r();Y2e="Prisma";NX=class extends q2e{constructor(t){super(t?.instrumentationConfig)}enable(){super.enable();let t=K2e();vNt(t)&&(t.createEngineSpan=n=>{let r=qt.getTracer("prismaV5Compatibility"),o=r._idGenerator;if(!o){Wo(()=>{console.warn("[Sentry] Could not find _idGenerator on tracer, skipping Prisma v5 compatibility - some Prisma spans may be missing!")});return}try{n.spans.forEach(i=>{let s=RNt(i.kind),u=i.parent_span_id,l=i.span_id,p=i.trace_id,h=i.links?.map(S=>({context:{traceId:S.trace_id,spanId:S.span_id,traceFlags:ou.SAMPLED}})),y=qt.setSpanContext(Xe.active(),{traceId:p,spanId:u,traceFlags:ou.SAMPLED});Xe.with(y,()=>{let S={generateTraceId:()=>p,generateSpanId:()=>l};r._idGenerator=S,r.startSpan(i.name,{kind:s,links:h,startTime:i.start_time,attributes:i.attributes}).end(i.end_time),r._idGenerator=o})})}finally{r._idGenerator=o}})}};xNt=ut(Y2e,e=>new NX(e)),J2e=e=>({name:Y2e,setupOnce(){xNt(e)},setup(t){K2e()&&t.on("spanStart",n=>{let r=kt(n);r.description?.startsWith("prisma:")&&n.setAttribute(Pt,"auto.db.otel.prisma"),r.description==="prisma:engine:db_query"&&r.data["db.query.text"]&&n.updateName(r.data["db.query.text"]),r.description==="prisma:engine:db_query"&&!r.data["db.system"]&&n.setAttribute("db.system","prisma")})}})});var W2e=P(MR=>{"use strict";m();Object.defineProperty(MR,"__esModule",{value:!0});MR.PACKAGE_NAME=MR.PACKAGE_VERSION=void 0;MR.PACKAGE_VERSION="0.60.0";MR.PACKAGE_NAME="@opentelemetry/instrumentation-hapi"});var BX=P(tA=>{"use strict";m();Object.defineProperty(tA,"__esModule",{value:!0});tA.HapiLifecycleMethodNames=tA.HapiLayerType=tA.handlerPatched=tA.HapiComponentName=void 0;tA.HapiComponentName="@hapi/hapi";tA.handlerPatched=Symbol("hapi-handler-patched");tA.HapiLayerType={ROUTER:"router",PLUGIN:"plugin",EXT:"server.ext"};tA.HapiLifecycleMethodNames=new Set(["onPreAuth","onCredentials","onPostAuth","onPreHandler","onPostHandler","onPreResponse","onRequest"])});var X2e=P(F6=>{"use strict";m();Object.defineProperty(F6,"__esModule",{value:!0});F6.ATTR_HTTP_METHOD=void 0;F6.ATTR_HTTP_METHOD="http.method"});var wX=P(IO=>{"use strict";m();Object.defineProperty(IO,"__esModule",{value:!0});IO.AttributeNames=void 0;var DNt;(function(e){e.HAPI_TYPE="hapi.type",e.PLUGIN_NAME="hapi.plugin.name",e.EXT_TYPE="server.ext.type"})(DNt=IO.AttributeNames||(IO.AttributeNames={}))});var nLe=P(ls=>{"use strict";m();Object.defineProperty(ls,"__esModule",{value:!0});ls.getPluginFromInput=ls.getExtMetadata=ls.getRouteMetadata=ls.isPatchableExtMethod=ls.isDirectExtInput=ls.isLifecycleExtEventObj=ls.isLifecycleExtType=ls.getPluginName=void 0;var eLe=(Xn(),Le(Gr)),NNt=X2e(),CO=BX(),RE=wX(),tLe=sn();function BNt(e){return e.name?e.name:e.pkg.name}ls.getPluginName=BNt;var wNt=e=>typeof e=="string"&&CO.HapiLifecycleMethodNames.has(e);ls.isLifecycleExtType=wNt;var ONt=e=>{let t=e?.type;return t!==void 0&&(0,ls.isLifecycleExtType)(t)};ls.isLifecycleExtEventObj=ONt;var kNt=e=>Array.isArray(e)&&e.length<=3&&(0,ls.isLifecycleExtType)(e[0])&&typeof e[1]=="function";ls.isDirectExtInput=kNt;var PNt=e=>!Array.isArray(e);ls.isPatchableExtMethod=PNt;var MNt=(e,t,n)=>{let r={[eLe.ATTR_HTTP_ROUTE]:e.path};t&tLe.SemconvStability.OLD&&(r[NNt.ATTR_HTTP_METHOD]=e.method),t&tLe.SemconvStability.STABLE&&(r[eLe.ATTR_HTTP_REQUEST_METHOD]=e.method);let o;return n?(r[RE.AttributeNames.HAPI_TYPE]=CO.HapiLayerType.PLUGIN,r[RE.AttributeNames.PLUGIN_NAME]=n,o=`${n}: route - ${e.path}`):(r[RE.AttributeNames.HAPI_TYPE]=CO.HapiLayerType.ROUTER,o=`route - ${e.path}`),{attributes:r,name:o}};ls.getRouteMetadata=MNt;var LNt=(e,t,n)=>{let r=`ext - ${e}`;return n&&n!=="method"&&(r=`ext - ${e} - ${n}`),t?{attributes:{[RE.AttributeNames.EXT_TYPE]:e,[RE.AttributeNames.HAPI_TYPE]:CO.HapiLayerType.EXT,[RE.AttributeNames.PLUGIN_NAME]:t},name:`${t}: ${r}`}:{attributes:{[RE.AttributeNames.EXT_TYPE]:e,[RE.AttributeNames.HAPI_TYPE]:CO.HapiLayerType.EXT},name:r}};ls.getExtMetadata=LNt;var UNt=e=>"plugin"in e?"plugin"in e.plugin?e.plugin.plugin:e.plugin:e;ls.getPluginFromInput=UNt});var iLe=P(G6=>{"use strict";m();Object.defineProperty(G6,"__esModule",{value:!0});G6.HapiInstrumentation=void 0;var Wl=(ze(),Le(nt)),rLe=Cr(),vO=sn(),oLe=W2e(),RO=BX(),Xg=nLe(),OX=class extends vO.InstrumentationBase{_semconvStability;constructor(t={}){super(oLe.PACKAGE_NAME,oLe.PACKAGE_VERSION,t),this._semconvStability=(0,vO.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new vO.InstrumentationNodeModuleDefinition(RO.HapiComponentName,[">=17.0.0 <22"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,vO.isWrapped)(n.server)||this._wrap(n,"server",this._getServerPatch.bind(this)),(0,vO.isWrapped)(n.Server)||this._wrap(n,"Server",this._getServerPatch.bind(this)),n},t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;this._massUnwrap([n],["server","Server"])})}_getServerPatch(t){let n=this,r=this;return function(i){let s=t.apply(this,[i]);return r._wrap(s,"route",u=>n._getServerRoutePatch.bind(n)(u)),r._wrap(s,"ext",u=>n._getServerExtPatch.bind(n)(u)),r._wrap(s,"register",n._getServerRegisterPatch.bind(n)),s}}_getServerRegisterPatch(t){let n=this;return function(o,i){if(Array.isArray(o))for(let s of o){let u=(0,Xg.getPluginFromInput)(s);n._wrapRegisterHandler(u)}else{let s=(0,Xg.getPluginFromInput)(o);n._wrapRegisterHandler(s)}return t.apply(this,[o,i])}}_getServerExtPatch(t,n){let r=this;return function(...i){if(Array.isArray(i[0])){let s=i[0];for(let u=0;u<s.length;u++){let l=s[u];if((0,Xg.isLifecycleExtType)(l.type)){let p=l,h=r._wrapExtMethods(p.method,l.type,n);p.method=h,s[u]=p}}return t.apply(this,i)}else if((0,Xg.isDirectExtInput)(i)){let s=i,u=s[1],l=r._wrapExtMethods(u,s[0],n);return t.apply(this,[s[0],l,s[2]])}else if((0,Xg.isLifecycleExtEventObj)(i[0])){let s=i[0],u=r._wrapExtMethods(s.method,s.type,n);return s.method=u,t.call(this,s)}return t.apply(this,i)}}_getServerRoutePatch(t,n){let r=this;return function(o){if(Array.isArray(o))for(let i=0;i<o.length;i++){let s=r._wrapRouteHandler.call(r,o[i],n);o[i]=s}else o=r._wrapRouteHandler.call(r,o,n);return t.apply(this,[o])}}_wrapRegisterHandler(t){let n=this,r=(0,Xg.getPluginName)(t),o=t.register,i=this,s=function(u,l){return i._wrap(u,"route",p=>n._getServerRoutePatch.bind(n)(p,r)),i._wrap(u,"ext",p=>n._getServerExtPatch.bind(n)(p,r)),o.call(this,u,l)};t.register=s}_wrapExtMethods(t,n,r){let o=this;if(t instanceof Array){for(let i=0;i<t.length;i++)t[i]=o._wrapExtMethods(t[i],n);return t}else if((0,Xg.isPatchableExtMethod)(t))return t[RO.handlerPatched]===!0?t:(t[RO.handlerPatched]=!0,async function(...s){if(Wl.trace.getSpan(Wl.context.active())===void 0)return await t.apply(this,s);let u=(0,Xg.getExtMetadata)(n,r,t.name),l=o.tracer.startSpan(u.name,{attributes:u.attributes});try{return await Wl.context.with(Wl.trace.setSpan(Wl.context.active(),l),t,void 0,...s)}catch(p){throw l.recordException(p),l.setStatus({code:Wl.SpanStatusCode.ERROR,message:p.message}),p}finally{l.end()}});return t}_wrapRouteHandler(t,n){let r=this;if(t[RO.handlerPatched]===!0)return t;t[RO.handlerPatched]=!0;let o=i=>async function(...s){if(Wl.trace.getSpan(Wl.context.active())===void 0)return await i.call(this,...s);let u=(0,rLe.getRPCMetadata)(Wl.context.active());u?.type===rLe.RPCType.HTTP&&(u.route=t.path);let l=(0,Xg.getRouteMetadata)(t,r._semconvStability,n),p=r.tracer.startSpan(l.name,{attributes:l.attributes});try{return await Wl.context.with(Wl.trace.setSpan(Wl.context.active(),p),()=>i.call(this,...s))}catch(h){throw p.recordException(h),p.setStatus({code:Wl.SpanStatusCode.ERROR,message:h.message}),h}finally{p.end()}};if(typeof t.handler=="function")t.handler=o(t.handler);else if(typeof t.options=="function"){let i=t.options;t.options=function(s){let u=i(s);return typeof u.handler=="function"&&(u.handler=o(u.handler)),u}}else typeof t.options?.handler=="function"&&(t.options.handler=o(t.options.handler));return t}};G6.HapiInstrumentation=OX});var sLe=P(LR=>{"use strict";m();Object.defineProperty(LR,"__esModule",{value:!0});LR.AttributeNames=LR.HapiInstrumentation=void 0;var QNt=iLe();Object.defineProperty(LR,"HapiInstrumentation",{enumerable:!0,get:function(){return QNt.HapiInstrumentation}});var FNt=wX();Object.defineProperty(LR,"AttributeNames",{enumerable:!0,get:function(){return FNt.AttributeNames}})});var aLe,uLe,cLe,GNt,lLe,dLe=w(()=>{m();aLe=ue(sLe(),1);_r();uLe="Hapi",cLe=ut(uLe,()=>new aLe.HapiInstrumentation),GNt=(()=>({name:uLe,setupOnce(){cLe()}})),lLe=GNt});var xE,xO,kX=w(()=>{m();xE={HONO_TYPE:"hono.type",HONO_NAME:"hono.name"},xO={MIDDLEWARE:"middleware",REQUEST_HANDLER:"request_handler"}});var z6,jNt,zNt,j6,pLe=w(()=>{m();ze();z6=ue(sn(),1);mt();kX();jNt="@sentry/instrumentation-hono",zNt="0.0.1",j6=class extends z6.InstrumentationBase{constructor(t={}){super(jNt,zNt,t)}init(){return[new z6.InstrumentationNodeModuleDefinition("hono",[">=4.0.0 <5"],t=>this._patch(t))]}_patch(t){let n=this;class r extends t.Hono{constructor(...i){super(...i),n._wrap(this,"get",n._patchHandler()),n._wrap(this,"post",n._patchHandler()),n._wrap(this,"put",n._patchHandler()),n._wrap(this,"delete",n._patchHandler()),n._wrap(this,"options",n._patchHandler()),n._wrap(this,"patch",n._patchHandler()),n._wrap(this,"all",n._patchHandler()),n._wrap(this,"on",n._patchOnHandler()),n._wrap(this,"use",n._patchMiddlewareHandler())}}try{t.Hono=r}catch{return{...t,Hono:r}}return t}_patchHandler(){let t=this;return function(n){return function(...o){if(typeof o[0]=="string"){let i=o[0];if(o.length===1)return n.apply(this,[i]);let s=o.slice(1);return n.apply(this,[i,...s.map(u=>t._wrapHandler(u))])}return n.apply(this,o.map(i=>t._wrapHandler(i)))}}}_patchOnHandler(){let t=this;return function(n){return function(...o){let i=o.slice(2);return n.apply(this,[...o.slice(0,2),...i.map(s=>t._wrapHandler(s))])}}}_patchMiddlewareHandler(){let t=this;return function(n){return function(...o){if(typeof o[0]=="string"){let i=o[0];if(o.length===1)return n.apply(this,[i]);let s=o.slice(1);return n.apply(this,[i,...s.map(u=>t._wrapHandler(u))])}return n.apply(this,o.map(i=>t._wrapHandler(i)))}}}_wrapHandler(t){let n=this;return function(r,o){if(!n.isEnabled())return t.apply(this,[r,o]);let i=r.req.path,s=n.tracer.startSpan(i);return Xe.with(qt.setSpan(Xe.active(),s),()=>n._safeExecute(()=>{let u=t.apply(this,[r,o]);if(xa(u))return u.then(l=>{let p=n._determineHandlerType(l);return s.setAttributes({[xE.HONO_TYPE]:p,[xE.HONO_NAME]:p===xO.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(s),l});{let l=n._determineHandlerType(u);return s.setAttributes({[xE.HONO_TYPE]:l,[xE.HONO_NAME]:l===xO.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(s),u}},()=>s.end(),u=>{n._handleError(s,u),s.end()}))}}_safeExecute(t,n,r){try{let o=t();return xa(o)?o.then(()=>n(),i=>r(i)):n(),o}catch(o){throw r(o),o}}_determineHandlerType(t){return t===void 0?xO.MIDDLEWARE:xO.REQUEST_HANDLER}_handleError(t,n){n instanceof Error&&(t.setStatus({code:Ai.ERROR,message:n.message}),t.recordException(n))}}});function HNt(e){let t=kt(e).data,n=t[xE.HONO_TYPE];if(t[Xt]||!n)return;e.setAttributes({[Pt]:"auto.http.otel.hono",[Xt]:`${n}.hono`});let r=t[xE.HONO_NAME];if(typeof r=="string"&&e.updateName(r),Rn()===Vd()){xs&&W.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let o=t[vg],i=t[lS];typeof o=="string"&&typeof i=="string"&&Rn().setTransactionName(`${i} ${o}`)}var fLe,mLe,$Nt,ALe,gLe=w(()=>{m();Xn();mt();_r();HS();kX();pLe();fLe="Hono";mLe=ut(fLe,()=>new j6({responseHook:e=>{HNt(e)}})),$Nt=(()=>({name:fLe,setupOnce(){mLe()}})),ALe=$Nt});var H6=P(DO=>{"use strict";m();Object.defineProperty(DO,"__esModule",{value:!0});DO.KoaLayerType=void 0;var qNt;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware"})(qNt=DO.KoaLayerType||(DO.KoaLayerType={}))});var hLe=P(UR=>{"use strict";m();Object.defineProperty(UR,"__esModule",{value:!0});UR.PACKAGE_NAME=UR.PACKAGE_VERSION=void 0;UR.PACKAGE_VERSION="0.62.0";UR.PACKAGE_NAME="@opentelemetry/instrumentation-koa"});var PX=P(NO=>{"use strict";m();Object.defineProperty(NO,"__esModule",{value:!0});NO.AttributeNames=void 0;var VNt;(function(e){e.KOA_TYPE="koa.type",e.KOA_NAME="koa.name"})(VNt=NO.AttributeNames||(NO.AttributeNames={}))});var ELe=P(QR=>{"use strict";m();Object.defineProperty(QR,"__esModule",{value:!0});QR.isLayerIgnored=QR.getMiddlewareMetadata=void 0;var _Le=H6(),$6=PX(),YNt=(Xn(),Le(Gr)),KNt=(e,t,n,r)=>n?{attributes:{[$6.AttributeNames.KOA_NAME]:r?.toString(),[$6.AttributeNames.KOA_TYPE]:_Le.KoaLayerType.ROUTER,[YNt.ATTR_HTTP_ROUTE]:r?.toString()},name:e._matchedRouteName||`router - ${r}`}:{attributes:{[$6.AttributeNames.KOA_NAME]:t.name??"middleware",[$6.AttributeNames.KOA_TYPE]:_Le.KoaLayerType.MIDDLEWARE},name:`middleware - ${t.name}`};QR.getMiddlewareMetadata=KNt;var JNt=(e,t)=>!!(Array.isArray(t?.ignoreLayersType)&&t?.ignoreLayersType?.includes(e));QR.isLayerIgnored=JNt});var yLe=P(q6=>{"use strict";m();Object.defineProperty(q6,"__esModule",{value:!0});q6.kLayerPatched=void 0;q6.kLayerPatched=Symbol("koa-layer-patched")});var vLe=P(V6=>{"use strict";m();Object.defineProperty(V6,"__esModule",{value:!0});V6.KoaInstrumentation=void 0;var nA=(ze(),Le(nt)),BO=sn(),SLe=H6(),TLe=hLe(),bLe=ELe(),ILe=Cr(),CLe=yLe(),MX=class extends BO.InstrumentationBase{constructor(t={}){super(TLe.PACKAGE_NAME,TLe.PACKAGE_VERSION,t)}init(){return new BO.InstrumentationNodeModuleDefinition("koa",[">=2.0.0 <4"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return n==null?n:((0,BO.isWrapped)(n.prototype.use)&&this._unwrap(n.prototype,"use"),this._wrap(n.prototype,"use",this._getKoaUsePatch.bind(this)),t)},t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;(0,BO.isWrapped)(n.prototype.use)&&this._unwrap(n.prototype,"use")})}_getKoaUsePatch(t){let n=this;return function(o){let i;return o.router?i=n._patchRouterDispatch(o):i=n._patchLayer(o,!1),t.apply(this,[i])}}_patchRouterDispatch(t){nA.diag.debug("Patching @koa/router dispatch");let r=t.router?.stack??[];for(let o of r){let i=o.path,s=o.stack;for(let u=0;u<s.length;u++){let l=s[u];s[u]=this._patchLayer(l,!0,i)}}return t}_patchLayer(t,n,r){let o=n?SLe.KoaLayerType.ROUTER:SLe.KoaLayerType.MIDDLEWARE;return t[CLe.kLayerPatched]===!0||(0,bLe.isLayerIgnored)(o,this.getConfig())?t:t.constructor.name==="GeneratorFunction"||t.constructor.name==="AsyncGeneratorFunction"?(nA.diag.debug("ignoring generator-based Koa middleware layer"),t):(t[CLe.kLayerPatched]=!0,nA.diag.debug("patching Koa middleware layer"),async(i,s)=>{if(nA.trace.getSpan(nA.context.active())===void 0)return t(i,s);let l=(0,bLe.getMiddlewareMetadata)(i,t,n,r),p=this.tracer.startSpan(l.name,{attributes:l.attributes}),h=(0,ILe.getRPCMetadata)(nA.context.active());h?.type===ILe.RPCType.HTTP&&i._matchedRoute&&(h.route=i._matchedRoute.toString());let{requestHook:y}=this.getConfig();y&&(0,BO.safeExecuteInTheMiddle)(()=>y(p,{context:i,middlewareLayer:t,layerType:o}),T=>{T&&nA.diag.error("koa instrumentation: request hook failed",T)},!0);let S=nA.trace.setSpan(nA.context.active(),p);return nA.context.with(S,async()=>{try{return await t(i,s)}catch(T){throw p.recordException(T),T}finally{p.end()}})})}};V6.KoaInstrumentation=MX});var RLe=P(DE=>{"use strict";m();Object.defineProperty(DE,"__esModule",{value:!0});DE.KoaLayerType=DE.AttributeNames=DE.KoaInstrumentation=void 0;var ZNt=vLe();Object.defineProperty(DE,"KoaInstrumentation",{enumerable:!0,get:function(){return ZNt.KoaInstrumentation}});var WNt=PX();Object.defineProperty(DE,"AttributeNames",{enumerable:!0,get:function(){return WNt.AttributeNames}});var XNt=H6();Object.defineProperty(DE,"KoaLayerType",{enumerable:!0,get:function(){return XNt.KoaLayerType}})});var xLe,DLe,NLe,eBt,BLe,wLe=w(()=>{m();xLe=ue(RLe(),1);Xn();mt();_r();HS();DLe="Koa",NLe=ut(DLe,xLe.KoaInstrumentation,(e={})=>({ignoreLayersType:e.ignoreLayersType,requestHook(t,n){zr(t,"auto.http.otel.koa");let r=kt(t).data,o=r["koa.type"];o&&t.setAttribute(Xt,`${o}.koa`);let i=r["koa.name"];if(typeof i=="string"&&t.updateName(i||"< unknown >"),Rn()===Vd()){xs&&W.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let s=r[vg],u=n.context?.request?.method?.toUpperCase()||"GET";s&&Rn().setTransactionName(`${u} ${s}`)}})),eBt=((e={})=>({name:DLe,setupOnce(){NLe(e)}})),BLe=eBt});var LX=P(vf=>{"use strict";m();Object.defineProperty(vf,"__esModule",{value:!0});vf.ConnectNames=vf.ConnectTypes=vf.AttributeNames=void 0;var tBt;(function(e){e.CONNECT_TYPE="connect.type",e.CONNECT_NAME="connect.name"})(tBt=vf.AttributeNames||(vf.AttributeNames={}));var nBt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(nBt=vf.ConnectTypes||(vf.ConnectTypes={}));var rBt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request handler"})(rBt=vf.ConnectNames||(vf.ConnectNames={}))});var OLe=P(FR=>{"use strict";m();Object.defineProperty(FR,"__esModule",{value:!0});FR.PACKAGE_NAME=FR.PACKAGE_VERSION=void 0;FR.PACKAGE_VERSION="0.57.0";FR.PACKAGE_NAME="@opentelemetry/instrumentation-connect"});var kLe=P(Y6=>{"use strict";m();Object.defineProperty(Y6,"__esModule",{value:!0});Y6._LAYERS_STORE_PROPERTY=void 0;Y6._LAYERS_STORE_PROPERTY=Symbol("opentelemetry.instrumentation-connect.request-route-stack")});var PLe=P(BE=>{"use strict";m();Object.defineProperty(BE,"__esModule",{value:!0});BE.generateRoute=BE.replaceCurrentStackRoute=BE.addNewStackLayer=void 0;var oBt=(ze(),Le(nt)),NE=kLe(),iBt=e=>{Array.isArray(e[NE._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(e,NE._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),e[NE._LAYERS_STORE_PROPERTY].push("/");let t=e[NE._LAYERS_STORE_PROPERTY].length;return()=>{t===e[NE._LAYERS_STORE_PROPERTY].length?e[NE._LAYERS_STORE_PROPERTY].pop():oBt.diag.warn("Connect: Trying to pop the stack multiple time")}};BE.addNewStackLayer=iBt;var sBt=(e,t)=>{t&&e[NE._LAYERS_STORE_PROPERTY].splice(-1,1,t)};BE.replaceCurrentStackRoute=sBt;var aBt=e=>e[NE._LAYERS_STORE_PROPERTY].reduce((t,n)=>t.replace(/\/+$/,"")+n);BE.generateRoute=aBt});var ULe=P(wE=>{"use strict";m();Object.defineProperty(wE,"__esModule",{value:!0});wE.ConnectInstrumentation=wE.ANONYMOUS_NAME=void 0;var uBt=(ze(),Le(nt)),MLe=Cr(),GR=LX(),LLe=OLe(),K6=sn(),cBt=(Xn(),Le(Gr)),UX=PLe();wE.ANONYMOUS_NAME="anonymous";var QX=class extends K6.InstrumentationBase{constructor(t={}){super(LLe.PACKAGE_NAME,LLe.PACKAGE_VERSION,t)}init(){return[new K6.InstrumentationNodeModuleDefinition("connect",[">=3.0.0 <4"],t=>this._patchConstructor(t))]}_patchApp(t){(0,K6.isWrapped)(t.use)||this._wrap(t,"use",this._patchUse.bind(this)),(0,K6.isWrapped)(t.handle)||this._wrap(t,"handle",this._patchHandle.bind(this))}_patchConstructor(t){let n=this;return function(...r){let o=t.apply(this,r);return n._patchApp(o),o}}_patchNext(t,n){return function(o){let i=t.apply(this,[o]);return n(),i}}_startSpan(t,n){let r,o,i;t?(r=GR.ConnectTypes.REQUEST_HANDLER,i=GR.ConnectNames.REQUEST_HANDLER,o=t):(r=GR.ConnectTypes.MIDDLEWARE,i=GR.ConnectNames.MIDDLEWARE,o=n.name||wE.ANONYMOUS_NAME);let s=`${i} - ${o}`,u={attributes:{[cBt.ATTR_HTTP_ROUTE]:t.length>0?t:"/",[GR.AttributeNames.CONNECT_TYPE]:r,[GR.AttributeNames.CONNECT_NAME]:o}};return this.tracer.startSpan(s,u)}_patchMiddleware(t,n){let r=this,o=n.length===4;function i(){if(!r.isEnabled())return n.apply(this,arguments);let[s,u,l]=o?[1,2,3]:[0,1,2],p=arguments[s],h=arguments[u],y=arguments[l];(0,UX.replaceCurrentStackRoute)(p,t);let S=(0,MLe.getRPCMetadata)(uBt.context.active());t&&S?.type===MLe.RPCType.HTTP&&(S.route=(0,UX.generateRoute)(p));let T="";t?T=`request handler - ${t}`:T=`middleware - ${n.name||wE.ANONYMOUS_NAME}`;let v=r._startSpan(t,n);r._diag.debug("start span",T);let R=!1;function x(){R?r._diag.debug(`span ${v.name} - already finished`):(R=!0,r._diag.debug(`finishing span ${v.name}`),v.end()),h.removeListener("close",x)}return h.addListener("close",x),arguments[l]=r._patchNext(y,x),n.apply(this,arguments)}return Object.defineProperty(i,"length",{value:n.length,writable:!1,configurable:!0}),i}_patchUse(t){let n=this;return function(...r){let o=r[r.length-1],i=r[r.length-2]||"";return r[r.length-1]=n._patchMiddleware(i,o),t.apply(this,r)}}_patchHandle(t){let n=this;return function(){let[r,o]=[0,2],i=arguments[r],s=arguments[o],u=(0,UX.addNewStackLayer)(i);return typeof s=="function"&&(arguments[o]=n._patchOut(s,u)),t.apply(this,arguments)}}_patchOut(t,n){return function(...o){return n(),Reflect.apply(t,this,o)}}};wE.ConnectInstrumentation=QX});var FLe=P(cp=>{"use strict";m();Object.defineProperty(cp,"__esModule",{value:!0});cp.ConnectTypes=cp.ConnectNames=cp.AttributeNames=cp.ANONYMOUS_NAME=cp.ConnectInstrumentation=void 0;var QLe=ULe();Object.defineProperty(cp,"ConnectInstrumentation",{enumerable:!0,get:function(){return QLe.ConnectInstrumentation}});Object.defineProperty(cp,"ANONYMOUS_NAME",{enumerable:!0,get:function(){return QLe.ANONYMOUS_NAME}});var FX=LX();Object.defineProperty(cp,"AttributeNames",{enumerable:!0,get:function(){return FX.AttributeNames}});Object.defineProperty(cp,"ConnectNames",{enumerable:!0,get:function(){return FX.ConnectNames}});Object.defineProperty(cp,"ConnectTypes",{enumerable:!0,get:function(){return FX.ConnectTypes}})});var GLe,jLe,zLe,lBt,HLe,$Le=w(()=>{m();GLe=ue(FLe(),1);_r();jLe="Connect",zLe=ut(jLe,()=>new GLe.ConnectInstrumentation),lBt=(()=>({name:jLe,setupOnce(){zLe()}})),HLe=lBt});var qLe=P(ca=>{"use strict";m();Object.defineProperty(ca,"__esModule",{value:!0});ca.DB_SYSTEM_VALUE_MSSQL=ca.ATTR_NET_PEER_PORT=ca.ATTR_NET_PEER_NAME=ca.ATTR_DB_USER=ca.ATTR_DB_SYSTEM=ca.ATTR_DB_STATEMENT=ca.ATTR_DB_SQL_TABLE=ca.ATTR_DB_NAME=void 0;ca.ATTR_DB_NAME="db.name";ca.ATTR_DB_SQL_TABLE="db.sql.table";ca.ATTR_DB_STATEMENT="db.statement";ca.ATTR_DB_SYSTEM="db.system";ca.ATTR_DB_USER="db.user";ca.ATTR_NET_PEER_NAME="net.peer.name";ca.ATTR_NET_PEER_PORT="net.peer.port";ca.DB_SYSTEM_VALUE_MSSQL="mssql"});var VLe=P(jR=>{"use strict";m();Object.defineProperty(jR,"__esModule",{value:!0});jR.once=jR.getSpanName=void 0;function dBt(e,t,n,r){return e==="execBulkLoad"&&r&&t?`${e} ${r} ${t}`:e==="callProcedure"?t?`${e} ${n} ${t}`:`${e} ${n}`:t?`${e} ${t}`:`${e}`}jR.getSpanName=dBt;var pBt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};jR.once=pBt});var YLe=P(zR=>{"use strict";m();Object.defineProperty(zR,"__esModule",{value:!0});zR.PACKAGE_NAME=zR.PACKAGE_VERSION=void 0;zR.PACKAGE_VERSION="0.33.0";zR.PACKAGE_NAME="@opentelemetry/instrumentation-tedious"});var XLe=P(kE=>{"use strict";m();Object.defineProperty(kE,"__esModule",{value:!0});kE.TediousInstrumentation=kE.INJECTED_CTX=void 0;var HR=(ze(),Le(nt)),fBt=Qe("events"),rA=sn(),nT=(Xn(),Le(Gr)),OE=qLe(),KLe=VLe(),JLe=YLe(),WLe=Symbol("opentelemetry.instrumentation-tedious.current-database");kE.INJECTED_CTX=Symbol("opentelemetry.instrumentation-tedious.context-info-injected");var ZLe=["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"];function J6(e){Object.defineProperty(this,WLe,{value:e,writable:!0})}var GX=class e extends rA.InstrumentationBase{static COMPONENT="tedious";_netSemconvStability;_dbSemconvStability;constructor(t={}){super(JLe.PACKAGE_NAME,JLe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,rA.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,rA.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new rA.InstrumentationNodeModuleDefinition(e.COMPONENT,[">=1.11.0 <20"],t=>{let n=t.Connection.prototype;for(let r of ZLe)(0,rA.isWrapped)(n[r])&&this._unwrap(n,r),this._wrap(n,r,this._patchQuery(r,t));return(0,rA.isWrapped)(n.connect)&&this._unwrap(n,"connect"),this._wrap(n,"connect",this._patchConnect),t},t=>{if(t===void 0)return;let n=t.Connection.prototype;for(let r of ZLe)this._unwrap(n,r);this._unwrap(n,"connect")})]}_patchConnect(t){return function(){return J6.call(this,this.config?.options?.database),this.removeListener("databaseChange",J6),this.on("databaseChange",J6),this.once("end",()=>{this.removeListener("databaseChange",J6)}),t.apply(this,arguments)}}_buildTraceparent(t){let n=t.spanContext();return`00-${n.traceId}-${n.spanId}-0${Number(n.traceFlags||HR.TraceFlags.NONE).toString(16)}`}_injectContextInfo(t,n,r){return new Promise(o=>{try{let i="set context_info @opentelemetry_traceparent",s=new n.Request(i,l=>{o()});Object.defineProperty(s,kE.INJECTED_CTX,{value:!0});let u=Buffer.from(r,"utf8");s.addParameter("opentelemetry_traceparent",n.TYPES.VarBinary,u,{length:u.length}),t.execSql(s)}catch{o()}})}_shouldInjectFor(t){return t==="execSql"||t==="execSqlBatch"||t==="callProcedure"||t==="execute"}_patchQuery(t,n){return r=>{let o=this;function i(s){if(s?.[kE.INJECTED_CTX])return r.apply(this,arguments);if(!(s instanceof fBt.EventEmitter))return o._diag.warn(`Unexpected invocation of patched ${t} method. Span not recorded`),r.apply(this,arguments);let u=0,l=0,p=()=>l++,h=()=>u++,y=this[WLe],S=(G=>G.sqlTextOrProcedure==="sp_prepare"&&G.parametersByName?.stmt?.value?G.parametersByName.stmt.value:G.sqlTextOrProcedure)(s),T={};o._dbSemconvStability&rA.SemconvStability.OLD&&(T[OE.ATTR_DB_SYSTEM]=OE.DB_SYSTEM_VALUE_MSSQL,T[OE.ATTR_DB_NAME]=y,T[OE.ATTR_DB_USER]=this.config?.userName??this.config?.authentication?.options?.userName,T[OE.ATTR_DB_STATEMENT]=S,T[OE.ATTR_DB_SQL_TABLE]=s.table),o._dbSemconvStability&rA.SemconvStability.STABLE&&(T[nT.ATTR_DB_NAMESPACE]=y,T[nT.ATTR_DB_SYSTEM_NAME]=nT.DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER,T[nT.ATTR_DB_QUERY_TEXT]=S,T[nT.ATTR_DB_COLLECTION_NAME]=s.table),o._netSemconvStability&rA.SemconvStability.OLD&&(T[OE.ATTR_NET_PEER_NAME]=this.config?.server,T[OE.ATTR_NET_PEER_PORT]=this.config?.options?.port),o._netSemconvStability&rA.SemconvStability.STABLE&&(T[nT.ATTR_SERVER_ADDRESS]=this.config?.server,T[nT.ATTR_SERVER_PORT]=this.config?.options?.port);let v=o.tracer.startSpan((0,KLe.getSpanName)(t,y,S,s.table),{kind:HR.SpanKind.CLIENT,attributes:T}),R=(0,KLe.once)(G=>{s.removeListener("done",p),s.removeListener("doneInProc",p),s.removeListener("doneProc",h),s.removeListener("error",R),this.removeListener("end",R),v.setAttribute("tedious.procedure_count",u),v.setAttribute("tedious.statement_count",l),G&&v.setStatus({code:HR.SpanStatusCode.ERROR,message:G.message}),v.end()});s.on("done",p),s.on("doneInProc",p),s.on("doneProc",h),s.once("error",R),this.on("end",R),typeof s.callback=="function"?o._wrap(s,"callback",o._patchCallbackQuery(R)):o._diag.error("Expected request.callback to be a function");let x=()=>HR.context.with(HR.trace.setSpan(HR.context.active(),v),r,this,...arguments);if(!(o.getConfig().enableTraceContextPropagation&&o._shouldInjectFor(t)))return x();let j=o._buildTraceparent(v);o._injectContextInfo(this,n,j).finally(x)}return Object.defineProperty(i,"length",{value:r.length,writable:!1}),i}}_patchCallbackQuery(t){return n=>function(r,o,i){return t(r),n.apply(this,arguments)}}};kE.TediousInstrumentation=GX});var eUe=P(Z6=>{"use strict";m();Object.defineProperty(Z6,"__esModule",{value:!0});Z6.TediousInstrumentation=void 0;var mBt=XLe();Object.defineProperty(Z6,"TediousInstrumentation",{enumerable:!0,get:function(){return mBt.TediousInstrumentation}})});var tUe,ABt,nUe,rUe,gBt,oUe,iUe=w(()=>{m();tUe=ue(eUe(),1);mt();_r();ABt=new Set(["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"]),nUe="Tedious",rUe=ut(nUe,()=>new tUe.TediousInstrumentation({})),gBt=(()=>{let e;return{name:nUe,setupOnce(){let t=rUe();e=mw(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let{description:r,data:o}=kt(n);if(!r||o["db.system"]!=="mssql")return;let i=r.split(" ")[0]||"";ABt.has(i)&&n.setAttribute(Pt,"auto.db.otel.tedious")}))}}}),oUe=gBt});var sUe=P($R=>{"use strict";m();Object.defineProperty($R,"__esModule",{value:!0});$R.PACKAGE_NAME=$R.PACKAGE_VERSION=void 0;$R.PACKAGE_VERSION="0.57.0";$R.PACKAGE_NAME="@opentelemetry/instrumentation-generic-pool"});var uUe=P(W6=>{"use strict";m();Object.defineProperty(W6,"__esModule",{value:!0});W6.GenericPoolInstrumentation=void 0;var qR=(ze(),Le(nt)),rT=sn(),aUe=sUe(),jX="generic-pool",zX=class extends rT.InstrumentationBase{_isDisabled=!1;constructor(t={}){super(aUe.PACKAGE_NAME,aUe.PACKAGE_VERSION,t)}init(){return[new rT.InstrumentationNodeModuleDefinition(jX,[">=3.0.0 <4"],t=>{let n=t.Pool;return(0,rT.isWrapped)(n.prototype.acquire)&&this._unwrap(n.prototype,"acquire"),this._wrap(n.prototype,"acquire",this._acquirePatcher.bind(this)),t},t=>{let n=t.Pool;return this._unwrap(n.prototype,"acquire"),t}),new rT.InstrumentationNodeModuleDefinition(jX,[">=2.4.0 <3"],t=>{let n=t.Pool;return(0,rT.isWrapped)(n.prototype.acquire)&&this._unwrap(n.prototype,"acquire"),this._wrap(n.prototype,"acquire",this._acquireWithCallbacksPatcher.bind(this)),t},t=>{let n=t.Pool;return this._unwrap(n.prototype,"acquire"),t}),new rT.InstrumentationNodeModuleDefinition(jX,[">=2.0.0 <2.4"],t=>(this._isDisabled=!1,(0,rT.isWrapped)(t.Pool)&&this._unwrap(t,"Pool"),this._wrap(t,"Pool",this._poolWrapper.bind(this)),t),t=>(this._isDisabled=!0,t))]}_acquirePatcher(t){let n=this;return function(...o){let i=qR.context.active(),s=n.tracer.startSpan("generic-pool.acquire",{},i);return qR.context.with(qR.trace.setSpan(i,s),()=>t.call(this,...o).then(u=>(s.end(),u),u=>{throw s.recordException(u),s.end(),u}))}}_poolWrapper(t){let n=this;return function(){let o=t.apply(this,arguments);return n._wrap(o,"acquire",n._acquireWithCallbacksPatcher.bind(n)),o}}_acquireWithCallbacksPatcher(t){let n=this;return function(o,i){if(n._isDisabled)return t.call(this,o,i);let s=qR.context.active(),u=n.tracer.startSpan("generic-pool.acquire",{},s);return qR.context.with(qR.trace.setSpan(s,u),()=>{t.call(this,(l,p)=>{if(u.end(),o)return o(l,p)},i)})}}};W6.GenericPoolInstrumentation=zX});var cUe=P(X6=>{"use strict";m();Object.defineProperty(X6,"__esModule",{value:!0});X6.GenericPoolInstrumentation=void 0;var hBt=uUe();Object.defineProperty(X6,"GenericPoolInstrumentation",{enumerable:!0,get:function(){return hBt.GenericPoolInstrumentation}})});var lUe,dUe,pUe,_Bt,fUe,mUe=w(()=>{m();lUe=ue(cUe(),1);mt();_r();dUe="GenericPool",pUe=ut(dUe,()=>new lUe.GenericPoolInstrumentation({})),_Bt=(()=>{let e;return{name:dUe,setupOnce(){let t=pUe();e=mw(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let o=kt(n).description;(o==="generic-pool.aquire"||o==="generic-pool.acquire")&&n.setAttribute(Pt,"auto.db.otel.generic_pool")}))}}}),fUe=_Bt});var HX=P(oA=>{"use strict";m();Object.defineProperty(oA,"__esModule",{value:!0});oA.ATTR_NET_PEER_PORT=oA.ATTR_NET_PEER_NAME=oA.ATTR_MESSAGING_SYSTEM=oA.ATTR_MESSAGING_OPERATION=void 0;oA.ATTR_MESSAGING_OPERATION="messaging.operation";oA.ATTR_MESSAGING_SYSTEM="messaging.system";oA.ATTR_NET_PEER_NAME="net.peer.name";oA.ATTR_NET_PEER_PORT="net.peer.port"});var $X=P(yi=>{"use strict";m();Object.defineProperty(yi,"__esModule",{value:!0});yi.ATTR_MESSAGING_CONVERSATION_ID=yi.OLD_ATTR_MESSAGING_MESSAGE_ID=yi.MESSAGING_DESTINATION_KIND_VALUE_TOPIC=yi.ATTR_MESSAGING_URL=yi.ATTR_MESSAGING_PROTOCOL_VERSION=yi.ATTR_MESSAGING_PROTOCOL=yi.MESSAGING_OPERATION_VALUE_PROCESS=yi.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY=yi.ATTR_MESSAGING_DESTINATION_KIND=yi.ATTR_MESSAGING_DESTINATION=void 0;yi.ATTR_MESSAGING_DESTINATION="messaging.destination";yi.ATTR_MESSAGING_DESTINATION_KIND="messaging.destination_kind";yi.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY="messaging.rabbitmq.routing_key";yi.MESSAGING_OPERATION_VALUE_PROCESS="process";yi.ATTR_MESSAGING_PROTOCOL="messaging.protocol";yi.ATTR_MESSAGING_PROTOCOL_VERSION="messaging.protocol_version";yi.ATTR_MESSAGING_URL="messaging.url";yi.MESSAGING_DESTINATION_KIND_VALUE_TOPIC="topic";yi.OLD_ATTR_MESSAGING_MESSAGE_ID="messaging.message_id";yi.ATTR_MESSAGING_CONVERSATION_ID="messaging.conversation_id"});var qX=P(oT=>{"use strict";m();Object.defineProperty(oT,"__esModule",{value:!0});oT.DEFAULT_CONFIG=oT.EndOperation=void 0;var EBt;(function(e){e.AutoAck="auto ack",e.Ack="ack",e.AckAll="ackAll",e.Reject="reject",e.Nack="nack",e.NackAll="nackAll",e.ChannelClosed="channel closed",e.ChannelError="channel error",e.InstrumentationTimeout="instrumentation timeout"})(EBt=oT.EndOperation||(oT.EndOperation={}));oT.DEFAULT_CONFIG={consumeTimeoutMs:1e3*60,useLinksForConsume:!1}});var _Ue=P(Si=>{"use strict";m();Object.defineProperty(Si,"__esModule",{value:!0});Si.isConfirmChannelTracing=Si.unmarkConfirmChannelTracing=Si.markConfirmChannelTracing=Si.getConnectionAttributesFromUrl=Si.getConnectionAttributesFromServer=Si.normalizeExchange=Si.CONNECTION_ATTRIBUTES=Si.CHANNEL_CONSUME_TIMEOUT_TIMER=Si.CHANNEL_SPANS_NOT_ENDED=Si.MESSAGE_STORED_SPAN=void 0;var VX=(ze(),Le(nt)),PE=sn(),eG=(Xn(),Le(Gr)),wO=HX(),tG=$X();Si.MESSAGE_STORED_SPAN=Symbol("opentelemetry.amqplib.message.stored-span");Si.CHANNEL_SPANS_NOT_ENDED=Symbol("opentelemetry.amqplib.channel.spans-not-ended");Si.CHANNEL_CONSUME_TIMEOUT_TIMER=Symbol("opentelemetry.amqplib.channel.consumer-timeout-timer");Si.CONNECTION_ATTRIBUTES=Symbol("opentelemetry.amqplib.connection.attributes");var YX=(0,VX.createContextKey)("opentelemetry.amqplib.channel.is-confirm-channel"),yBt=e=>e!==""?e:"<default>";Si.normalizeExchange=yBt;var SBt=e=>e.replace(/:[^:@/]*@/,":***@"),AUe=(e,t)=>e||(t==="AMQP"?5672:5671),gUe=e=>{let t=e||"amqp";return(t.endsWith(":")?t.substring(0,t.length-1):t).toUpperCase()},hUe=e=>e||"localhost",iA=(e,t,n,r)=>n?{[t]:n}:(VX.diag.error(`amqplib instrumentation: could not extract connection attribute ${r} from user supplied url`,{url:e}),{}),TBt=e=>{let t=e.serverProperties.product?.toLowerCase?.();return t?{[wO.ATTR_MESSAGING_SYSTEM]:t}:{}};Si.getConnectionAttributesFromServer=TBt;var bBt=(e,t)=>{let n={[tG.ATTR_MESSAGING_PROTOCOL_VERSION]:"0.9.1"};if(e=e||"amqp://localhost",typeof e=="object"){let r=e,o=gUe(r?.protocol);Object.assign(n,{...iA(e,tG.ATTR_MESSAGING_PROTOCOL,o,"protocol")});let i=hUe(r?.hostname);t&PE.SemconvStability.OLD&&Object.assign(n,{...iA(e,wO.ATTR_NET_PEER_NAME,i,"hostname")}),t&PE.SemconvStability.STABLE&&Object.assign(n,{...iA(e,eG.ATTR_SERVER_ADDRESS,i,"hostname")});let s=AUe(r.port,o);t&PE.SemconvStability.OLD&&Object.assign(n,iA(e,wO.ATTR_NET_PEER_PORT,s,"port")),t&PE.SemconvStability.STABLE&&Object.assign(n,iA(e,eG.ATTR_SERVER_PORT,s,"port"))}else{let r=SBt(e);n[tG.ATTR_MESSAGING_URL]=r;try{let o=new URL(r),i=gUe(o.protocol);Object.assign(n,{...iA(r,tG.ATTR_MESSAGING_PROTOCOL,i,"protocol")});let s=hUe(o.hostname);t&PE.SemconvStability.OLD&&Object.assign(n,{...iA(r,wO.ATTR_NET_PEER_NAME,s,"hostname")}),t&PE.SemconvStability.STABLE&&Object.assign(n,{...iA(r,eG.ATTR_SERVER_ADDRESS,s,"hostname")});let u=AUe(o.port?parseInt(o.port):void 0,i);t&PE.SemconvStability.OLD&&Object.assign(n,iA(r,wO.ATTR_NET_PEER_PORT,u,"port")),t&PE.SemconvStability.STABLE&&Object.assign(n,iA(r,eG.ATTR_SERVER_PORT,u,"port"))}catch(o){VX.diag.error("amqplib instrumentation: error while extracting connection details from connection url",{censoredUrl:r,err:o})}}return n};Si.getConnectionAttributesFromUrl=bBt;var IBt=e=>e.setValue(YX,!0);Si.markConfirmChannelTracing=IBt;var CBt=e=>e.deleteValue(YX);Si.unmarkConfirmChannelTracing=CBt;var vBt=e=>e.getValue(YX)===!0;Si.isConfirmChannelTracing=vBt});var EUe=P(VR=>{"use strict";m();Object.defineProperty(VR,"__esModule",{value:!0});VR.PACKAGE_NAME=VR.PACKAGE_VERSION=void 0;VR.PACKAGE_VERSION="0.61.0";VR.PACKAGE_NAME="@opentelemetry/instrumentation-amqplib"});var SUe=P(oG=>{"use strict";m();Object.defineProperty(oG,"__esModule",{value:!0});oG.AmqplibInstrumentation=void 0;var ni=(ze(),Le(nt)),nG=Cr(),Rr=sn(),RBt=HX(),Xl=$X(),oc=qX(),Ti=_Ue(),yUe=EUe(),rG=[">=0.5.5 <1"],KX=class extends Rr.InstrumentationBase{_netSemconvStability;constructor(t={}){super(yUe.PACKAGE_NAME,yUe.PACKAGE_VERSION,{...oc.DEFAULT_CONFIG,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Rr.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...oc.DEFAULT_CONFIG,...t})}init(){let t=new Rr.InstrumentationNodeModuleFile("amqplib/lib/channel_model.js",rG,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),n=new Rr.InstrumentationNodeModuleFile("amqplib/lib/callback_model.js",rG,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),r=new Rr.InstrumentationNodeModuleFile("amqplib/lib/connect.js",rG,this.patchConnect.bind(this),this.unpatchConnect.bind(this));return new Rr.InstrumentationNodeModuleDefinition("amqplib",rG,void 0,void 0,[t,r,n])}patchConnect(t){return t=this.unpatchConnect(t),(0,Rr.isWrapped)(t.connect)||this._wrap(t,"connect",this.getConnectPatch.bind(this)),t}unpatchConnect(t){return(0,Rr.isWrapped)(t.connect)&&this._unwrap(t,"connect"),t}patchChannelModel(t,n){return(0,Rr.isWrapped)(t.Channel.prototype.publish)||this._wrap(t.Channel.prototype,"publish",this.getPublishPatch.bind(this,n)),(0,Rr.isWrapped)(t.Channel.prototype.consume)||this._wrap(t.Channel.prototype,"consume",this.getConsumePatch.bind(this,n)),(0,Rr.isWrapped)(t.Channel.prototype.ack)||this._wrap(t.Channel.prototype,"ack",this.getAckPatch.bind(this,!1,oc.EndOperation.Ack)),(0,Rr.isWrapped)(t.Channel.prototype.nack)||this._wrap(t.Channel.prototype,"nack",this.getAckPatch.bind(this,!0,oc.EndOperation.Nack)),(0,Rr.isWrapped)(t.Channel.prototype.reject)||this._wrap(t.Channel.prototype,"reject",this.getAckPatch.bind(this,!0,oc.EndOperation.Reject)),(0,Rr.isWrapped)(t.Channel.prototype.ackAll)||this._wrap(t.Channel.prototype,"ackAll",this.getAckAllPatch.bind(this,!1,oc.EndOperation.AckAll)),(0,Rr.isWrapped)(t.Channel.prototype.nackAll)||this._wrap(t.Channel.prototype,"nackAll",this.getAckAllPatch.bind(this,!0,oc.EndOperation.NackAll)),(0,Rr.isWrapped)(t.Channel.prototype.emit)||this._wrap(t.Channel.prototype,"emit",this.getChannelEmitPatch.bind(this)),(0,Rr.isWrapped)(t.ConfirmChannel.prototype.publish)||this._wrap(t.ConfirmChannel.prototype,"publish",this.getConfirmedPublishPatch.bind(this,n)),t}unpatchChannelModel(t){return(0,Rr.isWrapped)(t.Channel.prototype.publish)&&this._unwrap(t.Channel.prototype,"publish"),(0,Rr.isWrapped)(t.Channel.prototype.consume)&&this._unwrap(t.Channel.prototype,"consume"),(0,Rr.isWrapped)(t.Channel.prototype.ack)&&this._unwrap(t.Channel.prototype,"ack"),(0,Rr.isWrapped)(t.Channel.prototype.nack)&&this._unwrap(t.Channel.prototype,"nack"),(0,Rr.isWrapped)(t.Channel.prototype.reject)&&this._unwrap(t.Channel.prototype,"reject"),(0,Rr.isWrapped)(t.Channel.prototype.ackAll)&&this._unwrap(t.Channel.prototype,"ackAll"),(0,Rr.isWrapped)(t.Channel.prototype.nackAll)&&this._unwrap(t.Channel.prototype,"nackAll"),(0,Rr.isWrapped)(t.Channel.prototype.emit)&&this._unwrap(t.Channel.prototype,"emit"),(0,Rr.isWrapped)(t.ConfirmChannel.prototype.publish)&&this._unwrap(t.ConfirmChannel.prototype,"publish"),t}getConnectPatch(t){let n=this;return function(o,i,s){return t.call(this,o,i,function(u,l){if(u==null){let p=(0,Ti.getConnectionAttributesFromUrl)(o,n._netSemconvStability),h=(0,Ti.getConnectionAttributesFromServer)(l);l[Ti.CONNECTION_ATTRIBUTES]={...p,...h}}s.apply(this,arguments)})}}getChannelEmitPatch(t){let n=this;return function(o){if(o==="close"){n.endAllSpansOnChannel(this,!0,oc.EndOperation.ChannelClosed,void 0);let i=this[Ti.CHANNEL_CONSUME_TIMEOUT_TIMER];i&&clearInterval(i),this[Ti.CHANNEL_CONSUME_TIMEOUT_TIMER]=void 0}else o==="error"&&n.endAllSpansOnChannel(this,!0,oc.EndOperation.ChannelError,void 0);return t.apply(this,arguments)}}getAckAllPatch(t,n,r){let o=this;return function(s){return o.endAllSpansOnChannel(this,t,n,s),r.apply(this,arguments)}}getAckPatch(t,n,r){let o=this;return function(s,u,l){let p=this,h=n===oc.EndOperation.Reject?u:l,y=p[Ti.CHANNEL_SPANS_NOT_ENDED]??[],S=y.findIndex(T=>T.msg===s);if(S<0)o.endConsumerSpan(s,t,n,h);else if(n!==oc.EndOperation.Reject&&u){for(let T=0;T<=S;T++)o.endConsumerSpan(y[T].msg,t,n,h);y.splice(0,S+1)}else o.endConsumerSpan(s,t,n,h),y.splice(S,1);return r.apply(this,arguments)}}getConsumePatch(t,n){let r=this;return function(i,s,u){let l=this;if(!Object.prototype.hasOwnProperty.call(l,Ti.CHANNEL_SPANS_NOT_ENDED)){let{consumeTimeoutMs:h}=r.getConfig();if(h){let y=setInterval(()=>{r.checkConsumeTimeoutOnChannel(l)},h);y.unref(),l[Ti.CHANNEL_CONSUME_TIMEOUT_TIMER]=y}l[Ti.CHANNEL_SPANS_NOT_ENDED]=[]}let p=function(h){if(!h)return s.call(this,h);let y=h.properties.headers??{},S=ni.propagation.extract(ni.ROOT_CONTEXT,y),T=h.fields?.exchange,v;if(r._config.useLinksForConsume){let M=S?ni.trace.getSpan(S)?.spanContext():void 0;S=void 0,M&&(v=[{context:M}])}let R=r.tracer.startSpan(`${i} process`,{kind:ni.SpanKind.CONSUMER,attributes:{...l?.connection?.[Ti.CONNECTION_ATTRIBUTES],[Xl.ATTR_MESSAGING_DESTINATION]:T,[Xl.ATTR_MESSAGING_DESTINATION_KIND]:Xl.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[Xl.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:h.fields?.routingKey,[RBt.ATTR_MESSAGING_OPERATION]:Xl.MESSAGING_OPERATION_VALUE_PROCESS,[Xl.OLD_ATTR_MESSAGING_MESSAGE_ID]:h?.properties.messageId,[Xl.ATTR_MESSAGING_CONVERSATION_ID]:h?.properties.correlationId},links:v},S),{consumeHook:x}=r.getConfig();x&&(0,Rr.safeExecuteInTheMiddle)(()=>x(R,{moduleVersion:t,msg:h}),M=>{M&&ni.diag.error("amqplib instrumentation: consumerHook error",M)},!0),u?.noAck||(l[Ti.CHANNEL_SPANS_NOT_ENDED].push({msg:h,timeOfConsume:(0,nG.hrTime)()}),h[Ti.MESSAGE_STORED_SPAN]=R);let O=S||ni.ROOT_CONTEXT;ni.context.with(ni.trace.setSpan(O,R),()=>{s.call(this,h)}),u?.noAck&&(r.callConsumeEndHook(R,h,!1,oc.EndOperation.AutoAck),R.end())};return arguments[1]=p,n.apply(this,arguments)}}getConfirmedPublishPatch(t,n){let r=this;return function(i,s,u,l,p){let h=this,{span:y,modifiedOptions:S}=r.createPublishSpan(r,i,s,h,l),{publishHook:T}=r.getConfig();T&&(0,Rr.safeExecuteInTheMiddle)(()=>T(y,{moduleVersion:t,exchange:i,routingKey:s,content:u,options:S,isConfirmChannel:!0}),O=>{O&&ni.diag.error("amqplib instrumentation: publishHook error",O)},!0);let v=function(O,M){try{p?.call(this,O,M)}finally{let{publishConfirmHook:j}=r.getConfig();j&&(0,Rr.safeExecuteInTheMiddle)(()=>j(y,{moduleVersion:t,exchange:i,routingKey:s,content:u,options:l,isConfirmChannel:!0,confirmError:O}),G=>{G&&ni.diag.error("amqplib instrumentation: publishConfirmHook error",G)},!0),O&&y.setStatus({code:ni.SpanStatusCode.ERROR,message:"message confirmation has been nack'ed"}),y.end()}},R=(0,Ti.markConfirmChannelTracing)(ni.context.active()),x=[...arguments];return x[3]=S,x[4]=ni.context.bind((0,Ti.unmarkConfirmChannelTracing)(ni.trace.setSpan(R,y)),v),ni.context.with(R,n.bind(this,...x))}}getPublishPatch(t,n){let r=this;return function(i,s,u,l){if((0,Ti.isConfirmChannelTracing)(ni.context.active()))return n.apply(this,arguments);{let p=this,{span:h,modifiedOptions:y}=r.createPublishSpan(r,i,s,p,l),{publishHook:S}=r.getConfig();S&&(0,Rr.safeExecuteInTheMiddle)(()=>S(h,{moduleVersion:t,exchange:i,routingKey:s,content:u,options:y,isConfirmChannel:!1}),R=>{R&&ni.diag.error("amqplib instrumentation: publishHook error",R)},!0);let T=[...arguments];T[3]=y;let v=n.apply(this,T);return h.end(),v}}}createPublishSpan(t,n,r,o,i){let s=(0,Ti.normalizeExchange)(n),u=t.tracer.startSpan(`publish ${s}`,{kind:ni.SpanKind.PRODUCER,attributes:{...o.connection[Ti.CONNECTION_ATTRIBUTES],[Xl.ATTR_MESSAGING_DESTINATION]:n,[Xl.ATTR_MESSAGING_DESTINATION_KIND]:Xl.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[Xl.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:r,[Xl.OLD_ATTR_MESSAGING_MESSAGE_ID]:i?.messageId,[Xl.ATTR_MESSAGING_CONVERSATION_ID]:i?.correlationId}}),l=i??{};return l.headers=l.headers??{},ni.propagation.inject(ni.trace.setSpan(ni.context.active(),u),l.headers),{span:u,modifiedOptions:l}}endConsumerSpan(t,n,r,o){let i=t[Ti.MESSAGE_STORED_SPAN];i&&(n!==!1&&i.setStatus({code:ni.SpanStatusCode.ERROR,message:r!==oc.EndOperation.ChannelClosed&&r!==oc.EndOperation.ChannelError?`${r} called on message${o===!0?" with requeue":o===!1?" without requeue":""}`:r}),this.callConsumeEndHook(i,t,n,r),i.end(),t[Ti.MESSAGE_STORED_SPAN]=void 0)}endAllSpansOnChannel(t,n,r,o){(t[Ti.CHANNEL_SPANS_NOT_ENDED]??[]).forEach(s=>{this.endConsumerSpan(s.msg,n,r,o)}),t[Ti.CHANNEL_SPANS_NOT_ENDED]=[]}callConsumeEndHook(t,n,r,o){let{consumeEndHook:i}=this.getConfig();i&&(0,Rr.safeExecuteInTheMiddle)(()=>i(t,{msg:n,rejected:r,endOperation:o}),s=>{s&&ni.diag.error("amqplib instrumentation: consumerEndHook error",s)},!0)}checkConsumeTimeoutOnChannel(t){let n=(0,nG.hrTime)(),r=t[Ti.CHANNEL_SPANS_NOT_ENDED]??[],o,{consumeTimeoutMs:i}=this.getConfig();for(o=0;o<r.length;o++){let s=r[o],u=(0,nG.hrTimeDuration)(s.timeOfConsume,n);if((0,nG.hrTimeToMilliseconds)(u)<i)break;this.endConsumerSpan(s.msg,null,oc.EndOperation.InstrumentationTimeout,!0)}r.splice(0,o)}};oG.AmqplibInstrumentation=KX});var bUe=P(ME=>{"use strict";m();Object.defineProperty(ME,"__esModule",{value:!0});ME.EndOperation=ME.DEFAULT_CONFIG=ME.AmqplibInstrumentation=void 0;var xBt=SUe();Object.defineProperty(ME,"AmqplibInstrumentation",{enumerable:!0,get:function(){return xBt.AmqplibInstrumentation}});var TUe=qX();Object.defineProperty(ME,"DEFAULT_CONFIG",{enumerable:!0,get:function(){return TUe.DEFAULT_CONFIG}});Object.defineProperty(ME,"EndOperation",{enumerable:!0,get:function(){return TUe.EndOperation}})});var IUe,CUe,DBt,vUe,NBt,RUe,xUe=w(()=>{m();IUe=ue(bUe(),1);_r();CUe="Amqplib",DBt={consumeEndHook:e=>{zr(e,"auto.amqplib.otel.consumer")},publishHook:e=>{zr(e,"auto.amqplib.otel.publisher")}},vUe=ut(CUe,()=>new IUe.AmqplibInstrumentation(DBt)),NBt=(()=>({name:CUe,setupOnce(){vUe()}})),RUe=NBt});var OO,JX=w(()=>{m();OO="VercelAI"});function wBt(e){if(typeof e!="object"||e===null)return!1;let t=e;return"type"in t&&"error"in t&&"toolName"in t&&"toolCallId"in t&&t.type==="tool-error"&&t.error instanceof Error}function OBt(e){if(typeof e!="object"||e===null||!("content"in e))return;let t=e;Array.isArray(t.content)&&(kBt(t.content),PBt(t.content))}function kBt(e){for(let t of e){if(!wBt(t))continue;let n=vK(t.toolCallId);n?Gl(r=>{r.setContext("trace",{trace_id:n.traceId,span_id:n.spanId}),r.setTag("vercel.ai.tool.name",t.toolName),r.setTag("vercel.ai.tool.callId",t.toolCallId),r.setLevel("error"),nn(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})}):Gl(r=>{r.setTag("vercel.ai.tool.name",t.toolName),r.setTag("vercel.ai.tool.callId",t.toolCallId),r.setLevel("error"),nn(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})})}}function PBt(e){for(let t of e)typeof t=="object"&&t!==null&&"toolCallId"in t&&typeof t.toolCallId=="string"&&RK(t.toolCallId)}function MBt(e,t,n,r){let o=e?.recordInputs!==void 0?e.recordInputs:t.recordInputs!==void 0?t.recordInputs:n===!0?!0:r,i=e?.recordOutputs!==void 0?e.recordOutputs:t.recordOutputs!==void 0?t.recordOutputs:n===!0?!0:r;return{recordInputs:o,recordOutputs:i}}var sG,BBt,DUe,iG,NUe=w(()=>{m();sG=ue(sn(),1);mt();JX();BBt=[">=3.0.0 <7"],DUe=["generateText","streamText","generateObject","streamObject","embed","embedMany","rerank"];iG=class e extends sG.InstrumentationBase{__init(){this._isPatched=!1}__init2(){this._callbacks=[]}constructor(t={}){super("@sentry/instrumentation-vercel-ai",er,t),e.prototype.__init.call(this),e.prototype.__init2.call(this)}init(){return new sG.InstrumentationNodeModuleDefinition("ai",BBt,this._patch.bind(this))}callWhenPatched(t){this._isPatched?t():this._callbacks.push(t)}_patch(t){this._isPatched=!0,this._callbacks.forEach(r=>r()),this._callbacks=[];let n=r=>new Proxy(r,{apply:(o,i,s)=>{let u=s[0].experimental_telemetry||{},l=u.isEnabled,p=_t(),h=p?.getIntegrationByName(OO),y=h?.options,S=h?!!p?.getOptions().sendDefaultPii:!1,{recordInputs:T,recordOutputs:v}=MBt(y,u,l,S);return s[0].experimental_telemetry={...u,isEnabled:l!==void 0?l:!0,recordInputs:T,recordOutputs:v},yf(()=>Reflect.apply(o,i,s),R=>{R&&typeof R=="object"&&ns(R,"_sentry_active_span",jc())},()=>{},R=>{OBt(R)})}});if(Object.prototype.toString.call(t)==="[object Module]"){for(let r of DUe)t[r]!=null&&(t[r]=n(t[r]));return t}else{let r=DUe.reduce((o,i)=>(t[i]!=null&&(o[i]=n(t[i])),o),{});return{...t,...r}}}}});function LBt(e){return!!e.getIntegrationByName("Modules")?.getModules?.()?.ai}var BUe,UBt,wUe,OUe=w(()=>{m();mt();_r();JX();NUe();BUe=ut(OO,()=>new iG({}));UBt=((e={})=>{let t;return{name:OO,options:e,setupOnce(){t=BUe()},afterAllSetup(n){e.force??LBt(n)?dF(n):t?.callWhenPatched(()=>dF(n))}}}),wUe=UBt});var uG,QBt,aG,kUe=w(()=>{m();uG=ue(sn(),1);mt();QBt=[">=4.0.0 <7"],aG=class extends uG.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-openai",er,t)}init(){return new uG.InstrumentationNodeModuleDefinition("openai",QBt,this._patch.bind(this))}_patch(t){let n=t;return n=this._patchClient(n,"OpenAI"),n=this._patchClient(n,"AzureOpenAI"),n}_patchClient(t,n){let r=t[n];if(!r)return t;let o=this.getConfig(),i=function(...s){if(RS(sE))return Reflect.construct(r,s);let u=Reflect.construct(r,s);return mF(u,o)};Object.setPrototypeOf(i,r),Object.setPrototypeOf(i.prototype,r.prototype);for(let s of Object.getOwnPropertyNames(r))if(!["length","name","prototype"].includes(s)){let u=Object.getOwnPropertyDescriptor(r,s);u&&Object.defineProperty(i,s,u)}try{t[n]=i}catch{Object.defineProperty(t,n,{value:i,writable:!0,configurable:!0,enumerable:!0})}if(t.default===r)try{t.default=i}catch{Object.defineProperty(t,"default",{value:i,writable:!0,configurable:!0,enumerable:!0})}return t}}});var PUe,FBt,MUe,LUe=w(()=>{m();mt();_r();kUe();PUe=ut(sE,e=>new aG(e)),FBt=((e={})=>({name:sE,setupOnce(){PUe(e)}})),MUe=FBt});var lG,GBt,cG,UUe=w(()=>{m();lG=ue(sn(),1);mt();GBt=[">=0.19.2 <1.0.0"],cG=class extends lG.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-anthropic-ai",er,t)}init(){return new lG.InstrumentationNodeModuleDefinition("@anthropic-ai/sdk",GBt,this._patch.bind(this))}_patch(t){let n=t.Anthropic,r=this.getConfig(),o=function(...i){if(RS(aE))return Reflect.construct(n,i);let s=Reflect.construct(n,i);return AF(s,r)};Object.setPrototypeOf(o,n),Object.setPrototypeOf(o.prototype,n.prototype);for(let i of Object.getOwnPropertyNames(n))if(!["length","name","prototype"].includes(i)){let s=Object.getOwnPropertyDescriptor(n,i);s&&Object.defineProperty(o,i,s)}try{t.Anthropic=o}catch{Object.defineProperty(t,"Anthropic",{value:o,writable:!0,configurable:!0,enumerable:!0})}if(t.default===n)try{t.default=o}catch{Object.defineProperty(t,"default",{value:o,writable:!0,configurable:!0,enumerable:!0})}return t}}});var QUe,jBt,FUe,GUe=w(()=>{m();mt();_r();UUe();QUe=ut(aE,e=>new cG(e)),jBt=((e={})=>({name:aE,options:e,setupOnce(){QUe(e)}})),FUe=jBt});var YR,jUe,dG,zUe=w(()=>{m();YR=ue(sn(),1);mt();jUe=[">=0.10.0 <2"],dG=class extends YR.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-google-genai",er,t)}init(){return new YR.InstrumentationNodeModuleDefinition("@google/genai",jUe,n=>this._patch(n),n=>n,[new YR.InstrumentationNodeModuleFile("@google/genai/dist/node/index.cjs",jUe,n=>this._patch(n),n=>n)])}_patch(t){let n=t.GoogleGenAI,r=this.getConfig();if(typeof n!="function")return t;let o=function(...i){if(RS(uE))return Reflect.construct(n,i);let s=Reflect.construct(n,i);return gF(s,r)};Object.setPrototypeOf(o,n),Object.setPrototypeOf(o.prototype,n.prototype);for(let i of Object.getOwnPropertyNames(n))if(!["length","name","prototype"].includes(i)){let s=Object.getOwnPropertyDescriptor(n,i);s&&Object.defineProperty(o,i,s)}return pw(t,"GoogleGenAI",o),t}}});var HUe,zBt,$Ue,qUe=w(()=>{m();mt();_r();zUe();HUe=ut(uE,e=>new dG(e)),zBt=((e={})=>({name:uE,setupOnce(){HUe(e)}})),$Ue=zBt});function HBt(e,t){return e?Array.isArray(e)?e.includes(t)?e:[...e,t]:typeof e=="object"?[e,t]:e:[t]}function $Bt(e,t,n){return new Proxy(e,{apply(r,o,i){let u=i[1];(!u||typeof u!="object"||Array.isArray(u))&&(u={},i[1]=u);let l=u.callbacks,p=HBt(l,t);return u.callbacks=p,Reflect.apply(r,o,i)}})}var LE,pG,fG,VUe=w(()=>{m();LE=ue(sn(),1);mt();pG=[">=0.1.0 <2.0.0"];fG=class extends LE.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langchain",er,t)}init(){let t=[],n=["@langchain/anthropic","@langchain/openai","@langchain/google-genai","@langchain/mistralai","@langchain/google-vertexai","@langchain/groq"];for(let r of n)t.push(new LE.InstrumentationNodeModuleDefinition(r,pG,this._patch.bind(this),o=>o,[new LE.InstrumentationNodeModuleFile(`${r}/dist/index.cjs`,pG,this._patch.bind(this),o=>o)]));return t.push(new LE.InstrumentationNodeModuleDefinition("langchain",pG,this._patch.bind(this),r=>r,[new LE.InstrumentationNodeModuleFile("langchain/dist/chat_models/universal.cjs",pG,this._patch.bind(this),r=>r)])),t}_patch(t){zY([sE,aE,uE]);let n=yF(this.getConfig());return this._patchRunnableMethods(t,n),t}_patchRunnableMethods(t,n){let r=["ChatAnthropic","ChatOpenAI","ChatGoogleGenerativeAI","ChatMistralAI","ChatVertexAI","ChatGroq","ConfigurableModel"],o=t.universal_exports??t,i=Object.values(o).find(l=>typeof l=="function"&&r.includes(l.name));if(!i)return;let s=i.prototype;if(s.__sentry_patched__)return;s.__sentry_patched__=!0;let u=["invoke","stream","batch"];for(let l of u){let p=s[l];typeof p=="function"&&(s[l]=$Bt(p,n))}}}});var YUe,qBt,KUe,JUe=w(()=>{m();mt();_r();VUe();YUe=ut(hF,e=>new fG(e)),qBt=((e={})=>({name:hF,setupOnce(){YUe(e)}})),KUe=qBt});var KR,ZUe,mG,WUe=w(()=>{m();KR=ue(sn(),1);mt();ZUe=[">=0.0.0 <2.0.0"],mG=class extends KR.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langgraph",er,t)}init(){return new KR.InstrumentationNodeModuleDefinition("@langchain/langgraph",ZUe,this._patch.bind(this),n=>n,[new KR.InstrumentationNodeModuleFile("@langchain/langgraph/dist/index.cjs",ZUe,this._patch.bind(this),n=>n)])}_patch(t){return t.StateGraph&&typeof t.StateGraph=="function"&&TF(t.StateGraph.prototype,this.getConfig()),t}}});var XUe,VBt,eQe,tQe=w(()=>{m();mt();_r();WUe();XUe=ut(SF,e=>new mG(e)),VBt=((e={})=>({name:SF,setupOnce(){XUe(e)}})),eQe=VBt});import*as rQe from"node:net";function oQe(e,t,n,r,o){let s=()=>{},u=o.firestoreSpanCreationHook;typeof u=="function"&&(s=h=>{(0,eh.safeExecuteInTheMiddle)(()=>u(h),y=>{y&&Ul.error(y?.message)},!0)});let l=new eh.InstrumentationNodeModuleDefinition("@firebase/firestore",t,h=>nQe(h,n,r,e,s)),p=["@firebase/firestore/dist/lite/index.node.cjs.js","@firebase/firestore/dist/lite/index.node.mjs.js","@firebase/firestore/dist/lite/index.rn.esm2017.js","@firebase/firestore/dist/lite/index.cjs.js"];for(let h of p)l.files.push(new eh.InstrumentationNodeModuleFile(h,t,y=>nQe(y,n,r,e,s),y=>iQe(y,r)));return l}function nQe(e,t,n,r,o){return iQe(e,n),t(e,"addDoc",YBt(r,o)),t(e,"getDocs",JBt(r,o)),t(e,"setDoc",ZBt(r,o)),t(e,"deleteDoc",KBt(r,o)),e}function iQe(e,t){for(let n of["addDoc","getDocs","setDoc","deleteDoc"])(0,eh.isWrapped)(e[n])&&t(e,n);return e}function YBt(e,t){return function(r){return function(o,i){let s=gG(e,"addDoc",o);return t(s),AG(s,()=>r(o,i))}}}function KBt(e,t){return function(r){return function(o){let i=gG(e,"deleteDoc",o.parent||o);return t(i),AG(i,()=>r(o))}}}function JBt(e,t){return function(r){return function(o){let i=gG(e,"getDocs",o);return t(i),AG(i,()=>r(o))}}}function ZBt(e,t){return function(r){return function(o,i,s){let u=gG(e,"setDoc",o.parent||o);return t(u),AG(u,()=>typeof s<"u"?r(o,i,s):r(o,i))}}}function AG(e,t){return Xe.with(qt.setSpan(Xe.active(),e),()=>(0,eh.safeExecuteInTheMiddle)(()=>t(),n=>{n&&e.recordException(n),e.end()},!0))}function gG(e,t,n){let r=e.startSpan(`${t} ${n.path}`,{kind:po.CLIENT});return XBt(r,n),r.setAttribute(PC,t),r}function WBt(e){let t,n;if(typeof e.host=="string")if(e.host.startsWith("[")){if(e.host.endsWith("]"))t=e.host.replace(/^\[|\]$/g,"");else if(e.host.includes("]:")){let r=e.host.lastIndexOf(":");r!==-1&&(t=e.host.slice(1,r).replace(/^\[|\]$/g,""),n=e.host.slice(r+1))}}else if(rQe.isIPv6(e.host))t=e.host;else{let r=e.host.lastIndexOf(":");r!==-1?(t=e.host.slice(0,r),n=e.host.slice(r+1)):t=e.host}return{address:t,port:n?parseInt(n,10):void 0}}function XBt(e,t){let n=t.firestore.app,r=n.options,i=(t.firestore.toJSON()||{}).settings||{},s={[fV]:t.path,[mV]:n.name,[cS]:"firebase.firestore","firebase.firestore.type":t.type,"firebase.firestore.options.projectId":r.projectId,"firebase.firestore.options.appId":r.appId,"firebase.firestore.options.messagingSenderId":r.messagingSenderId,"firebase.firestore.options.storageBucket":r.storageBucket},{address:u,port:l}=WBt(i);u&&(s[TV]=u),l&&(s[bV]=l),e.setAttributes(s)}var eh,sQe=w(()=>{m();ze();eh=ue(sn(),1);Xn()});function aQe(e,t,n,r,o){let i=()=>{},s=()=>{},u=o.functions?.errorHook,l=o.functions?.requestHook,p=o.functions?.responseHook;typeof p=="function"&&(s=(S,T)=>{(0,th.safeExecuteInTheMiddle)(()=>p(S,T),v=>{v&&Ul.error(v?.message)},!0)}),typeof l=="function"&&(i=S=>{(0,th.safeExecuteInTheMiddle)(()=>l(S),T=>{T&&Ul.error(T?.message)},!0)});let h=new th.InstrumentationNodeModuleDefinition("firebase-functions",t);return[{name:"firebase-functions/lib/v2/providers/https.js",triggerType:"function"},{name:"firebase-functions/lib/v2/providers/firestore.js",triggerType:"firestore"},{name:"firebase-functions/lib/v2/providers/scheduler.js",triggerType:"scheduler"},{name:"firebase-functions/lib/v2/storage.js",triggerType:"storage"}].forEach(({name:S,triggerType:T})=>{h.files.push(new th.InstrumentationNodeModuleFile(S,t,v=>ewt(v,n,r,e,{requestHook:i,responseHook:s,errorHook:u},T),v=>uQe(v,r)))}),h}function ic(e,t,n){return function(o){return function(...i){let s=typeof i[0]=="function"?i[0]:i[1],u=typeof i[0]=="function"?void 0:i[0];if(!s)return o.call(this,...i);let l=async function(...p){let h=process.env.FUNCTION_TARGET||process.env.K_SERVICE||"unknown",y=e.startSpan(`firebase.function.${n}`,{kind:po.SERVER}),S={"faas.name":h,"faas.trigger":n,"faas.provider":"firebase"};return process.env.GCLOUD_PROJECT&&(S["cloud.project_id"]=process.env.GCLOUD_PROJECT),process.env.EVENTARC_CLOUD_EVENT_SOURCE&&(S["cloud.event_source"]=process.env.EVENTARC_CLOUD_EVENT_SOURCE),y.setAttributes(S),t?.requestHook?.(y),Xe.with(qt.setSpan(Xe.active(),y),async()=>{let T,v;try{v=await s.apply(this,p)}catch(R){T=R}if(t?.responseHook?.(y,T),T&&y.recordException(T),y.end(),T)throw await t?.errorHook?.(y,T),T;return v})};return u?o.call(this,u,l):o.call(this,l)}}}function ewt(e,t,n,r,o,i){switch(uQe(e,n),i){case"function":t(e,"onRequest",ic(r,o,"http.request")),t(e,"onCall",ic(r,o,"http.call"));break;case"firestore":t(e,"onDocumentCreated",ic(r,o,"firestore.document.created")),t(e,"onDocumentUpdated",ic(r,o,"firestore.document.updated")),t(e,"onDocumentDeleted",ic(r,o,"firestore.document.deleted")),t(e,"onDocumentWritten",ic(r,o,"firestore.document.written")),t(e,"onDocumentCreatedWithAuthContext",ic(r,o,"firestore.document.created")),t(e,"onDocumentUpdatedWithAuthContext",ic(r,o,"firestore.document.updated")),t(e,"onDocumentDeletedWithAuthContext",ic(r,o,"firestore.document.deleted")),t(e,"onDocumentWrittenWithAuthContext",ic(r,o,"firestore.document.written"));break;case"scheduler":t(e,"onSchedule",ic(r,o,"scheduler.scheduled"));break;case"storage":t(e,"onObjectFinalized",ic(r,o,"storage.object.finalized")),t(e,"onObjectArchived",ic(r,o,"storage.object.archived")),t(e,"onObjectDeleted",ic(r,o,"storage.object.deleted")),t(e,"onObjectMetadataUpdated",ic(r,o,"storage.object.metadataUpdated"));break}return e}function uQe(e,t){let n=["onSchedule","onRequest","onCall","onObjectFinalized","onObjectArchived","onObjectDeleted","onObjectMetadataUpdated","onDocumentCreated","onDocumentUpdated","onDocumentDeleted","onDocumentWritten","onDocumentCreatedWithAuthContext","onDocumentUpdatedWithAuthContext","onDocumentDeletedWithAuthContext","onDocumentWrittenWithAuthContext"];for(let r of n)(0,th.isWrapped)(e[r])&&t(e,r);return e}var th,cQe=w(()=>{m();ze();th=ue(sn(),1)});var dQe,lQe,twt,nwt,hG,pQe=w(()=>{m();dQe=ue(sn(),1);mt();sQe();cQe();lQe={},twt=[">=3.0.0 <5"],nwt=[">=6.0.0 <7"],hG=class extends dQe.InstrumentationBase{constructor(t=lQe){super("@sentry/instrumentation-firebase",er,t)}setConfig(t={}){super.setConfig({...lQe,...t})}init(){let t=[];return t.push(oQe(this.tracer,twt,this._wrap,this._unwrap,this.getConfig())),t.push(aQe(this.tracer,nwt,this._wrap,this._unwrap,this.getConfig())),t}}});var fQe,rwt,mQe,owt,AQe,gQe=w(()=>{m();mt();_r();pQe();fQe="Firebase",rwt={firestoreSpanCreationHook:e=>{zr(e,"auto.firebase.otel.firestore"),e.setAttribute(Xt,"db.query")},functions:{requestHook:e=>{zr(e,"auto.firebase.otel.functions"),e.setAttribute(Xt,"http.request")},errorHook:async(e,t)=>{t&&(nn(t,{mechanism:{type:"auto.firebase.otel.functions",handled:!1}}),await Ev(2e3))}}},mQe=ut(fQe,()=>new hG(rwt)),owt=(()=>({name:fQe,setupOnce(){mQe()}})),AQe=owt});function hQe(){return[ywe(),eke(),Rke(),ALe(),mPe(),DPe(),GPe(),XPe(),BMe(),WMe(),J2e(),lLe(),BLe(),HLe(),oUe(),fUe(),Hke(),RUe(),tPe(),KUe(),eQe(),wUe(),MUe(),FUe(),$Ue(),n2e(),AQe()]}var _Qe=w(()=>{m();xUe();GUe();$Le();Swe();rke();gQe();mUe();qUe();Dke();dLe();gLe();$ke();wLe();JUe();tQe();nPe();APe();NPe();jPe();eMe();LUe();XMe();r2e();Z2e();wMe();iUe();OUe()});function yQe(e,t={}){e.getOptions().debug&&oZ();let[n,r]=iwt(e,t);e.traceProvider=n,e.asyncLocalStorageLookup=r}function iwt(e,t={}){let n=new EQe.BasicTracerProvider({sampler:new x4(e),resource:(0,_G.defaultResource)().merge((0,_G.resourceFromAttributes)({[IV]:"node",[pV]:"sentry",[CV]:er})),forceFlushTimeoutMillis:500,spanProcessors:[new R4({timeout:swt(e.getOptions().maxSpanWaitDuration)}),...t.spanProcessors||[]]});qt.setGlobalTracerProvider(n),lf.setGlobalPropagator(new v4);let r=new N4;return Xe.setGlobalContextManager(r),[n,r.getAsyncLocalStorageLookup()]}function swt(e){if(e!=null){if(e>ZX)return xs&&W.warn(`\`maxSpanWaitDuration\` is too high, using the maximum value of ${ZX}`),ZX;if(e<=0||Number.isNaN(e)){xs&&W.warn("`maxSpanWaitDuration` must be a positive number, using default value instead.");return}return e}}var _G,EQe,ZX,SQe=w(()=>{m();ze();_G=ue(hJ(),1),EQe=ue(zJ(),1);Xn();mt();_r();Zv();HS();ZX=1e6});function TQe(){return L4().filter(t=>t.name!=="Http"&&t.name!=="NodeFetch").concat(JBe(),iwe())}function bQe(e){return[...TQe(),...Mi(e)?hQe():[]]}function WX(e={}){return awt(e,bQe)}function awt(e={},t){xS(e,"node");let n=NZ({...e,defaultIntegrations:e.defaultIntegrations??t(e)});return n&&!e.skipOpenTelemetrySetup&&(yQe(n,{spanProcessors:e.openTelemetrySpanProcessors}),U4()),n}var IQe=w(()=>{m();mt();_r();ZBe();swe();_Qe();SQe()});var JR=w(()=>{m();IQe();mt();_r()});function Co(){return uwt}function hu(){return CQe}function vQe(){return cwt}var uwt,CQe,cwt,Wc=w(()=>{"use strict";m();uwt="prod",CQe="0.1.187",cwt=`@loredotlink/cli/${CQe}`});function mwt(e=""){if(!pwt.test(e))return e!==e.toLowerCase()}function RQe(e,t){let n=t??fwt,r=[];if(!e||typeof e!="string")return r;let o="",i,s;for(let u of e){let l=n.includes(u);if(l===!0){r.push(o),o="",i=void 0;continue}let p=mwt(u);if(s===!1){if(i===!1&&p===!0){r.push(o),o=u,i=p;continue}if(i===!0&&p===!1&&o.length>1){let h=o.at(-1);r.push(o.slice(0,Math.max(0,o.length-1))),o=h+u,i=p;continue}}o+=u,i=p,s=l}return r.push(o),r}function Awt(e){return e?e[0].toUpperCase()+e.slice(1):""}function gwt(e){return e?e[0].toLowerCase()+e.slice(1):""}function hwt(e,t){return e?(Array.isArray(e)?e:RQe(e)).map(n=>Awt(t?.normalize?n.toLowerCase():n)).join(""):""}function PO(e,t){return gwt(hwt(e||"",t))}function EG(e,t){return e?(Array.isArray(e)?e:RQe(e)).map(n=>n.toLowerCase()).join(t??"-"):""}function xQe(e){return EG(e||"","_")}var pwt,fwt,DQe=w(()=>{m();pwt=/\d/,fwt=["-","_","/","."]});import{parseArgs as _wt}from"node:util";function bG(e){return Array.isArray(e)?e:e===void 0?[]:[e]}function XX(e,t=""){let n=[];for(let r of e)for(let[o,i]of r.entries())n[o]=Math.max(n[o]||0,i.length);return e.map(r=>r.map((o,i)=>t+o[i===0?"padStart":"padEnd"](n[i])).join(" ")).join(`
39
39
  `)}function ed(e){return typeof e=="function"?e():e}function Ewt(e=[],t={}){let n=new Set(t.boolean||[]),r=new Set(t.string||[]),o=t.alias||{},i=t.default||{},s=new Map,u=new Map;for(let[x,O]of Object.entries(o)){let M=O;for(let j of M)s.set(x,j),u.has(j)||u.set(j,[]),u.get(j).push(x),s.set(j,x),u.has(x)||u.set(x,[]),u.get(x).push(j)}let l={};function p(x){if(n.has(x))return"boolean";let O=u.get(x)||[];for(let M of O)if(n.has(M))return"boolean";return"string"}function h(x){if(r.has(x))return!0;let O=u.get(x)||[];for(let M of O)if(r.has(M))return!0;return!1}let y=new Set([...n,...r,...Object.keys(o),...Object.values(o).flat(),...Object.keys(i)]);for(let x of y)l[x]||(l[x]={type:p(x),default:i[x]});for(let[x,O]of s.entries())x.length===1&&l[O]&&!l[O].short&&(l[O].short=x);let S=[],T={};for(let x=0;x<e.length;x++){let O=e[x];if(O==="--"){S.push(...e.slice(x));break}if(O.startsWith("--no-")){let M=O.slice(5);T[M]=!0;continue}S.push(O)}let v;try{v=_wt({args:S,options:Object.keys(l).length>0?l:void 0,allowPositionals:!0,strict:!1})}catch{v={values:{},positionals:S}}let R={_:[]};R._=v.positionals;for(let[x,O]of Object.entries(v.values)){let M=O;p(x)==="boolean"&&typeof O=="string"?M=O!=="false":h(x)&&typeof O=="boolean"&&(M=""),R[x]=M}for(let[x]of Object.entries(T)){R[x]=!1;let O=s.get(x);O&&(R[O]=!1);let M=u.get(x);if(M)for(let j of M)R[j]=!1}for(let[x,O]of s.entries())R[x]!==void 0&&R[O]===void 0&&(R[O]=R[x]),R[O]!==void 0&&R[x]===void 0&&(R[x]=R[O]),R[x]!==R[O]&&i[O]===R[O]&&(R[O]=R[x]);return R}function Swt(e,t){let n={boolean:[],string:[],alias:{},default:{}},r=wQe(t);for(let u of r){if(u.type==="positional")continue;u.type==="string"||u.type==="enum"?n.string.push(u.name):u.type==="boolean"&&n.boolean.push(u.name),u.default!==void 0&&(n.default[u.name]=u.default),u.alias&&(n.alias[u.name]=u.alias);let l=PO(u.name),p=EG(u.name);if(l!==u.name||p!==u.name){let h=bG(n.alias[u.name]||[]);l!==u.name&&!h.includes(l)&&h.push(l),p!==u.name&&!h.includes(p)&&h.push(p),h.length>0&&(n.alias[u.name]=h)}}let o=Ewt(e,n),[...i]=o._,s=new Proxy(o,{get(u,l){return u[l]??u[PO(l)]??u[EG(l)]}});for(let[,u]of r.entries())if(u.type==="positional"){let l=i.shift();if(l!==void 0)s[u.name]=l;else{if(u.default===void 0&&u.required!==!1)throw new iT(`Missing required positional argument: ${u.name.toUpperCase()}`,"EARG");s[u.name]=u.default}}else if(u.type==="enum"){let l=s[u.name],p=u.options||[];if(l!==void 0&&p.length>0&&!p.includes(l))throw new iT(`Invalid value for argument: ${Rf(`--${u.name}`)} (${Rf(l)}). Expected one of: ${p.map(h=>Rf(h)).join(", ")}.`,"EARG")}else if(u.required&&s[u.name]===void 0)throw new iT(`Missing required argument: --${u.name}`,"EARG");return s}function wQe(e){let t=[];for(let[n,r]of Object.entries(e||{}))t.push({...r,name:n,alias:bG(r.alias)});return t}async function Twt(e){return Promise.all(e.map(t=>ed(t)))}async function sT(e,t){let n=await ed(e.args||{}),r=Swt(t.rawArgs,n),o={rawArgs:t.rawArgs,args:r,data:t.data,cmd:e},i=await Twt(e.plugins??[]),s,u;try{for(let h of i)await h.setup?.(o);typeof e.setup=="function"&&await e.setup(o);let p=await ed(e.subCommands);if(p&&Object.keys(p).length>0){let h=bwt(t.rawArgs,n),y=t.rawArgs[h];if(y){let S=await NQe(p,y);if(!S)throw new iT(`Unknown command ${Rf(y)}`,"E_UNKNOWN_COMMAND");await sT(S,{rawArgs:t.rawArgs.slice(h+1)})}else{let S=await ed(e.default);if(S){if(e.run)throw new iT("Cannot specify both 'run' and 'default' on the same command.","E_DEFAULT_CONFLICT");let T=await NQe(p,S);if(!T)throw new iT(`Default sub command ${Rf(S)} not found in subCommands.`,"E_UNKNOWN_COMMAND");await sT(T,{rawArgs:t.rawArgs})}else if(!e.run)throw new iT("No command specified.","E_NO_COMMAND")}}typeof e.run=="function"&&(s=await e.run(o))}catch(p){u=p}let l=[];if(typeof e.cleanup=="function")try{await e.cleanup(o)}catch(p){l.push(p)}for(let p of[...i].reverse())try{await p.cleanup?.(o)}catch(h){l.push(h)}if(u)throw u;if(l.length===1)throw l[0];if(l.length>1)throw new Error("Multiple cleanup errors",{cause:l});return{result:s}}async function NQe(e,t){if(t in e)return ed(e[t]);for(let n of Object.values(e)){let r=await ed(n),o=await ed(r?.meta);if(o?.alias&&bG(o.alias).includes(t))return r}}function bwt(e,t){for(let n=0;n<e.length;n++){let r=e[n];if(r==="--")return-1;if(r.startsWith("-")){!r.includes("=")&&Iwt(r,t)&&n++;continue}return n}return-1}function Iwt(e,t){let n=e.replace(/^-{1,2}/,""),r=PO(n);for(let[o,i]of Object.entries(t))if(!(i.type!=="string"&&i.type!=="enum")&&(r===PO(o)||(Array.isArray(i.alias)?i.alias:i.alias?[i.alias]:[]).includes(n)))return!0;return!1}async function tee(e,t){let n=await ed(e.meta||{}),r=wQe(await ed(e.args||{})),o=await ed(t?.meta||{}),i=`${o.name?`${o.name} `:""}`+(n.name||process.argv[1]),s=[],u=[],l=[],p=[];for(let T of r)if(T.type==="positional"){let v=T.name.toUpperCase(),R=T.required!==!1&&T.default===void 0;u.push([Rf(v+eee(T)),BQe(T,R)]),p.push(R?`<${v}>`:`[${v}]`)}else{let v=T.required===!0&&T.default===void 0,R=[...(T.alias||[]).map(x=>`-${x}`),`--${T.name}`].join(", ")+eee(T);if(s.push([Rf(R),BQe(T,v)]),T.type==="boolean"&&(T.default===!0||T.negativeDescription)&&!Cwt.test(T.name)){let x=[...(T.alias||[]).map(O=>`--no-${O}`),`--no-${T.name}`].join(", ");s.push([Rf(x),[T.negativeDescription,v?TG("(Required)"):""].filter(Boolean).join(" ")])}v&&p.push(`--${T.name}`+eee(T))}if(e.subCommands){let T=[],v=await ed(e.subCommands);for(let[R,x]of Object.entries(v)){let O=await ed((await ed(x))?.meta);if(O?.hidden)continue;let M=bG(O?.alias),j=[R,...M].join(", ");l.push([Rf(j),O?.description||""]),T.push(R,...M)}p.push(T.join("|"))}let h=[],y=n.version||o.version;h.push(TG(`${n.description} (${i+(y?` v${y}`:"")})`),"");let S=s.length>0||u.length>0;return h.push(`${SG(yG("USAGE"))} ${Rf(`${i}${S?" [OPTIONS]":""} ${p.join(" ")}`)}`,""),u.length>0&&(h.push(SG(yG("ARGUMENTS")),""),h.push(XX(u," ")),h.push("")),s.length>0&&(h.push(SG(yG("OPTIONS")),""),h.push(XX(s," ")),h.push("")),l.length>0&&(h.push(SG(yG("COMMANDS")),""),h.push(XX(l," ")),h.push("",`Use ${Rf(`${i} <command> --help`)} for more information about a command.`)),h.filter(T=>typeof T=="string").join(`
40
40
  `)}function eee(e){let t=e.valueHint?`=<${e.valueHint}>`:"",n=t||`=<${xQe(e.name)}>`;return!e.type||e.type==="positional"||e.type==="boolean"?t:e.type==="enum"&&e.options?.length?`=<${e.options.join("|")}>`:n}function BQe(e,t){let n=t?TG("(Required)"):"",r=e.default===void 0?"":TG(`(Default: ${e.default})`);return[e.description,n,r].filter(Boolean).join(" ")}var iT,ywt,IG,yG,Rf,TG,SG,Cwt,nee=w(()=>{m();DQe();iT=class extends Error{code;constructor(e,t){super(e),this.name="CLIError",this.code=t}};ywt=(()=>{let e=globalThis.process?.env??{};return e.NO_COLOR==="1"||e.TERM==="dumb"||e.TEST||e.CI})(),IG=(e,t=39)=>n=>ywt?n:`\x1B[${e}m${n}\x1B[${t}m`,yG=IG(1,22),Rf=IG(36),TG=IG(90),SG=IG(4,24);Cwt=/^no[-A-Z]/});var ree,OQe,vwt,kQe,Z2n,oee=w(()=>{"use strict";m();ree=["free","creator","team"],OQe=typeof process<"u"&&process.env?.NODE_ENV!=="production",vwt={stripe:{plans:[{tier:"free",subjectType:"user",name:"Free",description:"Share any thread from Claude Code, Codex, or Cowork. Share with friends or keep private. Share skills with your team instantly.",price:0,priceId:null,features:[{name:"Share threads from Claude Code, Codex, and Cowork"},{name:"Share with friends or keep private"},{name:"Skills tab \u2014 tool usage across every thread"},{name:"Share skills with your team instantly"}],entitlements:{workspaceScope:!1,review:!1,sharedThreadTtlDays:3}},{tier:"creator",subjectType:"user",name:"Creator",description:"For builders who share a lot. Permanent share links that never expire.",price:29,isFeatured:!0,priceId:OQe?"price_1TP9BSKwvRM43sh64waIrvjj":"price_1TPA2gKwvRM43sh6Kp4ZCpJZ",features:[{name:"Everything in Free"},{name:"Shared threads live forever"}],entitlements:{workspaceScope:!1,review:!1,sharedThreadTtlDays:null}},{tier:"team",subjectType:"organization",name:"Team",description:"GitHub for Prompts. Org-wide thread sharing plus the review surface.",price:19,minSeats:2,priceId:OQe?"price_1TP9MpKwvRM43sh6TBIFxVCd":"price_1TPA3CKwvRM43sh6k0bgPTsQ",features:[{name:"Everything in Creator"},{name:"Workspace-wide thread sharing"},{name:"Minimum 2 seats"},{name:"Review feature (beta)"}],entitlements:{workspaceScope:!0,review:!0,sharedThreadTtlDays:null}}]}},kQe=vwt.stripe.plans,Z2n=Object.freeze(Object.fromEntries(kQe.map(e=>[e.tier,e])))});var PQe=w(()=>{"use strict";m();oee();oee()});function xwt(e){QQe=e}function vG(){return QQe}function lt(e,t){let n=RG({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,vG(),MO].filter(r=>!!r)});e.common.issues.push(n)}function xn(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(s,u)=>s.code!=="invalid_type"?{message:u.defaultError}:typeof u.data>"u"?{message:r??u.defaultError}:{message:n??u.defaultError},description:o}}function Qwt(e,t){return!!((t==="v4"||!t)&&Mwt.test(e)||(t==="v6"||!t)&&Lwt.test(e))}function Fwt(e,t){let n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=parseInt(e.toFixed(o).replace(".","")),s=parseInt(t.toFixed(o).replace(".",""));return i%s/Math.pow(10,o)}function ZR(e){if(e instanceof yu){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=xf.create(ZR(r))}return new yu({...e._def,shape:()=>t})}else return e instanceof rh?new rh({...e._def,type:ZR(e.element)}):e instanceof xf?xf.create(ZR(e.unwrap())):e instanceof oh?oh.create(ZR(e.unwrap())):e instanceof sA?sA.create(e.items.map(t=>ZR(t))):e}function lee(e,t){let n=UE(e),r=UE(t);if(e===t)return{valid:!0,data:e};if(n===at.object&&r===at.object){let o=Sr.objectKeys(t),i=Sr.objectKeys(e).filter(u=>o.indexOf(u)!==-1),s={...e,...t};for(let u of i){let l=lee(e[u],t[u]);if(!l.valid)return{valid:!1};s[u]=l.data}return{valid:!0,data:s}}else if(n===at.array&&r===at.array){if(e.length!==t.length)return{valid:!1};let o=[];for(let i=0;i<e.length;i++){let s=e[i],u=t[i],l=lee(s,u);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===at.date&&r===at.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}function GQe(e,t){return new hT({values:e,typeName:Jt.ZodEnum,...xn(t)})}var Sr,aee,at,UE,Ve,Rwt,Xc,MO,QQe,RG,Dwt,Eu,En,FQe,sc,uee,cee,LO,xG,Lt,dp,MQe,Dn,Nwt,Bwt,wwt,Owt,kwt,Pwt,Mwt,Lwt,Uwt,QE,aT,uT,cT,lT,WR,dT,pT,FE,nh,Df,XR,rh,yu,fT,CG,DG,mT,sA,NG,ex,tx,BG,AT,gT,hT,_T,GE,td,xf,oh,ET,nx,rx,Gwt,wG,UO,ox,jQe,jwt,Jt,zwt,zQe,HQe,Hwt,$wt,$Qe,qwt,Vwt,Ywt,Kwt,Jwt,Zwt,Wwt,Xwt,eOt,tOt,nOt,rOt,oOt,iOt,sOt,aOt,uOt,cOt,lOt,dOt,pOt,fOt,mOt,AOt,LQe,gOt,hOt,_Ot,EOt,yOt,SOt,TOt,bOt,IOt,_u,COt,iee,vOt,lp,dee,pLn,fLn,mLn,qQe,ROt,xOt,DOt,NOt,VQe,YQe,KQe,see,Su,BOt,wOt,OOt,kOt,pee,fee,mee,POt,UQe,MOt,LOt,UOt,QOt,Aee,aA=w(()=>{m();(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{let i={};for(let s of o)i[s]=s;return i},e.getValidEnumValues=o=>{let i=e.objectKeys(o).filter(u=>typeof o[o[u]]!="number"),s={};for(let u of i)s[u]=o[u];return e.objectValues(s)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{let i=[];for(let s in o)Object.prototype.hasOwnProperty.call(o,s)&&i.push(s);return i},e.find=(o,i)=>{for(let s of o)if(i(s))return s},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(Sr||(Sr={}));(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(aee||(aee={}));at=Sr.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),UE=e=>{switch(typeof e){case"undefined":return at.undefined;case"string":return at.string;case"number":return isNaN(e)?at.nan:at.number;case"boolean":return at.boolean;case"function":return at.function;case"bigint":return at.bigint;case"symbol":return at.symbol;case"object":return Array.isArray(e)?at.array:e===null?at.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?at.promise:typeof Map<"u"&&e instanceof Map?at.map:typeof Set<"u"&&e instanceof Set?at.set:typeof Date<"u"&&e instanceof Date?at.date:at.object;default:return at.unknown}},Ve=Sr.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Rwt=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),Xc=class extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};let n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){let n=t||function(i){return i.message},r={_errors:[]},o=i=>{for(let s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let u=r,l=0;for(;l<s.path.length;){let p=s.path[l];l===s.path.length-1?(u[p]=u[p]||{_errors:[]},u[p]._errors.push(n(s))):u[p]=u[p]||{_errors:[]},u=u[p],l++}}};return o(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,Sr.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){let n={},r=[];for(let o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}};Xc.create=e=>new Xc(e);MO=(e,t)=>{let n;switch(e.code){case Ve.invalid_type:e.received===at.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Ve.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Sr.jsonStringifyReplacer)}`;break;case Ve.unrecognized_keys:n=`Unrecognized key(s) in object: ${Sr.joinValues(e.keys,", ")}`;break;case Ve.invalid_union:n="Invalid input";break;case Ve.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Sr.joinValues(e.options)}`;break;case Ve.invalid_enum_value:n=`Invalid enum value. Expected ${Sr.joinValues(e.options)}, received '${e.received}'`;break;case Ve.invalid_arguments:n="Invalid function arguments";break;case Ve.invalid_return_type:n="Invalid function return type";break;case Ve.invalid_date:n="Invalid date";break;case Ve.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Sr.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case Ve.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case Ve.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case Ve.custom:n="Invalid input";break;case Ve.invalid_intersection_types:n="Intersection results could not be merged";break;case Ve.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Ve.not_finite:n="Number must be finite";break;default:n=t.defaultError,Sr.assertNever(e)}return{message:n}},QQe=MO;RG=e=>{let{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],s={...o,path:i},u="",l=r.filter(p=>!!p).slice().reverse();for(let p of l)u=p(s,{data:t,defaultError:u}).message;return{...o,path:i,message:o.message||u}},Dwt=[];Eu=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){let r=[];for(let o of n){if(o.status==="aborted")return En;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){let r=[];for(let o of n)r.push({key:await o.key,value:await o.value});return e.mergeObjectSync(t,r)}static mergeObjectSync(t,n){let r={};for(let o of n){let{key:i,value:s}=o;if(i.status==="aborted"||s.status==="aborted")return En;i.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||o.alwaysSet)&&(r[i.value]=s.value)}return{status:t.value,value:r}}},En=Object.freeze({status:"aborted"}),FQe=e=>({status:"dirty",value:e}),sc=e=>({status:"valid",value:e}),uee=e=>e.status==="aborted",cee=e=>e.status==="dirty",LO=e=>e.status==="valid",xG=e=>typeof Promise<"u"&&e instanceof Promise;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Lt||(Lt={}));dp=class{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},MQe=(e,t)=>{if(LO(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let n=new Xc(e.common.issues);return this._error=n,this._error}}};Dn=class{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return UE(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:UE(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Eu,ctx:{common:t.parent.common,data:t.data,parsedType:UE(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let n=this._parse(t);if(xG(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){let n=this._parse(t);return Promise.resolve(n)}parse(t,n){let r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;let o={common:{issues:[],async:(r=n?.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:UE(t)},i=this._parseSync({data:t,path:o.path,parent:o});return MQe(o,i)}async parseAsync(t,n){let r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){let r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:UE(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(xG(o)?o:Promise.resolve(o));return MQe(r,i)}refine(t,n){let r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{let s=t(o),u=()=>i.addIssue({code:Ve.custom,...r(o)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(u(),!1)):s?!0:(u(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new td({schema:this,typeName:Jt.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return xf.create(this,this._def)}nullable(){return oh.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return rh.create(this,this._def)}promise(){return GE.create(this,this._def)}or(t){return fT.create([this,t],this._def)}and(t){return mT.create(this,t,this._def)}transform(t){return new td({...xn(this._def),schema:this,typeName:Jt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let n=typeof t=="function"?t:()=>t;return new ET({...xn(this._def),innerType:this,defaultValue:n,typeName:Jt.ZodDefault})}brand(){return new wG({typeName:Jt.ZodBranded,type:this,...xn(this._def)})}catch(t){let n=typeof t=="function"?t:()=>t;return new nx({...xn(this._def),innerType:this,catchValue:n,typeName:Jt.ZodCatch})}describe(t){let n=this.constructor;return new n({...this._def,description:t})}pipe(t){return UO.create(this,t)}readonly(){return ox.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Nwt=/^c[^\s-]{8,}$/i,Bwt=/^[a-z][a-z0-9]*$/,wwt=/[0-9A-HJKMNP-TV-Z]{26}/,Owt=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,kwt=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Pwt=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u"),Mwt=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,Lwt=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Uwt=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");QE=class e extends Dn{constructor(){super(...arguments),this._regex=(t,n,r)=>this.refinement(o=>t.test(o),{validation:n,code:Ve.invalid_string,...Lt.errToObj(r)}),this.nonempty=t=>this.min(1,Lt.errToObj(t)),this.trim=()=>new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]}),this.toLowerCase=()=>new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]}),this.toUpperCase=()=>new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==at.string){let i=this._getOrReturnCtx(t);return lt(i,{code:Ve.invalid_type,expected:at.string,received:i.parsedType}),En}let r=new Eu,o;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),lt(o,{code:Ve.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),lt(o,{code:Ve.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){let s=t.data.length>i.value,u=t.data.length<i.value;(s||u)&&(o=this._getOrReturnCtx(t,o),s?lt(o,{code:Ve.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):u&&lt(o,{code:Ve.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")kwt.test(t.data)||(o=this._getOrReturnCtx(t,o),lt(o,{validation:"email",code:Ve.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Pwt.test(t.data)||(o=this._getOrReturnCtx(t,o),lt(o,{validation:"emoji",code:Ve.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")Owt.test(t.data)||(o=this._getOrReturnCtx(t,o),lt(o,{validation:"uuid",code:Ve.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")Nwt.test(t.data)||(o=this._getOrReturnCtx(t,o),lt(o,{validation:"cuid",code:Ve.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")Bwt.test(t.data)||(o=this._getOrReturnCtx(t,o),lt(o,{validation:"cuid2",code:Ve.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")wwt.test(t.data)||(o=this._getOrReturnCtx(t,o),lt(o,{validation:"ulid",code:Ve.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),lt(o,{validation:"url",code:Ve.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),lt(o,{validation:"regex",code:Ve.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),lt(o,{code:Ve.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),lt(o,{code:Ve.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),lt(o,{code:Ve.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?Uwt(i).test(t.data)||(o=this._getOrReturnCtx(t,o),lt(o,{code:Ve.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="ip"?Qwt(t.data,i.version)||(o=this._getOrReturnCtx(t,o),lt(o,{validation:"ip",code:Ve.invalid_string,message:i.message}),r.dirty()):Sr.assertNever(i);return{status:r.value,value:t.data}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Lt.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Lt.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Lt.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Lt.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Lt.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Lt.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Lt.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Lt.errToObj(t)})}datetime(t){var n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:(n=t?.offset)!==null&&n!==void 0?n:!1,...Lt.errToObj(t?.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Lt.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...Lt.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Lt.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Lt.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Lt.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Lt.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Lt.errToObj(n)})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};QE.create=e=>{var t;return new QE({checks:[],typeName:Jt.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...xn(e)})};aT=class e extends Dn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==at.number){let i=this._getOrReturnCtx(t);return lt(i,{code:Ve.invalid_type,expected:at.number,received:i.parsedType}),En}let r,o=new Eu;for(let i of this._def.checks)i.kind==="int"?Sr.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),lt(r,{code:Ve.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),lt(r,{code:Ve.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),lt(r,{code:Ve.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?Fwt(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),lt(r,{code:Ve.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),lt(r,{code:Ve.not_finite,message:i.message}),o.dirty()):Sr.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Lt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Lt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Lt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Lt.toString(n))}setLimit(t,n,r,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Lt.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Lt.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Lt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Lt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Lt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Lt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Lt.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Lt.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Lt.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Lt.toString(t)})}get minValue(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Sr.isInteger(t.value))}get isFinite(){let t=null,n=null;for(let r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}};aT.create=e=>new aT({checks:[],typeName:Jt.ZodNumber,coerce:e?.coerce||!1,...xn(e)});uT=class e extends Dn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==at.bigint){let i=this._getOrReturnCtx(t);return lt(i,{code:Ve.invalid_type,expected:at.bigint,received:i.parsedType}),En}let r,o=new Eu;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),lt(r,{code:Ve.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),lt(r,{code:Ve.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),lt(r,{code:Ve.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):Sr.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Lt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Lt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Lt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Lt.toString(n))}setLimit(t,n,r,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Lt.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Lt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Lt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Lt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Lt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Lt.toString(n)})}get minValue(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};uT.create=e=>{var t;return new uT({checks:[],typeName:Jt.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...xn(e)})};cT=class extends Dn{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==at.boolean){let r=this._getOrReturnCtx(t);return lt(r,{code:Ve.invalid_type,expected:at.boolean,received:r.parsedType}),En}return sc(t.data)}};cT.create=e=>new cT({typeName:Jt.ZodBoolean,coerce:e?.coerce||!1,...xn(e)});lT=class e extends Dn{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==at.date){let i=this._getOrReturnCtx(t);return lt(i,{code:Ve.invalid_type,expected:at.date,received:i.parsedType}),En}if(isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return lt(i,{code:Ve.invalid_date}),En}let r=new Eu,o;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),lt(o,{code:Ve.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),lt(o,{code:Ve.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Sr.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Lt.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Lt.toString(n)})}get minDate(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}};lT.create=e=>new lT({checks:[],coerce:e?.coerce||!1,typeName:Jt.ZodDate,...xn(e)});WR=class extends Dn{_parse(t){if(this._getType(t)!==at.symbol){let r=this._getOrReturnCtx(t);return lt(r,{code:Ve.invalid_type,expected:at.symbol,received:r.parsedType}),En}return sc(t.data)}};WR.create=e=>new WR({typeName:Jt.ZodSymbol,...xn(e)});dT=class extends Dn{_parse(t){if(this._getType(t)!==at.undefined){let r=this._getOrReturnCtx(t);return lt(r,{code:Ve.invalid_type,expected:at.undefined,received:r.parsedType}),En}return sc(t.data)}};dT.create=e=>new dT({typeName:Jt.ZodUndefined,...xn(e)});pT=class extends Dn{_parse(t){if(this._getType(t)!==at.null){let r=this._getOrReturnCtx(t);return lt(r,{code:Ve.invalid_type,expected:at.null,received:r.parsedType}),En}return sc(t.data)}};pT.create=e=>new pT({typeName:Jt.ZodNull,...xn(e)});FE=class extends Dn{constructor(){super(...arguments),this._any=!0}_parse(t){return sc(t.data)}};FE.create=e=>new FE({typeName:Jt.ZodAny,...xn(e)});nh=class extends Dn{constructor(){super(...arguments),this._unknown=!0}_parse(t){return sc(t.data)}};nh.create=e=>new nh({typeName:Jt.ZodUnknown,...xn(e)});Df=class extends Dn{_parse(t){let n=this._getOrReturnCtx(t);return lt(n,{code:Ve.invalid_type,expected:at.never,received:n.parsedType}),En}};Df.create=e=>new Df({typeName:Jt.ZodNever,...xn(e)});XR=class extends Dn{_parse(t){if(this._getType(t)!==at.undefined){let r=this._getOrReturnCtx(t);return lt(r,{code:Ve.invalid_type,expected:at.void,received:r.parsedType}),En}return sc(t.data)}};XR.create=e=>new XR({typeName:Jt.ZodVoid,...xn(e)});rh=class e extends Dn{_parse(t){let{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==at.array)return lt(n,{code:Ve.invalid_type,expected:at.array,received:n.parsedType}),En;if(o.exactLength!==null){let s=n.data.length>o.exactLength.value,u=n.data.length<o.exactLength.value;(s||u)&&(lt(n,{code:s?Ve.too_big:Ve.too_small,minimum:u?o.exactLength.value:void 0,maximum:s?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(lt(n,{code:Ve.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(lt(n,{code:Ve.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((s,u)=>o.type._parseAsync(new dp(n,s,n.path,u)))).then(s=>Eu.mergeArray(r,s));let i=[...n.data].map((s,u)=>o.type._parseSync(new dp(n,s,n.path,u)));return Eu.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:Lt.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:Lt.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:Lt.toString(n)}})}nonempty(t){return this.min(1,t)}};rh.create=(e,t)=>new rh({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Jt.ZodArray,...xn(t)});yu=class e extends Dn{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),n=Sr.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==at.object){let p=this._getOrReturnCtx(t);return lt(p,{code:Ve.invalid_type,expected:at.object,received:p.parsedType}),En}let{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),u=[];if(!(this._def.catchall instanceof Df&&this._def.unknownKeys==="strip"))for(let p in o.data)s.includes(p)||u.push(p);let l=[];for(let p of s){let h=i[p],y=o.data[p];l.push({key:{status:"valid",value:p},value:h._parse(new dp(o,y,o.path,p)),alwaysSet:p in o.data})}if(this._def.catchall instanceof Df){let p=this._def.unknownKeys;if(p==="passthrough")for(let h of u)l.push({key:{status:"valid",value:h},value:{status:"valid",value:o.data[h]}});else if(p==="strict")u.length>0&&(lt(o,{code:Ve.unrecognized_keys,keys:u}),r.dirty());else if(p!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let p=this._def.catchall;for(let h of u){let y=o.data[h];l.push({key:{status:"valid",value:h},value:p._parse(new dp(o,y,o.path,h)),alwaysSet:h in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let p=[];for(let h of l){let y=await h.key;p.push({key:y,value:await h.value,alwaysSet:h.alwaysSet})}return p}).then(p=>Eu.mergeObjectSync(r,p)):Eu.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return Lt.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,i,s,u;let l=(s=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,n,r).message)!==null&&s!==void 0?s:r.defaultError;return n.code==="unrecognized_keys"?{message:(u=Lt.errToObj(t).message)!==null&&u!==void 0?u:l}:{message:l}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Jt.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};return Sr.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new e({...this._def,shape:()=>n})}omit(t){let n={};return Sr.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new e({...this._def,shape:()=>n})}deepPartial(){return ZR(this)}partial(t){let n={};return Sr.objectKeys(this.shape).forEach(r=>{let o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new e({...this._def,shape:()=>n})}required(t){let n={};return Sr.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof xf;)i=i._def.innerType;n[r]=i}}),new e({...this._def,shape:()=>n})}keyof(){return GQe(Sr.objectKeys(this.shape))}};yu.create=(e,t)=>new yu({shape:()=>e,unknownKeys:"strip",catchall:Df.create(),typeName:Jt.ZodObject,...xn(t)});yu.strictCreate=(e,t)=>new yu({shape:()=>e,unknownKeys:"strict",catchall:Df.create(),typeName:Jt.ZodObject,...xn(t)});yu.lazycreate=(e,t)=>new yu({shape:e,unknownKeys:"strip",catchall:Df.create(),typeName:Jt.ZodObject,...xn(t)});fT=class extends Dn{_parse(t){let{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(let u of i)if(u.result.status==="valid")return u.result;for(let u of i)if(u.result.status==="dirty")return n.common.issues.push(...u.ctx.common.issues),u.result;let s=i.map(u=>new Xc(u.ctx.common.issues));return lt(n,{code:Ve.invalid_union,unionErrors:s}),En}if(n.common.async)return Promise.all(r.map(async i=>{let s={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(o);{let i,s=[];for(let l of r){let p={...n,common:{...n.common,issues:[]},parent:null},h=l._parseSync({data:n.data,path:n.path,parent:p});if(h.status==="valid")return h;h.status==="dirty"&&!i&&(i={result:h,ctx:p}),p.common.issues.length&&s.push(p.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;let u=s.map(l=>new Xc(l));return lt(n,{code:Ve.invalid_union,unionErrors:u}),En}}get options(){return this._def.options}};fT.create=(e,t)=>new fT({options:e,typeName:Jt.ZodUnion,...xn(t)});CG=e=>e instanceof AT?CG(e.schema):e instanceof td?CG(e.innerType()):e instanceof gT?[e.value]:e instanceof hT?e.options:e instanceof _T?Object.keys(e.enum):e instanceof ET?CG(e._def.innerType):e instanceof dT?[void 0]:e instanceof pT?[null]:null,DG=class e extends Dn{_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==at.object)return lt(n,{code:Ve.invalid_type,expected:at.object,received:n.parsedType}),En;let r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(lt(n,{code:Ve.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),En)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let o=new Map;for(let i of n){let s=CG(i.shape[t]);if(!s)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let u of s){if(o.has(u))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(u)}`);o.set(u,i)}}return new e({typeName:Jt.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...xn(r)})}};mT=class extends Dn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t),o=(i,s)=>{if(uee(i)||uee(s))return En;let u=lee(i.value,s.value);return u.valid?((cee(i)||cee(s))&&n.dirty(),{status:n.value,value:u.data}):(lt(r,{code:Ve.invalid_intersection_types}),En)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,s])=>o(i,s)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};mT.create=(e,t,n)=>new mT({left:e,right:t,typeName:Jt.ZodIntersection,...xn(n)});sA=class e extends Dn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==at.array)return lt(r,{code:Ve.invalid_type,expected:at.array,received:r.parsedType}),En;if(r.data.length<this._def.items.length)return lt(r,{code:Ve.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),En;!this._def.rest&&r.data.length>this._def.items.length&&(lt(r,{code:Ve.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());let i=[...r.data].map((s,u)=>{let l=this._def.items[u]||this._def.rest;return l?l._parse(new dp(r,s,r.path,u)):null}).filter(s=>!!s);return r.common.async?Promise.all(i).then(s=>Eu.mergeArray(n,s)):Eu.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};sA.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new sA({items:e,typeName:Jt.ZodTuple,rest:null,...xn(t)})};NG=class e extends Dn{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==at.object)return lt(r,{code:Ve.invalid_type,expected:at.object,received:r.parsedType}),En;let o=[],i=this._def.keyType,s=this._def.valueType;for(let u in r.data)o.push({key:i._parse(new dp(r,u,r.path,u)),value:s._parse(new dp(r,r.data[u],r.path,u))});return r.common.async?Eu.mergeObjectAsync(n,o):Eu.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Dn?new e({keyType:t,valueType:n,typeName:Jt.ZodRecord,...xn(r)}):new e({keyType:QE.create(),valueType:t,typeName:Jt.ZodRecord,...xn(n)})}},ex=class extends Dn{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==at.map)return lt(r,{code:Ve.invalid_type,expected:at.map,received:r.parsedType}),En;let o=this._def.keyType,i=this._def.valueType,s=[...r.data.entries()].map(([u,l],p)=>({key:o._parse(new dp(r,u,r.path,[p,"key"])),value:i._parse(new dp(r,l,r.path,[p,"value"]))}));if(r.common.async){let u=new Map;return Promise.resolve().then(async()=>{for(let l of s){let p=await l.key,h=await l.value;if(p.status==="aborted"||h.status==="aborted")return En;(p.status==="dirty"||h.status==="dirty")&&n.dirty(),u.set(p.value,h.value)}return{status:n.value,value:u}})}else{let u=new Map;for(let l of s){let p=l.key,h=l.value;if(p.status==="aborted"||h.status==="aborted")return En;(p.status==="dirty"||h.status==="dirty")&&n.dirty(),u.set(p.value,h.value)}return{status:n.value,value:u}}}};ex.create=(e,t,n)=>new ex({valueType:t,keyType:e,typeName:Jt.ZodMap,...xn(n)});tx=class e extends Dn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==at.set)return lt(r,{code:Ve.invalid_type,expected:at.set,received:r.parsedType}),En;let o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(lt(r,{code:Ve.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(lt(r,{code:Ve.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());let i=this._def.valueType;function s(l){let p=new Set;for(let h of l){if(h.status==="aborted")return En;h.status==="dirty"&&n.dirty(),p.add(h.value)}return{status:n.value,value:p}}let u=[...r.data.values()].map((l,p)=>i._parse(new dp(r,l,r.path,p)));return r.common.async?Promise.all(u).then(l=>s(l)):s(u)}min(t,n){return new e({...this._def,minSize:{value:t,message:Lt.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:Lt.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}};tx.create=(e,t)=>new tx({valueType:e,minSize:null,maxSize:null,typeName:Jt.ZodSet,...xn(t)});BG=class e extends Dn{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==at.function)return lt(n,{code:Ve.invalid_type,expected:at.function,received:n.parsedType}),En;function r(u,l){return RG({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,vG(),MO].filter(p=>!!p),issueData:{code:Ve.invalid_arguments,argumentsError:l}})}function o(u,l){return RG({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,vG(),MO].filter(p=>!!p),issueData:{code:Ve.invalid_return_type,returnTypeError:l}})}let i={errorMap:n.common.contextualErrorMap},s=n.data;if(this._def.returns instanceof GE){let u=this;return sc(async function(...l){let p=new Xc([]),h=await u._def.args.parseAsync(l,i).catch(T=>{throw p.addIssue(r(l,T)),p}),y=await Reflect.apply(s,this,h);return await u._def.returns._def.type.parseAsync(y,i).catch(T=>{throw p.addIssue(o(y,T)),p})})}else{let u=this;return sc(function(...l){let p=u._def.args.safeParse(l,i);if(!p.success)throw new Xc([r(l,p.error)]);let h=Reflect.apply(s,this,p.data),y=u._def.returns.safeParse(h,i);if(!y.success)throw new Xc([o(h,y.error)]);return y.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:sA.create(t).rest(nh.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new e({args:t||sA.create([]).rest(nh.create()),returns:n||nh.create(),typeName:Jt.ZodFunction,...xn(r)})}},AT=class extends Dn{get schema(){return this._def.getter()}_parse(t){let{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};AT.create=(e,t)=>new AT({getter:e,typeName:Jt.ZodLazy,...xn(t)});gT=class extends Dn{_parse(t){if(t.data!==this._def.value){let n=this._getOrReturnCtx(t);return lt(n,{received:n.data,code:Ve.invalid_literal,expected:this._def.value}),En}return{status:"valid",value:t.data}}get value(){return this._def.value}};gT.create=(e,t)=>new gT({value:e,typeName:Jt.ZodLiteral,...xn(t)});hT=class e extends Dn{_parse(t){if(typeof t.data!="string"){let n=this._getOrReturnCtx(t),r=this._def.values;return lt(n,{expected:Sr.joinValues(r),received:n.parsedType,code:Ve.invalid_type}),En}if(this._def.values.indexOf(t.data)===-1){let n=this._getOrReturnCtx(t),r=this._def.values;return lt(n,{received:n.data,code:Ve.invalid_enum_value,options:r}),En}return sc(t.data)}get options(){return this._def.values}get enum(){let t={};for(let n of this._def.values)t[n]=n;return t}get Values(){let t={};for(let n of this._def.values)t[n]=n;return t}get Enum(){let t={};for(let n of this._def.values)t[n]=n;return t}extract(t){return e.create(t)}exclude(t){return e.create(this.options.filter(n=>!t.includes(n)))}};hT.create=GQe;_T=class extends Dn{_parse(t){let n=Sr.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==at.string&&r.parsedType!==at.number){let o=Sr.objectValues(n);return lt(r,{expected:Sr.joinValues(o),received:r.parsedType,code:Ve.invalid_type}),En}if(n.indexOf(t.data)===-1){let o=Sr.objectValues(n);return lt(r,{received:r.data,code:Ve.invalid_enum_value,options:o}),En}return sc(t.data)}get enum(){return this._def.values}};_T.create=(e,t)=>new _T({values:e,typeName:Jt.ZodNativeEnum,...xn(t)});GE=class extends Dn{unwrap(){return this._def.type}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==at.promise&&n.common.async===!1)return lt(n,{code:Ve.invalid_type,expected:at.promise,received:n.parsedType}),En;let r=n.parsedType===at.promise?n.data:Promise.resolve(n.data);return sc(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}};GE.create=(e,t)=>new GE({type:e,typeName:Jt.ZodPromise,...xn(t)});td=class extends Dn{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Jt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:s=>{lt(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){let s=o.transform(r.data,i);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(s).then(u=>this._def.schema._parseAsync({data:u,path:r.path,parent:r})):this._def.schema._parseSync({data:s,path:r.path,parent:r})}if(o.type==="refinement"){let s=u=>{let l=o.refinement(u,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(r.common.async===!1){let u=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return u.status==="aborted"?En:(u.status==="dirty"&&n.dirty(),s(u.value),{status:n.value,value:u.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(u=>u.status==="aborted"?En:(u.status==="dirty"&&n.dirty(),s(u.value).then(()=>({status:n.value,value:u.value}))))}if(o.type==="transform")if(r.common.async===!1){let s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!LO(s))return s;let u=o.transform(s.value,i);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:u}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>LO(s)?Promise.resolve(o.transform(s.value,i)).then(u=>({status:n.value,value:u})):s);Sr.assertNever(o)}};td.create=(e,t,n)=>new td({schema:e,typeName:Jt.ZodEffects,effect:t,...xn(n)});td.createWithPreprocess=(e,t,n)=>new td({schema:t,effect:{type:"preprocess",transform:e},typeName:Jt.ZodEffects,...xn(n)});xf=class extends Dn{_parse(t){return this._getType(t)===at.undefined?sc(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};xf.create=(e,t)=>new xf({innerType:e,typeName:Jt.ZodOptional,...xn(t)});oh=class extends Dn{_parse(t){return this._getType(t)===at.null?sc(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};oh.create=(e,t)=>new oh({innerType:e,typeName:Jt.ZodNullable,...xn(t)});ET=class extends Dn{_parse(t){let{ctx:n}=this._processInputParams(t),r=n.data;return n.parsedType===at.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};ET.create=(e,t)=>new ET({innerType:e,typeName:Jt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...xn(t)});nx=class extends Dn{_parse(t){let{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return xG(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Xc(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Xc(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};nx.create=(e,t)=>new nx({innerType:e,typeName:Jt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...xn(t)});rx=class extends Dn{_parse(t){if(this._getType(t)!==at.nan){let r=this._getOrReturnCtx(t);return lt(r,{code:Ve.invalid_type,expected:at.nan,received:r.parsedType}),En}return{status:"valid",value:t.data}}};rx.create=e=>new rx({typeName:Jt.ZodNaN,...xn(e)});Gwt=Symbol("zod_brand"),wG=class extends Dn{_parse(t){let{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}},UO=class e extends Dn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?En:i.status==="dirty"?(n.dirty(),FQe(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{let o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?En:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new e({in:t,out:n,typeName:Jt.ZodPipeline})}},ox=class extends Dn{_parse(t){let n=this._def.innerType._parse(t);return LO(n)&&(n.value=Object.freeze(n.value)),n}};ox.create=(e,t)=>new ox({innerType:e,typeName:Jt.ZodReadonly,...xn(t)});jQe=(e,t={},n)=>e?FE.create().superRefine((r,o)=>{var i,s;if(!e(r)){let u=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,l=(s=(i=u.fatal)!==null&&i!==void 0?i:n)!==null&&s!==void 0?s:!0,p=typeof u=="string"?{message:u}:u;o.addIssue({code:"custom",...p,fatal:l})}}):FE.create(),jwt={object:yu.lazycreate};(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Jt||(Jt={}));zwt=(e,t={message:`Input not instance of ${e.name}`})=>jQe(n=>n instanceof e,t),zQe=QE.create,HQe=aT.create,Hwt=rx.create,$wt=uT.create,$Qe=cT.create,qwt=lT.create,Vwt=WR.create,Ywt=dT.create,Kwt=pT.create,Jwt=FE.create,Zwt=nh.create,Wwt=Df.create,Xwt=XR.create,eOt=rh.create,tOt=yu.create,nOt=yu.strictCreate,rOt=fT.create,oOt=DG.create,iOt=mT.create,sOt=sA.create,aOt=NG.create,uOt=ex.create,cOt=tx.create,lOt=BG.create,dOt=AT.create,pOt=gT.create,fOt=hT.create,mOt=_T.create,AOt=GE.create,LQe=td.create,gOt=xf.create,hOt=oh.create,_Ot=td.createWithPreprocess,EOt=UO.create,yOt=()=>zQe().optional(),SOt=()=>HQe().optional(),TOt=()=>$Qe().optional(),bOt={string:(e=>QE.create({...e,coerce:!0})),number:(e=>aT.create({...e,coerce:!0})),boolean:(e=>cT.create({...e,coerce:!0})),bigint:(e=>uT.create({...e,coerce:!0})),date:(e=>lT.create({...e,coerce:!0}))},IOt=En,_u=Object.freeze({__proto__:null,defaultErrorMap:MO,setErrorMap:xwt,getErrorMap:vG,makeIssue:RG,EMPTY_PATH:Dwt,addIssueToContext:lt,ParseStatus:Eu,INVALID:En,DIRTY:FQe,OK:sc,isAborted:uee,isDirty:cee,isValid:LO,isAsync:xG,get util(){return Sr},get objectUtil(){return aee},ZodParsedType:at,getParsedType:UE,ZodType:Dn,ZodString:QE,ZodNumber:aT,ZodBigInt:uT,ZodBoolean:cT,ZodDate:lT,ZodSymbol:WR,ZodUndefined:dT,ZodNull:pT,ZodAny:FE,ZodUnknown:nh,ZodNever:Df,ZodVoid:XR,ZodArray:rh,ZodObject:yu,ZodUnion:fT,ZodDiscriminatedUnion:DG,ZodIntersection:mT,ZodTuple:sA,ZodRecord:NG,ZodMap:ex,ZodSet:tx,ZodFunction:BG,ZodLazy:AT,ZodLiteral:gT,ZodEnum:hT,ZodNativeEnum:_T,ZodPromise:GE,ZodEffects:td,ZodTransformer:td,ZodOptional:xf,ZodNullable:oh,ZodDefault:ET,ZodCatch:nx,ZodNaN:rx,BRAND:Gwt,ZodBranded:wG,ZodPipeline:UO,ZodReadonly:ox,custom:jQe,Schema:Dn,ZodSchema:Dn,late:jwt,get ZodFirstPartyTypeKind(){return Jt},coerce:bOt,any:Jwt,array:eOt,bigint:$wt,boolean:$Qe,date:qwt,discriminatedUnion:oOt,effect:LQe,enum:fOt,function:lOt,instanceof:zwt,intersection:iOt,lazy:dOt,literal:pOt,map:uOt,nan:Hwt,nativeEnum:mOt,never:Wwt,null:Kwt,nullable:hOt,number:HQe,object:tOt,oboolean:TOt,onumber:SOt,optional:gOt,ostring:yOt,pipeline:EOt,preprocess:_Ot,promise:AOt,record:aOt,set:cOt,strictObject:nOt,string:zQe,symbol:Vwt,transformer:LQe,tuple:sOt,undefined:Ywt,union:rOt,unknown:Zwt,void:Xwt,NEVER:IOt,ZodIssueCode:Ve,quotelessJson:Rwt,ZodError:Xc}),COt=e=>typeof e?.safeParse=="function",iee=e=>typeof e?.passthrough=="function",vOt=(e,t)=>iee(e)?iee(t)?e.merge(t):e:iee(t)?t:Object.assign({},e,t),lp=_u.object({name:_u.literal("ZodError"),issues:_u.array(_u.object({path:_u.array(_u.union([_u.string(),_u.number()])),message:_u.string().optional(),code:_u.nativeEnum(_u.ZodIssueCode)}).catchall(_u.any()))}),dee=class extends Error{constructor(t){let n=JSON.stringify(t,(r,o)=>typeof o=="bigint"?o.toString():o,2);super(n),this.name="ValidationError",this.issues=t}toString(){return this.message}},pLn=_u.object({message:_u.literal("Request validation failed"),pathParameterErrors:lp.nullable(),headerErrors:lp.nullable(),queryParameterErrors:lp.nullable(),bodyErrors:lp.nullable()}),fLn=_u.object({pathParameterErrors:lp.nullable(),headerErrors:lp.nullable(),queryParameterErrors:lp.nullable(),bodyErrors:lp.nullable()}),mLn=_u.object({paramsResult:lp.nullable(),headersResult:lp.nullable(),queryResult:lp.nullable(),bodyResult:lp.nullable()}),qQe="zod-ts-rest-polyfill",ROt=e=>{if(!e)return!1;let t=e?.["~standard"];return t?t.version===1&&typeof t.validate=="function":!1},xOt=e=>ROt(e)?e:COt(e)?(Object.assign(e,{"~standard":{vendor:qQe,version:1,validate:r=>{let o=e.safeParse(r);return o.success?{value:o.data}:{issues:o.error.issues}}}}),e):null,DOt=(e,t)=>e?t?e instanceof yu&&t instanceof yu?vOt(e,t):{...e,...t}:e:t,NOt=(e,t,{passThroughExtraKeys:n=!1}={})=>{let r=t["~standard"].validate(e);if(r instanceof Promise)throw new Error("Schema validation must be synchronous");return r.issues?t["~standard"].vendor===qQe?{error:new Xc(r.issues)}:{error:new dee(r.issues)}:n&&typeof e=="object"&&r.value?{value:{...e,...r.value}}:{value:r.value}},VQe=Symbol("ContractNoBody"),YQe=e=>"method"in e&&"path"in e,KQe=(e,t)=>Object.fromEntries(Object.entries(e).map(([n,r])=>{var o,i,s;return YQe(r)?[n,{...r,path:t?.pathPrefix?t.pathPrefix+r.path:r.path,headers:DOt(t?.baseHeaders,r.headers),strictStatusCodes:(o=r.strictStatusCodes)!==null&&o!==void 0?o:t?.strictStatusCodes,validateResponseOnClient:(i=r.validateResponseOnClient)!==null&&i!==void 0?i:t?.validateResponseOnClient,responses:{...t?.commonResponses,...r.responses},metadata:t?.metadata?{...t?.metadata,...(s=r.metadata)!==null&&s!==void 0?s:{}}:r.metadata}]:[n,KQe(r,t)]})),see=Symbol("ContractPlainType"),Su=()=>({router:(e,t)=>KQe(e,t),query:e=>e,mutation:e=>e,responses:e=>e,response:()=>see,body:()=>see,type:()=>see,otherResponse:({contentType:e,body:t})=>({contentType:e,body:t}),noBody:()=>VQe}),BOt=({path:e,params:t})=>{let n=t;return e.replace(/\/?:([^/?]+)\??/g,(r,o)=>n[o]?`${r.startsWith("/")?"/":""}${n[o]}`:"")},wOt=(e,t=!1)=>{let n=t?OOt(e):kOt(e);return n?.length>0?"?"+n:""},OOt=e=>e?Object.entries(e).filter(([,t])=>t!==void 0).map(([t,n])=>{let r;return typeof n=="string"&&!["true","false","null"].includes(n.trim())&&isNaN(Number(n))?r=n:r=JSON.stringify(n),`${encodeURIComponent(t)}=${encodeURIComponent(r)}`}).join("&"):"",kOt=e=>e?Object.keys(e).flatMap(t=>pee(t,e[t])).map(([t,n])=>`${encodeURIComponent(t)}=${encodeURIComponent(n)}`).join("&"):"",pee=(e,t)=>Array.isArray(t)?t.flatMap((n,r)=>pee(`${e}[${r}]`,n)):t instanceof Date?[[`${e}`,t.toISOString()]]:t===null?[[`${e}`,""]]:t===void 0?[]:typeof t=="object"?Object.keys(t).flatMap(n=>pee(`${e}[${n}]`,t[n])):[[`${e}`,`${t}`]],fee=class extends Error{constructor(t,n){let r=n.join(",");super(`Server returned unexpected response. Expected one of: ${r} got: ${t.status}`),this.response=t}},mee=async({route:e,path:t,method:n,headers:r,body:o,validateResponse:i,fetchOptions:s})=>{let u=await fetch(t,{...s,method:n,headers:r,body:o}),l=u.headers.get("content-type");if(l?.includes("application/")&&l?.includes("json")){let p=e.responses[u.status],h={status:u.status,body:p===VQe?void 0:await u.json(),headers:u.headers},y=xOt(p);if(y&&(i??e.validateResponseOnClient)){let S=NOt(h.body,y);if(S.error)throw S.error;return{...h,body:S.value}}return h}return l?.includes("text/")?{status:u.status,body:await u.text(),headers:u.headers}:{status:u.status,body:await u.blob(),headers:u.headers}},POt=e=>{let t=new FormData,n=(r,o)=>{o instanceof File?t.append(r,o):t.append(r,JSON.stringify(o))};return Object.entries(e).forEach(([r,o])=>{if(Array.isArray(o))for(let i of o)n(r,i);else n(r,o)}),t},UQe=e=>Object.fromEntries(Object.entries(e).map(([t,n])=>[t.toLowerCase(),n])),MOt=e=>{let{path:t,clientArgs:n,route:r,body:o,query:i,extraInputArgs:s,headers:u,fetchOptions:l}=e,p=n.api||mee,h=n.baseHeaders&&Object.fromEntries(Object.entries(n.baseHeaders).map(([T,v])=>typeof v=="function"?[T,v(e)]:[T,v])),y={...h&&UQe(h),...UQe(u)};Object.keys(y).forEach(T=>{y[T]===void 0&&delete y[T]});let S={route:r,path:t,method:r.method,headers:y,body:void 0,rawBody:o,rawQuery:i,contentType:void 0,validateResponse:n.validateResponse,fetchOptions:{...n.credentials&&{credentials:n.credentials},...l},...l?.signal&&{signal:l.signal},...l?.cache&&{cache:l.cache},...l&&"next"in l&&!!l?.next&&{next:l.next}};return r.method!=="GET"&&("contentType"in r&&r.contentType==="multipart/form-data"?S={...S,contentType:"multipart/form-data",body:o instanceof FormData?o:POt(o)}:"contentType"in r&&r.contentType==="application/x-www-form-urlencoded"?S={...S,contentType:"application/x-www-form-urlencoded",headers:{"content-type":"application/x-www-form-urlencoded",...S.headers},body:typeof o=="string"?o:new URLSearchParams(o)}:o!=null&&(S={...S,contentType:"application/json",headers:{"content-type":"application/json",...S.headers},body:JSON.stringify(o)})),p({...S,...s})},LOt=(e,t,n)=>{let{query:r,params:o,body:i,headers:s,extraHeaders:u,overrideClientOptions:l,fetchOptions:p,cache:h,next:y,...S}=n||{},T={...t,...l},v=typeof o=="object"?Object.fromEntries(Object.entries(o).map(([x,O])=>[x,String(O)])):{};return{path:UOt(r,T.baseUrl,v,e,!!T.jsonQuery),clientArgs:T,route:e,body:i,query:r,extraInputArgs:S,fetchOptions:{...h&&{cache:h},...y&&{next:y},...p},headers:{...u,...s}}},UOt=(e,t,n,r,o)=>{let i=BOt({path:r.path,params:n}),s=wOt(e,o);return t.endsWith("/")&&i.startsWith("/")?`${t}${i.substring(1)}${s}`:`${t}${i}${s}`},QOt=(e,t)=>{let n=Object.keys(e.responses);return async r=>{let o=LOt(e,t,r),i=await MOt(o);if(!t.throwOnUnknownStatus||n.includes(i.status.toString()))return i;throw new fee(i,n)}},Aee=(e,t)=>Object.fromEntries(Object.entries(e).map(([n,r])=>YQe(r)?[n,QOt(r,t)]:[n,Aee(r,t)]))});function oe(e,t,n){function r(u,l){if(u._zod||Object.defineProperty(u,"_zod",{value:{def:l,constr:s,traits:new Set},enumerable:!1}),u._zod.traits.has(e))return;u._zod.traits.add(e),t(u,l);let p=s.prototype,h=Object.keys(p);for(let y=0;y<h.length;y++){let S=h[y];S in u||(u[S]=p[S].bind(u))}}let o=n?.Parent??Object;class i extends o{}Object.defineProperty(i,"name",{value:e});function s(u){var l;let p=n?.Parent?new i:this;r(p,u),(l=p._zod).deferred??(l.deferred=[]);for(let h of p._zod.deferred)h();return p}return Object.defineProperty(s,"init",{value:r}),Object.defineProperty(s,Symbol.hasInstance,{value:u=>n?.Parent&&u instanceof n.Parent?!0:u?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}function bi(e){return e&&Object.assign(yT,e),yT}var JQe,gee,hee,Nf,jE,yT,ST=w(()=>{m();gee=Object.freeze({status:"aborted"});hee=Symbol("zod_brand"),Nf=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},jE=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(JQe=globalThis).__zod_globalConfig??(JQe.__zod_globalConfig={});yT=globalThis.__zod_globalConfig});var Ue={};Js(Ue,{BIGINT_FORMAT_RANGES:()=>Ree,Class:()=>Eee,NUMBER_FORMAT_RANGES:()=>vee,aborted:()=>qE,allowsEval:()=>Tee,assert:()=>HOt,assertEqual:()=>FOt,assertIs:()=>jOt,assertNever:()=>zOt,assertNotEqual:()=>GOt,assignProp:()=>HE,base64ToUint8Array:()=>WQe,base64urlToUint8Array:()=>akt,cached:()=>sx,captureStackTrace:()=>kG,cleanEnum:()=>skt,cleanRegex:()=>GO,clone:()=>ac,cloneDef:()=>qOt,createTransparentProxy:()=>WOt,defineLazy:()=>Hn,esc:()=>OG,escapeRegex:()=>pp,explicitlyAborted:()=>xee,extend:()=>tkt,finalizeIssue:()=>uc,floatSafeRemainder:()=>yee,getElementAtPath:()=>VOt,getEnumValues:()=>FO,getLengthableOrigin:()=>HO,getParsedType:()=>ZOt,getSizableOrigin:()=>zO,hexToUint8Array:()=>ckt,isObject:()=>TT,isPlainObject:()=>$E,issue:()=>ax,joinValues:()=>de,jsonStringifyReplacer:()=>ix,merge:()=>rkt,mergeDefs:()=>ih,normalizeParams:()=>$e,nullish:()=>zE,numKeys:()=>JOt,objectClone:()=>$Ot,omit:()=>ekt,optionalKeys:()=>Cee,parsedType:()=>Pe,partial:()=>okt,pick:()=>XOt,prefixIssues:()=>el,primitiveTypes:()=>Iee,promiseAllObject:()=>YOt,propertyKeyTypes:()=>jO,randomString:()=>KOt,required:()=>ikt,safeExtend:()=>nkt,shallowClone:()=>bee,slugify:()=>See,stringifyPrimitive:()=>ke,uint8ArrayToBase64:()=>XQe,uint8ArrayToBase64url:()=>ukt,uint8ArrayToHex:()=>lkt,unwrapMessage:()=>QO});function FOt(e){return e}function GOt(e){return e}function jOt(e){}function zOt(e){throw new Error("Unexpected value in exhaustive check")}function HOt(e){}function FO(e){let t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function de(e,t="|"){return e.map(n=>ke(n)).join(t)}function ix(e,t){return typeof t=="bigint"?t.toString():t}function sx(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function zE(e){return e==null}function GO(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function yee(e,t){let n=e/t,r=Math.round(n),o=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-r)<o?0:n-r}function Hn(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==ZQe)return r===void 0&&(r=ZQe,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function $Ot(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function HE(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ih(...e){let t={};for(let n of e){let r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function qOt(e){return ih(e._zod.def)}function VOt(e,t){return t?t.reduce((n,r)=>n?.[r],e):e}function YOt(e){let t=Object.keys(e),n=t.map(r=>e[r]);return Promise.all(n).then(r=>{let o={};for(let i=0;i<t.length;i++)o[t[i]]=r[i];return o})}function KOt(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let r=0;r<e;r++)n+=t[Math.floor(Math.random()*t.length)];return n}function OG(e){return JSON.stringify(e)}function See(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function TT(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function $E(e){if(TT(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(TT(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function bee(e){return $E(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function JOt(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function pp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ac(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function $e(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function WOt(e){let t;return new Proxy({},{get(n,r,o){return t??(t=e()),Reflect.get(t,r,o)},set(n,r,o,i){return t??(t=e()),Reflect.set(t,r,o,i)},has(n,r){return t??(t=e()),Reflect.has(t,r)},deleteProperty(n,r){return t??(t=e()),Reflect.deleteProperty(t,r)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,r){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,r)},defineProperty(n,r,o){return t??(t=e()),Reflect.defineProperty(t,r,o)}})}function ke(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Cee(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function XOt(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let i=ih(e._zod.def,{get shape(){let s={};for(let u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&(s[u]=n.shape[u])}return HE(this,"shape",s),s},checks:[]});return ac(e,i)}function ekt(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let i=ih(e._zod.def,{get shape(){let s={...e._zod.def.shape};for(let u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&delete s[u]}return HE(this,"shape",s),s},checks:[]});return ac(e,i)}function tkt(e,t){if(!$E(t))throw new Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let i=e._zod.def.shape;for(let s in t)if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let o=ih(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return HE(this,"shape",i),i}});return ac(e,o)}function nkt(e,t){if(!$E(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=ih(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t};return HE(this,"shape",r),r}});return ac(e,n)}function rkt(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let n=ih(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t._zod.def.shape};return HE(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return ac(e,n)}function okt(e,t,n){let o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let s=ih(t._zod.def,{get shape(){let u=t._zod.def.shape,l={...u};if(n)for(let p in n){if(!(p in u))throw new Error(`Unrecognized key: "${p}"`);n[p]&&(l[p]=e?new e({type:"optional",innerType:u[p]}):u[p])}else for(let p in u)l[p]=e?new e({type:"optional",innerType:u[p]}):u[p];return HE(this,"shape",l),l},checks:[]});return ac(t,s)}function ikt(e,t,n){let r=ih(t._zod.def,{get shape(){let o=t._zod.def.shape,i={...o};if(n)for(let s in n){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);n[s]&&(i[s]=new e({type:"nonoptional",innerType:o[s]}))}else for(let s in o)i[s]=new e({type:"nonoptional",innerType:o[s]});return HE(this,"shape",i),i}});return ac(t,r)}function qE(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function xee(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function el(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function QO(e){return typeof e=="string"?e:e?.message}function uc(e,t,n){let r=e.message?e.message:QO(e.inst?._zod.def?.error?.(e))??QO(t?.error?.(e))??QO(n.customError?.(e))??QO(n.localeError?.(e))??"Invalid input",{inst:o,continue:i,input:s,...u}=e;return u.path??(u.path=[]),u.message=r,t?.reportInput&&(u.input=s),u}function zO(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function HO(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Pe(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function ax(...e){let[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}function skt(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function WQe(e){let t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}function XQe(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function akt(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return WQe(t+n)}function ukt(e){return XQe(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function ckt(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let n=new Uint8Array(t.length/2);for(let r=0;r<t.length;r+=2)n[r/2]=Number.parseInt(t.slice(r,r+2),16);return n}function lkt(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var ZQe,kG,Tee,ZOt,jO,Iee,vee,Ree,Eee,yt=w(()=>{m();ST();ZQe=Symbol("evaluating");kG="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};Tee=sx(()=>{if(yT.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});ZOt=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},jO=new Set(["string","number","symbol"]),Iee=new Set(["string","number","bigint","boolean","symbol","undefined"]);vee={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Ree={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};Eee=class{constructor(...t){}}});function qO(e,t=n=>n.message){let n={},r=[];for(let o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}function VO(e,t=n=>n.message){let n={_errors:[]},r=(o,i=[])=>{for(let s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(u=>r({issues:u},[...i,...s.path]));else if(s.code==="invalid_key")r({issues:s.issues},[...i,...s.path]);else if(s.code==="invalid_element")r({issues:s.issues},[...i,...s.path]);else{let u=[...i,...s.path];if(u.length===0)n._errors.push(t(s));else{let l=n,p=0;for(;p<u.length;){let h=u[p];p===u.length-1?(l[h]=l[h]||{_errors:[]},l[h]._errors.push(t(s))):l[h]=l[h]||{_errors:[]},l=l[h],p++}}}};return r(e),n}function Dee(e,t=n=>n.message){let n={errors:[]},r=(o,i=[])=>{var s,u;for(let l of o.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(p=>r({issues:p},[...i,...l.path]));else if(l.code==="invalid_key")r({issues:l.issues},[...i,...l.path]);else if(l.code==="invalid_element")r({issues:l.issues},[...i,...l.path]);else{let p=[...i,...l.path];if(p.length===0){n.errors.push(t(l));continue}let h=n,y=0;for(;y<p.length;){let S=p[y],T=y===p.length-1;typeof S=="string"?(h.properties??(h.properties={}),(s=h.properties)[S]??(s[S]={errors:[]}),h=h.properties[S]):(h.items??(h.items=[]),(u=h.items)[S]??(u[S]={errors:[]}),h=h.items[S]),T&&h.errors.push(t(l)),y++}}};return r(e),n}function tFe(e){let t=[],n=e.map(r=>typeof r=="object"?r.key:r);for(let r of n)typeof r=="number"?t.push(`[${r}]`):typeof r=="symbol"?t.push(`[${JSON.stringify(String(r))}]`):/[^\w$]/.test(r)?t.push(`[${JSON.stringify(r)}]`):(t.length&&t.push("."),t.push(r));return t.join("")}function Nee(e){let t=[],n=[...e.issues].sort((r,o)=>(r.path??[]).length-(o.path??[]).length);for(let r of n)t.push(`\u2716 ${r.message}`),r.path?.length&&t.push(` \u2192 at ${tFe(r.path)}`);return t.join(`
41
41
  `)}var eFe,$O,tl,Bee=w(()=>{m();ST();yt();eFe=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,ix,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},$O=oe("$ZodError",eFe),tl=oe("$ZodError",eFe,{Parent:Error})});var ux,PG,cx,MG,lx,wee,dx,Oee,LG,pkt,UG,fkt,QG,mkt,FG,Akt,GG,gkt,jG,hkt,zG,_kt,HG,Ekt,kee=w(()=>{m();ST();Bee();yt();ux=e=>(t,n,r,o)=>{let i=r?{...r,async:!1}:{async:!1},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw new Nf;if(s.issues.length){let u=new(o?.Err??e)(s.issues.map(l=>uc(l,i,bi())));throw kG(u,o?.callee),u}return s.value},PG=ux(tl),cx=e=>async(t,n,r,o)=>{let i=r?{...r,async:!0}:{async:!0},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let u=new(o?.Err??e)(s.issues.map(l=>uc(l,i,bi())));throw kG(u,o?.callee),u}return s.value},MG=cx(tl),lx=e=>(t,n,r)=>{let o=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new Nf;return i.issues.length?{success:!1,error:new(e??$O)(i.issues.map(s=>uc(s,o,bi())))}:{success:!0,data:i.value}},wee=lx(tl),dx=e=>async(t,n,r)=>{let o=r?{...r,async:!0}:{async:!0},i=t._zod.run({value:n,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>uc(s,o,bi())))}:{success:!0,data:i.value}},Oee=dx(tl),LG=e=>(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return ux(e)(t,n,o)},pkt=LG(tl),UG=e=>(t,n,r)=>ux(e)(t,n,r),fkt=UG(tl),QG=e=>async(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return cx(e)(t,n,o)},mkt=QG(tl),FG=e=>async(t,n,r)=>cx(e)(t,n,r),Akt=FG(tl),GG=e=>(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return lx(e)(t,n,o)},gkt=GG(tl),jG=e=>(t,n,r)=>lx(e)(t,n,r),hkt=jG(tl),zG=e=>async(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return dx(e)(t,n,o)},_kt=zG(tl),HG=e=>async(t,n,r)=>dx(e)(t,n,r),Ekt=HG(tl)});var nd={};Js(nd,{base64:()=>Jee,base64url:()=>$G,bigint:()=>rte,boolean:()=>ite,browserEmail:()=>Rkt,cidrv4:()=>Yee,cidrv6:()=>Kee,cuid:()=>Pee,cuid2:()=>Mee,date:()=>Xee,datetime:()=>tte,domain:()=>Nkt,duration:()=>Gee,e164:()=>Wee,email:()=>zee,emoji:()=>Hee,extendedDuration:()=>ykt,guid:()=>jee,hex:()=>Bkt,hostname:()=>Dkt,html5Email:()=>Ikt,httpProtocol:()=>Zee,idnEmail:()=>vkt,integer:()=>ote,ipv4:()=>$ee,ipv6:()=>qee,ksuid:()=>Qee,lowercase:()=>ute,mac:()=>Vee,md5_base64:()=>Okt,md5_base64url:()=>kkt,md5_hex:()=>wkt,nanoid:()=>Fee,null:()=>ste,number:()=>qG,rfc5322Email:()=>Ckt,sha1_base64:()=>Mkt,sha1_base64url:()=>Lkt,sha1_hex:()=>Pkt,sha256_base64:()=>Qkt,sha256_base64url:()=>Fkt,sha256_hex:()=>Ukt,sha384_base64:()=>jkt,sha384_base64url:()=>zkt,sha384_hex:()=>Gkt,sha512_base64:()=>$kt,sha512_base64url:()=>qkt,sha512_hex:()=>Hkt,string:()=>nte,time:()=>ete,ulid:()=>Lee,undefined:()=>ate,unicodeEmail:()=>nFe,uppercase:()=>cte,uuid:()=>bT,uuid4:()=>Skt,uuid6:()=>Tkt,uuid7:()=>bkt,xid:()=>Uee});function Hee(){return new RegExp(xkt,"u")}function oFe(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function ete(e){return new RegExp(`^${oFe(e)}$`)}function tte(e){let t=oFe({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let r=`${t}(?:${n.join("|")})`;return new RegExp(`^${rFe}T(?:${r})$`)}function YO(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function KO(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var Pee,Mee,Lee,Uee,Qee,Fee,Gee,ykt,jee,bT,Skt,Tkt,bkt,zee,Ikt,Ckt,nFe,vkt,Rkt,xkt,$ee,qee,Vee,Yee,Kee,Jee,$G,Dkt,Nkt,Zee,Wee,rFe,Xee,nte,rte,ote,qG,ite,ste,ate,ute,cte,Bkt,wkt,Okt,kkt,Pkt,Mkt,Lkt,Ukt,Qkt,Fkt,Gkt,jkt,zkt,Hkt,$kt,qkt,VG=w(()=>{m();yt();Pee=/^[cC][0-9a-z]{6,}$/,Mee=/^[0-9a-z]+$/,Lee=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Uee=/^[0-9a-vA-V]{20}$/,Qee=/^[A-Za-z0-9]{27}$/,Fee=/^[a-zA-Z0-9_-]{21}$/,Gee=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,ykt=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,jee=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,bT=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Skt=bT(4),Tkt=bT(6),bkt=bT(7),zee=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Ikt=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Ckt=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,nFe=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,vkt=nFe,Rkt=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,xkt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";$ee=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,qee=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Vee=e=>{let t=pp(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Yee=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Kee=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Jee=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,$G=/^[A-Za-z0-9_-]*$/,Dkt=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Nkt=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Zee=/^https?$/,Wee=/^\+[1-9]\d{6,14}$/,rFe="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Xee=new RegExp(`^${rFe}$`);nte=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},rte=/^-?\d+n?$/,ote=/^-?\d+$/,qG=/^-?\d+(?:\.\d+)?$/,ite=/^(?:true|false)$/i,ste=/^null$/i,ate=/^undefined$/i,ute=/^[^A-Z]*$/,cte=/^[^a-z]*$/,Bkt=/^[0-9a-fA-F]*$/;wkt=/^[0-9a-fA-F]{32}$/,Okt=YO(22,"=="),kkt=KO(22),Pkt=/^[0-9a-fA-F]{40}$/,Mkt=YO(27,"="),Lkt=KO(27),Ukt=/^[0-9a-fA-F]{64}$/,Qkt=YO(43,"="),Fkt=KO(43),Gkt=/^[0-9a-fA-F]{96}$/,jkt=YO(64,""),zkt=KO(64),Hkt=/^[0-9a-fA-F]{128}$/,$kt=YO(86,"=="),qkt=KO(86)});function iFe(e,t,n){e.issues.length&&t.issues.push(...el(n,e.issues))}var eo,sFe,YG,KG,lte,dte,pte,fte,mte,Ate,gte,hte,_te,px,Ete,yte,Ste,Tte,bte,Ite,Cte,vte,Rte,JG=w(()=>{m();ST();VG();yt();eo=oe("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),sFe={number:"number",bigint:"bigint",object:"date"},YG=oe("$ZodCheckLessThan",(e,t)=>{eo.init(e,t);let n=sFe[typeof t.value];e._zod.onattach.push(r=>{let o=r._zod.bag,i=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),KG=oe("$ZodCheckGreaterThan",(e,t)=>{eo.init(e,t);let n=sFe[typeof t.value];e._zod.onattach.push(r=>{let o=r._zod.bag,i=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),lte=oe("$ZodCheckMultipleOf",(e,t)=>{eo.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):yee(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),dte=oe("$ZodCheckNumberFormat",(e,t)=>{eo.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),r=n?"int":"number",[o,i]=vee[t.format];e._zod.onattach.push(s=>{let u=s._zod.bag;u.format=t.format,u.minimum=o,u.maximum=i,n&&(u.pattern=ote)}),e._zod.check=s=>{let u=s.value;if(n){if(!Number.isInteger(u)){s.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:u,inst:e});return}if(!Number.isSafeInteger(u)){u>0?s.issues.push({input:u,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):s.issues.push({input:u,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}u<o&&s.issues.push({origin:"number",input:u,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),u>i&&s.issues.push({origin:"number",input:u,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),pte=oe("$ZodCheckBigIntFormat",(e,t)=>{eo.init(e,t);let[n,r]=Ree[t.format];e._zod.onattach.push(o=>{let i=o._zod.bag;i.format=t.format,i.minimum=n,i.maximum=r}),e._zod.check=o=>{let i=o.value;i<n&&o.issues.push({origin:"bigint",input:i,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),i>r&&o.issues.push({origin:"bigint",input:i,code:"too_big",maximum:r,inclusive:!0,inst:e,continue:!t.abort})}}),fte=oe("$ZodCheckMaxSize",(e,t)=>{var n;eo.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!zE(o)&&o.size!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{let o=r.value;o.size<=t.maximum||r.issues.push({origin:zO(o),code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),mte=oe("$ZodCheckMinSize",(e,t)=>{var n;eo.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!zE(o)&&o.size!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{let o=r.value;o.size>=t.minimum||r.issues.push({origin:zO(o),code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Ate=oe("$ZodCheckSizeEquals",(e,t)=>{var n;eo.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!zE(o)&&o.size!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag;o.minimum=t.size,o.maximum=t.size,o.size=t.size}),e._zod.check=r=>{let o=r.value,i=o.size;if(i===t.size)return;let s=i>t.size;r.issues.push({origin:zO(o),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),gte=oe("$ZodCheckMaxLength",(e,t)=>{var n;eo.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!zE(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{let o=r.value;if(o.length<=t.maximum)return;let s=HO(o);r.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),hte=oe("$ZodCheckMinLength",(e,t)=>{var n;eo.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!zE(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{let o=r.value;if(o.length>=t.minimum)return;let s=HO(o);r.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),_te=oe("$ZodCheckLengthEquals",(e,t)=>{var n;eo.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!zE(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{let o=r.value,i=o.length;if(i===t.length)return;let s=HO(o),u=i>t.length;r.issues.push({origin:s,...u?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),px=oe("$ZodCheckStringFormat",(e,t)=>{var n,r;eo.init(e,t),e._zod.onattach.push(o=>{let i=o._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Ete=oe("$ZodCheckRegex",(e,t)=>{px.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),yte=oe("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=ute),px.init(e,t)}),Ste=oe("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=cte),px.init(e,t)}),Tte=oe("$ZodCheckIncludes",(e,t)=>{eo.init(e,t);let n=pp(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(o=>{let i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),bte=oe("$ZodCheckStartsWith",(e,t)=>{eo.init(e,t);let n=new RegExp(`^${pp(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{let o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),Ite=oe("$ZodCheckEndsWith",(e,t)=>{eo.init(e,t);let n=new RegExp(`.*${pp(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{let o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}});Cte=oe("$ZodCheckProperty",(e,t)=>{eo.init(e,t),e._zod.check=n=>{let r=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(r instanceof Promise)return r.then(o=>iFe(o,n,t.property));iFe(r,n,t.property)}}),vte=oe("$ZodCheckMimeType",(e,t)=>{eo.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(r=>{r._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:"invalid_value",values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),Rte=oe("$ZodCheckOverwrite",(e,t)=>{eo.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}})});var JO,xte=w(()=>{m();JO=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let r=t.split(`
@@ -662,7 +662,7 @@ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.pus
662
662
  `)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
663
663
  `,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(t){let n=t.items[t.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){let r="end"in n.value?n.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,t.indent)){let o=t.items[t.items.length-2]?.value?.end;if(Array.isArray(o)){Array.prototype.push.apply(o,n.start),o.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=t.indent){let r=!this.onKeyLine&&this.indent===t.indent,o=r&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind",i=[];if(o&&n.sep&&!n.value){let s=[];for(let u=0;u<n.sep.length;++u){let l=n.sep[u];switch(l.type){case"newline":s.push(u);break;case"space":break;case"comment":l.indent>t.indent&&(s.length=0);break;default:s.length=0}}s.length>=2&&(i=n.sep.splice(s[1]))}switch(this.type){case"anchor":case"tag":o||n.value?(i.push(this.sourceToken),t.items.push({start:i}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):o||n.value?(i.push(this.sourceToken),t.items.push({start:i,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(n.explicitKey)if(n.sep)if(n.value)t.items.push({start:[],key:null,sep:[this.sourceToken]});else if(B0(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(QZe(n.key)&&!B0(n.sep,"newline")){let s=e1(n.start),u=n.key,l=n.sep;l.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:u,sep:l}]})}else i.length>0?n.sep=n.sep.concat(i,this.sourceToken):n.sep.push(this.sourceToken);else if(B0(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{let s=e1(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||o?t.items.push({start:i,key:null,sep:[this.sourceToken]}):B0(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let s=this.flowScalar(this.type);o||n.value?(t.items.push({start:i,key:s,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(s):(Object.assign(n,{key:s,sep:[]}),this.onKeyLine=!0);return}default:{let s=this.startBlockValue(t);if(s){if(s.type==="block-seq"){if(!n.explicitKey&&n.sep&&!B0(n.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else r&&t.items.push({start:i});this.stack.push(s);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(t){let n=t.items[t.items.length-1];switch(this.type){case"newline":if(n.value){let r="end"in n.value?n.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,t.indent)){let o=t.items[t.items.length-2]?.value?.end;if(Array.isArray(o)){Array.prototype.push.apply(o,n.start),o.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=t.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==t.indent)break;n.value||B0(n.start,"seq-item-ind")?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>t.indent){let r=this.startBlockValue(t);if(r){this.stack.push(r);return}}yield*this.pop(),yield*this.step()}*flowCollection(t){let n=t.items[t.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while(r?.type==="flow-collection")}else if(t.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?t.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?t.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let o=this.flowScalar(this.type);!n||n.value?t.items.push({start:[],key:o,sep:[]}):n.sep?this.stack.push(o):Object.assign(n,{key:o,sep:[]});return}case"flow-map-end":case"flow-seq-end":t.end.push(this.sourceToken);return}let r=this.startBlockValue(t);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{let r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===t.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){let o=A9(r),i=e1(o);UZe(t);let s=t.end.splice(1,t.end.length);s.push(this.sourceToken);let u={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:i,key:t,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=u}else yield*this.lineEnd(t)}}flowScalar(t){if(this.onNewLine){let n=this.source.indexOf(`
664
664
  `)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
665
- `,n)+1}return{type:t,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(t){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let n=A9(t),r=e1(n);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let n=A9(t),r=e1(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,n){return this.type!=="comment"||this.indent<=n?!1:t.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(t){this.type!=="doc-mode"&&(t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(t){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};FZe.Parser=Dpe});var $Ze=P(yM=>{"use strict";m();var GZe=gpe(),JJt=dM(),EM=mM(),ZJt=mde(),WJt=gr(),XJt=xpe(),jZe=Npe();function zZe(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new XJt.LineCounter||null,prettyErrors:t}}function eZt(e,t={}){let{lineCounter:n,prettyErrors:r}=zZe(t),o=new jZe.Parser(n?.addNewLine),i=new GZe.Composer(t),s=Array.from(i.compose(o.parse(e)));if(r&&n)for(let u of s)u.errors.forEach(EM.prettifyError(e,n)),u.warnings.forEach(EM.prettifyError(e,n));return s.length>0?s:Object.assign([],{empty:!0},i.streamInfo())}function HZe(e,t={}){let{lineCounter:n,prettyErrors:r}=zZe(t),o=new jZe.Parser(n?.addNewLine),i=new GZe.Composer(t),s=null;for(let u of i.compose(o.parse(e),!0,e.length))if(!s)s=u;else if(s.options.logLevel!=="silent"){s.errors.push(new EM.YAMLParseError(u.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(s.errors.forEach(EM.prettifyError(e,n)),s.warnings.forEach(EM.prettifyError(e,n))),s}function tZt(e,t,n){let r;typeof t=="function"?r=t:n===void 0&&t&&typeof t=="object"&&(n=t);let o=HZe(e,n);if(!o)return null;if(o.warnings.forEach(i=>ZJt.warn(o.options.logLevel,i)),o.errors.length>0){if(o.options.logLevel!=="silent")throw o.errors[0];o.errors=[]}return o.toJS(Object.assign({reviver:r},n))}function nZt(e,t,n){let r=null;if(typeof t=="function"||Array.isArray(t)?r=t:n===void 0&&t&&(n=t),typeof n=="string"&&(n=n.length),typeof n=="number"){let o=Math.round(n);n=o<1?void 0:o>8?{indent:8}:{indent:o}}if(e===void 0){let{keepUndefined:o}=n??t??{};if(!o)return}return WJt.isDocument(e)&&!r?e.toString(n):new JJt.Document(e,r,n).toString(n)}yM.parse=tZt;yM.parseAllDocuments=eZt;yM.parseDocument=HZe;yM.stringify=nZt});var VZe=P(kr=>{"use strict";m();var rZt=gpe(),oZt=dM(),iZt=Jde(),Bpe=mM(),sZt=YP(),w0=gr(),aZt=R0(),uZt=ps(),cZt=D0(),lZt=N0(),dZt=f9(),pZt=vpe(),fZt=xpe(),mZt=Npe(),g9=$Ze(),qZe=HP();kr.Composer=rZt.Composer;kr.Document=oZt.Document;kr.Schema=iZt.Schema;kr.YAMLError=Bpe.YAMLError;kr.YAMLParseError=Bpe.YAMLParseError;kr.YAMLWarning=Bpe.YAMLWarning;kr.Alias=sZt.Alias;kr.isAlias=w0.isAlias;kr.isCollection=w0.isCollection;kr.isDocument=w0.isDocument;kr.isMap=w0.isMap;kr.isNode=w0.isNode;kr.isPair=w0.isPair;kr.isScalar=w0.isScalar;kr.isSeq=w0.isSeq;kr.Pair=aZt.Pair;kr.Scalar=uZt.Scalar;kr.YAMLMap=cZt.YAMLMap;kr.YAMLSeq=lZt.YAMLSeq;kr.CST=dZt;kr.Lexer=pZt.Lexer;kr.LineCounter=fZt.LineCounter;kr.Parser=mZt.Parser;kr.parse=g9.parse;kr.parseAllDocuments=g9.parseAllDocuments;kr.parseDocument=g9.parseDocument;kr.stringify=g9.stringify;kr.visit=qZe.visit;kr.visitAsync=qZe.visitAsync});m();m();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="6a80637d-9834-419a-b3c1-6245d76f15f3",e._sentryDebugIdIdentifier="sentry-dbid-6a80637d-9834-419a-b3c1-6245d76f15f3")}catch{}})();m();m();m();function nAe(e=process.versions.node){let t=Number.parseInt(e.split(".")[0]??"",10);return!Number.isFinite(t)||t<=0?{ok:!0,currentVersion:e,message:null}:t<20?{ok:!1,currentVersion:e,message:`requires Node.js >= 20.0.0 (found ${e})`}:{ok:!0,currentVersion:e,message:null}}var rAe=nAe();rAe.ok||(process.stderr.write(`lore: ${rAe.message}.
665
+ `,n)+1}return{type:t,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(t){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let n=A9(t),r=e1(n);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let n=A9(t),r=e1(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,n){return this.type!=="comment"||this.indent<=n?!1:t.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(t){this.type!=="doc-mode"&&(t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(t){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};FZe.Parser=Dpe});var $Ze=P(yM=>{"use strict";m();var GZe=gpe(),JJt=dM(),EM=mM(),ZJt=mde(),WJt=gr(),XJt=xpe(),jZe=Npe();function zZe(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new XJt.LineCounter||null,prettyErrors:t}}function eZt(e,t={}){let{lineCounter:n,prettyErrors:r}=zZe(t),o=new jZe.Parser(n?.addNewLine),i=new GZe.Composer(t),s=Array.from(i.compose(o.parse(e)));if(r&&n)for(let u of s)u.errors.forEach(EM.prettifyError(e,n)),u.warnings.forEach(EM.prettifyError(e,n));return s.length>0?s:Object.assign([],{empty:!0},i.streamInfo())}function HZe(e,t={}){let{lineCounter:n,prettyErrors:r}=zZe(t),o=new jZe.Parser(n?.addNewLine),i=new GZe.Composer(t),s=null;for(let u of i.compose(o.parse(e),!0,e.length))if(!s)s=u;else if(s.options.logLevel!=="silent"){s.errors.push(new EM.YAMLParseError(u.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(s.errors.forEach(EM.prettifyError(e,n)),s.warnings.forEach(EM.prettifyError(e,n))),s}function tZt(e,t,n){let r;typeof t=="function"?r=t:n===void 0&&t&&typeof t=="object"&&(n=t);let o=HZe(e,n);if(!o)return null;if(o.warnings.forEach(i=>ZJt.warn(o.options.logLevel,i)),o.errors.length>0){if(o.options.logLevel!=="silent")throw o.errors[0];o.errors=[]}return o.toJS(Object.assign({reviver:r},n))}function nZt(e,t,n){let r=null;if(typeof t=="function"||Array.isArray(t)?r=t:n===void 0&&t&&(n=t),typeof n=="string"&&(n=n.length),typeof n=="number"){let o=Math.round(n);n=o<1?void 0:o>8?{indent:8}:{indent:o}}if(e===void 0){let{keepUndefined:o}=n??t??{};if(!o)return}return WJt.isDocument(e)&&!r?e.toString(n):new JJt.Document(e,r,n).toString(n)}yM.parse=tZt;yM.parseAllDocuments=eZt;yM.parseDocument=HZe;yM.stringify=nZt});var VZe=P(kr=>{"use strict";m();var rZt=gpe(),oZt=dM(),iZt=Jde(),Bpe=mM(),sZt=YP(),w0=gr(),aZt=R0(),uZt=ps(),cZt=D0(),lZt=N0(),dZt=f9(),pZt=vpe(),fZt=xpe(),mZt=Npe(),g9=$Ze(),qZe=HP();kr.Composer=rZt.Composer;kr.Document=oZt.Document;kr.Schema=iZt.Schema;kr.YAMLError=Bpe.YAMLError;kr.YAMLParseError=Bpe.YAMLParseError;kr.YAMLWarning=Bpe.YAMLWarning;kr.Alias=sZt.Alias;kr.isAlias=w0.isAlias;kr.isCollection=w0.isCollection;kr.isDocument=w0.isDocument;kr.isMap=w0.isMap;kr.isNode=w0.isNode;kr.isPair=w0.isPair;kr.isScalar=w0.isScalar;kr.isSeq=w0.isSeq;kr.Pair=aZt.Pair;kr.Scalar=uZt.Scalar;kr.YAMLMap=cZt.YAMLMap;kr.YAMLSeq=lZt.YAMLSeq;kr.CST=dZt;kr.Lexer=pZt.Lexer;kr.LineCounter=fZt.LineCounter;kr.Parser=mZt.Parser;kr.parse=g9.parse;kr.parseAllDocuments=g9.parseAllDocuments;kr.parseDocument=g9.parseDocument;kr.stringify=g9.stringify;kr.visit=qZe.visit;kr.visitAsync=qZe.visitAsync});m();m();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="b2cfdf19-d08d-4748-9b49-e8836c7398a3",e._sentryDebugIdIdentifier="sentry-dbid-b2cfdf19-d08d-4748-9b49-e8836c7398a3")}catch{}})();m();m();m();function nAe(e=process.versions.node){let t=Number.parseInt(e.split(".")[0]??"",10);return!Number.isFinite(t)||t<=0?{ok:!0,currentVersion:e,message:null}:t<20?{ok:!1,currentVersion:e,message:`requires Node.js >= 20.0.0 (found ${e})`}:{ok:!0,currentVersion:e,message:null}}var rAe=nAe();rAe.ok||(process.stderr.write(`lore: ${rAe.message}.
666
666
  Upgrade Node (e.g. \`nvm install 20\`) and re-run.
667
667
  `),process.exit(1));m();JR();Wc();function lwt(){let e=process.env.SENTRY_SPOTLIGHT?.trim();return!e||e==="0"||e==="false"?!1:e==="1"||e==="true"?!0:e}var dwt=lwt();WX({dsn:"https://583674b382128b1b30b9fa1f0581daab@o4509017064472576.ingest.us.sentry.io/4511344717529088",environment:Co(),release:hu(),sendDefaultPii:!0,enableLogs:!0,spotlight:dwt,tracesSampleRate:1});MQ("service_name","lore-cli");JR();nee();import{realpathSync as Otn}from"node:fs";import{fileURLToPath as ktn,pathToFileURL as jet}from"node:url";m();m();bk();Yr();fn();Un();m();function Pk(e){let t=e;return t._def??t.def??{}}function j4t(e){let t=Pk(e);return typeof t.typeName=="string"?t.typeName:typeof t.type=="string"?t.type:void 0}function ol(e,t,n){let r=j4t(e);return r===t||r===n}function Nje(e){let t=Pk(e);if(t.element)return t.element;if(typeof t.type=="object"&&t.type!==null)return t.type}function z4t(e){let t=e.options;if(Array.isArray(t))return[...t];let n=Pk(e);return Array.isArray(n.values)?[...n.values]:n.entries&&typeof n.entries=="object"?Object.values(n.entries):[]}function mse(e){if(!e||!ol(e,"ZodObject","object"))return;let t=e.shape;if(typeof t=="function")return t();if(t&&typeof t=="object")return t;let n=Pk(e).shape;if(typeof n=="function")return n();if(n&&typeof n=="object")return n}function Bje(e){let t=e,n=!1,r,o=e.description;for(;;){o=t.description??o;let i=Pk(t);if(ol(t,"ZodOptional","optional"))n=!0,t=i.innerType;else if(ol(t,"ZodNullable","nullable"))n=!0,t=i.innerType;else if(ol(t,"ZodDefault","default"))r=typeof i.defaultValue=="function"?i.defaultValue():i.defaultValue,t=i.innerType;else if(ol(t,"ZodEffects","effects"))t=i.schema;else if(ol(t,"ZodPipeline","pipe"))t=i.in;else break}return{inner:t,optional:n,defaultValue:r,description:o}}function H4t(e,t={}){let{inner:n,optional:r,defaultValue:o,description:i}=Bje(e),s=!1,u=n;ol(u,"ZodArray","array")&&(s=!0,u=Nje(u)??u);let l=!r&&o===void 0;return t.positional?{arg:{type:"positional",description:i,required:l,...o!==void 0?{default:String(o)}:{}},optional:r,isArray:s}:ol(u,"ZodEnum","enum")?{arg:{type:"enum",description:i,options:z4t(u),required:l,...o!==void 0?{default:String(o)}:{}},optional:r,isArray:s}:ol(u,"ZodBoolean","boolean")?{arg:{type:"boolean",description:i,required:l,...typeof o=="boolean"?{default:o}:{}},optional:r,isArray:s}:{arg:{type:"string",description:s?`${i??""}${i?" ":""}(comma-separated)`.trim()||void 0:i,required:l,...o!==void 0?{default:String(o)}:{},...s?{valueHint:"a,b,c"}:{}},optional:r,isArray:s}}function Ase(e,t={}){let n={},r={};for(let[o,i]of Object.entries(e)){let{arg:s,isArray:u}=H4t(i,t);n[o]=s,r[o]={isArray:u,leafKind:$4t(i)}}return{args:n,fields:r}}function gse(e,t={}){let n=mse(e);return n?Ase(n,t):{args:{},fields:{}}}function $4t(e){let{inner:t}=Bje(e),n=t;return ol(n,"ZodArray","array")&&(n=Nje(n)??n),ol(n,"ZodNumber","number")?"number":ol(n,"ZodBoolean","boolean")?"boolean":ol(n,"ZodEnum","enum")?"enum":ol(n,"ZodString","string")?"string":"other"}function q4t(e,t){let n=e;for(let r of t){if(n===null||typeof n!="object"||!(r in n))throw new Error(`cliRoutes path [${t.join(".")}] does not resolve in apiContract`);n=n[r]}if(n===null||typeof n!="object"||typeof n.method!="string")throw new Error(`cliRoutes path [${t.join(".")}] is not a leaf route (missing 'method')`);return n}function V4t(e,t){let n=e;for(let r of t)n=n[r];if(typeof n!="function")throw new Error(`client method for [${t.join(".")}] is not callable`);return n}function hse(e,t){if(!(e==null||e==="")){if(t.isArray&&typeof e=="string"){let n=e.split(",").map(r=>r.trim()).filter(r=>r.length>0);return n.length>0?n:void 0}if(t.leafKind==="number"&&typeof e=="string"){let n=Number(e);return Number.isFinite(n)?n:e}return e}}function Y4t(e){if(typeof e!="string")return e;try{let n=new URL(e).pathname.split("/").filter(Boolean),r=n.findIndex(i=>i==="thread"||i==="threads"),o=r>=0?n[r+1]:void 0;return o&&o.length>0?o:e}catch{return e}}function K4t(e,t){let n=t.path.map(o=>String(o)).join(".");return` ${n?`${e}.${n}`:e}: ${t.message}`}function _se(e,t,n){if(!e)return[];let r=t??{},o=e.safeParse(r);return o.success?[]:(o.error.issues??[]).map(s=>K4t(n,s))}function J4t(e,t,n){return e.resource==="threads"&&t==="id"?Y4t(n):n}function wje(e){let t=q4t(kz,e.path),n=mse(t.pathParams),r=e.positional??(n?Object.keys(n):[]),o=new Set(r),i=Ase(n?Object.fromEntries(r.map(h=>[h,n[h]])):{},{positional:!0}),s=gse(t.query),u=t.method==="GET"||t.method==="DELETE"?{args:{},fields:{}}:gse(t.body);for(let h of Object.keys(u.args))if(s.args[h]!==void 0||o.has(h))throw new Error(`route [${e.path.join(".")}] has overlapping field "${h}" across path/query/body`);let l={...i.args,...s.args,...u.args},p=e.description??t.summary??`${t.method} ${t.path}`;return{meta:{name:e.op,description:p},args:l,async run({args:h,data:y}){q.info("command_start",{command:`${e.resource} ${e.op}`,route:e.path.join(".")});let S=y;if(!await(S?.getAccessToken??rn)())throw new Be("not logged in \u2014 run 'lore login' first");let v={};for(let ae of r){let se=h[ae],Ee=hse(se,i.fields[ae])??se;v[ae]=J4t(e,ae,Ee)}let R={};for(let[ae,se]of Object.entries(s.fields)){let Ee=hse(h[ae],se);Ee!==void 0&&(R[ae]=Ee)}let x={};for(let[ae,se]of Object.entries(u.fields)){let Ee=hse(h[ae],se);Ee!==void 0&&(x[ae]=Ee)}let O=[..._se(t.pathParams,v,"path"),..._se(t.query,R,"query"),...t.method==="GET"||t.method==="DELETE"?[]:_se(t.body,x,"body")];if(O.length>0)throw new Be(`Invalid request for \`lore ${e.resource} ${e.op}\`:
668
668
  ${O.join(`