@tanagram/lore 0.1.196 → 0.1.197

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/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 wtt=Object.create;var ML=Object.defineProperty;var Ott=Object.getOwnPropertyDescriptor;var ktt=Object.getOwnPropertyNames;var Ptt=Object.getPrototypeOf,Mtt=Object.prototype.hasOwnProperty;var Ue=(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 M=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},Zs=(e,t)=>{for(var n in t)ML(e,n,{get:t[n],enumerable:!0})},sAe=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ktt(t))!Mtt.call(e,o)&&o!==n&&ML(e,o,{get:()=>t[o],enumerable:!(r=Ott(t,o))||r.enumerable});return e};var ue=(e,t,n)=>(n=e!=null?wtt(Ptt(e)):{},sAe(t||!e||!e.__esModule?ML(n,"default",{value:e,enumerable:!0}):n,e)),Me=e=>sAe(ML({},"__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.196"}}catch{}})()});var Ig,g5=w(()=>{m();Ig="1.9.1"});function Ltt(e){let t=new Set([e]),n=new Set,r=e.match(cAe);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 f=l.match(cAe);if(!f)return i(l);let h={major:+f[1],minor:+f[2],patch:+f[3],prerelease:f[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 cAe,lAe,dAe=w(()=>{m();g5();cAe=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;lAe=Ltt(Ig)});function vm(e,t,n,r=!1){var o;let i=sB[iB]=(o=sB[iB])!==null&&o!==void 0?o:{version:Ig};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!==Ig){let s=new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${Ig}`);return n.error(s.stack||s.message),!1}return i[e]=t,n.debug(`@opentelemetry/api: Registered a global for ${e} v${Ig}.`),!0}function Ul(e){var t,n;let r=(t=sB[iB])===null||t===void 0?void 0:t.version;if(!(!r||!lAe(r)))return(n=sB[iB])===null||n===void 0?void 0:n[e]}function Rm(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${Ig}.`);let n=sB[iB];n&&delete n[e]}var Utt,iB,sB,uS=w(()=>{m();g5();dAe();Utt=Ig.split(".")[0],iB=Symbol.for(`opentelemetry.js.api.${Utt}`),sB=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});function aB(e,t,n){let r=Ul("diag");if(r)return r[e](t,...n)}var LL,pAe=w(()=>{m();uS();LL=class{constructor(t){this._namespace=t.namespace||"DiagComponentLogger"}debug(...t){return aB("debug",this._namespace,t)}error(...t){return aB("error",this._namespace,t)}info(...t){return aB("info",this._namespace,t)}warn(...t){return aB("warn",this._namespace,t)}verbose(...t){return aB("verbose",this._namespace,t)}}});var Cs,UL=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"})(Cs||(Cs={}))});function fAe(e,t){e<Cs.NONE?e=Cs.NONE:e>Cs.ALL&&(e=Cs.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",Cs.ERROR),warn:n("warn",Cs.WARN),info:n("info",Cs.INFO),debug:n("debug",Cs.DEBUG),verbose:n("verbose",Cs.VERBOSE)}}var mAe=w(()=>{m();UL()});var Qtt,Ws,cS=w(()=>{m();pAe();mAe();UL();uS();Qtt="diag",Ws=class e{static instance(){return this._instance||(this._instance=new e),this._instance}constructor(){function t(o){return function(...i){let s=Ul("diag");if(s)return s[o](...i)}}let n=this,r=(o,i={logLevel:Cs.INFO})=>{var s,u,l;if(o===n){let _=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=_.stack)!==null&&s!==void 0?s:_.message),!1}typeof i=="number"&&(i={logLevel:i});let f=Ul("diag"),h=fAe((u=i.logLevel)!==null&&u!==void 0?u:Cs.INFO,o);if(f&&!i.suppressOverrideMessage){let _=(l=new Error().stack)!==null&&l!==void 0?l:"<failed to generate stacktrace>";f.warn(`Current logger will be overwritten from ${_}`),h.warn(`Current logger will overwrite one already registered from ${_}`)}return vm("diag",h,n,!0)};n.setLogger=r,n.disable=()=>{Rm(Qtt,n)},n.createComponentLogger=o=>new LL(o),n.verbose=t("verbose"),n.debug=t("debug"),n.info=t("info"),n.warn=t("warn"),n.error=t("error")}}});var QL,AAe=w(()=>{m();QL=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 gAe,hAe=w(()=>{m();gAe=Symbol("BaggageEntryMetadata")});function _Ae(e={}){return new QL(new Map(Object.entries(e)))}function EAe(e){return typeof e!="string"&&(Ftt.error(`Cannot create baggage metadata from unknown type: ${typeof e}`),e=""),{__TYPE__:gAe,toString(){return e}}}var Ftt,h5=w(()=>{m();cS();AAe();hAe();Ftt=Ws.instance()});function Ql(e){return Symbol.for(e)}var _5,BC,uB=w(()=>{m();_5=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}}},BC=new _5});var E5,y5,FL,yAe=w(()=>{m();E5=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],y5={};if(typeof console<"u"){let e=["error","warn","info","debug","trace","log"];for(let t of e)typeof console[t]=="function"&&(y5[t]=console[t])}FL=class{constructor(){function t(n){return function(...r){let o=y5[n];if(typeof o!="function"&&(o=y5.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<E5.length;n++)this[E5[n].n]=t(E5[n].c)}}});function SAe(){return D5}var S5,wC,T5,b5,I5,C5,cB,v5,R5,x5,D5,Gtt,jtt,ztt,Htt,$tt,qtt,Vtt,N5=w(()=>{m();S5=class{constructor(){}createGauge(t,n){return jtt}createHistogram(t,n){return ztt}createCounter(t,n){return Gtt}createUpDownCounter(t,n){return Htt}createObservableGauge(t,n){return qtt}createObservableCounter(t,n){return $tt}createObservableUpDownCounter(t,n){return Vtt}addBatchObservableCallback(t,n){}removeBatchObservableCallback(t){}},wC=class{},T5=class extends wC{add(t,n){}},b5=class extends wC{add(t,n){}},I5=class extends wC{record(t,n){}},C5=class extends wC{record(t,n){}},cB=class{addCallback(t){}removeCallback(t){}},v5=class extends cB{},R5=class extends cB{},x5=class extends cB{},D5=new S5,Gtt=new T5,jtt=new I5,ztt=new C5,Htt=new b5,$tt=new v5,qtt=new R5,Vtt=new x5});var GL,TAe=w(()=>{m();(function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"})(GL||(GL={}))});var jL,zL,B5=w(()=>{m();jL={get(e,t){if(e!=null)return e[t]},keys(e){return e==null?[]:Object.keys(e)}},zL={set(e,t,n){e!=null&&(e[t]=n)}}});var HL,bAe=w(()=>{m();uB();HL=class{active(){return BC}with(t,n,r,...o){return n.call(r,...o)}bind(t,n){return n}enable(){return this}disable(){return this}}});var w5,Ytt,xm,lB=w(()=>{m();bAe();uS();cS();w5="context",Ytt=new HL,xm=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalContextManager(t){return vm(w5,t,Ws.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 Ul(w5)||Ytt}disable(){this._getContextManager().disable(),Rm(w5,Ws.instance())}}});var iu,O5=w(()=>{m();(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(iu||(iu={}))});var dB,lS,$L,qL=w(()=>{m();O5();dB="0000000000000000",lS="00000000000000000000000000000000",$L={traceId:lS,spanId:dB,traceFlags:iu.NONE}});var Dm,VL=w(()=>{m();qL();Dm=class{constructor(t=$L){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 YL(e){return e.getValue(k5)||void 0}function IAe(){return YL(xm.getInstance().active())}function pB(e,t){return e.setValue(k5,t)}function CAe(e){return e.deleteValue(k5)}function vAe(e,t){return pB(e,new Dm(t))}function KL(e){var t;return(t=YL(e))===null||t===void 0?void 0:t.spanContext()}var k5,P5=w(()=>{m();uB();VL();lB();k5=Ql("OpenTelemetry Context Key SPAN")});function RAe(e,t){if(typeof e!="string"||e.length!==t)return!1;let n=0;for(let r=0;r<e.length;r+=4)n+=(JL[e.charCodeAt(r)]|0)+(JL[e.charCodeAt(r+1)]|0)+(JL[e.charCodeAt(r+2)]|0)+(JL[e.charCodeAt(r+3)]|0);return n===t}function M5(e){return RAe(e,32)&&e!==lS}function L5(e){return RAe(e,16)&&e!==dB}function Cg(e){return M5(e.traceId)&&L5(e.spanId)}function xAe(e){return new Dm(e)}var JL,ZL=w(()=>{m();qL();VL();JL=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 Ktt(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 U5,OC,Q5=w(()=>{m();lB();P5();VL();ZL();U5=xm.getInstance(),OC=class{startSpan(t,n,r=U5.active()){if(!!n?.root)return new Dm;let i=r&&KL(r);return Ktt(i)&&Cg(i)?new Dm(i):new Dm}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??U5.active(),f=this.startSpan(t,i,l),h=pB(l,f);return U5.with(h,u,void 0,f)}}});var Jtt,kC,F5=w(()=>{m();Q5();Jtt=new OC,kC=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):Jtt}}});var WL,DAe=w(()=>{m();Q5();WL=class{getTracer(t,n,r){return new OC}}});var Ztt,dS,G5=w(()=>{m();F5();DAe();Ztt=new WL,dS=class{getTracer(t,n,r){var o;return(o=this.getDelegateTracer(t,n,r))!==null&&o!==void 0?o:new kC(this,t,n,r)}getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:Ztt}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 XL,NAe=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"})(XL||(XL={}))});var fo,BAe=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"})(fo||(fo={}))});var Ai,wAe=w(()=>{m();(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(Ai||(Ai={}))});function OAe(e){return ent.test(e)}function kAe(e){return tnt.test(e)&&!nnt.test(e)}var j5,Wtt,Xtt,ent,tnt,nnt,PAe=w(()=>{m();j5="[_0-9a-z-*/]",Wtt=`[a-z]${j5}{0,255}`,Xtt=`[a-z0-9]${j5}{0,240}@[a-z]${j5}{0,13}`,ent=new RegExp(`^(?:${Wtt}|${Xtt})$`),tnt=/^[ -~]{0,255}[!-~]$/,nnt=/,|=/});var MAe,rnt,LAe,UAe,eU,QAe=w(()=>{m();PAe();MAe=32,rnt=512,LAe=",",UAe="=",eU=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+UAe+this.get(n)),t),[]).join(LAe)}_parse(t){t.length>rnt||(this._internalState=t.split(LAe).reduceRight((n,r)=>{let o=r.trim(),i=o.indexOf(UAe);if(i!==-1){let s=o.slice(0,i),u=o.slice(i+1,r.length);OAe(s)&&kAe(u)&&n.set(s,u)}return n},new Map),this._internalState.size>MAe&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,MAe))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}}});function FAe(e){return new eU(e)}var GAe=w(()=>{m();QAe()});var We,jAe=w(()=>{m();lB();We=xm.getInstance()});var Fl,zAe=w(()=>{m();cS();Fl=Ws.instance()});var z5,HAe,$Ae=w(()=>{m();N5();z5=class{getMeter(t,n,r){return D5}},HAe=new z5});var H5,tU,qAe=w(()=>{m();$Ae();uS();cS();H5="metrics",tU=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalMeterProvider(t){return vm(H5,t,Ws.instance())}getMeterProvider(){return Ul(H5)||HAe}getMeter(t,n,r){return this.getMeterProvider().getMeter(t,n,r)}disable(){Rm(H5,Ws.instance())}}});var $5,VAe=w(()=>{m();qAe();$5=tU.getInstance()});var nU,YAe=w(()=>{m();nU=class{inject(t,n){}extract(t,n){return t}fields(){return[]}}});function V5(e){return e.getValue(q5)||void 0}function KAe(){return V5(xm.getInstance().active())}function JAe(e,t){return e.setValue(q5,t)}function ZAe(e){return e.deleteValue(q5)}var q5,WAe=w(()=>{m();lB();uB();q5=Ql("OpenTelemetry Baggage Key")});var Y5,ont,rU,XAe=w(()=>{m();uS();YAe();B5();WAe();h5();cS();Y5="propagation",ont=new nU,rU=class e{constructor(){this.createBaggage=_Ae,this.getBaggage=V5,this.getActiveBaggage=KAe,this.setBaggage=JAe,this.deleteBaggage=ZAe}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalPropagator(t){return vm(Y5,t,Ws.instance())}inject(t,n,r=zL){return this._getGlobalPropagator().inject(t,n,r)}extract(t,n,r=jL){return this._getGlobalPropagator().extract(t,n,r)}fields(){return this._getGlobalPropagator().fields()}disable(){Rm(Y5,Ws.instance())}_getGlobalPropagator(){return Ul(Y5)||ont}}});var mf,ege=w(()=>{m();XAe();mf=rU.getInstance()});var K5,oU,tge=w(()=>{m();uS();G5();ZL();P5();cS();K5="trace",oU=class e{constructor(){this._proxyTracerProvider=new dS,this.wrapSpanContext=xAe,this.isSpanContextValid=Cg,this.deleteSpan=CAe,this.getSpan=YL,this.getActiveSpan=IAe,this.getSpanContext=KL,this.setSpan=pB,this.setSpanContext=vAe}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalTracerProvider(t){let n=vm(K5,this._proxyTracerProvider,Ws.instance());return n&&this._proxyTracerProvider.setDelegate(t),n}getTracerProvider(){return Ul(K5)||this._proxyTracerProvider}getTracer(t,n){return this.getTracerProvider().getTracer(t,n)}disable(){Rm(K5,Ws.instance()),this._proxyTracerProvider=new dS}}});var Vt,nge=w(()=>{m();tge();Vt=oU.getInstance()});var tt={};Zs(tt,{DiagConsoleLogger:()=>FL,DiagLogLevel:()=>Cs,INVALID_SPANID:()=>dB,INVALID_SPAN_CONTEXT:()=>$L,INVALID_TRACEID:()=>lS,ProxyTracer:()=>kC,ProxyTracerProvider:()=>dS,ROOT_CONTEXT:()=>BC,SamplingDecision:()=>XL,SpanKind:()=>fo,SpanStatusCode:()=>Ai,TraceFlags:()=>iu,ValueType:()=>GL,baggageEntryMetadataFromString:()=>EAe,context:()=>We,createContextKey:()=>Ql,createNoopMeter:()=>SAe,createTraceState:()=>FAe,default:()=>int,defaultTextMapGetter:()=>jL,defaultTextMapSetter:()=>zL,diag:()=>Fl,isSpanContextValid:()=>Cg,isValidSpanId:()=>L5,isValidTraceId:()=>M5,metrics:()=>$5,propagation:()=>mf,trace:()=>Vt});var int,He=w(()=>{m();h5();uB();yAe();UL();N5();TAe();B5();F5();G5();NAe();BAe();wAe();O5();GAe();ZL();qL();jAe();zAe();VAe();ege();nge();int={context:We,diag:Fl,metrics:$5,propagation:mf,trace:Vt}});var fB=M(R_=>{"use strict";m();Object.defineProperty(R_,"__esModule",{value:!0});R_.isTracingSuppressed=R_.unsuppressTracing=R_.suppressTracing=void 0;var snt=(He(),Me(tt)),J5=(0,snt.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function ant(e){return e.setValue(J5,!0)}R_.suppressTracing=ant;function unt(e){return e.deleteValue(J5)}R_.unsuppressTracing=unt;function cnt(e){return e.getValue(J5)===!0}R_.isTracingSuppressed=cnt});var Z5=M(su=>{"use strict";m();Object.defineProperty(su,"__esModule",{value:!0});su.BAGGAGE_MAX_TOTAL_LENGTH=su.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=su.BAGGAGE_MAX_NAME_VALUE_PAIRS=su.BAGGAGE_HEADER=su.BAGGAGE_ITEMS_SEPARATOR=su.BAGGAGE_PROPERTIES_SEPARATOR=su.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;su.BAGGAGE_KEY_PAIR_SEPARATOR="=";su.BAGGAGE_PROPERTIES_SEPARATOR=";";su.BAGGAGE_ITEMS_SEPARATOR=",";su.BAGGAGE_HEADER="baggage";su.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;su.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;su.BAGGAGE_MAX_TOTAL_LENGTH=8192});var X5=M(qd=>{"use strict";m();Object.defineProperty(qd,"__esModule",{value:!0});qd.parseKeyPairsIntoRecord=qd.parseBaggageHeaderString=qd.parsePairKeyValue=qd.getKeyPairs=qd.serializeKeyPairs=void 0;var lnt=(He(),Me(tt)),Nm=Z5();function dnt(e){return e.reduce((t,n)=>{let r=`${t}${t!==""?Nm.BAGGAGE_ITEMS_SEPARATOR:""}${n}`;return r.length>Nm.BAGGAGE_MAX_TOTAL_LENGTH?t:r},"")}qd.serializeKeyPairs=dnt;function pnt(e){return e.getAllEntries().map(([t,n])=>{let r=`${encodeURIComponent(t)}=${encodeURIComponent(n.value)}`;return n.metadata!==void 0&&(r+=Nm.BAGGAGE_PROPERTIES_SEPARATOR+n.metadata.toString()),r})}qd.getKeyPairs=pnt;function W5(e){if(!e)return;let t=e.indexOf(Nm.BAGGAGE_PROPERTIES_SEPARATOR),n=t===-1?e:e.substring(0,t),r=n.indexOf(Nm.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 f=e.substring(t+1);l=(0,lnt.baggageEntryMetadataFromString)(f)}return{key:s,value:u,metadata:l}}qd.parsePairKeyValue=W5;function fnt(e,t,n,r){let o=0;for(;o<e.length&&n<Nm.BAGGAGE_MAX_NAME_VALUE_PAIRS;){let i=e.indexOf(Nm.BAGGAGE_ITEMS_SEPARATOR,o),s=i===-1?e.length:i,u=s-o;if(u<=Nm.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS){let l=W5(e.substring(o,s));if(l){let f=(n===0?0:1)+u;if(r+f>Nm.BAGGAGE_MAX_TOTAL_LENGTH)break;t[l.key]=l.metadata?{value:l.value,metadata:l.metadata}:{value:l.value},n++,r+=f}}if(i===-1)break;o=i+1}return[n,r]}qd.parseBaggageHeaderString=fnt;function mnt(e){let t={};return typeof e=="string"&&e.length>0&&e.split(Nm.BAGGAGE_ITEMS_SEPARATOR).forEach(n=>{let r=W5(n);r!==void 0&&r.value.length>0&&(t[r.key]=r.value)}),t}qd.parseKeyPairsIntoRecord=mnt});var rge=M(sU=>{"use strict";m();Object.defineProperty(sU,"__esModule",{value:!0});sU.W3CBaggagePropagator=void 0;var eV=(He(),Me(tt)),Ant=fB(),mB=Z5(),iU=X5(),tV=class{inject(t,n,r){let o=eV.propagation.getBaggage(t);if(!o||(0,Ant.isTracingSuppressed)(t))return;let i=(0,iU.getKeyPairs)(o).filter(u=>u.length<=mB.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,mB.BAGGAGE_MAX_NAME_VALUE_PAIRS),s=(0,iU.serializeKeyPairs)(i);s.length>0&&r.set(n,mB.BAGGAGE_HEADER,s)}extract(t,n,r){let o=r.get(n,mB.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,iU.parseBaggageHeaderString)(o[l],i,s,u);else[s]=(0,iU.parseBaggageHeaderString)(o,i,s,u);return s===0?t:eV.propagation.setBaggage(t,eV.propagation.createBaggage(i))}fields(){return[mB.BAGGAGE_HEADER]}};sU.W3CBaggagePropagator=tV});var oge=M(aU=>{"use strict";m();Object.defineProperty(aU,"__esModule",{value:!0});aU.AnchoredClock=void 0;var nV=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}};aU.AnchoredClock=nV});var cge=M(x_=>{"use strict";m();Object.defineProperty(x_,"__esModule",{value:!0});x_.isAttributeValue=x_.isAttributeKey=x_.sanitizeAttributes=void 0;var ige=(He(),Me(tt));function gnt(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(!sge(n)){ige.diag.warn(`Invalid attribute key: ${n}`);continue}let r=e[n];if(!age(r)){ige.diag.warn(`Invalid attribute value set for key: ${n}`);continue}Array.isArray(r)?t[n]=r.slice():t[n]=r}return t}x_.sanitizeAttributes=gnt;function sge(e){return typeof e=="string"&&e!==""}x_.isAttributeKey=sge;function age(e){return e==null?!0:Array.isArray(e)?hnt(e):uge(typeof e)}x_.isAttributeValue=age;function hnt(e){let t;for(let n of e){if(n==null)continue;let r=typeof n;if(r!==t){if(!t){if(uge(r)){t=r;continue}return!1}return!1}}return!0}function uge(e){switch(e){case"number":case"boolean":case"string":return!0}return!1}});var rV=M(uU=>{"use strict";m();Object.defineProperty(uU,"__esModule",{value:!0});uU.loggingErrorHandler=void 0;var _nt=(He(),Me(tt));function Ent(){return e=>{_nt.diag.error(ynt(e))}}uU.loggingErrorHandler=Ent;function ynt(e){return typeof e=="string"?e:JSON.stringify(Snt(e))}function Snt(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 dge=M(PC=>{"use strict";m();Object.defineProperty(PC,"__esModule",{value:!0});PC.globalErrorHandler=PC.setGlobalErrorHandler=void 0;var Tnt=rV(),lge=(0,Tnt.loggingErrorHandler)();function bnt(e){lge=e}PC.setGlobalErrorHandler=bnt;function Int(e){try{lge(e)}catch{}}PC.globalErrorHandler=Int});var Age=M(Bm=>{"use strict";m();Object.defineProperty(Bm,"__esModule",{value:!0});Bm.getStringListFromEnv=Bm.getBooleanFromEnv=Bm.getStringFromEnv=Bm.getNumberFromEnv=void 0;var pge=(He(),Me(tt)),fge=Ue("util");function Cnt(e){let t=process.env[e];if(t==null||t.trim()==="")return;let n=Number(t);if(isNaN(n)){pge.diag.warn(`Unknown value ${(0,fge.inspect)(t)} for ${e}, expected a number, using defaults`);return}return n}Bm.getNumberFromEnv=Cnt;function mge(e){let t=process.env[e];if(!(t==null||t.trim()===""))return t}Bm.getStringFromEnv=mge;function vnt(e){let t=process.env[e]?.trim().toLowerCase();return t==null||t===""?!1:t==="true"?!0:(t==="false"||pge.diag.warn(`Unknown value ${(0,fge.inspect)(t)} for ${e}, expected 'true' or 'false', falling back to 'false' (default)`),!1)}Bm.getBooleanFromEnv=vnt;function Rnt(e){return mge(e)?.split(",").map(t=>t.trim()).filter(t=>t!=="")}Bm.getStringListFromEnv=Rnt});var gge=M(cU=>{"use strict";m();Object.defineProperty(cU,"__esModule",{value:!0});cU._globalThis=void 0;cU._globalThis=globalThis});var hge=M(lU=>{"use strict";m();Object.defineProperty(lU,"__esModule",{value:!0});lU.VERSION=void 0;lU.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 oV=w(()=>{m()});var _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,k_e,P_e,M_e,L_e,xnt,iV,Dnt,Nnt,Bnt,wnt,sV,Ont,knt,Pnt,Mnt,Lnt,Unt,Qnt,Fnt,Gnt,jnt,znt,Hnt,$nt,qnt,Vnt,Ynt,Knt,Jnt,aV,Znt,Wnt,Xnt,ert,trt,nrt,rrt,ort,irt,srt,art,urt,uV,crt,lrt,cV,lV,drt,prt,frt,mrt,Art,grt,hrt,_rt,Ert,yrt,Srt,Trt,brt,Irt,Crt,vrt,Rrt,AB,MC,dV,xrt,Drt,pS,Nrt,Brt,wrt,Ort,pV,fV,krt,mV,Prt,Mrt,Lrt,Urt,Qrt,Frt,Grt,jrt,zrt,Hrt,$rt,qrt,Vrt,Yrt,Krt,Jrt,Zrt,Wrt,Xrt,eot,tot,not,rot,AV,oot,iot,sot,aot,uot,cot,lot,dot,pot,fot,mot,Aot,got,hot,_ot,Eot,yot,Sot,Tot,gV,bot,hV,Iot,Cot,vot,Rot,xot,Dot,Not,Bot,wot,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,REe,xEe,DEe,NEe,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,ait,uit,cit,lit,dit,pit,fit,mit,Ait,git,hit,_it,Eit,yit,Sit,Tit,bit,Iit,Cit,vit,BEe,wEe,OEe,kEe,PEe,MEe,LEe,UEe,QEe,FEe,GEe,Rit,xit,Dit,Nit,Bit,wit,Oit,kit,Pit,Mit,Lit,Uit,jEe,zEe,HEe,$Ee,qEe,Qit,Fit,Git,jit,zit,Hit,VEe,YEe,KEe,$it,qit,Vit,Yit,JEe,ZEe,WEe,XEe,Kit,Jit,Zit,Wit,Xit,e0e,t0e,n0e,r0e,o0e,i0e,s0e,est,tst,nst,rst,ost,ist,sst,ast,a0e,u0e,c0e,l0e,d0e,ust,cst,lst,dst,pst,fst,p0e,f0e,m0e,A0e,g0e,h0e,_0e,E0e,y0e,S0e,T0e,b0e,I0e,C0e,v0e,R0e,x0e,D0e,N0e,B0e,w0e,mst,Ast,gst,hst,_st,Est,yst,Sst,Tst,bst,Ist,Cst,vst,Rst,xst,Dst,Nst,Bst,wst,Ost,kst,Pst,O0e,k0e,P0e,M0e,L0e,Mst,Lst,Ust,Qst,Fst,Gst,U0e,Q0e,jst,zst,Hst,F0e,G0e,$st,qst,Vst,j0e,z0e,H0e,$0e,q0e,V0e,Y0e,K0e,J0e,Z0e,W0e,X0e,eye,tye,nye,rye,oye,Yst,Kst,Jst,Zst,Wst,Xst,eat,tat,nat,rat,oat,iat,sat,aat,uat,cat,lat,dat,iye,sye,pat,fat,mat,aye=w(()=>{m();oV();_ge="aws.lambda.invoked_arn",Ege="db.system",yge="db.connection_string",Sge="db.user",Tge="db.jdbc.driver_classname",bge="db.name",Ige="db.statement",Cge="db.operation",vge="db.mssql.instance_name",Rge="db.cassandra.keyspace",xge="db.cassandra.page_size",Dge="db.cassandra.consistency_level",Nge="db.cassandra.table",Bge="db.cassandra.idempotence",wge="db.cassandra.speculative_execution_count",Oge="db.cassandra.coordinator.id",kge="db.cassandra.coordinator.dc",Pge="db.hbase.namespace",Mge="db.redis.database_index",Lge="db.mongodb.collection",Uge="db.sql.table",Qge="exception.type",Fge="exception.message",Gge="exception.stacktrace",jge="exception.escaped",zge="faas.trigger",Hge="faas.execution",$ge="faas.document.collection",qge="faas.document.operation",Vge="faas.document.time",Yge="faas.document.name",Kge="faas.time",Jge="faas.cron",Zge="faas.coldstart",Wge="faas.invoked_name",Xge="faas.invoked_provider",ehe="faas.invoked_region",the="net.transport",nhe="net.peer.ip",rhe="net.peer.port",ohe="net.peer.name",ihe="net.host.ip",she="net.host.port",ahe="net.host.name",uhe="net.host.connection.type",che="net.host.connection.subtype",lhe="net.host.carrier.name",dhe="net.host.carrier.mcc",phe="net.host.carrier.mnc",fhe="net.host.carrier.icc",mhe="peer.service",Ahe="enduser.id",ghe="enduser.role",hhe="enduser.scope",_he="thread.id",Ehe="thread.name",yhe="code.function",She="code.namespace",The="code.filepath",bhe="code.lineno",Ihe="http.method",Che="http.url",vhe="http.target",Rhe="http.host",xhe="http.scheme",Dhe="http.status_code",Nhe="http.flavor",Bhe="http.user_agent",whe="http.request_content_length",Ohe="http.request_content_length_uncompressed",khe="http.response_content_length",Phe="http.response_content_length_uncompressed",Mhe="http.server_name",Lhe="http.route",Uhe="http.client_ip",Qhe="aws.dynamodb.table_names",Fhe="aws.dynamodb.consumed_capacity",Ghe="aws.dynamodb.item_collection_metrics",jhe="aws.dynamodb.provisioned_read_capacity",zhe="aws.dynamodb.provisioned_write_capacity",Hhe="aws.dynamodb.consistent_read",$he="aws.dynamodb.projection",qhe="aws.dynamodb.limit",Vhe="aws.dynamodb.attributes_to_get",Yhe="aws.dynamodb.index_name",Khe="aws.dynamodb.select",Jhe="aws.dynamodb.global_secondary_indexes",Zhe="aws.dynamodb.local_secondary_indexes",Whe="aws.dynamodb.exclusive_start_table",Xhe="aws.dynamodb.table_count",e_e="aws.dynamodb.scan_forward",t_e="aws.dynamodb.segment",n_e="aws.dynamodb.total_segments",r_e="aws.dynamodb.count",o_e="aws.dynamodb.scanned_count",i_e="aws.dynamodb.attribute_definitions",s_e="aws.dynamodb.global_secondary_index_updates",a_e="messaging.system",u_e="messaging.destination",c_e="messaging.destination_kind",l_e="messaging.temp_destination",d_e="messaging.protocol",p_e="messaging.protocol_version",f_e="messaging.url",m_e="messaging.message_id",A_e="messaging.conversation_id",g_e="messaging.message_payload_size_bytes",h_e="messaging.message_payload_compressed_size_bytes",__e="messaging.operation",E_e="messaging.consumer_id",y_e="messaging.rabbitmq.routing_key",S_e="messaging.kafka.message_key",T_e="messaging.kafka.consumer_group",b_e="messaging.kafka.client_id",I_e="messaging.kafka.partition",C_e="messaging.kafka.tombstone",v_e="rpc.system",R_e="rpc.service",x_e="rpc.method",D_e="rpc.grpc.status_code",N_e="rpc.jsonrpc.version",B_e="rpc.jsonrpc.request_id",w_e="rpc.jsonrpc.error_code",O_e="rpc.jsonrpc.error_message",k_e="message.type",P_e="message.id",M_e="message.compressed_size",L_e="message.uncompressed_size",xnt=_ge,iV=Ege,Dnt=yge,Nnt=Sge,Bnt=Tge,wnt=bge,sV=Ige,Ont=Cge,knt=vge,Pnt=Rge,Mnt=xge,Lnt=Dge,Unt=Nge,Qnt=Bge,Fnt=wge,Gnt=Oge,jnt=kge,znt=Pge,Hnt=Mge,$nt=Lge,qnt=Uge,Vnt=Qge,Ynt=Fge,Knt=Gge,Jnt=jge,aV=zge,Znt=Hge,Wnt=$ge,Xnt=qge,ert=Vge,trt=Yge,nrt=Kge,rrt=Jge,ort=Zge,irt=Wge,srt=Xge,art=ehe,urt=the,uV=nhe,crt=rhe,lrt=ohe,cV=ihe,lV=she,drt=ahe,prt=uhe,frt=che,mrt=lhe,Art=dhe,grt=phe,hrt=fhe,_rt=mhe,Ert=Ahe,yrt=ghe,Srt=hhe,Trt=_he,brt=Ehe,Irt=yhe,Crt=She,vrt=The,Rrt=bhe,AB=Ihe,MC=Che,dV=vhe,xrt=Rhe,Drt=xhe,pS=Dhe,Nrt=Nhe,Brt=Bhe,wrt=whe,Ort=Ohe,pV=khe,fV=Phe,krt=Mhe,mV=Lhe,Prt=Uhe,Mrt=Qhe,Lrt=Fhe,Urt=Ghe,Qrt=jhe,Frt=zhe,Grt=Hhe,jrt=$he,zrt=qhe,Hrt=Vhe,$rt=Yhe,qrt=Khe,Vrt=Jhe,Yrt=Zhe,Krt=Whe,Jrt=Xhe,Zrt=e_e,Wrt=t_e,Xrt=n_e,eot=r_e,tot=o_e,not=i_e,rot=s_e,AV=a_e,oot=u_e,iot=c_e,sot=l_e,aot=d_e,uot=p_e,cot=f_e,lot=m_e,dot=A_e,pot=g_e,fot=h_e,mot=__e,Aot=E_e,got=y_e,hot=S_e,_ot=T_e,Eot=b_e,yot=I_e,Sot=C_e,Tot=v_e,gV=R_e,bot=x_e,hV=D_e,Iot=N_e,Cot=B_e,vot=w_e,Rot=O_e,xot=k_e,Dot=P_e,Not=M_e,Bot=L_e,wot=Oi([_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,k_e,P_e,M_e,L_e]),U_e="other_sql",Q_e="mssql",F_e="mysql",G_e="oracle",j_e="db2",z_e="postgresql",H_e="redshift",$_e="hive",q_e="cloudscape",V_e="hsqldb",Y_e="progress",K_e="maxdb",J_e="hanadb",Z_e="ingres",W_e="firstsql",X_e="edb",eEe="cache",tEe="adabas",nEe="firebird",rEe="derby",oEe="filemaker",iEe="informix",sEe="instantdb",aEe="interbase",uEe="mariadb",cEe="netezza",lEe="pervasive",dEe="pointbase",pEe="sqlite",fEe="sybase",mEe="teradata",AEe="vertica",gEe="h2",hEe="coldfusion",_Ee="cassandra",EEe="hbase",yEe="mongodb",SEe="redis",TEe="couchbase",bEe="couchdb",IEe="cosmosdb",CEe="dynamodb",vEe="neo4j",REe="geode",xEe="elasticsearch",DEe="memcached",NEe="cockroachdb",Oot=U_e,kot=Q_e,Pot=F_e,Mot=G_e,Lot=j_e,Uot=z_e,Qot=H_e,Fot=$_e,Got=q_e,jot=V_e,zot=Y_e,Hot=K_e,$ot=J_e,qot=Z_e,Vot=W_e,Yot=X_e,Kot=eEe,Jot=tEe,Zot=nEe,Wot=rEe,Xot=oEe,eit=iEe,tit=sEe,nit=aEe,rit=uEe,oit=cEe,iit=lEe,sit=dEe,ait=pEe,uit=fEe,cit=mEe,lit=AEe,dit=gEe,pit=hEe,fit=_Ee,mit=EEe,Ait=yEe,git=SEe,hit=TEe,_it=bEe,Eit=IEe,yit=CEe,Sit=vEe,Tit=REe,bit=xEe,Iit=DEe,Cit=NEe,vit=Oi([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,REe,xEe,DEe,NEe]),BEe="all",wEe="each_quorum",OEe="quorum",kEe="local_quorum",PEe="one",MEe="two",LEe="three",UEe="local_one",QEe="any",FEe="serial",GEe="local_serial",Rit=BEe,xit=wEe,Dit=OEe,Nit=kEe,Bit=PEe,wit=MEe,Oit=LEe,kit=UEe,Pit=QEe,Mit=FEe,Lit=GEe,Uit=Oi([BEe,wEe,OEe,kEe,PEe,MEe,LEe,UEe,QEe,FEe,GEe]),jEe="datasource",zEe="http",HEe="pubsub",$Ee="timer",qEe="other",Qit=jEe,Fit=zEe,Git=HEe,jit=$Ee,zit=qEe,Hit=Oi([jEe,zEe,HEe,$Ee,qEe]),VEe="insert",YEe="edit",KEe="delete",$it=VEe,qit=YEe,Vit=KEe,Yit=Oi([VEe,YEe,KEe]),JEe="alibaba_cloud",ZEe="aws",WEe="azure",XEe="gcp",Kit=JEe,Jit=ZEe,Zit=WEe,Wit=XEe,Xit=Oi([JEe,ZEe,WEe,XEe]),e0e="ip_tcp",t0e="ip_udp",n0e="ip",r0e="unix",o0e="pipe",i0e="inproc",s0e="other",est=e0e,tst=t0e,nst=n0e,rst=r0e,ost=o0e,ist=i0e,sst=s0e,ast=Oi([e0e,t0e,n0e,r0e,o0e,i0e,s0e]),a0e="wifi",u0e="wired",c0e="cell",l0e="unavailable",d0e="unknown",ust=a0e,cst=u0e,lst=c0e,dst=l0e,pst=d0e,fst=Oi([a0e,u0e,c0e,l0e,d0e]),p0e="gprs",f0e="edge",m0e="umts",A0e="cdma",g0e="evdo_0",h0e="evdo_a",_0e="cdma2000_1xrtt",E0e="hsdpa",y0e="hsupa",S0e="hspa",T0e="iden",b0e="evdo_b",I0e="lte",C0e="ehrpd",v0e="hspap",R0e="gsm",x0e="td_scdma",D0e="iwlan",N0e="nr",B0e="nrnsa",w0e="lte_ca",mst=p0e,Ast=f0e,gst=m0e,hst=A0e,_st=g0e,Est=h0e,yst=_0e,Sst=E0e,Tst=y0e,bst=S0e,Ist=T0e,Cst=b0e,vst=I0e,Rst=C0e,xst=v0e,Dst=R0e,Nst=x0e,Bst=D0e,wst=N0e,Ost=B0e,kst=w0e,Pst=Oi([p0e,f0e,m0e,A0e,g0e,h0e,_0e,E0e,y0e,S0e,T0e,b0e,I0e,C0e,v0e,R0e,x0e,D0e,N0e,B0e,w0e]),O0e="1.0",k0e="1.1",P0e="2.0",M0e="SPDY",L0e="QUIC",Mst=O0e,Lst=k0e,Ust=P0e,Qst=M0e,Fst=L0e,Gst={HTTP_1_0:O0e,HTTP_1_1:k0e,HTTP_2_0:P0e,SPDY:M0e,QUIC:L0e},U0e="queue",Q0e="topic",jst=U0e,zst=Q0e,Hst=Oi([U0e,Q0e]),F0e="receive",G0e="process",$st=F0e,qst=G0e,Vst=Oi([F0e,G0e]),j0e=0,z0e=1,H0e=2,$0e=3,q0e=4,V0e=5,Y0e=6,K0e=7,J0e=8,Z0e=9,W0e=10,X0e=11,eye=12,tye=13,nye=14,rye=15,oye=16,Yst=j0e,Kst=z0e,Jst=H0e,Zst=$0e,Wst=q0e,Xst=V0e,eat=Y0e,tat=K0e,nat=J0e,rat=Z0e,oat=W0e,iat=X0e,sat=eye,aat=tye,uat=nye,cat=rye,lat=oye,dat={OK:j0e,CANCELLED:z0e,UNKNOWN:H0e,INVALID_ARGUMENT:$0e,DEADLINE_EXCEEDED:q0e,NOT_FOUND:V0e,ALREADY_EXISTS:Y0e,PERMISSION_DENIED:K0e,RESOURCE_EXHAUSTED:J0e,FAILED_PRECONDITION:Z0e,ABORTED:W0e,OUT_OF_RANGE:X0e,UNIMPLEMENTED:eye,INTERNAL:tye,UNAVAILABLE:nye,DATA_LOSS:rye,UNAUTHENTICATED:oye},iye="SENT",sye="RECEIVED",pat=iye,fat=sye,mat=Oi([iye,sye])});var uye=w(()=>{m();aye()});var 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,wSe,OSe,kSe,PSe,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,put,fut,mut,Aut,gut,hut,_ut,Eut,yut,Sut,Tut,but,Iut,Cut,vut,Rut,xut,Dut,Nut,But,_V,wut,Out,kut,Put,Mut,Lut,Uut,Qut,Fut,Gut,MSe,LSe,USe,QSe,jut,zut,Hut,$ut,qut,FSe,GSe,jSe,zSe,HSe,$Se,qSe,VSe,YSe,KSe,JSe,ZSe,WSe,XSe,eTe,tTe,nTe,Vut,Yut,Kut,Jut,Zut,Wut,Xut,ect,tct,nct,rct,oct,ict,sct,act,uct,cct,lct,rTe,oTe,dct,pct,fct,iTe,sTe,aTe,uTe,cTe,lTe,dTe,mct,Act,gct,hct,_ct,Ect,yct,Sct,pTe,fTe,mTe,ATe,gTe,hTe,_Te,ETe,yTe,STe,TTe,Tct,bct,Ict,Cct,vct,Rct,xct,Dct,Nct,Bct,wct,Oct,bTe,ITe,CTe,vTe,RTe,xTe,DTe,NTe,BTe,wTe,kct,Pct,Mct,Lct,Uct,Qct,Fct,Gct,jct,zct,Hct,OTe=w(()=>{m();oV();cye="cloud.provider",lye="cloud.account.id",dye="cloud.region",pye="cloud.availability_zone",fye="cloud.platform",mye="aws.ecs.container.arn",Aye="aws.ecs.cluster.arn",gye="aws.ecs.launchtype",hye="aws.ecs.task.arn",_ye="aws.ecs.task.family",Eye="aws.ecs.task.revision",yye="aws.eks.cluster.arn",Sye="aws.log.group.names",Tye="aws.log.group.arns",bye="aws.log.stream.names",Iye="aws.log.stream.arns",Cye="container.name",vye="container.id",Rye="container.runtime",xye="container.image.name",Dye="container.image.tag",Nye="deployment.environment",Bye="device.id",wye="device.model.identifier",Oye="device.model.name",kye="faas.name",Pye="faas.id",Mye="faas.version",Lye="faas.instance",Uye="faas.max_memory",Qye="host.id",Fye="host.name",Gye="host.type",jye="host.arch",zye="host.image.name",Hye="host.image.id",$ye="host.image.version",qye="k8s.cluster.name",Vye="k8s.node.name",Yye="k8s.node.uid",Kye="k8s.namespace.name",Jye="k8s.pod.uid",Zye="k8s.pod.name",Wye="k8s.container.name",Xye="k8s.replicaset.uid",eSe="k8s.replicaset.name",tSe="k8s.deployment.uid",nSe="k8s.deployment.name",rSe="k8s.statefulset.uid",oSe="k8s.statefulset.name",iSe="k8s.daemonset.uid",sSe="k8s.daemonset.name",aSe="k8s.job.uid",uSe="k8s.job.name",cSe="k8s.cronjob.uid",lSe="k8s.cronjob.name",dSe="os.type",pSe="os.description",fSe="os.name",mSe="os.version",ASe="process.pid",gSe="process.executable.name",hSe="process.executable.path",_Se="process.command",ESe="process.command_line",ySe="process.command_args",SSe="process.owner",TSe="process.runtime.name",bSe="process.runtime.version",ISe="process.runtime.description",CSe="service.name",vSe="service.namespace",RSe="service.instance.id",xSe="service.version",DSe="telemetry.sdk.name",NSe="telemetry.sdk.language",BSe="telemetry.sdk.version",wSe="telemetry.auto.version",OSe="webengine.name",kSe="webengine.version",PSe="webengine.description",Aat=cye,gat=lye,hat=dye,_at=pye,Eat=fye,yat=mye,Sat=Aye,Tat=gye,bat=hye,Iat=_ye,Cat=Eye,vat=yye,Rat=Sye,xat=Tye,Dat=bye,Nat=Iye,Bat=Cye,wat=vye,Oat=Rye,kat=xye,Pat=Dye,Mat=Nye,Lat=Bye,Uat=wye,Qat=Oye,Fat=kye,Gat=Pye,jat=Mye,zat=Lye,Hat=Uye,$at=Qye,qat=Fye,Vat=Gye,Yat=jye,Kat=zye,Jat=Hye,Zat=$ye,Wat=qye,Xat=Vye,eut=Yye,tut=Kye,nut=Jye,rut=Zye,out=Wye,iut=Xye,sut=eSe,aut=tSe,uut=nSe,cut=rSe,lut=oSe,dut=iSe,put=sSe,fut=aSe,mut=uSe,Aut=cSe,gut=lSe,hut=dSe,_ut=pSe,Eut=fSe,yut=mSe,Sut=ASe,Tut=gSe,but=hSe,Iut=_Se,Cut=ESe,vut=ySe,Rut=SSe,xut=TSe,Dut=bSe,Nut=ISe,But=CSe,_V=vSe,wut=RSe,Out=xSe,kut=DSe,Put=NSe,Mut=BSe,Lut=wSe,Uut=OSe,Qut=kSe,Fut=PSe,Gut=Oi([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,wSe,OSe,kSe,PSe]),MSe="alibaba_cloud",LSe="aws",USe="azure",QSe="gcp",jut=MSe,zut=LSe,Hut=USe,$ut=QSe,qut=Oi([MSe,LSe,USe,QSe]),FSe="alibaba_cloud_ecs",GSe="alibaba_cloud_fc",jSe="aws_ec2",zSe="aws_ecs",HSe="aws_eks",$Se="aws_lambda",qSe="aws_elastic_beanstalk",VSe="azure_vm",YSe="azure_container_instances",KSe="azure_aks",JSe="azure_functions",ZSe="azure_app_service",WSe="gcp_compute_engine",XSe="gcp_cloud_run",eTe="gcp_kubernetes_engine",tTe="gcp_cloud_functions",nTe="gcp_app_engine",Vut=FSe,Yut=GSe,Kut=jSe,Jut=zSe,Zut=HSe,Wut=$Se,Xut=qSe,ect=VSe,tct=YSe,nct=KSe,rct=JSe,oct=ZSe,ict=WSe,sct=XSe,act=eTe,uct=tTe,cct=nTe,lct=Oi([FSe,GSe,jSe,zSe,HSe,$Se,qSe,VSe,YSe,KSe,JSe,ZSe,WSe,XSe,eTe,tTe,nTe]),rTe="ec2",oTe="fargate",dct=rTe,pct=oTe,fct=Oi([rTe,oTe]),iTe="amd64",sTe="arm32",aTe="arm64",uTe="ia64",cTe="ppc32",lTe="ppc64",dTe="x86",mct=iTe,Act=sTe,gct=aTe,hct=uTe,_ct=cTe,Ect=lTe,yct=dTe,Sct=Oi([iTe,sTe,aTe,uTe,cTe,lTe,dTe]),pTe="windows",fTe="linux",mTe="darwin",ATe="freebsd",gTe="netbsd",hTe="openbsd",_Te="dragonflybsd",ETe="hpux",yTe="aix",STe="solaris",TTe="z_os",Tct=pTe,bct=fTe,Ict=mTe,Cct=ATe,vct=gTe,Rct=hTe,xct=_Te,Dct=ETe,Nct=yTe,Bct=STe,wct=TTe,Oct=Oi([pTe,fTe,mTe,ATe,gTe,hTe,_Te,ETe,yTe,STe,TTe]),bTe="cpp",ITe="dotnet",CTe="erlang",vTe="go",RTe="java",xTe="nodejs",DTe="php",NTe="python",BTe="ruby",wTe="webjs",kct=bTe,Pct=ITe,Mct=CTe,Lct=vTe,Uct=RTe,Qct=xTe,Fct=DTe,Gct=NTe,jct=BTe,zct=wTe,Hct=Oi([bTe,ITe,CTe,vTe,RTe,xTe,DTe,NTe,BTe,wTe])});var kTe=w(()=>{m();OTe()});var $ct,qct,Vct,Yct,Kct,Jct,Zct,Wct,Xct,elt,tlt,nlt,rlt,olt,ilt,slt,alt,ult,clt,llt,dlt,plt,flt,mlt,Alt,EV,yV,glt,LC,hlt,SV,TV,_lt,fS,Elt,ylt,Slt,Tlt,blt,Ilt,Clt,vlt,ysn,Ssn,bV,Rlt,xlt,Dlt,Nlt,Blt,wlt,mS,Olt,klt,Plt,Tsn,Mlt,Llt,Ult,Qlt,bsn,Flt,Glt,jlt,zlt,vg,Rg,Hlt,$lt,qlt,Vlt,Ylt,Klt,Jlt,Zlt,Wlt,Isn,Xlt,edt,tdt,ndt,rdt,odt,IV,CV,idt,vV,RV,sdt,adt,Csn,vsn,udt,cdt,ldt,ddt,pdt,fdt,mdt,Adt,Rsn,gdt,xV,DV,hdt,NV,_dt,BV,Edt,ydt,Sdt,Tdt,bdt,Idt,Cdt,vdt,Rdt,xsn,xdt,Ddt,Dsn,Ndt,Bdt,Nsn,wdt,Odt,kdt,Pdt,Mdt,Ldt,Udt,Qdt,D_,Fdt,Gdt,jdt,wV,PTe=w(()=>{m();$ct="aspnetcore.diagnostics.exception.result",qct="aborted",Vct="handled",Yct="skipped",Kct="unhandled",Jct="aspnetcore.diagnostics.handler.type",Zct="aspnetcore.rate_limiting.policy",Wct="aspnetcore.rate_limiting.result",Xct="acquired",elt="endpoint_limiter",tlt="global_limiter",nlt="request_canceled",rlt="aspnetcore.request.is_unhandled",olt="aspnetcore.routing.is_fallback",ilt="aspnetcore.routing.match_status",slt="failure",alt="success",ult="aspnetcore.user.is_authenticated",clt="client.address",llt="client.port",dlt="code.column.number",plt="code.file.path",flt="code.function.name",mlt="code.line.number",Alt="code.stacktrace",EV="db.collection.name",yV="db.namespace",glt="db.operation.batch.size",LC="db.operation.name",hlt="db.query.summary",SV="db.query.text",TV="db.response.status_code",_lt="db.stored_procedure.name",fS="db.system.name",Elt="mariadb",ylt="microsoft.sql_server",Slt="mysql",Tlt="postgresql",blt="dotnet.gc.heap.generation",Ilt="gen0",Clt="gen1",vlt="gen2",ysn="loh",Ssn="poh",bV="error.type",Rlt="_OTHER",xlt="exception.escaped",Dlt="exception.message",Nlt="exception.stacktrace",Blt="exception.type",wlt=e=>`http.request.header.${e}`,mS="http.request.method",Olt="_OTHER",klt="CONNECT",Plt="DELETE",Tsn="GET",Mlt="HEAD",Llt="OPTIONS",Ult="PATCH",Qlt="POST",bsn="PUT",Flt="TRACE",Glt="http.request.method_original",jlt="http.request.resend_count",zlt=e=>`http.response.header.${e}`,vg="http.response.status_code",Rg="http.route",Hlt="jvm.gc.action",$lt="jvm.gc.name",qlt="jvm.memory.pool.name",Vlt="jvm.memory.type",Ylt="heap",Klt="non_heap",Jlt="jvm.thread.daemon",Zlt="jvm.thread.state",Wlt="blocked",Isn="new",Xlt="runnable",edt="terminated",tdt="timed_waiting",ndt="waiting",rdt="network.local.address",odt="network.local.port",IV="network.peer.address",CV="network.peer.port",idt="network.protocol.name",vV="network.protocol.version",RV="network.transport",sdt="pipe",adt="quic",Csn="tcp",vsn="udp",udt="unix",cdt="network.type",ldt="ipv4",ddt="ipv6",pdt="otel.scope.name",fdt="otel.scope.version",mdt="otel.status_code",Adt="ERROR",Rsn="OK",gdt="otel.status_description",xV="server.address",DV="server.port",hdt="service.instance.id",NV="service.name",_dt="service.namespace",BV="service.version",Edt="signalr.connection.status",ydt="app_shutdown",Sdt="normal_closure",Tdt="timeout",bdt="signalr.transport",Idt="long_polling",Cdt="server_sent_events",vdt="web_sockets",Rdt="telemetry.sdk.language",xsn="cpp",xdt="dotnet",Ddt="erlang",Dsn="go",Ndt="java",Bdt="nodejs",Nsn="php",wdt="python",Odt="ruby",kdt="rust",Pdt="swift",Mdt="webjs",Ldt="telemetry.sdk.name",Udt="telemetry.sdk.version",Qdt="url.fragment",D_="url.full",Fdt="url.path",Gdt="url.query",jdt="url.scheme",wV="user_agent.original"});var 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,ypt,Spt,Tpt,bpt,Ipt,Cpt,vpt,Rpt,xpt,Dpt,Npt,Bpt,wpt,Opt,kpt,Ppt,Mpt,Lpt,Upt,Qpt,MTe=w(()=>{m();zdt="aspnetcore.diagnostics.exceptions",Hdt="aspnetcore.rate_limiting.active_request_leases",$dt="aspnetcore.rate_limiting.queued_requests",qdt="aspnetcore.rate_limiting.request.time_in_queue",Vdt="aspnetcore.rate_limiting.request_lease.duration",Ydt="aspnetcore.rate_limiting.requests",Kdt="aspnetcore.routing.match_attempts",Jdt="db.client.operation.duration",Zdt="dotnet.assembly.count",Wdt="dotnet.exceptions",Xdt="dotnet.gc.collections",ept="dotnet.gc.heap.total_allocated",tpt="dotnet.gc.last_collection.heap.fragmentation.size",npt="dotnet.gc.last_collection.heap.size",rpt="dotnet.gc.last_collection.memory.committed_size",opt="dotnet.gc.pause.time",ipt="dotnet.jit.compilation.time",spt="dotnet.jit.compiled_il.size",apt="dotnet.jit.compiled_methods",upt="dotnet.monitor.lock_contentions",cpt="dotnet.process.cpu.count",lpt="dotnet.process.cpu.time",dpt="dotnet.process.memory.working_set",ppt="dotnet.thread_pool.queue.length",fpt="dotnet.thread_pool.thread.count",mpt="dotnet.thread_pool.work_item.count",Apt="dotnet.timer.count",gpt="http.client.request.duration",hpt="http.server.request.duration",_pt="jvm.class.count",Ept="jvm.class.loaded",ypt="jvm.class.unloaded",Spt="jvm.cpu.count",Tpt="jvm.cpu.recent_utilization",bpt="jvm.cpu.time",Ipt="jvm.gc.duration",Cpt="jvm.memory.committed",vpt="jvm.memory.limit",Rpt="jvm.memory.used",xpt="jvm.memory.used_after_last_gc",Dpt="jvm.thread.count",Npt="kestrel.active_connections",Bpt="kestrel.active_tls_handshakes",wpt="kestrel.connection.duration",Opt="kestrel.queued_connections",kpt="kestrel.queued_requests",Ppt="kestrel.rejected_connections",Mpt="kestrel.tls_handshake.duration",Lpt="kestrel.upgraded_connections",Upt="signalr.server.active_connections",Qpt="signalr.server.connection.duration"});var Fpt,LTe=w(()=>{m();Fpt="exception"});var Hr={};Zs(Hr,{ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED:()=>qct,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED:()=>Vct,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED:()=>Yct,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED:()=>Kct,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED:()=>Xct,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER:()=>elt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER:()=>tlt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED:()=>nlt,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE:()=>slt,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS:()=>alt,ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT:()=>$ct,ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE:()=>Jct,ATTR_ASPNETCORE_RATE_LIMITING_POLICY:()=>Zct,ATTR_ASPNETCORE_RATE_LIMITING_RESULT:()=>Wct,ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED:()=>rlt,ATTR_ASPNETCORE_ROUTING_IS_FALLBACK:()=>olt,ATTR_ASPNETCORE_ROUTING_MATCH_STATUS:()=>ilt,ATTR_ASPNETCORE_USER_IS_AUTHENTICATED:()=>ult,ATTR_CLIENT_ADDRESS:()=>clt,ATTR_CLIENT_PORT:()=>llt,ATTR_CODE_COLUMN_NUMBER:()=>dlt,ATTR_CODE_FILE_PATH:()=>plt,ATTR_CODE_FUNCTION_NAME:()=>flt,ATTR_CODE_LINE_NUMBER:()=>mlt,ATTR_CODE_STACKTRACE:()=>Alt,ATTR_DB_COLLECTION_NAME:()=>EV,ATTR_DB_NAMESPACE:()=>yV,ATTR_DB_OPERATION_BATCH_SIZE:()=>glt,ATTR_DB_OPERATION_NAME:()=>LC,ATTR_DB_QUERY_SUMMARY:()=>hlt,ATTR_DB_QUERY_TEXT:()=>SV,ATTR_DB_RESPONSE_STATUS_CODE:()=>TV,ATTR_DB_STORED_PROCEDURE_NAME:()=>_lt,ATTR_DB_SYSTEM_NAME:()=>fS,ATTR_DOTNET_GC_HEAP_GENERATION:()=>blt,ATTR_ERROR_TYPE:()=>bV,ATTR_EXCEPTION_ESCAPED:()=>xlt,ATTR_EXCEPTION_MESSAGE:()=>Dlt,ATTR_EXCEPTION_STACKTRACE:()=>Nlt,ATTR_EXCEPTION_TYPE:()=>Blt,ATTR_HTTP_REQUEST_HEADER:()=>wlt,ATTR_HTTP_REQUEST_METHOD:()=>mS,ATTR_HTTP_REQUEST_METHOD_ORIGINAL:()=>Glt,ATTR_HTTP_REQUEST_RESEND_COUNT:()=>jlt,ATTR_HTTP_RESPONSE_HEADER:()=>zlt,ATTR_HTTP_RESPONSE_STATUS_CODE:()=>vg,ATTR_HTTP_ROUTE:()=>Rg,ATTR_JVM_GC_ACTION:()=>Hlt,ATTR_JVM_GC_NAME:()=>$lt,ATTR_JVM_MEMORY_POOL_NAME:()=>qlt,ATTR_JVM_MEMORY_TYPE:()=>Vlt,ATTR_JVM_THREAD_DAEMON:()=>Jlt,ATTR_JVM_THREAD_STATE:()=>Zlt,ATTR_NETWORK_LOCAL_ADDRESS:()=>rdt,ATTR_NETWORK_LOCAL_PORT:()=>odt,ATTR_NETWORK_PEER_ADDRESS:()=>IV,ATTR_NETWORK_PEER_PORT:()=>CV,ATTR_NETWORK_PROTOCOL_NAME:()=>idt,ATTR_NETWORK_PROTOCOL_VERSION:()=>vV,ATTR_NETWORK_TRANSPORT:()=>RV,ATTR_NETWORK_TYPE:()=>cdt,ATTR_OTEL_SCOPE_NAME:()=>pdt,ATTR_OTEL_SCOPE_VERSION:()=>fdt,ATTR_OTEL_STATUS_CODE:()=>mdt,ATTR_OTEL_STATUS_DESCRIPTION:()=>gdt,ATTR_SERVER_ADDRESS:()=>xV,ATTR_SERVER_PORT:()=>DV,ATTR_SERVICE_INSTANCE_ID:()=>hdt,ATTR_SERVICE_NAME:()=>NV,ATTR_SERVICE_NAMESPACE:()=>_dt,ATTR_SERVICE_VERSION:()=>BV,ATTR_SIGNALR_CONNECTION_STATUS:()=>Edt,ATTR_SIGNALR_TRANSPORT:()=>bdt,ATTR_TELEMETRY_SDK_LANGUAGE:()=>Rdt,ATTR_TELEMETRY_SDK_NAME:()=>Ldt,ATTR_TELEMETRY_SDK_VERSION:()=>Udt,ATTR_URL_FRAGMENT:()=>Qdt,ATTR_URL_FULL:()=>D_,ATTR_URL_PATH:()=>Fdt,ATTR_URL_QUERY:()=>Gdt,ATTR_URL_SCHEME:()=>jdt,ATTR_USER_AGENT_ORIGINAL:()=>wV,AWSECSLAUNCHTYPEVALUES_EC2:()=>dct,AWSECSLAUNCHTYPEVALUES_FARGATE:()=>pct,AwsEcsLaunchtypeValues:()=>fct,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:()=>Vut,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:()=>Yut,CLOUDPLATFORMVALUES_AWS_EC2:()=>Kut,CLOUDPLATFORMVALUES_AWS_ECS:()=>Jut,CLOUDPLATFORMVALUES_AWS_EKS:()=>Zut,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:()=>Xut,CLOUDPLATFORMVALUES_AWS_LAMBDA:()=>Wut,CLOUDPLATFORMVALUES_AZURE_AKS:()=>nct,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:()=>oct,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:()=>tct,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:()=>rct,CLOUDPLATFORMVALUES_AZURE_VM:()=>ect,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:()=>cct,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:()=>uct,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:()=>sct,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:()=>ict,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:()=>act,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:()=>jut,CLOUDPROVIDERVALUES_AWS:()=>zut,CLOUDPROVIDERVALUES_AZURE:()=>Hut,CLOUDPROVIDERVALUES_GCP:()=>$ut,CloudPlatformValues:()=>lct,CloudProviderValues:()=>qut,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:()=>Rit,DBCASSANDRACONSISTENCYLEVELVALUES_ANY:()=>Pit,DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:()=>xit,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:()=>kit,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:()=>Nit,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:()=>Lit,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:()=>Bit,DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:()=>Dit,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:()=>Mit,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:()=>Oit,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:()=>wit,DBSYSTEMVALUES_ADABAS:()=>Jot,DBSYSTEMVALUES_CACHE:()=>Kot,DBSYSTEMVALUES_CASSANDRA:()=>fit,DBSYSTEMVALUES_CLOUDSCAPE:()=>Got,DBSYSTEMVALUES_COCKROACHDB:()=>Cit,DBSYSTEMVALUES_COLDFUSION:()=>pit,DBSYSTEMVALUES_COSMOSDB:()=>Eit,DBSYSTEMVALUES_COUCHBASE:()=>hit,DBSYSTEMVALUES_COUCHDB:()=>_it,DBSYSTEMVALUES_DB2:()=>Lot,DBSYSTEMVALUES_DERBY:()=>Wot,DBSYSTEMVALUES_DYNAMODB:()=>yit,DBSYSTEMVALUES_EDB:()=>Yot,DBSYSTEMVALUES_ELASTICSEARCH:()=>bit,DBSYSTEMVALUES_FILEMAKER:()=>Xot,DBSYSTEMVALUES_FIREBIRD:()=>Zot,DBSYSTEMVALUES_FIRSTSQL:()=>Vot,DBSYSTEMVALUES_GEODE:()=>Tit,DBSYSTEMVALUES_H2:()=>dit,DBSYSTEMVALUES_HANADB:()=>$ot,DBSYSTEMVALUES_HBASE:()=>mit,DBSYSTEMVALUES_HIVE:()=>Fot,DBSYSTEMVALUES_HSQLDB:()=>jot,DBSYSTEMVALUES_INFORMIX:()=>eit,DBSYSTEMVALUES_INGRES:()=>qot,DBSYSTEMVALUES_INSTANTDB:()=>tit,DBSYSTEMVALUES_INTERBASE:()=>nit,DBSYSTEMVALUES_MARIADB:()=>rit,DBSYSTEMVALUES_MAXDB:()=>Hot,DBSYSTEMVALUES_MEMCACHED:()=>Iit,DBSYSTEMVALUES_MONGODB:()=>Ait,DBSYSTEMVALUES_MSSQL:()=>kot,DBSYSTEMVALUES_MYSQL:()=>Pot,DBSYSTEMVALUES_NEO4J:()=>Sit,DBSYSTEMVALUES_NETEZZA:()=>oit,DBSYSTEMVALUES_ORACLE:()=>Mot,DBSYSTEMVALUES_OTHER_SQL:()=>Oot,DBSYSTEMVALUES_PERVASIVE:()=>iit,DBSYSTEMVALUES_POINTBASE:()=>sit,DBSYSTEMVALUES_POSTGRESQL:()=>Uot,DBSYSTEMVALUES_PROGRESS:()=>zot,DBSYSTEMVALUES_REDIS:()=>git,DBSYSTEMVALUES_REDSHIFT:()=>Qot,DBSYSTEMVALUES_SQLITE:()=>ait,DBSYSTEMVALUES_SYBASE:()=>uit,DBSYSTEMVALUES_TERADATA:()=>cit,DBSYSTEMVALUES_VERTICA:()=>lit,DB_SYSTEM_NAME_VALUE_MARIADB:()=>Elt,DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER:()=>ylt,DB_SYSTEM_NAME_VALUE_MYSQL:()=>Slt,DB_SYSTEM_NAME_VALUE_POSTGRESQL:()=>Tlt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN0:()=>Ilt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN1:()=>Clt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN2:()=>vlt,DOTNET_GC_HEAP_GENERATION_VALUE_LOH:()=>ysn,DOTNET_GC_HEAP_GENERATION_VALUE_POH:()=>Ssn,DbCassandraConsistencyLevelValues:()=>Uit,DbSystemValues:()=>vit,ERROR_TYPE_VALUE_OTHER:()=>Rlt,EVENT_EXCEPTION:()=>Fpt,FAASDOCUMENTOPERATIONVALUES_DELETE:()=>Vit,FAASDOCUMENTOPERATIONVALUES_EDIT:()=>qit,FAASDOCUMENTOPERATIONVALUES_INSERT:()=>$it,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:()=>Kit,FAASINVOKEDPROVIDERVALUES_AWS:()=>Jit,FAASINVOKEDPROVIDERVALUES_AZURE:()=>Zit,FAASINVOKEDPROVIDERVALUES_GCP:()=>Wit,FAASTRIGGERVALUES_DATASOURCE:()=>Qit,FAASTRIGGERVALUES_HTTP:()=>Fit,FAASTRIGGERVALUES_OTHER:()=>zit,FAASTRIGGERVALUES_PUBSUB:()=>Git,FAASTRIGGERVALUES_TIMER:()=>jit,FaasDocumentOperationValues:()=>Yit,FaasInvokedProviderValues:()=>Xit,FaasTriggerValues:()=>Hit,HOSTARCHVALUES_AMD64:()=>mct,HOSTARCHVALUES_ARM32:()=>Act,HOSTARCHVALUES_ARM64:()=>gct,HOSTARCHVALUES_IA64:()=>hct,HOSTARCHVALUES_PPC32:()=>_ct,HOSTARCHVALUES_PPC64:()=>Ect,HOSTARCHVALUES_X86:()=>yct,HTTPFLAVORVALUES_HTTP_1_0:()=>Mst,HTTPFLAVORVALUES_HTTP_1_1:()=>Lst,HTTPFLAVORVALUES_HTTP_2_0:()=>Ust,HTTPFLAVORVALUES_QUIC:()=>Fst,HTTPFLAVORVALUES_SPDY:()=>Qst,HTTP_REQUEST_METHOD_VALUE_CONNECT:()=>klt,HTTP_REQUEST_METHOD_VALUE_DELETE:()=>Plt,HTTP_REQUEST_METHOD_VALUE_GET:()=>Tsn,HTTP_REQUEST_METHOD_VALUE_HEAD:()=>Mlt,HTTP_REQUEST_METHOD_VALUE_OPTIONS:()=>Llt,HTTP_REQUEST_METHOD_VALUE_OTHER:()=>Olt,HTTP_REQUEST_METHOD_VALUE_PATCH:()=>Ult,HTTP_REQUEST_METHOD_VALUE_POST:()=>Qlt,HTTP_REQUEST_METHOD_VALUE_PUT:()=>bsn,HTTP_REQUEST_METHOD_VALUE_TRACE:()=>Flt,HostArchValues:()=>Sct,HttpFlavorValues:()=>Gst,JVM_MEMORY_TYPE_VALUE_HEAP:()=>Ylt,JVM_MEMORY_TYPE_VALUE_NON_HEAP:()=>Klt,JVM_THREAD_STATE_VALUE_BLOCKED:()=>Wlt,JVM_THREAD_STATE_VALUE_NEW:()=>Isn,JVM_THREAD_STATE_VALUE_RUNNABLE:()=>Xlt,JVM_THREAD_STATE_VALUE_TERMINATED:()=>edt,JVM_THREAD_STATE_VALUE_TIMED_WAITING:()=>tdt,JVM_THREAD_STATE_VALUE_WAITING:()=>ndt,MESSAGETYPEVALUES_RECEIVED:()=>fat,MESSAGETYPEVALUES_SENT:()=>pat,MESSAGINGDESTINATIONKINDVALUES_QUEUE:()=>jst,MESSAGINGDESTINATIONKINDVALUES_TOPIC:()=>zst,MESSAGINGOPERATIONVALUES_PROCESS:()=>qst,MESSAGINGOPERATIONVALUES_RECEIVE:()=>$st,METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS:()=>zdt,METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES:()=>Hdt,METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS:()=>$dt,METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS:()=>Ydt,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION:()=>Vdt,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE:()=>qdt,METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS:()=>Kdt,METRIC_DB_CLIENT_OPERATION_DURATION:()=>Jdt,METRIC_DOTNET_ASSEMBLY_COUNT:()=>Zdt,METRIC_DOTNET_EXCEPTIONS:()=>Wdt,METRIC_DOTNET_GC_COLLECTIONS:()=>Xdt,METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED:()=>ept,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE:()=>tpt,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE:()=>npt,METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE:()=>rpt,METRIC_DOTNET_GC_PAUSE_TIME:()=>opt,METRIC_DOTNET_JIT_COMPILATION_TIME:()=>ipt,METRIC_DOTNET_JIT_COMPILED_IL_SIZE:()=>spt,METRIC_DOTNET_JIT_COMPILED_METHODS:()=>apt,METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS:()=>upt,METRIC_DOTNET_PROCESS_CPU_COUNT:()=>cpt,METRIC_DOTNET_PROCESS_CPU_TIME:()=>lpt,METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET:()=>dpt,METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH:()=>ppt,METRIC_DOTNET_THREAD_POOL_THREAD_COUNT:()=>fpt,METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT:()=>mpt,METRIC_DOTNET_TIMER_COUNT:()=>Apt,METRIC_HTTP_CLIENT_REQUEST_DURATION:()=>gpt,METRIC_HTTP_SERVER_REQUEST_DURATION:()=>hpt,METRIC_JVM_CLASS_COUNT:()=>_pt,METRIC_JVM_CLASS_LOADED:()=>Ept,METRIC_JVM_CLASS_UNLOADED:()=>ypt,METRIC_JVM_CPU_COUNT:()=>Spt,METRIC_JVM_CPU_RECENT_UTILIZATION:()=>Tpt,METRIC_JVM_CPU_TIME:()=>bpt,METRIC_JVM_GC_DURATION:()=>Ipt,METRIC_JVM_MEMORY_COMMITTED:()=>Cpt,METRIC_JVM_MEMORY_LIMIT:()=>vpt,METRIC_JVM_MEMORY_USED:()=>Rpt,METRIC_JVM_MEMORY_USED_AFTER_LAST_GC:()=>xpt,METRIC_JVM_THREAD_COUNT:()=>Dpt,METRIC_KESTREL_ACTIVE_CONNECTIONS:()=>Npt,METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES:()=>Bpt,METRIC_KESTREL_CONNECTION_DURATION:()=>wpt,METRIC_KESTREL_QUEUED_CONNECTIONS:()=>Opt,METRIC_KESTREL_QUEUED_REQUESTS:()=>kpt,METRIC_KESTREL_REJECTED_CONNECTIONS:()=>Ppt,METRIC_KESTREL_TLS_HANDSHAKE_DURATION:()=>Mpt,METRIC_KESTREL_UPGRADED_CONNECTIONS:()=>Lpt,METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS:()=>Upt,METRIC_SIGNALR_SERVER_CONNECTION_DURATION:()=>Qpt,MessageTypeValues:()=>mat,MessagingDestinationKindValues:()=>Hst,MessagingOperationValues:()=>Vst,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:()=>hst,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:()=>yst,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:()=>Ast,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:()=>Rst,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:()=>_st,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:()=>Est,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:()=>Cst,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:()=>mst,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:()=>Dst,NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:()=>Sst,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:()=>bst,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:()=>xst,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:()=>Tst,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:()=>Ist,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:()=>Bst,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:()=>vst,NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:()=>kst,NETHOSTCONNECTIONSUBTYPEVALUES_NR:()=>wst,NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:()=>Ost,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:()=>Nst,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:()=>gst,NETHOSTCONNECTIONTYPEVALUES_CELL:()=>lst,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:()=>dst,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:()=>pst,NETHOSTCONNECTIONTYPEVALUES_WIFI:()=>ust,NETHOSTCONNECTIONTYPEVALUES_WIRED:()=>cst,NETTRANSPORTVALUES_INPROC:()=>ist,NETTRANSPORTVALUES_IP:()=>nst,NETTRANSPORTVALUES_IP_TCP:()=>est,NETTRANSPORTVALUES_IP_UDP:()=>tst,NETTRANSPORTVALUES_OTHER:()=>sst,NETTRANSPORTVALUES_PIPE:()=>ost,NETTRANSPORTVALUES_UNIX:()=>rst,NETWORK_TRANSPORT_VALUE_PIPE:()=>sdt,NETWORK_TRANSPORT_VALUE_QUIC:()=>adt,NETWORK_TRANSPORT_VALUE_TCP:()=>Csn,NETWORK_TRANSPORT_VALUE_UDP:()=>vsn,NETWORK_TRANSPORT_VALUE_UNIX:()=>udt,NETWORK_TYPE_VALUE_IPV4:()=>ldt,NETWORK_TYPE_VALUE_IPV6:()=>ddt,NetHostConnectionSubtypeValues:()=>Pst,NetHostConnectionTypeValues:()=>fst,NetTransportValues:()=>ast,OSTYPEVALUES_AIX:()=>Nct,OSTYPEVALUES_DARWIN:()=>Ict,OSTYPEVALUES_DRAGONFLYBSD:()=>xct,OSTYPEVALUES_FREEBSD:()=>Cct,OSTYPEVALUES_HPUX:()=>Dct,OSTYPEVALUES_LINUX:()=>bct,OSTYPEVALUES_NETBSD:()=>vct,OSTYPEVALUES_OPENBSD:()=>Rct,OSTYPEVALUES_SOLARIS:()=>Bct,OSTYPEVALUES_WINDOWS:()=>Tct,OSTYPEVALUES_Z_OS:()=>wct,OTEL_STATUS_CODE_VALUE_ERROR:()=>Adt,OTEL_STATUS_CODE_VALUE_OK:()=>Rsn,OsTypeValues:()=>Oct,RPCGRPCSTATUSCODEVALUES_ABORTED:()=>oat,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:()=>eat,RPCGRPCSTATUSCODEVALUES_CANCELLED:()=>Kst,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:()=>cat,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:()=>Wst,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:()=>rat,RPCGRPCSTATUSCODEVALUES_INTERNAL:()=>aat,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:()=>Zst,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:()=>Xst,RPCGRPCSTATUSCODEVALUES_OK:()=>Yst,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:()=>iat,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:()=>tat,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:()=>nat,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:()=>lat,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:()=>uat,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:()=>sat,RPCGRPCSTATUSCODEVALUES_UNKNOWN:()=>Jst,RpcGrpcStatusCodeValues:()=>dat,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:()=>Hrt,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:()=>not,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:()=>Grt,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:()=>Lrt,SEMATTRS_AWS_DYNAMODB_COUNT:()=>eot,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:()=>Krt,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:()=>Vrt,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:()=>rot,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:()=>$rt,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:()=>Urt,SEMATTRS_AWS_DYNAMODB_LIMIT:()=>zrt,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:()=>Yrt,SEMATTRS_AWS_DYNAMODB_PROJECTION:()=>jrt,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:()=>Qrt,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:()=>Frt,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:()=>tot,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:()=>Zrt,SEMATTRS_AWS_DYNAMODB_SEGMENT:()=>Wrt,SEMATTRS_AWS_DYNAMODB_SELECT:()=>qrt,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:()=>Jrt,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:()=>Mrt,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:()=>Xrt,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:()=>xnt,SEMATTRS_CODE_FILEPATH:()=>vrt,SEMATTRS_CODE_FUNCTION:()=>Irt,SEMATTRS_CODE_LINENO:()=>Rrt,SEMATTRS_CODE_NAMESPACE:()=>Crt,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:()=>Lnt,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:()=>jnt,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:()=>Gnt,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:()=>Qnt,SEMATTRS_DB_CASSANDRA_KEYSPACE:()=>Pnt,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:()=>Mnt,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:()=>Fnt,SEMATTRS_DB_CASSANDRA_TABLE:()=>Unt,SEMATTRS_DB_CONNECTION_STRING:()=>Dnt,SEMATTRS_DB_HBASE_NAMESPACE:()=>znt,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:()=>Bnt,SEMATTRS_DB_MONGODB_COLLECTION:()=>$nt,SEMATTRS_DB_MSSQL_INSTANCE_NAME:()=>knt,SEMATTRS_DB_NAME:()=>wnt,SEMATTRS_DB_OPERATION:()=>Ont,SEMATTRS_DB_REDIS_DATABASE_INDEX:()=>Hnt,SEMATTRS_DB_SQL_TABLE:()=>qnt,SEMATTRS_DB_STATEMENT:()=>sV,SEMATTRS_DB_SYSTEM:()=>iV,SEMATTRS_DB_USER:()=>Nnt,SEMATTRS_ENDUSER_ID:()=>Ert,SEMATTRS_ENDUSER_ROLE:()=>yrt,SEMATTRS_ENDUSER_SCOPE:()=>Srt,SEMATTRS_EXCEPTION_ESCAPED:()=>Jnt,SEMATTRS_EXCEPTION_MESSAGE:()=>Ynt,SEMATTRS_EXCEPTION_STACKTRACE:()=>Knt,SEMATTRS_EXCEPTION_TYPE:()=>Vnt,SEMATTRS_FAAS_COLDSTART:()=>ort,SEMATTRS_FAAS_CRON:()=>rrt,SEMATTRS_FAAS_DOCUMENT_COLLECTION:()=>Wnt,SEMATTRS_FAAS_DOCUMENT_NAME:()=>trt,SEMATTRS_FAAS_DOCUMENT_OPERATION:()=>Xnt,SEMATTRS_FAAS_DOCUMENT_TIME:()=>ert,SEMATTRS_FAAS_EXECUTION:()=>Znt,SEMATTRS_FAAS_INVOKED_NAME:()=>irt,SEMATTRS_FAAS_INVOKED_PROVIDER:()=>srt,SEMATTRS_FAAS_INVOKED_REGION:()=>art,SEMATTRS_FAAS_TIME:()=>nrt,SEMATTRS_FAAS_TRIGGER:()=>aV,SEMATTRS_HTTP_CLIENT_IP:()=>Prt,SEMATTRS_HTTP_FLAVOR:()=>Nrt,SEMATTRS_HTTP_HOST:()=>xrt,SEMATTRS_HTTP_METHOD:()=>AB,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:()=>wrt,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:()=>Ort,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:()=>pV,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:()=>fV,SEMATTRS_HTTP_ROUTE:()=>mV,SEMATTRS_HTTP_SCHEME:()=>Drt,SEMATTRS_HTTP_SERVER_NAME:()=>krt,SEMATTRS_HTTP_STATUS_CODE:()=>pS,SEMATTRS_HTTP_TARGET:()=>dV,SEMATTRS_HTTP_URL:()=>MC,SEMATTRS_HTTP_USER_AGENT:()=>Brt,SEMATTRS_MESSAGE_COMPRESSED_SIZE:()=>Not,SEMATTRS_MESSAGE_ID:()=>Dot,SEMATTRS_MESSAGE_TYPE:()=>xot,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:()=>Bot,SEMATTRS_MESSAGING_CONSUMER_ID:()=>Aot,SEMATTRS_MESSAGING_CONVERSATION_ID:()=>dot,SEMATTRS_MESSAGING_DESTINATION:()=>oot,SEMATTRS_MESSAGING_DESTINATION_KIND:()=>iot,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:()=>Eot,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:()=>_ot,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:()=>hot,SEMATTRS_MESSAGING_KAFKA_PARTITION:()=>yot,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:()=>Sot,SEMATTRS_MESSAGING_MESSAGE_ID:()=>lot,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:()=>fot,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:()=>pot,SEMATTRS_MESSAGING_OPERATION:()=>mot,SEMATTRS_MESSAGING_PROTOCOL:()=>aot,SEMATTRS_MESSAGING_PROTOCOL_VERSION:()=>uot,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:()=>got,SEMATTRS_MESSAGING_SYSTEM:()=>AV,SEMATTRS_MESSAGING_TEMP_DESTINATION:()=>sot,SEMATTRS_MESSAGING_URL:()=>cot,SEMATTRS_NET_HOST_CARRIER_ICC:()=>hrt,SEMATTRS_NET_HOST_CARRIER_MCC:()=>Art,SEMATTRS_NET_HOST_CARRIER_MNC:()=>grt,SEMATTRS_NET_HOST_CARRIER_NAME:()=>mrt,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:()=>frt,SEMATTRS_NET_HOST_CONNECTION_TYPE:()=>prt,SEMATTRS_NET_HOST_IP:()=>cV,SEMATTRS_NET_HOST_NAME:()=>drt,SEMATTRS_NET_HOST_PORT:()=>lV,SEMATTRS_NET_PEER_IP:()=>uV,SEMATTRS_NET_PEER_NAME:()=>lrt,SEMATTRS_NET_PEER_PORT:()=>crt,SEMATTRS_NET_TRANSPORT:()=>urt,SEMATTRS_PEER_SERVICE:()=>_rt,SEMATTRS_RPC_GRPC_STATUS_CODE:()=>hV,SEMATTRS_RPC_JSONRPC_ERROR_CODE:()=>vot,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:()=>Rot,SEMATTRS_RPC_JSONRPC_REQUEST_ID:()=>Cot,SEMATTRS_RPC_JSONRPC_VERSION:()=>Iot,SEMATTRS_RPC_METHOD:()=>bot,SEMATTRS_RPC_SERVICE:()=>gV,SEMATTRS_RPC_SYSTEM:()=>Tot,SEMATTRS_THREAD_ID:()=>Trt,SEMATTRS_THREAD_NAME:()=>brt,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:()=>Sat,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:()=>yat,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:()=>Tat,SEMRESATTRS_AWS_ECS_TASK_ARN:()=>bat,SEMRESATTRS_AWS_ECS_TASK_FAMILY:()=>Iat,SEMRESATTRS_AWS_ECS_TASK_REVISION:()=>Cat,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:()=>vat,SEMRESATTRS_AWS_LOG_GROUP_ARNS:()=>xat,SEMRESATTRS_AWS_LOG_GROUP_NAMES:()=>Rat,SEMRESATTRS_AWS_LOG_STREAM_ARNS:()=>Nat,SEMRESATTRS_AWS_LOG_STREAM_NAMES:()=>Dat,SEMRESATTRS_CLOUD_ACCOUNT_ID:()=>gat,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:()=>_at,SEMRESATTRS_CLOUD_PLATFORM:()=>Eat,SEMRESATTRS_CLOUD_PROVIDER:()=>Aat,SEMRESATTRS_CLOUD_REGION:()=>hat,SEMRESATTRS_CONTAINER_ID:()=>wat,SEMRESATTRS_CONTAINER_IMAGE_NAME:()=>kat,SEMRESATTRS_CONTAINER_IMAGE_TAG:()=>Pat,SEMRESATTRS_CONTAINER_NAME:()=>Bat,SEMRESATTRS_CONTAINER_RUNTIME:()=>Oat,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:()=>Mat,SEMRESATTRS_DEVICE_ID:()=>Lat,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:()=>Uat,SEMRESATTRS_DEVICE_MODEL_NAME:()=>Qat,SEMRESATTRS_FAAS_ID:()=>Gat,SEMRESATTRS_FAAS_INSTANCE:()=>zat,SEMRESATTRS_FAAS_MAX_MEMORY:()=>Hat,SEMRESATTRS_FAAS_NAME:()=>Fat,SEMRESATTRS_FAAS_VERSION:()=>jat,SEMRESATTRS_HOST_ARCH:()=>Yat,SEMRESATTRS_HOST_ID:()=>$at,SEMRESATTRS_HOST_IMAGE_ID:()=>Jat,SEMRESATTRS_HOST_IMAGE_NAME:()=>Kat,SEMRESATTRS_HOST_IMAGE_VERSION:()=>Zat,SEMRESATTRS_HOST_NAME:()=>qat,SEMRESATTRS_HOST_TYPE:()=>Vat,SEMRESATTRS_K8S_CLUSTER_NAME:()=>Wat,SEMRESATTRS_K8S_CONTAINER_NAME:()=>out,SEMRESATTRS_K8S_CRONJOB_NAME:()=>gut,SEMRESATTRS_K8S_CRONJOB_UID:()=>Aut,SEMRESATTRS_K8S_DAEMONSET_NAME:()=>put,SEMRESATTRS_K8S_DAEMONSET_UID:()=>dut,SEMRESATTRS_K8S_DEPLOYMENT_NAME:()=>uut,SEMRESATTRS_K8S_DEPLOYMENT_UID:()=>aut,SEMRESATTRS_K8S_JOB_NAME:()=>mut,SEMRESATTRS_K8S_JOB_UID:()=>fut,SEMRESATTRS_K8S_NAMESPACE_NAME:()=>tut,SEMRESATTRS_K8S_NODE_NAME:()=>Xat,SEMRESATTRS_K8S_NODE_UID:()=>eut,SEMRESATTRS_K8S_POD_NAME:()=>rut,SEMRESATTRS_K8S_POD_UID:()=>nut,SEMRESATTRS_K8S_REPLICASET_NAME:()=>sut,SEMRESATTRS_K8S_REPLICASET_UID:()=>iut,SEMRESATTRS_K8S_STATEFULSET_NAME:()=>lut,SEMRESATTRS_K8S_STATEFULSET_UID:()=>cut,SEMRESATTRS_OS_DESCRIPTION:()=>_ut,SEMRESATTRS_OS_NAME:()=>Eut,SEMRESATTRS_OS_TYPE:()=>hut,SEMRESATTRS_OS_VERSION:()=>yut,SEMRESATTRS_PROCESS_COMMAND:()=>Iut,SEMRESATTRS_PROCESS_COMMAND_ARGS:()=>vut,SEMRESATTRS_PROCESS_COMMAND_LINE:()=>Cut,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:()=>Tut,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:()=>but,SEMRESATTRS_PROCESS_OWNER:()=>Rut,SEMRESATTRS_PROCESS_PID:()=>Sut,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:()=>Nut,SEMRESATTRS_PROCESS_RUNTIME_NAME:()=>xut,SEMRESATTRS_PROCESS_RUNTIME_VERSION:()=>Dut,SEMRESATTRS_SERVICE_INSTANCE_ID:()=>wut,SEMRESATTRS_SERVICE_NAME:()=>But,SEMRESATTRS_SERVICE_NAMESPACE:()=>_V,SEMRESATTRS_SERVICE_VERSION:()=>Out,SEMRESATTRS_TELEMETRY_AUTO_VERSION:()=>Lut,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:()=>Put,SEMRESATTRS_TELEMETRY_SDK_NAME:()=>kut,SEMRESATTRS_TELEMETRY_SDK_VERSION:()=>Mut,SEMRESATTRS_WEBENGINE_DESCRIPTION:()=>Fut,SEMRESATTRS_WEBENGINE_NAME:()=>Uut,SEMRESATTRS_WEBENGINE_VERSION:()=>Qut,SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN:()=>ydt,SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE:()=>Sdt,SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT:()=>Tdt,SIGNALR_TRANSPORT_VALUE_LONG_POLLING:()=>Idt,SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS:()=>Cdt,SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS:()=>vdt,SemanticAttributes:()=>wot,SemanticResourceAttributes:()=>Gut,TELEMETRYSDKLANGUAGEVALUES_CPP:()=>kct,TELEMETRYSDKLANGUAGEVALUES_DOTNET:()=>Pct,TELEMETRYSDKLANGUAGEVALUES_ERLANG:()=>Mct,TELEMETRYSDKLANGUAGEVALUES_GO:()=>Lct,TELEMETRYSDKLANGUAGEVALUES_JAVA:()=>Uct,TELEMETRYSDKLANGUAGEVALUES_NODEJS:()=>Qct,TELEMETRYSDKLANGUAGEVALUES_PHP:()=>Fct,TELEMETRYSDKLANGUAGEVALUES_PYTHON:()=>Gct,TELEMETRYSDKLANGUAGEVALUES_RUBY:()=>jct,TELEMETRYSDKLANGUAGEVALUES_WEBJS:()=>zct,TELEMETRY_SDK_LANGUAGE_VALUE_CPP:()=>xsn,TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET:()=>xdt,TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG:()=>Ddt,TELEMETRY_SDK_LANGUAGE_VALUE_GO:()=>Dsn,TELEMETRY_SDK_LANGUAGE_VALUE_JAVA:()=>Ndt,TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:()=>Bdt,TELEMETRY_SDK_LANGUAGE_VALUE_PHP:()=>Nsn,TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON:()=>wdt,TELEMETRY_SDK_LANGUAGE_VALUE_RUBY:()=>Odt,TELEMETRY_SDK_LANGUAGE_VALUE_RUST:()=>kdt,TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT:()=>Pdt,TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS:()=>Mdt,TelemetrySdkLanguageValues:()=>Hct});var Xn=w(()=>{m();uye();kTe();PTe();MTe();LTe()});var UTe=M(dU=>{"use strict";m();Object.defineProperty(dU,"__esModule",{value:!0});dU.ATTR_PROCESS_RUNTIME_NAME=void 0;dU.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name"});var QTe=M(fU=>{"use strict";m();Object.defineProperty(fU,"__esModule",{value:!0});fU.SDK_INFO=void 0;var Gpt=hge(),pU=(Xn(),Me(Hr)),jpt=UTe();fU.SDK_INFO={[pU.ATTR_TELEMETRY_SDK_NAME]:"opentelemetry",[jpt.ATTR_PROCESS_RUNTIME_NAME]:"node",[pU.ATTR_TELEMETRY_SDK_LANGUAGE]:pU.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,[pU.ATTR_TELEMETRY_SDK_VERSION]:Gpt.VERSION}});var FTe=M(au=>{"use strict";m();Object.defineProperty(au,"__esModule",{value:!0});au.otperformance=au.SDK_INFO=au._globalThis=au.getStringListFromEnv=au.getNumberFromEnv=au.getBooleanFromEnv=au.getStringFromEnv=void 0;var mU=Age();Object.defineProperty(au,"getStringFromEnv",{enumerable:!0,get:function(){return mU.getStringFromEnv}});Object.defineProperty(au,"getBooleanFromEnv",{enumerable:!0,get:function(){return mU.getBooleanFromEnv}});Object.defineProperty(au,"getNumberFromEnv",{enumerable:!0,get:function(){return mU.getNumberFromEnv}});Object.defineProperty(au,"getStringListFromEnv",{enumerable:!0,get:function(){return mU.getStringListFromEnv}});var zpt=gge();Object.defineProperty(au,"_globalThis",{enumerable:!0,get:function(){return zpt._globalThis}});var Hpt=QTe();Object.defineProperty(au,"SDK_INFO",{enumerable:!0,get:function(){return Hpt.SDK_INFO}});au.otperformance=performance});var OV=M(uu=>{"use strict";m();Object.defineProperty(uu,"__esModule",{value:!0});uu.getStringListFromEnv=uu.getNumberFromEnv=uu.getStringFromEnv=uu.getBooleanFromEnv=uu.otperformance=uu._globalThis=uu.SDK_INFO=void 0;var AS=FTe();Object.defineProperty(uu,"SDK_INFO",{enumerable:!0,get:function(){return AS.SDK_INFO}});Object.defineProperty(uu,"_globalThis",{enumerable:!0,get:function(){return AS._globalThis}});Object.defineProperty(uu,"otperformance",{enumerable:!0,get:function(){return AS.otperformance}});Object.defineProperty(uu,"getBooleanFromEnv",{enumerable:!0,get:function(){return AS.getBooleanFromEnv}});Object.defineProperty(uu,"getStringFromEnv",{enumerable:!0,get:function(){return AS.getStringFromEnv}});Object.defineProperty(uu,"getNumberFromEnv",{enumerable:!0,get:function(){return AS.getNumberFromEnv}});Object.defineProperty(uu,"getStringListFromEnv",{enumerable:!0,get:function(){return AS.getStringListFromEnv}})});var HTe=M($r=>{"use strict";m();Object.defineProperty($r,"__esModule",{value:!0});$r.addHrTimes=$r.isTimeInput=$r.isTimeInputHrTime=$r.hrTimeToSeconds=$r.hrTimeToMilliseconds=$r.hrTimeToMicroseconds=$r.hrTimeToNanoseconds=$r.hrTimeToTimeStamp=$r.hrTimeDuration=$r.timeInputToHrTime=$r.hrTime=$r.getTimeOrigin=$r.millisToHrTime=void 0;var AU=OV(),GTe=9,$pt=6,qpt=Math.pow(10,$pt),gB=Math.pow(10,GTe);function hB(e){let t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*qpt);return[n,r]}$r.millisToHrTime=hB;function Vpt(){return AU.otperformance.timeOrigin}$r.getTimeOrigin=Vpt;function jTe(e){let t=hB(AU.otperformance.timeOrigin),n=hB(typeof e=="number"?e:AU.otperformance.now());return zTe(t,n)}$r.hrTime=jTe;function Ypt(e){if(kV(e))return e;if(typeof e=="number")return e<AU.otperformance.timeOrigin?jTe(e):hB(e);if(e instanceof Date)return hB(e.getTime());throw TypeError("Invalid input type")}$r.timeInputToHrTime=Ypt;function Kpt(e,t){let n=t[0]-e[0],r=t[1]-e[1];return r<0&&(n-=1,r+=gB),[n,r]}$r.hrTimeDuration=Kpt;function Jpt(e){let t=GTe,n=`${"0".repeat(t)}${e[1]}Z`,r=n.substring(n.length-t-1);return new Date(e[0]*1e3).toISOString().replace("000Z",r)}$r.hrTimeToTimeStamp=Jpt;function Zpt(e){return e[0]*gB+e[1]}$r.hrTimeToNanoseconds=Zpt;function Wpt(e){return e[0]*1e6+e[1]/1e3}$r.hrTimeToMicroseconds=Wpt;function Xpt(e){return e[0]*1e3+e[1]/1e6}$r.hrTimeToMilliseconds=Xpt;function eft(e){return e[0]+e[1]/gB}$r.hrTimeToSeconds=eft;function kV(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}$r.isTimeInputHrTime=kV;function tft(e){return kV(e)||typeof e=="number"||e instanceof Date}$r.isTimeInput=tft;function zTe(e,t){let n=[e[0]+t[0],e[1]+t[1]];return n[1]>=gB&&(n[1]-=gB,n[0]+=1),n}$r.addHrTimes=zTe});var $Te=M(gU=>{"use strict";m();Object.defineProperty(gU,"__esModule",{value:!0});gU.unrefTimer=void 0;function nft(e){typeof e!="number"&&e.unref()}gU.unrefTimer=nft});var qTe=M(_B=>{"use strict";m();Object.defineProperty(_B,"__esModule",{value:!0});_B.ExportResultCode=void 0;var rft;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(rft=_B.ExportResultCode||(_B.ExportResultCode={}))});var YTe=M(hU=>{"use strict";m();Object.defineProperty(hU,"__esModule",{value:!0});hU.CompositePropagator=void 0;var VTe=(He(),Me(tt)),PV=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){VTe.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){VTe.diag.warn(`Failed to extract with ${i.constructor.name}. Err: ${s.message}`)}return o},t)}fields(){return this._fields.slice()}};hU.CompositePropagator=PV});var KTe=M(UC=>{"use strict";m();Object.defineProperty(UC,"__esModule",{value:!0});UC.validateValue=UC.validateKey=void 0;var MV="[_0-9a-z-*/]",oft=`[a-z]${MV}{0,255}`,ift=`[a-z0-9]${MV}{0,240}@[a-z]${MV}{0,13}`,sft=new RegExp(`^(?:${oft}|${ift})$`),aft=/^[ -~]{0,255}[!-~]$/,uft=/,|=/;function cft(e){return sft.test(e)}UC.validateKey=cft;function lft(e){return aft.test(e)&&!uft.test(e)}UC.validateValue=lft});var UV=M(EU=>{"use strict";m();Object.defineProperty(EU,"__esModule",{value:!0});EU.TraceState=void 0;var _U=KTe(),dft=32,JTe=512,ZTe=",",WTe="=",LV=class e{_length;_rawTraceState;_internalState;constructor(t){this._rawTraceState=typeof t=="string"?t:"",this._length=this._rawTraceState.length}set(t,n){if(!(0,_U.validateKey)(t)||!(0,_U.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>JTe)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=ZTe+t),t=`${r[0]}${WTe}${r[1]}`+t,n++;return t}_getState(){if(this._internalState)return this._internalState;let t=this._rawTraceState.split(ZTe),n=new Map,r=0;for(let o of t){let i=o.trim(),s=i.indexOf(WTe);if(s===-1)continue;let u=i.slice(0,s),l=i.slice(s+1);if(!(0,_U.validateKey)(u)||!(0,_U.validateValue)(l))continue;let f=r+i.length+(n.size>0?1:0);if(!(f>JTe)&&(n.set(u,l),r=f,n.size>=dft))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}};EU.TraceState=LV});var ebe=M(cu=>{"use strict";m();Object.defineProperty(cu,"__esModule",{value:!0});cu.W3CTraceContextPropagator=cu.parseTraceParent=cu.TRACE_STATE_HEADER=cu.TRACE_PARENT_HEADER=void 0;var yU=(He(),Me(tt)),pft=fB(),fft=UV();cu.TRACE_PARENT_HEADER="traceparent";cu.TRACE_STATE_HEADER="tracestate";var mft="00",Aft="(?!ff)[\\da-f]{2}",gft="(?![0]{32})[\\da-f]{32}",hft="(?![0]{16})[\\da-f]{16}",_ft="[\\da-f]{2}",Eft=new RegExp(`^\\s?(${Aft})-(${gft})-(${hft})-(${_ft})(-.*)?\\s?$`);function XTe(e){let t=Eft.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}cu.parseTraceParent=XTe;var QV=class{inject(t,n,r){let o=yU.trace.getSpanContext(t);if(!o||(0,pft.isTracingSuppressed)(t)||!(0,yU.isSpanContextValid)(o))return;let i=`${mft}-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||yU.TraceFlags.NONE).toString(16)}`;r.set(n,cu.TRACE_PARENT_HEADER,i),o.traceState&&r.set(n,cu.TRACE_STATE_HEADER,o.traceState.serialize())}extract(t,n,r){let o=r.get(n,cu.TRACE_PARENT_HEADER);if(!o)return t;let i=Array.isArray(o)?o[0]:o;if(typeof i!="string")return t;let s=XTe(i);if(!s)return t;s.isRemote=!0;let u=r.get(n,cu.TRACE_STATE_HEADER);if(u){let l=Array.isArray(u)?u.join(","):u;s.traceState=new fft.TraceState(typeof l=="string"?l:void 0)}return yU.trace.setSpanContext(t,s)}fields(){return[cu.TRACE_PARENT_HEADER,cu.TRACE_STATE_HEADER]}};cu.W3CTraceContextPropagator=QV});var tbe=M(Af=>{"use strict";m();Object.defineProperty(Af,"__esModule",{value:!0});Af.getRPCMetadata=Af.deleteRPCMetadata=Af.setRPCMetadata=Af.RPCType=void 0;var yft=(He(),Me(tt)),FV=(0,yft.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),Sft;(function(e){e.HTTP="http"})(Sft=Af.RPCType||(Af.RPCType={}));function Tft(e,t){return e.setValue(FV,t)}Af.setRPCMetadata=Tft;function bft(e){return e.deleteValue(FV)}Af.deleteRPCMetadata=bft;function Ift(e){return e.getValue(FV)}Af.getRPCMetadata=Ift});var sbe=M(SU=>{"use strict";m();Object.defineProperty(SU,"__esModule",{value:!0});SU.isPlainObject=void 0;var Cft="[object Object]",vft="[object Null]",Rft="[object Undefined]",xft=Function.prototype,nbe=xft.toString,Dft=nbe.call(Object),Nft=Object.getPrototypeOf,rbe=Object.prototype,obe=rbe.hasOwnProperty,gS=Symbol?Symbol.toStringTag:void 0,ibe=rbe.toString;function Bft(e){if(!wft(e)||Oft(e)!==Cft)return!1;let t=Nft(e);if(t===null)return!0;let n=obe.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&nbe.call(n)===Dft}SU.isPlainObject=Bft;function wft(e){return e!=null&&typeof e=="object"}function Oft(e){return e==null?e===void 0?Rft:vft:gS&&gS in Object(e)?kft(e):Pft(e)}function kft(e){let t=obe.call(e,gS),n=e[gS],r=!1;try{e[gS]=void 0,r=!0}catch{}let o=ibe.call(e);return r&&(t?e[gS]=n:delete e[gS]),o}function Pft(e){return ibe.call(e)}});var dbe=M(IU=>{"use strict";m();Object.defineProperty(IU,"__esModule",{value:!0});IU.merge=void 0;var abe=sbe(),Mft=20;function Lft(...e){let t=e.shift(),n=new WeakMap;for(;e.length>0;)t=cbe(t,e.shift(),0,n);return t}IU.merge=Lft;function GV(e){return bU(e)?e.slice():e}function cbe(e,t,n=0,r){let o;if(!(n>Mft)){if(n++,TU(e)||TU(t)||lbe(t))o=GV(t);else if(bU(e)){if(o=e.slice(),bU(t))for(let i=0,s=t.length;i<s;i++)o.push(GV(t[i]));else if(EB(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]=GV(t[l]))}}}else if(EB(e))if(EB(t)){if(!Uft(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 f=t[l];if(TU(f))typeof f>"u"?delete o[l]:o[l]=f;else{let h=o[l],_=f;if(ube(e,l,r)||ube(t,l,r))delete o[l];else{if(EB(h)&&EB(_)){let y=r.get(h)||[],T=r.get(_)||[];y.push({obj:e,key:l}),T.push({obj:t,key:l}),r.set(h,y),r.set(_,T)}o[l]=cbe(o[l],f,n,r)}}}}else o=t;return o}}function ube(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 bU(e){return Array.isArray(e)}function lbe(e){return typeof e=="function"}function EB(e){return!TU(e)&&!bU(e)&&!lbe(e)&&typeof e=="object"}function TU(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function Uft(e,t){return!(!(0,abe.isPlainObject)(e)||!(0,abe.isPlainObject)(t))}});var pbe=M(QC=>{"use strict";m();Object.defineProperty(QC,"__esModule",{value:!0});QC.callWithTimeout=QC.TimeoutError=void 0;var CU=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};QC.TimeoutError=CU;function Qft(e,t){let n,r=new Promise(function(i,s){n=setTimeout(function(){s(new CU("Operation timed out."))},t)});return Promise.race([e,r]).then(o=>(clearTimeout(n),o),o=>{throw clearTimeout(n),o})}QC.callWithTimeout=Qft});var mbe=M(FC=>{"use strict";m();Object.defineProperty(FC,"__esModule",{value:!0});FC.isUrlIgnored=FC.urlMatches=void 0;function fbe(e,t){return typeof t=="string"?e===t:!!e.match(t)}FC.urlMatches=fbe;function Fft(e,t){if(!t)return!1;for(let n of t)if(fbe(e,n))return!0;return!1}FC.isUrlIgnored=Fft});var Abe=M(vU=>{"use strict";m();Object.defineProperty(vU,"__esModule",{value:!0});vU.Deferred=void 0;var jV=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)}};vU.Deferred=jV});var gbe=M(RU=>{"use strict";m();Object.defineProperty(RU,"__esModule",{value:!0});RU.BindOnceFuture=void 0;var Gft=Abe(),zV=class{_isCalled=!1;_deferred=new Gft.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}};RU.BindOnceFuture=zV});var _be=M(xU=>{"use strict";m();Object.defineProperty(xU,"__esModule",{value:!0});xU.diagLogLevelFromString=void 0;var xg=(He(),Me(tt)),hbe={ALL:xg.DiagLogLevel.ALL,VERBOSE:xg.DiagLogLevel.VERBOSE,DEBUG:xg.DiagLogLevel.DEBUG,INFO:xg.DiagLogLevel.INFO,WARN:xg.DiagLogLevel.WARN,ERROR:xg.DiagLogLevel.ERROR,NONE:xg.DiagLogLevel.NONE};function jft(e){if(e==null)return;let t=hbe[e.toUpperCase()];return t??(xg.diag.warn(`Unknown log level "${e}", expected one of ${Object.keys(hbe)}, using default`),xg.DiagLogLevel.INFO)}xU.diagLogLevelFromString=jft});var ybe=M(DU=>{"use strict";m();Object.defineProperty(DU,"__esModule",{value:!0});DU._export=void 0;var Ebe=(He(),Me(tt)),zft=fB();function Hft(e,t){return new Promise(n=>{Ebe.context.with((0,zft.suppressTracing)(Ebe.context.active()),()=>{e.export(t,n)})})}DU._export=Hft});var vr=M(Be=>{"use strict";m();Object.defineProperty(Be,"__esModule",{value:!0});Be.diagLogLevelFromString=Be.BindOnceFuture=Be.urlMatches=Be.isUrlIgnored=Be.callWithTimeout=Be.TimeoutError=Be.merge=Be.TraceState=Be.unsuppressTracing=Be.suppressTracing=Be.isTracingSuppressed=Be.setRPCMetadata=Be.getRPCMetadata=Be.deleteRPCMetadata=Be.RPCType=Be.parseTraceParent=Be.W3CTraceContextPropagator=Be.TRACE_STATE_HEADER=Be.TRACE_PARENT_HEADER=Be.CompositePropagator=Be.otperformance=Be.getStringListFromEnv=Be.getNumberFromEnv=Be.getBooleanFromEnv=Be.getStringFromEnv=Be._globalThis=Be.SDK_INFO=Be.parseKeyPairsIntoRecord=Be.ExportResultCode=Be.unrefTimer=Be.timeInputToHrTime=Be.millisToHrTime=Be.isTimeInputHrTime=Be.isTimeInput=Be.hrTimeToTimeStamp=Be.hrTimeToSeconds=Be.hrTimeToNanoseconds=Be.hrTimeToMilliseconds=Be.hrTimeToMicroseconds=Be.hrTimeDuration=Be.hrTime=Be.getTimeOrigin=Be.addHrTimes=Be.loggingErrorHandler=Be.setGlobalErrorHandler=Be.globalErrorHandler=Be.sanitizeAttributes=Be.isAttributeValue=Be.AnchoredClock=Be.W3CBaggagePropagator=void 0;Be.internal=void 0;var $ft=rge();Object.defineProperty(Be,"W3CBaggagePropagator",{enumerable:!0,get:function(){return $ft.W3CBaggagePropagator}});var qft=oge();Object.defineProperty(Be,"AnchoredClock",{enumerable:!0,get:function(){return qft.AnchoredClock}});var Sbe=cge();Object.defineProperty(Be,"isAttributeValue",{enumerable:!0,get:function(){return Sbe.isAttributeValue}});Object.defineProperty(Be,"sanitizeAttributes",{enumerable:!0,get:function(){return Sbe.sanitizeAttributes}});var Tbe=dge();Object.defineProperty(Be,"globalErrorHandler",{enumerable:!0,get:function(){return Tbe.globalErrorHandler}});Object.defineProperty(Be,"setGlobalErrorHandler",{enumerable:!0,get:function(){return Tbe.setGlobalErrorHandler}});var Vft=rV();Object.defineProperty(Be,"loggingErrorHandler",{enumerable:!0,get:function(){return Vft.loggingErrorHandler}});var Gl=HTe();Object.defineProperty(Be,"addHrTimes",{enumerable:!0,get:function(){return Gl.addHrTimes}});Object.defineProperty(Be,"getTimeOrigin",{enumerable:!0,get:function(){return Gl.getTimeOrigin}});Object.defineProperty(Be,"hrTime",{enumerable:!0,get:function(){return Gl.hrTime}});Object.defineProperty(Be,"hrTimeDuration",{enumerable:!0,get:function(){return Gl.hrTimeDuration}});Object.defineProperty(Be,"hrTimeToMicroseconds",{enumerable:!0,get:function(){return Gl.hrTimeToMicroseconds}});Object.defineProperty(Be,"hrTimeToMilliseconds",{enumerable:!0,get:function(){return Gl.hrTimeToMilliseconds}});Object.defineProperty(Be,"hrTimeToNanoseconds",{enumerable:!0,get:function(){return Gl.hrTimeToNanoseconds}});Object.defineProperty(Be,"hrTimeToSeconds",{enumerable:!0,get:function(){return Gl.hrTimeToSeconds}});Object.defineProperty(Be,"hrTimeToTimeStamp",{enumerable:!0,get:function(){return Gl.hrTimeToTimeStamp}});Object.defineProperty(Be,"isTimeInput",{enumerable:!0,get:function(){return Gl.isTimeInput}});Object.defineProperty(Be,"isTimeInputHrTime",{enumerable:!0,get:function(){return Gl.isTimeInputHrTime}});Object.defineProperty(Be,"millisToHrTime",{enumerable:!0,get:function(){return Gl.millisToHrTime}});Object.defineProperty(Be,"timeInputToHrTime",{enumerable:!0,get:function(){return Gl.timeInputToHrTime}});var Yft=$Te();Object.defineProperty(Be,"unrefTimer",{enumerable:!0,get:function(){return Yft.unrefTimer}});var Kft=qTe();Object.defineProperty(Be,"ExportResultCode",{enumerable:!0,get:function(){return Kft.ExportResultCode}});var Jft=X5();Object.defineProperty(Be,"parseKeyPairsIntoRecord",{enumerable:!0,get:function(){return Jft.parseKeyPairsIntoRecord}});var hS=OV();Object.defineProperty(Be,"SDK_INFO",{enumerable:!0,get:function(){return hS.SDK_INFO}});Object.defineProperty(Be,"_globalThis",{enumerable:!0,get:function(){return hS._globalThis}});Object.defineProperty(Be,"getStringFromEnv",{enumerable:!0,get:function(){return hS.getStringFromEnv}});Object.defineProperty(Be,"getBooleanFromEnv",{enumerable:!0,get:function(){return hS.getBooleanFromEnv}});Object.defineProperty(Be,"getNumberFromEnv",{enumerable:!0,get:function(){return hS.getNumberFromEnv}});Object.defineProperty(Be,"getStringListFromEnv",{enumerable:!0,get:function(){return hS.getStringListFromEnv}});Object.defineProperty(Be,"otperformance",{enumerable:!0,get:function(){return hS.otperformance}});var Zft=YTe();Object.defineProperty(Be,"CompositePropagator",{enumerable:!0,get:function(){return Zft.CompositePropagator}});var NU=ebe();Object.defineProperty(Be,"TRACE_PARENT_HEADER",{enumerable:!0,get:function(){return NU.TRACE_PARENT_HEADER}});Object.defineProperty(Be,"TRACE_STATE_HEADER",{enumerable:!0,get:function(){return NU.TRACE_STATE_HEADER}});Object.defineProperty(Be,"W3CTraceContextPropagator",{enumerable:!0,get:function(){return NU.W3CTraceContextPropagator}});Object.defineProperty(Be,"parseTraceParent",{enumerable:!0,get:function(){return NU.parseTraceParent}});var BU=tbe();Object.defineProperty(Be,"RPCType",{enumerable:!0,get:function(){return BU.RPCType}});Object.defineProperty(Be,"deleteRPCMetadata",{enumerable:!0,get:function(){return BU.deleteRPCMetadata}});Object.defineProperty(Be,"getRPCMetadata",{enumerable:!0,get:function(){return BU.getRPCMetadata}});Object.defineProperty(Be,"setRPCMetadata",{enumerable:!0,get:function(){return BU.setRPCMetadata}});var HV=fB();Object.defineProperty(Be,"isTracingSuppressed",{enumerable:!0,get:function(){return HV.isTracingSuppressed}});Object.defineProperty(Be,"suppressTracing",{enumerable:!0,get:function(){return HV.suppressTracing}});Object.defineProperty(Be,"unsuppressTracing",{enumerable:!0,get:function(){return HV.unsuppressTracing}});var Wft=UV();Object.defineProperty(Be,"TraceState",{enumerable:!0,get:function(){return Wft.TraceState}});var Xft=dbe();Object.defineProperty(Be,"merge",{enumerable:!0,get:function(){return Xft.merge}});var bbe=pbe();Object.defineProperty(Be,"TimeoutError",{enumerable:!0,get:function(){return bbe.TimeoutError}});Object.defineProperty(Be,"callWithTimeout",{enumerable:!0,get:function(){return bbe.callWithTimeout}});var Ibe=mbe();Object.defineProperty(Be,"isUrlIgnored",{enumerable:!0,get:function(){return Ibe.isUrlIgnored}});Object.defineProperty(Be,"urlMatches",{enumerable:!0,get:function(){return Ibe.urlMatches}});var emt=gbe();Object.defineProperty(Be,"BindOnceFuture",{enumerable:!0,get:function(){return emt.BindOnceFuture}});var tmt=_be();Object.defineProperty(Be,"diagLogLevelFromString",{enumerable:!0,get:function(){return tmt.diagLogLevelFromString}});var nmt=ybe();Be.internal={_export:nmt._export}});var Cbe=M(wU=>{"use strict";m();Object.defineProperty(wU,"__esModule",{value:!0});wU.VERSION=void 0;wU.VERSION="0.214.0"});var vbe=M(yB=>{"use strict";m();Object.defineProperty(yB,"__esModule",{value:!0});yB.SeverityNumber=void 0;var rmt;(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"})(rmt=yB.SeverityNumber||(yB.SeverityNumber={}))});var kU=M(GC=>{"use strict";m();Object.defineProperty(GC,"__esModule",{value:!0});GC.NOOP_LOGGER=GC.NoopLogger=void 0;var OU=class{emit(t){}};GC.NoopLogger=OU;GC.NOOP_LOGGER=new OU});var Rbe=M(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 omt(e,t,n){return r=>r===e?t:n}wm.makeGetter=omt;wm.API_BACKWARDS_COMPATIBILITY_VERSION=1});var $V=M(jC=>{"use strict";m();Object.defineProperty(jC,"__esModule",{value:!0});jC.NOOP_LOGGER_PROVIDER=jC.NoopLoggerProvider=void 0;var imt=kU(),PU=class{getLogger(t,n,r){return new imt.NoopLogger}};jC.NoopLoggerProvider=PU;jC.NOOP_LOGGER_PROVIDER=new PU});var xbe=M(MU=>{"use strict";m();Object.defineProperty(MU,"__esModule",{value:!0});MU.ProxyLogger=void 0;var smt=kU(),qV=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):smt.NOOP_LOGGER}};MU.ProxyLogger=qV});var Dbe=M(LU=>{"use strict";m();Object.defineProperty(LU,"__esModule",{value:!0});LU.ProxyLoggerProvider=void 0;var amt=$V(),umt=xbe(),VV=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new umt.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:amt.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)}};LU.ProxyLoggerProvider=VV});var Bbe=M(UU=>{"use strict";m();Object.defineProperty(UU,"__esModule",{value:!0});UU.LogsAPI=void 0;var Vd=Rbe(),cmt=$V(),Nbe=Dbe(),YV=class e{constructor(){this._proxyLoggerProvider=new Nbe.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return Vd._global[Vd.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Vd._global[Vd.GLOBAL_LOGS_API_KEY]=(0,Vd.makeGetter)(Vd.API_BACKWARDS_COMPATIBILITY_VERSION,t,cmt.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=Vd._global[Vd.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(Vd._global,Vd.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete Vd._global[Vd.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new Nbe.ProxyLoggerProvider}};UU.LogsAPI=YV});var KV=M(Om=>{"use strict";m();Object.defineProperty(Om,"__esModule",{value:!0});Om.logs=Om.NoopLogger=Om.NOOP_LOGGER=Om.SeverityNumber=void 0;var lmt=vbe();Object.defineProperty(Om,"SeverityNumber",{enumerable:!0,get:function(){return lmt.SeverityNumber}});var wbe=kU();Object.defineProperty(Om,"NOOP_LOGGER",{enumerable:!0,get:function(){return wbe.NOOP_LOGGER}});Object.defineProperty(Om,"NoopLogger",{enumerable:!0,get:function(){return wbe.NoopLogger}});var dmt=Bbe();Om.logs=dmt.LogsAPI.getInstance()});var Obe=M(zC=>{"use strict";m();Object.defineProperty(zC,"__esModule",{value:!0});zC.disableInstrumentations=zC.enableInstrumentations=void 0;function pmt(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()}}zC.enableInstrumentations=pmt;function fmt(e){e.forEach(t=>t.disable())}zC.disableInstrumentations=fmt});var Mbe=M(QU=>{"use strict";m();Object.defineProperty(QU,"__esModule",{value:!0});QU.registerInstrumentations=void 0;var kbe=(He(),Me(tt)),mmt=KV(),Pbe=Obe();function Amt(e){let t=e.tracerProvider||kbe.trace.getTracerProvider(),n=e.meterProvider||kbe.metrics.getMeterProvider(),r=e.loggerProvider||mmt.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,Pbe.enableInstrumentations)(o,t,n,r),()=>{(0,Pbe.disableInstrumentations)(o)}}QU.registerInstrumentations=Amt});var $be=M(FU=>{"use strict";m();Object.defineProperty(FU,"__esModule",{value:!0});FU.satisfies=void 0;var XV=(He(),Me(tt)),Gbe=/^(?: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-]+)*))?$/,gmt=/^(?<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-]+)*))?$/,hmt={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function _mt(e,t,n){if(!Emt(e))return XV.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=bmt(e);if(!r)return!1;let o=[],i=jbe(r,t,o,n);return i&&!n?.includePrerelease?Smt(r,o):i}FU.satisfies=_mt;function Emt(e){return typeof e=="string"&&Gbe.test(e)}function jbe(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(JV(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=Hmt(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!JV(e,i,n,r))return!1;return!0}return JV(e,t,n,r)}function JV(e,t,n,r){if(t=Tmt(t,r),t.includes(" "))return jbe(e,t,n,r);{let o=Imt(t);return n.push(o),ymt(e,o)}}function ymt(e,t){if(t.invalid)return!1;if(!t.version||WV(t.version))return!0;let n=Ube(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=Ube(r,o)}return hmt[t.op]?.includes(n)}function Smt(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function Tmt(e,t){return e=e.trim(),e=jmt(e,t),e=Gmt(e),e=zmt(e,t),e=e.trim(),e}function $u(e){return!e||e.toLowerCase()==="x"||e==="*"}function bmt(e){let t=e.match(Gbe);if(!t){XV.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 Imt(e){if(!e)return{};let t=e.match(gmt);if(!t)return XV.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 WV(e){return e==="*"||e==="x"||e==="X"}function Lbe(e){let t=parseInt(e,10);return isNaN(t)?e:t}function Cmt(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 vmt(e,t){if(WV(e)||WV(t))return 0;let[n,r]=Cmt(Lbe(e),Lbe(t));return n>r?1:n<r?-1:0}function Ube(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=vmt(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var zbe="[a-zA-Z0-9-]",Hbe="0|[1-9]\\d*",Rmt=`\\d*[a-zA-Z-]${zbe}*`,xmt="((?:<|>)?=?)",Qbe=`(?:${Hbe}|${Rmt})`,Dmt=`(?:-(${Qbe}(?:\\.${Qbe})*))`,Fbe=`${zbe}+`,Nmt=`(?:\\+(${Fbe}(?:\\.${Fbe})*))`,ZV=`${Hbe}|x|X|\\*`,SB=`[v=\\s]*(${ZV})(?:\\.(${ZV})(?:\\.(${ZV})(?:${Dmt})?${Nmt}?)?)?`,Bmt=`^${xmt}\\s*${SB}$`,wmt=new RegExp(Bmt),Omt=`^\\s*(${SB})\\s+-\\s+(${SB})\\s*$`,kmt=new RegExp(Omt),Pmt="(?:~>?)",Mmt=`^${Pmt}${SB}$`,Lmt=new RegExp(Mmt),Umt="(?:\\^)",Qmt=`^${Umt}${SB}$`,Fmt=new RegExp(Qmt);function Gmt(e){let t=Lmt;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 jmt(e,t){let n=Fmt,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,s,u,l)=>{let f;return $u(i)?f="":$u(s)?f=`>=${i}.0.0${r} <${+i+1}.0.0-0`:$u(u)?i==="0"?f=`>=${i}.${s}.0${r} <${i}.${+s+1}.0-0`:f=`>=${i}.${s}.0${r} <${+i+1}.0.0-0`:l?i==="0"?s==="0"?f=`>=${i}.${s}.${u}-${l} <${i}.${s}.${+u+1}-0`:f=`>=${i}.${s}.${u}-${l} <${i}.${+s+1}.0-0`:f=`>=${i}.${s}.${u}-${l} <${+i+1}.0.0-0`:i==="0"?s==="0"?f=`>=${i}.${s}.${u}${r} <${i}.${s}.${+u+1}-0`:f=`>=${i}.${s}.${u}${r} <${i}.${+s+1}.0-0`:f=`>=${i}.${s}.${u} <${+i+1}.0.0-0`,f})}function zmt(e,t){let n=wmt;return e.replace(n,(r,o,i,s,u,l)=>{let f=$u(i),h=f||$u(s),_=h||$u(u),y=_;return o==="="&&y&&(o=""),l=t?.includePrerelease?"-0":"",f?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&y?(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`:_&&(r=`>=${i}.${s}.0${l} <${i}.${+s+1}.0-0`),r})}function Hmt(e,t){let n=kmt;return e.replace(n,(r,o,i,s,u,l,f,h,_,y,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(_)?h="":$u(y)?h=`<${+_+1}.0.0-0`:$u(T)?h=`<${_}.${+y+1}.0-0`:v?h=`<=${_}.${y}.${T}-${v}`:t?.includePrerelease?h=`<${_}.${y}.${+T+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var e7=M(xa=>{"use strict";m();Object.defineProperty(xa,"__esModule",{value:!0});xa.massUnwrap=xa.unwrap=xa.massWrap=xa.wrap=void 0;var qu=console.error.bind(console);function TB(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 $mt=(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 TB(o,"__original",r),TB(o,"__unwrap",()=>{e[t]===o&&TB(e,t,r)}),TB(o,"__wrapped",!0),TB(e,t,o),o};xa.wrap=$mt;var qmt=(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,xa.wrap)(r,o,n)})})};xa.massWrap=qmt;var Vmt=(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}};xa.unwrap=Vmt;var Ymt=(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,xa.unwrap)(n,r)})})};xa.massUnwrap=Ymt;function bB(e){e&&e.logger&&(typeof e.logger!="function"?qu("new logger isn't a function, not replacing"):qu=e.logger)}xa.default=bB;bB.wrap=xa.wrap;bB.massWrap=xa.massWrap;bB.unwrap=xa.unwrap;bB.massUnwrap=xa.massUnwrap});var qbe=M(jU=>{"use strict";m();Object.defineProperty(jU,"__esModule",{value:!0});jU.InstrumentationAbstract=void 0;var t7=(He(),Me(tt)),Kmt=KV(),GU=e7(),n7=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=t7.diag.createComponentLogger({namespace:t}),this._tracer=t7.trace.getTracer(t,n),this._meter=t7.metrics.getMeter(t,n),this._logger=Kmt.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=GU.wrap;_unwrap=GU.unwrap;_massWrap=GU.massWrap;_massUnwrap=GU.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)}}};jU.InstrumentationAbstract=n7});var Ybe=M((iun,Vbe)=>{m();var HC=1e3,$C=HC*60,qC=$C*60,_S=qC*24,Jmt=_S*7,Zmt=_S*365.25;Vbe.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?eAt(e):Xmt(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*Zmt;case"weeks":case"week":case"w":return n*Jmt;case"days":case"day":case"d":return n*_S;case"hours":case"hour":case"hrs":case"hr":case"h":return n*qC;case"minutes":case"minute":case"mins":case"min":case"m":return n*$C;case"seconds":case"second":case"secs":case"sec":case"s":return n*HC;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function Xmt(e){var t=Math.abs(e);return t>=_S?Math.round(e/_S)+"d":t>=qC?Math.round(e/qC)+"h":t>=$C?Math.round(e/$C)+"m":t>=HC?Math.round(e/HC)+"s":e+"ms"}function eAt(e){var t=Math.abs(e);return t>=_S?zU(e,t,_S,"day"):t>=qC?zU(e,t,qC,"hour"):t>=$C?zU(e,t,$C,"minute"):t>=HC?zU(e,t,HC,"second"):e+" ms"}function zU(e,t,n,r){var o=t>=n*1.5;return Math.round(e/n)+" "+r+(o?"s":"")}});var r7=M((aun,Kbe)=>{m();function tAt(e){n.debug=n,n.default=n,n.coerce=l,n.disable=s,n.enable=o,n.enabled=u,n.humanize=Ybe(),n.destroy=f,Object.keys(e).forEach(h=>{n[h]=e[h]}),n.names=[],n.skips=[],n.formatters={};function t(h){let _=0;for(let y=0;y<h.length;y++)_=(_<<5)-_+h.charCodeAt(y),_|=0;return n.colors[Math.abs(_)%n.colors.length]}n.selectColor=t;function n(h){let _,y=null,T,v;function R(...x){if(!R.enabled)return;let O=R,P=Number(new Date),j=P-(_||P);O.diff=j,O.prev=_,O.curr=P,_=P,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 re=n.formatters[ae];if(typeof re=="function"){let _e=x[G];V=re.call(O,_e),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:()=>y!==null?y:(T!==n.namespaces&&(T=n.namespaces,v=n.enabled(h)),v),set:x=>{y=x}}),typeof n.init=="function"&&n.init(R),R}function r(h,_){let y=n(this.namespace+(typeof _>"u"?":":_)+h);return y.log=this.log,y}function o(h){n.save(h),n.namespaces=h,n.names=[],n.skips=[];let _=(typeof h=="string"?h:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let y of _)y[0]==="-"?n.skips.push(y.slice(1)):n.names.push(y)}function i(h,_){let y=0,T=0,v=-1,R=0;for(;y<h.length;)if(T<_.length&&(_[T]===h[y]||_[T]==="*"))_[T]==="*"?(v=T,R=y,T++):(y++,T++);else if(v!==-1)T=v+1,R++,y=R;else return!1;for(;T<_.length&&_[T]==="*";)T++;return T===_.length}function s(){let h=[...n.names,...n.skips.map(_=>"-"+_)].join(",");return n.enable(""),h}function u(h){for(let _ of n.skips)if(i(h,_))return!1;for(let _ of n.names)if(i(h,_))return!0;return!1}function l(h){return h instanceof Error?h.stack||h.message:h}function f(){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}Kbe.exports=tAt});var Jbe=M((Gc,HU)=>{m();Gc.formatArgs=rAt;Gc.save=oAt;Gc.load=iAt;Gc.useColors=nAt;Gc.storage=sAt();Gc.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`."))}})();Gc.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 nAt(){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 rAt(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+HU.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)}Gc.log=console.debug||console.log||(()=>{});function oAt(e){try{e?Gc.storage.setItem("debug",e):Gc.storage.removeItem("debug")}catch{}}function iAt(){let e;try{e=Gc.storage.getItem("debug")||Gc.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function sAt(){try{return localStorage}catch{}}HU.exports=r7()(Gc);var{formatters:aAt}=HU.exports;aAt.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Wbe=M((lun,Zbe)=>{"use strict";m();Zbe.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 tIe=M((pun,eIe)=>{"use strict";m();var uAt=Ue("os"),Xbe=Ue("tty"),Yd=Wbe(),{env:Xs}=process,N_;Yd("no-color")||Yd("no-colors")||Yd("color=false")||Yd("color=never")?N_=0:(Yd("color")||Yd("colors")||Yd("color=true")||Yd("color=always"))&&(N_=1);"FORCE_COLOR"in Xs&&(Xs.FORCE_COLOR==="true"?N_=1:Xs.FORCE_COLOR==="false"?N_=0:N_=Xs.FORCE_COLOR.length===0?1:Math.min(parseInt(Xs.FORCE_COLOR,10),3));function o7(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function i7(e,t){if(N_===0)return 0;if(Yd("color=16m")||Yd("color=full")||Yd("color=truecolor"))return 3;if(Yd("color=256"))return 2;if(e&&!t&&N_===void 0)return 0;let n=N_||0;if(Xs.TERM==="dumb")return n;if(process.platform==="win32"){let r=uAt.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in Xs)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(r=>r in Xs)||Xs.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in Xs)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Xs.TEAMCITY_VERSION)?1:0;if(Xs.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Xs){let r=parseInt((Xs.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Xs.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Xs.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Xs.TERM)||"COLORTERM"in Xs?1:n}function cAt(e){let t=i7(e,e&&e.isTTY);return o7(t)}eIe.exports={supportsColor:cAt,stdout:o7(i7(!0,Xbe.isatty(1))),stderr:o7(i7(!0,Xbe.isatty(2)))}});var rIe=M((ea,qU)=>{m();var lAt=Ue("tty"),$U=Ue("util");ea.init=hAt;ea.log=mAt;ea.formatArgs=pAt;ea.save=AAt;ea.load=gAt;ea.useColors=dAt;ea.destroy=$U.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");ea.colors=[6,2,3,4,5,1];try{let e=tIe();e&&(e.stderr||e).level>=2&&(ea.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{}ea.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 dAt(){return"colors"in ea.inspectOpts?!!ea.inspectOpts.colors:lAt.isatty(process.stderr.fd)}function pAt(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 wtt=Object.create;var ML=Object.defineProperty;var Ott=Object.getOwnPropertyDescriptor;var ktt=Object.getOwnPropertyNames;var Ptt=Object.getPrototypeOf,Mtt=Object.prototype.hasOwnProperty;var Ue=(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 M=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},Zs=(e,t)=>{for(var n in t)ML(e,n,{get:t[n],enumerable:!0})},sAe=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ktt(t))!Mtt.call(e,o)&&o!==n&&ML(e,o,{get:()=>t[o],enumerable:!(r=Ott(t,o))||r.enumerable});return e};var ue=(e,t,n)=>(n=e!=null?wtt(Ptt(e)):{},sAe(t||!e||!e.__esModule?ML(n,"default",{value:e,enumerable:!0}):n,e)),Me=e=>sAe(ML({},"__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.197"}}catch{}})()});var Ig,g5=w(()=>{m();Ig="1.9.1"});function Ltt(e){let t=new Set([e]),n=new Set,r=e.match(cAe);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 f=l.match(cAe);if(!f)return i(l);let h={major:+f[1],minor:+f[2],patch:+f[3],prerelease:f[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 cAe,lAe,dAe=w(()=>{m();g5();cAe=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;lAe=Ltt(Ig)});function vm(e,t,n,r=!1){var o;let i=sB[iB]=(o=sB[iB])!==null&&o!==void 0?o:{version:Ig};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!==Ig){let s=new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${Ig}`);return n.error(s.stack||s.message),!1}return i[e]=t,n.debug(`@opentelemetry/api: Registered a global for ${e} v${Ig}.`),!0}function Ul(e){var t,n;let r=(t=sB[iB])===null||t===void 0?void 0:t.version;if(!(!r||!lAe(r)))return(n=sB[iB])===null||n===void 0?void 0:n[e]}function Rm(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${Ig}.`);let n=sB[iB];n&&delete n[e]}var Utt,iB,sB,uS=w(()=>{m();g5();dAe();Utt=Ig.split(".")[0],iB=Symbol.for(`opentelemetry.js.api.${Utt}`),sB=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});function aB(e,t,n){let r=Ul("diag");if(r)return r[e](t,...n)}var LL,pAe=w(()=>{m();uS();LL=class{constructor(t){this._namespace=t.namespace||"DiagComponentLogger"}debug(...t){return aB("debug",this._namespace,t)}error(...t){return aB("error",this._namespace,t)}info(...t){return aB("info",this._namespace,t)}warn(...t){return aB("warn",this._namespace,t)}verbose(...t){return aB("verbose",this._namespace,t)}}});var Cs,UL=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"})(Cs||(Cs={}))});function fAe(e,t){e<Cs.NONE?e=Cs.NONE:e>Cs.ALL&&(e=Cs.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",Cs.ERROR),warn:n("warn",Cs.WARN),info:n("info",Cs.INFO),debug:n("debug",Cs.DEBUG),verbose:n("verbose",Cs.VERBOSE)}}var mAe=w(()=>{m();UL()});var Qtt,Ws,cS=w(()=>{m();pAe();mAe();UL();uS();Qtt="diag",Ws=class e{static instance(){return this._instance||(this._instance=new e),this._instance}constructor(){function t(o){return function(...i){let s=Ul("diag");if(s)return s[o](...i)}}let n=this,r=(o,i={logLevel:Cs.INFO})=>{var s,u,l;if(o===n){let _=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=_.stack)!==null&&s!==void 0?s:_.message),!1}typeof i=="number"&&(i={logLevel:i});let f=Ul("diag"),h=fAe((u=i.logLevel)!==null&&u!==void 0?u:Cs.INFO,o);if(f&&!i.suppressOverrideMessage){let _=(l=new Error().stack)!==null&&l!==void 0?l:"<failed to generate stacktrace>";f.warn(`Current logger will be overwritten from ${_}`),h.warn(`Current logger will overwrite one already registered from ${_}`)}return vm("diag",h,n,!0)};n.setLogger=r,n.disable=()=>{Rm(Qtt,n)},n.createComponentLogger=o=>new LL(o),n.verbose=t("verbose"),n.debug=t("debug"),n.info=t("info"),n.warn=t("warn"),n.error=t("error")}}});var QL,AAe=w(()=>{m();QL=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 gAe,hAe=w(()=>{m();gAe=Symbol("BaggageEntryMetadata")});function _Ae(e={}){return new QL(new Map(Object.entries(e)))}function EAe(e){return typeof e!="string"&&(Ftt.error(`Cannot create baggage metadata from unknown type: ${typeof e}`),e=""),{__TYPE__:gAe,toString(){return e}}}var Ftt,h5=w(()=>{m();cS();AAe();hAe();Ftt=Ws.instance()});function Ql(e){return Symbol.for(e)}var _5,BC,uB=w(()=>{m();_5=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}}},BC=new _5});var E5,y5,FL,yAe=w(()=>{m();E5=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],y5={};if(typeof console<"u"){let e=["error","warn","info","debug","trace","log"];for(let t of e)typeof console[t]=="function"&&(y5[t]=console[t])}FL=class{constructor(){function t(n){return function(...r){let o=y5[n];if(typeof o!="function"&&(o=y5.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<E5.length;n++)this[E5[n].n]=t(E5[n].c)}}});function SAe(){return D5}var S5,wC,T5,b5,I5,C5,cB,v5,R5,x5,D5,Gtt,jtt,ztt,Htt,$tt,qtt,Vtt,N5=w(()=>{m();S5=class{constructor(){}createGauge(t,n){return jtt}createHistogram(t,n){return ztt}createCounter(t,n){return Gtt}createUpDownCounter(t,n){return Htt}createObservableGauge(t,n){return qtt}createObservableCounter(t,n){return $tt}createObservableUpDownCounter(t,n){return Vtt}addBatchObservableCallback(t,n){}removeBatchObservableCallback(t){}},wC=class{},T5=class extends wC{add(t,n){}},b5=class extends wC{add(t,n){}},I5=class extends wC{record(t,n){}},C5=class extends wC{record(t,n){}},cB=class{addCallback(t){}removeCallback(t){}},v5=class extends cB{},R5=class extends cB{},x5=class extends cB{},D5=new S5,Gtt=new T5,jtt=new I5,ztt=new C5,Htt=new b5,$tt=new v5,qtt=new R5,Vtt=new x5});var GL,TAe=w(()=>{m();(function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"})(GL||(GL={}))});var jL,zL,B5=w(()=>{m();jL={get(e,t){if(e!=null)return e[t]},keys(e){return e==null?[]:Object.keys(e)}},zL={set(e,t,n){e!=null&&(e[t]=n)}}});var HL,bAe=w(()=>{m();uB();HL=class{active(){return BC}with(t,n,r,...o){return n.call(r,...o)}bind(t,n){return n}enable(){return this}disable(){return this}}});var w5,Ytt,xm,lB=w(()=>{m();bAe();uS();cS();w5="context",Ytt=new HL,xm=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalContextManager(t){return vm(w5,t,Ws.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 Ul(w5)||Ytt}disable(){this._getContextManager().disable(),Rm(w5,Ws.instance())}}});var iu,O5=w(()=>{m();(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(iu||(iu={}))});var dB,lS,$L,qL=w(()=>{m();O5();dB="0000000000000000",lS="00000000000000000000000000000000",$L={traceId:lS,spanId:dB,traceFlags:iu.NONE}});var Dm,VL=w(()=>{m();qL();Dm=class{constructor(t=$L){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 YL(e){return e.getValue(k5)||void 0}function IAe(){return YL(xm.getInstance().active())}function pB(e,t){return e.setValue(k5,t)}function CAe(e){return e.deleteValue(k5)}function vAe(e,t){return pB(e,new Dm(t))}function KL(e){var t;return(t=YL(e))===null||t===void 0?void 0:t.spanContext()}var k5,P5=w(()=>{m();uB();VL();lB();k5=Ql("OpenTelemetry Context Key SPAN")});function RAe(e,t){if(typeof e!="string"||e.length!==t)return!1;let n=0;for(let r=0;r<e.length;r+=4)n+=(JL[e.charCodeAt(r)]|0)+(JL[e.charCodeAt(r+1)]|0)+(JL[e.charCodeAt(r+2)]|0)+(JL[e.charCodeAt(r+3)]|0);return n===t}function M5(e){return RAe(e,32)&&e!==lS}function L5(e){return RAe(e,16)&&e!==dB}function Cg(e){return M5(e.traceId)&&L5(e.spanId)}function xAe(e){return new Dm(e)}var JL,ZL=w(()=>{m();qL();VL();JL=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 Ktt(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 U5,OC,Q5=w(()=>{m();lB();P5();VL();ZL();U5=xm.getInstance(),OC=class{startSpan(t,n,r=U5.active()){if(!!n?.root)return new Dm;let i=r&&KL(r);return Ktt(i)&&Cg(i)?new Dm(i):new Dm}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??U5.active(),f=this.startSpan(t,i,l),h=pB(l,f);return U5.with(h,u,void 0,f)}}});var Jtt,kC,F5=w(()=>{m();Q5();Jtt=new OC,kC=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):Jtt}}});var WL,DAe=w(()=>{m();Q5();WL=class{getTracer(t,n,r){return new OC}}});var Ztt,dS,G5=w(()=>{m();F5();DAe();Ztt=new WL,dS=class{getTracer(t,n,r){var o;return(o=this.getDelegateTracer(t,n,r))!==null&&o!==void 0?o:new kC(this,t,n,r)}getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:Ztt}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 XL,NAe=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"})(XL||(XL={}))});var fo,BAe=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"})(fo||(fo={}))});var Ai,wAe=w(()=>{m();(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(Ai||(Ai={}))});function OAe(e){return ent.test(e)}function kAe(e){return tnt.test(e)&&!nnt.test(e)}var j5,Wtt,Xtt,ent,tnt,nnt,PAe=w(()=>{m();j5="[_0-9a-z-*/]",Wtt=`[a-z]${j5}{0,255}`,Xtt=`[a-z0-9]${j5}{0,240}@[a-z]${j5}{0,13}`,ent=new RegExp(`^(?:${Wtt}|${Xtt})$`),tnt=/^[ -~]{0,255}[!-~]$/,nnt=/,|=/});var MAe,rnt,LAe,UAe,eU,QAe=w(()=>{m();PAe();MAe=32,rnt=512,LAe=",",UAe="=",eU=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+UAe+this.get(n)),t),[]).join(LAe)}_parse(t){t.length>rnt||(this._internalState=t.split(LAe).reduceRight((n,r)=>{let o=r.trim(),i=o.indexOf(UAe);if(i!==-1){let s=o.slice(0,i),u=o.slice(i+1,r.length);OAe(s)&&kAe(u)&&n.set(s,u)}return n},new Map),this._internalState.size>MAe&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,MAe))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}}});function FAe(e){return new eU(e)}var GAe=w(()=>{m();QAe()});var We,jAe=w(()=>{m();lB();We=xm.getInstance()});var Fl,zAe=w(()=>{m();cS();Fl=Ws.instance()});var z5,HAe,$Ae=w(()=>{m();N5();z5=class{getMeter(t,n,r){return D5}},HAe=new z5});var H5,tU,qAe=w(()=>{m();$Ae();uS();cS();H5="metrics",tU=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalMeterProvider(t){return vm(H5,t,Ws.instance())}getMeterProvider(){return Ul(H5)||HAe}getMeter(t,n,r){return this.getMeterProvider().getMeter(t,n,r)}disable(){Rm(H5,Ws.instance())}}});var $5,VAe=w(()=>{m();qAe();$5=tU.getInstance()});var nU,YAe=w(()=>{m();nU=class{inject(t,n){}extract(t,n){return t}fields(){return[]}}});function V5(e){return e.getValue(q5)||void 0}function KAe(){return V5(xm.getInstance().active())}function JAe(e,t){return e.setValue(q5,t)}function ZAe(e){return e.deleteValue(q5)}var q5,WAe=w(()=>{m();lB();uB();q5=Ql("OpenTelemetry Baggage Key")});var Y5,ont,rU,XAe=w(()=>{m();uS();YAe();B5();WAe();h5();cS();Y5="propagation",ont=new nU,rU=class e{constructor(){this.createBaggage=_Ae,this.getBaggage=V5,this.getActiveBaggage=KAe,this.setBaggage=JAe,this.deleteBaggage=ZAe}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalPropagator(t){return vm(Y5,t,Ws.instance())}inject(t,n,r=zL){return this._getGlobalPropagator().inject(t,n,r)}extract(t,n,r=jL){return this._getGlobalPropagator().extract(t,n,r)}fields(){return this._getGlobalPropagator().fields()}disable(){Rm(Y5,Ws.instance())}_getGlobalPropagator(){return Ul(Y5)||ont}}});var mf,ege=w(()=>{m();XAe();mf=rU.getInstance()});var K5,oU,tge=w(()=>{m();uS();G5();ZL();P5();cS();K5="trace",oU=class e{constructor(){this._proxyTracerProvider=new dS,this.wrapSpanContext=xAe,this.isSpanContextValid=Cg,this.deleteSpan=CAe,this.getSpan=YL,this.getActiveSpan=IAe,this.getSpanContext=KL,this.setSpan=pB,this.setSpanContext=vAe}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalTracerProvider(t){let n=vm(K5,this._proxyTracerProvider,Ws.instance());return n&&this._proxyTracerProvider.setDelegate(t),n}getTracerProvider(){return Ul(K5)||this._proxyTracerProvider}getTracer(t,n){return this.getTracerProvider().getTracer(t,n)}disable(){Rm(K5,Ws.instance()),this._proxyTracerProvider=new dS}}});var Vt,nge=w(()=>{m();tge();Vt=oU.getInstance()});var tt={};Zs(tt,{DiagConsoleLogger:()=>FL,DiagLogLevel:()=>Cs,INVALID_SPANID:()=>dB,INVALID_SPAN_CONTEXT:()=>$L,INVALID_TRACEID:()=>lS,ProxyTracer:()=>kC,ProxyTracerProvider:()=>dS,ROOT_CONTEXT:()=>BC,SamplingDecision:()=>XL,SpanKind:()=>fo,SpanStatusCode:()=>Ai,TraceFlags:()=>iu,ValueType:()=>GL,baggageEntryMetadataFromString:()=>EAe,context:()=>We,createContextKey:()=>Ql,createNoopMeter:()=>SAe,createTraceState:()=>FAe,default:()=>int,defaultTextMapGetter:()=>jL,defaultTextMapSetter:()=>zL,diag:()=>Fl,isSpanContextValid:()=>Cg,isValidSpanId:()=>L5,isValidTraceId:()=>M5,metrics:()=>$5,propagation:()=>mf,trace:()=>Vt});var int,He=w(()=>{m();h5();uB();yAe();UL();N5();TAe();B5();F5();G5();NAe();BAe();wAe();O5();GAe();ZL();qL();jAe();zAe();VAe();ege();nge();int={context:We,diag:Fl,metrics:$5,propagation:mf,trace:Vt}});var fB=M(R_=>{"use strict";m();Object.defineProperty(R_,"__esModule",{value:!0});R_.isTracingSuppressed=R_.unsuppressTracing=R_.suppressTracing=void 0;var snt=(He(),Me(tt)),J5=(0,snt.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function ant(e){return e.setValue(J5,!0)}R_.suppressTracing=ant;function unt(e){return e.deleteValue(J5)}R_.unsuppressTracing=unt;function cnt(e){return e.getValue(J5)===!0}R_.isTracingSuppressed=cnt});var Z5=M(su=>{"use strict";m();Object.defineProperty(su,"__esModule",{value:!0});su.BAGGAGE_MAX_TOTAL_LENGTH=su.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=su.BAGGAGE_MAX_NAME_VALUE_PAIRS=su.BAGGAGE_HEADER=su.BAGGAGE_ITEMS_SEPARATOR=su.BAGGAGE_PROPERTIES_SEPARATOR=su.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;su.BAGGAGE_KEY_PAIR_SEPARATOR="=";su.BAGGAGE_PROPERTIES_SEPARATOR=";";su.BAGGAGE_ITEMS_SEPARATOR=",";su.BAGGAGE_HEADER="baggage";su.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;su.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;su.BAGGAGE_MAX_TOTAL_LENGTH=8192});var X5=M(qd=>{"use strict";m();Object.defineProperty(qd,"__esModule",{value:!0});qd.parseKeyPairsIntoRecord=qd.parseBaggageHeaderString=qd.parsePairKeyValue=qd.getKeyPairs=qd.serializeKeyPairs=void 0;var lnt=(He(),Me(tt)),Nm=Z5();function dnt(e){return e.reduce((t,n)=>{let r=`${t}${t!==""?Nm.BAGGAGE_ITEMS_SEPARATOR:""}${n}`;return r.length>Nm.BAGGAGE_MAX_TOTAL_LENGTH?t:r},"")}qd.serializeKeyPairs=dnt;function pnt(e){return e.getAllEntries().map(([t,n])=>{let r=`${encodeURIComponent(t)}=${encodeURIComponent(n.value)}`;return n.metadata!==void 0&&(r+=Nm.BAGGAGE_PROPERTIES_SEPARATOR+n.metadata.toString()),r})}qd.getKeyPairs=pnt;function W5(e){if(!e)return;let t=e.indexOf(Nm.BAGGAGE_PROPERTIES_SEPARATOR),n=t===-1?e:e.substring(0,t),r=n.indexOf(Nm.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 f=e.substring(t+1);l=(0,lnt.baggageEntryMetadataFromString)(f)}return{key:s,value:u,metadata:l}}qd.parsePairKeyValue=W5;function fnt(e,t,n,r){let o=0;for(;o<e.length&&n<Nm.BAGGAGE_MAX_NAME_VALUE_PAIRS;){let i=e.indexOf(Nm.BAGGAGE_ITEMS_SEPARATOR,o),s=i===-1?e.length:i,u=s-o;if(u<=Nm.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS){let l=W5(e.substring(o,s));if(l){let f=(n===0?0:1)+u;if(r+f>Nm.BAGGAGE_MAX_TOTAL_LENGTH)break;t[l.key]=l.metadata?{value:l.value,metadata:l.metadata}:{value:l.value},n++,r+=f}}if(i===-1)break;o=i+1}return[n,r]}qd.parseBaggageHeaderString=fnt;function mnt(e){let t={};return typeof e=="string"&&e.length>0&&e.split(Nm.BAGGAGE_ITEMS_SEPARATOR).forEach(n=>{let r=W5(n);r!==void 0&&r.value.length>0&&(t[r.key]=r.value)}),t}qd.parseKeyPairsIntoRecord=mnt});var rge=M(sU=>{"use strict";m();Object.defineProperty(sU,"__esModule",{value:!0});sU.W3CBaggagePropagator=void 0;var eV=(He(),Me(tt)),Ant=fB(),mB=Z5(),iU=X5(),tV=class{inject(t,n,r){let o=eV.propagation.getBaggage(t);if(!o||(0,Ant.isTracingSuppressed)(t))return;let i=(0,iU.getKeyPairs)(o).filter(u=>u.length<=mB.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,mB.BAGGAGE_MAX_NAME_VALUE_PAIRS),s=(0,iU.serializeKeyPairs)(i);s.length>0&&r.set(n,mB.BAGGAGE_HEADER,s)}extract(t,n,r){let o=r.get(n,mB.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,iU.parseBaggageHeaderString)(o[l],i,s,u);else[s]=(0,iU.parseBaggageHeaderString)(o,i,s,u);return s===0?t:eV.propagation.setBaggage(t,eV.propagation.createBaggage(i))}fields(){return[mB.BAGGAGE_HEADER]}};sU.W3CBaggagePropagator=tV});var oge=M(aU=>{"use strict";m();Object.defineProperty(aU,"__esModule",{value:!0});aU.AnchoredClock=void 0;var nV=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}};aU.AnchoredClock=nV});var cge=M(x_=>{"use strict";m();Object.defineProperty(x_,"__esModule",{value:!0});x_.isAttributeValue=x_.isAttributeKey=x_.sanitizeAttributes=void 0;var ige=(He(),Me(tt));function gnt(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(!sge(n)){ige.diag.warn(`Invalid attribute key: ${n}`);continue}let r=e[n];if(!age(r)){ige.diag.warn(`Invalid attribute value set for key: ${n}`);continue}Array.isArray(r)?t[n]=r.slice():t[n]=r}return t}x_.sanitizeAttributes=gnt;function sge(e){return typeof e=="string"&&e!==""}x_.isAttributeKey=sge;function age(e){return e==null?!0:Array.isArray(e)?hnt(e):uge(typeof e)}x_.isAttributeValue=age;function hnt(e){let t;for(let n of e){if(n==null)continue;let r=typeof n;if(r!==t){if(!t){if(uge(r)){t=r;continue}return!1}return!1}}return!0}function uge(e){switch(e){case"number":case"boolean":case"string":return!0}return!1}});var rV=M(uU=>{"use strict";m();Object.defineProperty(uU,"__esModule",{value:!0});uU.loggingErrorHandler=void 0;var _nt=(He(),Me(tt));function Ent(){return e=>{_nt.diag.error(ynt(e))}}uU.loggingErrorHandler=Ent;function ynt(e){return typeof e=="string"?e:JSON.stringify(Snt(e))}function Snt(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 dge=M(PC=>{"use strict";m();Object.defineProperty(PC,"__esModule",{value:!0});PC.globalErrorHandler=PC.setGlobalErrorHandler=void 0;var Tnt=rV(),lge=(0,Tnt.loggingErrorHandler)();function bnt(e){lge=e}PC.setGlobalErrorHandler=bnt;function Int(e){try{lge(e)}catch{}}PC.globalErrorHandler=Int});var Age=M(Bm=>{"use strict";m();Object.defineProperty(Bm,"__esModule",{value:!0});Bm.getStringListFromEnv=Bm.getBooleanFromEnv=Bm.getStringFromEnv=Bm.getNumberFromEnv=void 0;var pge=(He(),Me(tt)),fge=Ue("util");function Cnt(e){let t=process.env[e];if(t==null||t.trim()==="")return;let n=Number(t);if(isNaN(n)){pge.diag.warn(`Unknown value ${(0,fge.inspect)(t)} for ${e}, expected a number, using defaults`);return}return n}Bm.getNumberFromEnv=Cnt;function mge(e){let t=process.env[e];if(!(t==null||t.trim()===""))return t}Bm.getStringFromEnv=mge;function vnt(e){let t=process.env[e]?.trim().toLowerCase();return t==null||t===""?!1:t==="true"?!0:(t==="false"||pge.diag.warn(`Unknown value ${(0,fge.inspect)(t)} for ${e}, expected 'true' or 'false', falling back to 'false' (default)`),!1)}Bm.getBooleanFromEnv=vnt;function Rnt(e){return mge(e)?.split(",").map(t=>t.trim()).filter(t=>t!=="")}Bm.getStringListFromEnv=Rnt});var gge=M(cU=>{"use strict";m();Object.defineProperty(cU,"__esModule",{value:!0});cU._globalThis=void 0;cU._globalThis=globalThis});var hge=M(lU=>{"use strict";m();Object.defineProperty(lU,"__esModule",{value:!0});lU.VERSION=void 0;lU.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 oV=w(()=>{m()});var _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,k_e,P_e,M_e,L_e,xnt,iV,Dnt,Nnt,Bnt,wnt,sV,Ont,knt,Pnt,Mnt,Lnt,Unt,Qnt,Fnt,Gnt,jnt,znt,Hnt,$nt,qnt,Vnt,Ynt,Knt,Jnt,aV,Znt,Wnt,Xnt,ert,trt,nrt,rrt,ort,irt,srt,art,urt,uV,crt,lrt,cV,lV,drt,prt,frt,mrt,Art,grt,hrt,_rt,Ert,yrt,Srt,Trt,brt,Irt,Crt,vrt,Rrt,AB,MC,dV,xrt,Drt,pS,Nrt,Brt,wrt,Ort,pV,fV,krt,mV,Prt,Mrt,Lrt,Urt,Qrt,Frt,Grt,jrt,zrt,Hrt,$rt,qrt,Vrt,Yrt,Krt,Jrt,Zrt,Wrt,Xrt,eot,tot,not,rot,AV,oot,iot,sot,aot,uot,cot,lot,dot,pot,fot,mot,Aot,got,hot,_ot,Eot,yot,Sot,Tot,gV,bot,hV,Iot,Cot,vot,Rot,xot,Dot,Not,Bot,wot,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,REe,xEe,DEe,NEe,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,ait,uit,cit,lit,dit,pit,fit,mit,Ait,git,hit,_it,Eit,yit,Sit,Tit,bit,Iit,Cit,vit,BEe,wEe,OEe,kEe,PEe,MEe,LEe,UEe,QEe,FEe,GEe,Rit,xit,Dit,Nit,Bit,wit,Oit,kit,Pit,Mit,Lit,Uit,jEe,zEe,HEe,$Ee,qEe,Qit,Fit,Git,jit,zit,Hit,VEe,YEe,KEe,$it,qit,Vit,Yit,JEe,ZEe,WEe,XEe,Kit,Jit,Zit,Wit,Xit,e0e,t0e,n0e,r0e,o0e,i0e,s0e,est,tst,nst,rst,ost,ist,sst,ast,a0e,u0e,c0e,l0e,d0e,ust,cst,lst,dst,pst,fst,p0e,f0e,m0e,A0e,g0e,h0e,_0e,E0e,y0e,S0e,T0e,b0e,I0e,C0e,v0e,R0e,x0e,D0e,N0e,B0e,w0e,mst,Ast,gst,hst,_st,Est,yst,Sst,Tst,bst,Ist,Cst,vst,Rst,xst,Dst,Nst,Bst,wst,Ost,kst,Pst,O0e,k0e,P0e,M0e,L0e,Mst,Lst,Ust,Qst,Fst,Gst,U0e,Q0e,jst,zst,Hst,F0e,G0e,$st,qst,Vst,j0e,z0e,H0e,$0e,q0e,V0e,Y0e,K0e,J0e,Z0e,W0e,X0e,eye,tye,nye,rye,oye,Yst,Kst,Jst,Zst,Wst,Xst,eat,tat,nat,rat,oat,iat,sat,aat,uat,cat,lat,dat,iye,sye,pat,fat,mat,aye=w(()=>{m();oV();_ge="aws.lambda.invoked_arn",Ege="db.system",yge="db.connection_string",Sge="db.user",Tge="db.jdbc.driver_classname",bge="db.name",Ige="db.statement",Cge="db.operation",vge="db.mssql.instance_name",Rge="db.cassandra.keyspace",xge="db.cassandra.page_size",Dge="db.cassandra.consistency_level",Nge="db.cassandra.table",Bge="db.cassandra.idempotence",wge="db.cassandra.speculative_execution_count",Oge="db.cassandra.coordinator.id",kge="db.cassandra.coordinator.dc",Pge="db.hbase.namespace",Mge="db.redis.database_index",Lge="db.mongodb.collection",Uge="db.sql.table",Qge="exception.type",Fge="exception.message",Gge="exception.stacktrace",jge="exception.escaped",zge="faas.trigger",Hge="faas.execution",$ge="faas.document.collection",qge="faas.document.operation",Vge="faas.document.time",Yge="faas.document.name",Kge="faas.time",Jge="faas.cron",Zge="faas.coldstart",Wge="faas.invoked_name",Xge="faas.invoked_provider",ehe="faas.invoked_region",the="net.transport",nhe="net.peer.ip",rhe="net.peer.port",ohe="net.peer.name",ihe="net.host.ip",she="net.host.port",ahe="net.host.name",uhe="net.host.connection.type",che="net.host.connection.subtype",lhe="net.host.carrier.name",dhe="net.host.carrier.mcc",phe="net.host.carrier.mnc",fhe="net.host.carrier.icc",mhe="peer.service",Ahe="enduser.id",ghe="enduser.role",hhe="enduser.scope",_he="thread.id",Ehe="thread.name",yhe="code.function",She="code.namespace",The="code.filepath",bhe="code.lineno",Ihe="http.method",Che="http.url",vhe="http.target",Rhe="http.host",xhe="http.scheme",Dhe="http.status_code",Nhe="http.flavor",Bhe="http.user_agent",whe="http.request_content_length",Ohe="http.request_content_length_uncompressed",khe="http.response_content_length",Phe="http.response_content_length_uncompressed",Mhe="http.server_name",Lhe="http.route",Uhe="http.client_ip",Qhe="aws.dynamodb.table_names",Fhe="aws.dynamodb.consumed_capacity",Ghe="aws.dynamodb.item_collection_metrics",jhe="aws.dynamodb.provisioned_read_capacity",zhe="aws.dynamodb.provisioned_write_capacity",Hhe="aws.dynamodb.consistent_read",$he="aws.dynamodb.projection",qhe="aws.dynamodb.limit",Vhe="aws.dynamodb.attributes_to_get",Yhe="aws.dynamodb.index_name",Khe="aws.dynamodb.select",Jhe="aws.dynamodb.global_secondary_indexes",Zhe="aws.dynamodb.local_secondary_indexes",Whe="aws.dynamodb.exclusive_start_table",Xhe="aws.dynamodb.table_count",e_e="aws.dynamodb.scan_forward",t_e="aws.dynamodb.segment",n_e="aws.dynamodb.total_segments",r_e="aws.dynamodb.count",o_e="aws.dynamodb.scanned_count",i_e="aws.dynamodb.attribute_definitions",s_e="aws.dynamodb.global_secondary_index_updates",a_e="messaging.system",u_e="messaging.destination",c_e="messaging.destination_kind",l_e="messaging.temp_destination",d_e="messaging.protocol",p_e="messaging.protocol_version",f_e="messaging.url",m_e="messaging.message_id",A_e="messaging.conversation_id",g_e="messaging.message_payload_size_bytes",h_e="messaging.message_payload_compressed_size_bytes",__e="messaging.operation",E_e="messaging.consumer_id",y_e="messaging.rabbitmq.routing_key",S_e="messaging.kafka.message_key",T_e="messaging.kafka.consumer_group",b_e="messaging.kafka.client_id",I_e="messaging.kafka.partition",C_e="messaging.kafka.tombstone",v_e="rpc.system",R_e="rpc.service",x_e="rpc.method",D_e="rpc.grpc.status_code",N_e="rpc.jsonrpc.version",B_e="rpc.jsonrpc.request_id",w_e="rpc.jsonrpc.error_code",O_e="rpc.jsonrpc.error_message",k_e="message.type",P_e="message.id",M_e="message.compressed_size",L_e="message.uncompressed_size",xnt=_ge,iV=Ege,Dnt=yge,Nnt=Sge,Bnt=Tge,wnt=bge,sV=Ige,Ont=Cge,knt=vge,Pnt=Rge,Mnt=xge,Lnt=Dge,Unt=Nge,Qnt=Bge,Fnt=wge,Gnt=Oge,jnt=kge,znt=Pge,Hnt=Mge,$nt=Lge,qnt=Uge,Vnt=Qge,Ynt=Fge,Knt=Gge,Jnt=jge,aV=zge,Znt=Hge,Wnt=$ge,Xnt=qge,ert=Vge,trt=Yge,nrt=Kge,rrt=Jge,ort=Zge,irt=Wge,srt=Xge,art=ehe,urt=the,uV=nhe,crt=rhe,lrt=ohe,cV=ihe,lV=she,drt=ahe,prt=uhe,frt=che,mrt=lhe,Art=dhe,grt=phe,hrt=fhe,_rt=mhe,Ert=Ahe,yrt=ghe,Srt=hhe,Trt=_he,brt=Ehe,Irt=yhe,Crt=She,vrt=The,Rrt=bhe,AB=Ihe,MC=Che,dV=vhe,xrt=Rhe,Drt=xhe,pS=Dhe,Nrt=Nhe,Brt=Bhe,wrt=whe,Ort=Ohe,pV=khe,fV=Phe,krt=Mhe,mV=Lhe,Prt=Uhe,Mrt=Qhe,Lrt=Fhe,Urt=Ghe,Qrt=jhe,Frt=zhe,Grt=Hhe,jrt=$he,zrt=qhe,Hrt=Vhe,$rt=Yhe,qrt=Khe,Vrt=Jhe,Yrt=Zhe,Krt=Whe,Jrt=Xhe,Zrt=e_e,Wrt=t_e,Xrt=n_e,eot=r_e,tot=o_e,not=i_e,rot=s_e,AV=a_e,oot=u_e,iot=c_e,sot=l_e,aot=d_e,uot=p_e,cot=f_e,lot=m_e,dot=A_e,pot=g_e,fot=h_e,mot=__e,Aot=E_e,got=y_e,hot=S_e,_ot=T_e,Eot=b_e,yot=I_e,Sot=C_e,Tot=v_e,gV=R_e,bot=x_e,hV=D_e,Iot=N_e,Cot=B_e,vot=w_e,Rot=O_e,xot=k_e,Dot=P_e,Not=M_e,Bot=L_e,wot=Oi([_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,k_e,P_e,M_e,L_e]),U_e="other_sql",Q_e="mssql",F_e="mysql",G_e="oracle",j_e="db2",z_e="postgresql",H_e="redshift",$_e="hive",q_e="cloudscape",V_e="hsqldb",Y_e="progress",K_e="maxdb",J_e="hanadb",Z_e="ingres",W_e="firstsql",X_e="edb",eEe="cache",tEe="adabas",nEe="firebird",rEe="derby",oEe="filemaker",iEe="informix",sEe="instantdb",aEe="interbase",uEe="mariadb",cEe="netezza",lEe="pervasive",dEe="pointbase",pEe="sqlite",fEe="sybase",mEe="teradata",AEe="vertica",gEe="h2",hEe="coldfusion",_Ee="cassandra",EEe="hbase",yEe="mongodb",SEe="redis",TEe="couchbase",bEe="couchdb",IEe="cosmosdb",CEe="dynamodb",vEe="neo4j",REe="geode",xEe="elasticsearch",DEe="memcached",NEe="cockroachdb",Oot=U_e,kot=Q_e,Pot=F_e,Mot=G_e,Lot=j_e,Uot=z_e,Qot=H_e,Fot=$_e,Got=q_e,jot=V_e,zot=Y_e,Hot=K_e,$ot=J_e,qot=Z_e,Vot=W_e,Yot=X_e,Kot=eEe,Jot=tEe,Zot=nEe,Wot=rEe,Xot=oEe,eit=iEe,tit=sEe,nit=aEe,rit=uEe,oit=cEe,iit=lEe,sit=dEe,ait=pEe,uit=fEe,cit=mEe,lit=AEe,dit=gEe,pit=hEe,fit=_Ee,mit=EEe,Ait=yEe,git=SEe,hit=TEe,_it=bEe,Eit=IEe,yit=CEe,Sit=vEe,Tit=REe,bit=xEe,Iit=DEe,Cit=NEe,vit=Oi([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,REe,xEe,DEe,NEe]),BEe="all",wEe="each_quorum",OEe="quorum",kEe="local_quorum",PEe="one",MEe="two",LEe="three",UEe="local_one",QEe="any",FEe="serial",GEe="local_serial",Rit=BEe,xit=wEe,Dit=OEe,Nit=kEe,Bit=PEe,wit=MEe,Oit=LEe,kit=UEe,Pit=QEe,Mit=FEe,Lit=GEe,Uit=Oi([BEe,wEe,OEe,kEe,PEe,MEe,LEe,UEe,QEe,FEe,GEe]),jEe="datasource",zEe="http",HEe="pubsub",$Ee="timer",qEe="other",Qit=jEe,Fit=zEe,Git=HEe,jit=$Ee,zit=qEe,Hit=Oi([jEe,zEe,HEe,$Ee,qEe]),VEe="insert",YEe="edit",KEe="delete",$it=VEe,qit=YEe,Vit=KEe,Yit=Oi([VEe,YEe,KEe]),JEe="alibaba_cloud",ZEe="aws",WEe="azure",XEe="gcp",Kit=JEe,Jit=ZEe,Zit=WEe,Wit=XEe,Xit=Oi([JEe,ZEe,WEe,XEe]),e0e="ip_tcp",t0e="ip_udp",n0e="ip",r0e="unix",o0e="pipe",i0e="inproc",s0e="other",est=e0e,tst=t0e,nst=n0e,rst=r0e,ost=o0e,ist=i0e,sst=s0e,ast=Oi([e0e,t0e,n0e,r0e,o0e,i0e,s0e]),a0e="wifi",u0e="wired",c0e="cell",l0e="unavailable",d0e="unknown",ust=a0e,cst=u0e,lst=c0e,dst=l0e,pst=d0e,fst=Oi([a0e,u0e,c0e,l0e,d0e]),p0e="gprs",f0e="edge",m0e="umts",A0e="cdma",g0e="evdo_0",h0e="evdo_a",_0e="cdma2000_1xrtt",E0e="hsdpa",y0e="hsupa",S0e="hspa",T0e="iden",b0e="evdo_b",I0e="lte",C0e="ehrpd",v0e="hspap",R0e="gsm",x0e="td_scdma",D0e="iwlan",N0e="nr",B0e="nrnsa",w0e="lte_ca",mst=p0e,Ast=f0e,gst=m0e,hst=A0e,_st=g0e,Est=h0e,yst=_0e,Sst=E0e,Tst=y0e,bst=S0e,Ist=T0e,Cst=b0e,vst=I0e,Rst=C0e,xst=v0e,Dst=R0e,Nst=x0e,Bst=D0e,wst=N0e,Ost=B0e,kst=w0e,Pst=Oi([p0e,f0e,m0e,A0e,g0e,h0e,_0e,E0e,y0e,S0e,T0e,b0e,I0e,C0e,v0e,R0e,x0e,D0e,N0e,B0e,w0e]),O0e="1.0",k0e="1.1",P0e="2.0",M0e="SPDY",L0e="QUIC",Mst=O0e,Lst=k0e,Ust=P0e,Qst=M0e,Fst=L0e,Gst={HTTP_1_0:O0e,HTTP_1_1:k0e,HTTP_2_0:P0e,SPDY:M0e,QUIC:L0e},U0e="queue",Q0e="topic",jst=U0e,zst=Q0e,Hst=Oi([U0e,Q0e]),F0e="receive",G0e="process",$st=F0e,qst=G0e,Vst=Oi([F0e,G0e]),j0e=0,z0e=1,H0e=2,$0e=3,q0e=4,V0e=5,Y0e=6,K0e=7,J0e=8,Z0e=9,W0e=10,X0e=11,eye=12,tye=13,nye=14,rye=15,oye=16,Yst=j0e,Kst=z0e,Jst=H0e,Zst=$0e,Wst=q0e,Xst=V0e,eat=Y0e,tat=K0e,nat=J0e,rat=Z0e,oat=W0e,iat=X0e,sat=eye,aat=tye,uat=nye,cat=rye,lat=oye,dat={OK:j0e,CANCELLED:z0e,UNKNOWN:H0e,INVALID_ARGUMENT:$0e,DEADLINE_EXCEEDED:q0e,NOT_FOUND:V0e,ALREADY_EXISTS:Y0e,PERMISSION_DENIED:K0e,RESOURCE_EXHAUSTED:J0e,FAILED_PRECONDITION:Z0e,ABORTED:W0e,OUT_OF_RANGE:X0e,UNIMPLEMENTED:eye,INTERNAL:tye,UNAVAILABLE:nye,DATA_LOSS:rye,UNAUTHENTICATED:oye},iye="SENT",sye="RECEIVED",pat=iye,fat=sye,mat=Oi([iye,sye])});var uye=w(()=>{m();aye()});var 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,wSe,OSe,kSe,PSe,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,put,fut,mut,Aut,gut,hut,_ut,Eut,yut,Sut,Tut,but,Iut,Cut,vut,Rut,xut,Dut,Nut,But,_V,wut,Out,kut,Put,Mut,Lut,Uut,Qut,Fut,Gut,MSe,LSe,USe,QSe,jut,zut,Hut,$ut,qut,FSe,GSe,jSe,zSe,HSe,$Se,qSe,VSe,YSe,KSe,JSe,ZSe,WSe,XSe,eTe,tTe,nTe,Vut,Yut,Kut,Jut,Zut,Wut,Xut,ect,tct,nct,rct,oct,ict,sct,act,uct,cct,lct,rTe,oTe,dct,pct,fct,iTe,sTe,aTe,uTe,cTe,lTe,dTe,mct,Act,gct,hct,_ct,Ect,yct,Sct,pTe,fTe,mTe,ATe,gTe,hTe,_Te,ETe,yTe,STe,TTe,Tct,bct,Ict,Cct,vct,Rct,xct,Dct,Nct,Bct,wct,Oct,bTe,ITe,CTe,vTe,RTe,xTe,DTe,NTe,BTe,wTe,kct,Pct,Mct,Lct,Uct,Qct,Fct,Gct,jct,zct,Hct,OTe=w(()=>{m();oV();cye="cloud.provider",lye="cloud.account.id",dye="cloud.region",pye="cloud.availability_zone",fye="cloud.platform",mye="aws.ecs.container.arn",Aye="aws.ecs.cluster.arn",gye="aws.ecs.launchtype",hye="aws.ecs.task.arn",_ye="aws.ecs.task.family",Eye="aws.ecs.task.revision",yye="aws.eks.cluster.arn",Sye="aws.log.group.names",Tye="aws.log.group.arns",bye="aws.log.stream.names",Iye="aws.log.stream.arns",Cye="container.name",vye="container.id",Rye="container.runtime",xye="container.image.name",Dye="container.image.tag",Nye="deployment.environment",Bye="device.id",wye="device.model.identifier",Oye="device.model.name",kye="faas.name",Pye="faas.id",Mye="faas.version",Lye="faas.instance",Uye="faas.max_memory",Qye="host.id",Fye="host.name",Gye="host.type",jye="host.arch",zye="host.image.name",Hye="host.image.id",$ye="host.image.version",qye="k8s.cluster.name",Vye="k8s.node.name",Yye="k8s.node.uid",Kye="k8s.namespace.name",Jye="k8s.pod.uid",Zye="k8s.pod.name",Wye="k8s.container.name",Xye="k8s.replicaset.uid",eSe="k8s.replicaset.name",tSe="k8s.deployment.uid",nSe="k8s.deployment.name",rSe="k8s.statefulset.uid",oSe="k8s.statefulset.name",iSe="k8s.daemonset.uid",sSe="k8s.daemonset.name",aSe="k8s.job.uid",uSe="k8s.job.name",cSe="k8s.cronjob.uid",lSe="k8s.cronjob.name",dSe="os.type",pSe="os.description",fSe="os.name",mSe="os.version",ASe="process.pid",gSe="process.executable.name",hSe="process.executable.path",_Se="process.command",ESe="process.command_line",ySe="process.command_args",SSe="process.owner",TSe="process.runtime.name",bSe="process.runtime.version",ISe="process.runtime.description",CSe="service.name",vSe="service.namespace",RSe="service.instance.id",xSe="service.version",DSe="telemetry.sdk.name",NSe="telemetry.sdk.language",BSe="telemetry.sdk.version",wSe="telemetry.auto.version",OSe="webengine.name",kSe="webengine.version",PSe="webengine.description",Aat=cye,gat=lye,hat=dye,_at=pye,Eat=fye,yat=mye,Sat=Aye,Tat=gye,bat=hye,Iat=_ye,Cat=Eye,vat=yye,Rat=Sye,xat=Tye,Dat=bye,Nat=Iye,Bat=Cye,wat=vye,Oat=Rye,kat=xye,Pat=Dye,Mat=Nye,Lat=Bye,Uat=wye,Qat=Oye,Fat=kye,Gat=Pye,jat=Mye,zat=Lye,Hat=Uye,$at=Qye,qat=Fye,Vat=Gye,Yat=jye,Kat=zye,Jat=Hye,Zat=$ye,Wat=qye,Xat=Vye,eut=Yye,tut=Kye,nut=Jye,rut=Zye,out=Wye,iut=Xye,sut=eSe,aut=tSe,uut=nSe,cut=rSe,lut=oSe,dut=iSe,put=sSe,fut=aSe,mut=uSe,Aut=cSe,gut=lSe,hut=dSe,_ut=pSe,Eut=fSe,yut=mSe,Sut=ASe,Tut=gSe,but=hSe,Iut=_Se,Cut=ESe,vut=ySe,Rut=SSe,xut=TSe,Dut=bSe,Nut=ISe,But=CSe,_V=vSe,wut=RSe,Out=xSe,kut=DSe,Put=NSe,Mut=BSe,Lut=wSe,Uut=OSe,Qut=kSe,Fut=PSe,Gut=Oi([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,wSe,OSe,kSe,PSe]),MSe="alibaba_cloud",LSe="aws",USe="azure",QSe="gcp",jut=MSe,zut=LSe,Hut=USe,$ut=QSe,qut=Oi([MSe,LSe,USe,QSe]),FSe="alibaba_cloud_ecs",GSe="alibaba_cloud_fc",jSe="aws_ec2",zSe="aws_ecs",HSe="aws_eks",$Se="aws_lambda",qSe="aws_elastic_beanstalk",VSe="azure_vm",YSe="azure_container_instances",KSe="azure_aks",JSe="azure_functions",ZSe="azure_app_service",WSe="gcp_compute_engine",XSe="gcp_cloud_run",eTe="gcp_kubernetes_engine",tTe="gcp_cloud_functions",nTe="gcp_app_engine",Vut=FSe,Yut=GSe,Kut=jSe,Jut=zSe,Zut=HSe,Wut=$Se,Xut=qSe,ect=VSe,tct=YSe,nct=KSe,rct=JSe,oct=ZSe,ict=WSe,sct=XSe,act=eTe,uct=tTe,cct=nTe,lct=Oi([FSe,GSe,jSe,zSe,HSe,$Se,qSe,VSe,YSe,KSe,JSe,ZSe,WSe,XSe,eTe,tTe,nTe]),rTe="ec2",oTe="fargate",dct=rTe,pct=oTe,fct=Oi([rTe,oTe]),iTe="amd64",sTe="arm32",aTe="arm64",uTe="ia64",cTe="ppc32",lTe="ppc64",dTe="x86",mct=iTe,Act=sTe,gct=aTe,hct=uTe,_ct=cTe,Ect=lTe,yct=dTe,Sct=Oi([iTe,sTe,aTe,uTe,cTe,lTe,dTe]),pTe="windows",fTe="linux",mTe="darwin",ATe="freebsd",gTe="netbsd",hTe="openbsd",_Te="dragonflybsd",ETe="hpux",yTe="aix",STe="solaris",TTe="z_os",Tct=pTe,bct=fTe,Ict=mTe,Cct=ATe,vct=gTe,Rct=hTe,xct=_Te,Dct=ETe,Nct=yTe,Bct=STe,wct=TTe,Oct=Oi([pTe,fTe,mTe,ATe,gTe,hTe,_Te,ETe,yTe,STe,TTe]),bTe="cpp",ITe="dotnet",CTe="erlang",vTe="go",RTe="java",xTe="nodejs",DTe="php",NTe="python",BTe="ruby",wTe="webjs",kct=bTe,Pct=ITe,Mct=CTe,Lct=vTe,Uct=RTe,Qct=xTe,Fct=DTe,Gct=NTe,jct=BTe,zct=wTe,Hct=Oi([bTe,ITe,CTe,vTe,RTe,xTe,DTe,NTe,BTe,wTe])});var kTe=w(()=>{m();OTe()});var $ct,qct,Vct,Yct,Kct,Jct,Zct,Wct,Xct,elt,tlt,nlt,rlt,olt,ilt,slt,alt,ult,clt,llt,dlt,plt,flt,mlt,Alt,EV,yV,glt,LC,hlt,SV,TV,_lt,fS,Elt,ylt,Slt,Tlt,blt,Ilt,Clt,vlt,ysn,Ssn,bV,Rlt,xlt,Dlt,Nlt,Blt,wlt,mS,Olt,klt,Plt,Tsn,Mlt,Llt,Ult,Qlt,bsn,Flt,Glt,jlt,zlt,vg,Rg,Hlt,$lt,qlt,Vlt,Ylt,Klt,Jlt,Zlt,Wlt,Isn,Xlt,edt,tdt,ndt,rdt,odt,IV,CV,idt,vV,RV,sdt,adt,Csn,vsn,udt,cdt,ldt,ddt,pdt,fdt,mdt,Adt,Rsn,gdt,xV,DV,hdt,NV,_dt,BV,Edt,ydt,Sdt,Tdt,bdt,Idt,Cdt,vdt,Rdt,xsn,xdt,Ddt,Dsn,Ndt,Bdt,Nsn,wdt,Odt,kdt,Pdt,Mdt,Ldt,Udt,Qdt,D_,Fdt,Gdt,jdt,wV,PTe=w(()=>{m();$ct="aspnetcore.diagnostics.exception.result",qct="aborted",Vct="handled",Yct="skipped",Kct="unhandled",Jct="aspnetcore.diagnostics.handler.type",Zct="aspnetcore.rate_limiting.policy",Wct="aspnetcore.rate_limiting.result",Xct="acquired",elt="endpoint_limiter",tlt="global_limiter",nlt="request_canceled",rlt="aspnetcore.request.is_unhandled",olt="aspnetcore.routing.is_fallback",ilt="aspnetcore.routing.match_status",slt="failure",alt="success",ult="aspnetcore.user.is_authenticated",clt="client.address",llt="client.port",dlt="code.column.number",plt="code.file.path",flt="code.function.name",mlt="code.line.number",Alt="code.stacktrace",EV="db.collection.name",yV="db.namespace",glt="db.operation.batch.size",LC="db.operation.name",hlt="db.query.summary",SV="db.query.text",TV="db.response.status_code",_lt="db.stored_procedure.name",fS="db.system.name",Elt="mariadb",ylt="microsoft.sql_server",Slt="mysql",Tlt="postgresql",blt="dotnet.gc.heap.generation",Ilt="gen0",Clt="gen1",vlt="gen2",ysn="loh",Ssn="poh",bV="error.type",Rlt="_OTHER",xlt="exception.escaped",Dlt="exception.message",Nlt="exception.stacktrace",Blt="exception.type",wlt=e=>`http.request.header.${e}`,mS="http.request.method",Olt="_OTHER",klt="CONNECT",Plt="DELETE",Tsn="GET",Mlt="HEAD",Llt="OPTIONS",Ult="PATCH",Qlt="POST",bsn="PUT",Flt="TRACE",Glt="http.request.method_original",jlt="http.request.resend_count",zlt=e=>`http.response.header.${e}`,vg="http.response.status_code",Rg="http.route",Hlt="jvm.gc.action",$lt="jvm.gc.name",qlt="jvm.memory.pool.name",Vlt="jvm.memory.type",Ylt="heap",Klt="non_heap",Jlt="jvm.thread.daemon",Zlt="jvm.thread.state",Wlt="blocked",Isn="new",Xlt="runnable",edt="terminated",tdt="timed_waiting",ndt="waiting",rdt="network.local.address",odt="network.local.port",IV="network.peer.address",CV="network.peer.port",idt="network.protocol.name",vV="network.protocol.version",RV="network.transport",sdt="pipe",adt="quic",Csn="tcp",vsn="udp",udt="unix",cdt="network.type",ldt="ipv4",ddt="ipv6",pdt="otel.scope.name",fdt="otel.scope.version",mdt="otel.status_code",Adt="ERROR",Rsn="OK",gdt="otel.status_description",xV="server.address",DV="server.port",hdt="service.instance.id",NV="service.name",_dt="service.namespace",BV="service.version",Edt="signalr.connection.status",ydt="app_shutdown",Sdt="normal_closure",Tdt="timeout",bdt="signalr.transport",Idt="long_polling",Cdt="server_sent_events",vdt="web_sockets",Rdt="telemetry.sdk.language",xsn="cpp",xdt="dotnet",Ddt="erlang",Dsn="go",Ndt="java",Bdt="nodejs",Nsn="php",wdt="python",Odt="ruby",kdt="rust",Pdt="swift",Mdt="webjs",Ldt="telemetry.sdk.name",Udt="telemetry.sdk.version",Qdt="url.fragment",D_="url.full",Fdt="url.path",Gdt="url.query",jdt="url.scheme",wV="user_agent.original"});var 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,ypt,Spt,Tpt,bpt,Ipt,Cpt,vpt,Rpt,xpt,Dpt,Npt,Bpt,wpt,Opt,kpt,Ppt,Mpt,Lpt,Upt,Qpt,MTe=w(()=>{m();zdt="aspnetcore.diagnostics.exceptions",Hdt="aspnetcore.rate_limiting.active_request_leases",$dt="aspnetcore.rate_limiting.queued_requests",qdt="aspnetcore.rate_limiting.request.time_in_queue",Vdt="aspnetcore.rate_limiting.request_lease.duration",Ydt="aspnetcore.rate_limiting.requests",Kdt="aspnetcore.routing.match_attempts",Jdt="db.client.operation.duration",Zdt="dotnet.assembly.count",Wdt="dotnet.exceptions",Xdt="dotnet.gc.collections",ept="dotnet.gc.heap.total_allocated",tpt="dotnet.gc.last_collection.heap.fragmentation.size",npt="dotnet.gc.last_collection.heap.size",rpt="dotnet.gc.last_collection.memory.committed_size",opt="dotnet.gc.pause.time",ipt="dotnet.jit.compilation.time",spt="dotnet.jit.compiled_il.size",apt="dotnet.jit.compiled_methods",upt="dotnet.monitor.lock_contentions",cpt="dotnet.process.cpu.count",lpt="dotnet.process.cpu.time",dpt="dotnet.process.memory.working_set",ppt="dotnet.thread_pool.queue.length",fpt="dotnet.thread_pool.thread.count",mpt="dotnet.thread_pool.work_item.count",Apt="dotnet.timer.count",gpt="http.client.request.duration",hpt="http.server.request.duration",_pt="jvm.class.count",Ept="jvm.class.loaded",ypt="jvm.class.unloaded",Spt="jvm.cpu.count",Tpt="jvm.cpu.recent_utilization",bpt="jvm.cpu.time",Ipt="jvm.gc.duration",Cpt="jvm.memory.committed",vpt="jvm.memory.limit",Rpt="jvm.memory.used",xpt="jvm.memory.used_after_last_gc",Dpt="jvm.thread.count",Npt="kestrel.active_connections",Bpt="kestrel.active_tls_handshakes",wpt="kestrel.connection.duration",Opt="kestrel.queued_connections",kpt="kestrel.queued_requests",Ppt="kestrel.rejected_connections",Mpt="kestrel.tls_handshake.duration",Lpt="kestrel.upgraded_connections",Upt="signalr.server.active_connections",Qpt="signalr.server.connection.duration"});var Fpt,LTe=w(()=>{m();Fpt="exception"});var Hr={};Zs(Hr,{ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED:()=>qct,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED:()=>Vct,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED:()=>Yct,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED:()=>Kct,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED:()=>Xct,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER:()=>elt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER:()=>tlt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED:()=>nlt,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE:()=>slt,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS:()=>alt,ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT:()=>$ct,ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE:()=>Jct,ATTR_ASPNETCORE_RATE_LIMITING_POLICY:()=>Zct,ATTR_ASPNETCORE_RATE_LIMITING_RESULT:()=>Wct,ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED:()=>rlt,ATTR_ASPNETCORE_ROUTING_IS_FALLBACK:()=>olt,ATTR_ASPNETCORE_ROUTING_MATCH_STATUS:()=>ilt,ATTR_ASPNETCORE_USER_IS_AUTHENTICATED:()=>ult,ATTR_CLIENT_ADDRESS:()=>clt,ATTR_CLIENT_PORT:()=>llt,ATTR_CODE_COLUMN_NUMBER:()=>dlt,ATTR_CODE_FILE_PATH:()=>plt,ATTR_CODE_FUNCTION_NAME:()=>flt,ATTR_CODE_LINE_NUMBER:()=>mlt,ATTR_CODE_STACKTRACE:()=>Alt,ATTR_DB_COLLECTION_NAME:()=>EV,ATTR_DB_NAMESPACE:()=>yV,ATTR_DB_OPERATION_BATCH_SIZE:()=>glt,ATTR_DB_OPERATION_NAME:()=>LC,ATTR_DB_QUERY_SUMMARY:()=>hlt,ATTR_DB_QUERY_TEXT:()=>SV,ATTR_DB_RESPONSE_STATUS_CODE:()=>TV,ATTR_DB_STORED_PROCEDURE_NAME:()=>_lt,ATTR_DB_SYSTEM_NAME:()=>fS,ATTR_DOTNET_GC_HEAP_GENERATION:()=>blt,ATTR_ERROR_TYPE:()=>bV,ATTR_EXCEPTION_ESCAPED:()=>xlt,ATTR_EXCEPTION_MESSAGE:()=>Dlt,ATTR_EXCEPTION_STACKTRACE:()=>Nlt,ATTR_EXCEPTION_TYPE:()=>Blt,ATTR_HTTP_REQUEST_HEADER:()=>wlt,ATTR_HTTP_REQUEST_METHOD:()=>mS,ATTR_HTTP_REQUEST_METHOD_ORIGINAL:()=>Glt,ATTR_HTTP_REQUEST_RESEND_COUNT:()=>jlt,ATTR_HTTP_RESPONSE_HEADER:()=>zlt,ATTR_HTTP_RESPONSE_STATUS_CODE:()=>vg,ATTR_HTTP_ROUTE:()=>Rg,ATTR_JVM_GC_ACTION:()=>Hlt,ATTR_JVM_GC_NAME:()=>$lt,ATTR_JVM_MEMORY_POOL_NAME:()=>qlt,ATTR_JVM_MEMORY_TYPE:()=>Vlt,ATTR_JVM_THREAD_DAEMON:()=>Jlt,ATTR_JVM_THREAD_STATE:()=>Zlt,ATTR_NETWORK_LOCAL_ADDRESS:()=>rdt,ATTR_NETWORK_LOCAL_PORT:()=>odt,ATTR_NETWORK_PEER_ADDRESS:()=>IV,ATTR_NETWORK_PEER_PORT:()=>CV,ATTR_NETWORK_PROTOCOL_NAME:()=>idt,ATTR_NETWORK_PROTOCOL_VERSION:()=>vV,ATTR_NETWORK_TRANSPORT:()=>RV,ATTR_NETWORK_TYPE:()=>cdt,ATTR_OTEL_SCOPE_NAME:()=>pdt,ATTR_OTEL_SCOPE_VERSION:()=>fdt,ATTR_OTEL_STATUS_CODE:()=>mdt,ATTR_OTEL_STATUS_DESCRIPTION:()=>gdt,ATTR_SERVER_ADDRESS:()=>xV,ATTR_SERVER_PORT:()=>DV,ATTR_SERVICE_INSTANCE_ID:()=>hdt,ATTR_SERVICE_NAME:()=>NV,ATTR_SERVICE_NAMESPACE:()=>_dt,ATTR_SERVICE_VERSION:()=>BV,ATTR_SIGNALR_CONNECTION_STATUS:()=>Edt,ATTR_SIGNALR_TRANSPORT:()=>bdt,ATTR_TELEMETRY_SDK_LANGUAGE:()=>Rdt,ATTR_TELEMETRY_SDK_NAME:()=>Ldt,ATTR_TELEMETRY_SDK_VERSION:()=>Udt,ATTR_URL_FRAGMENT:()=>Qdt,ATTR_URL_FULL:()=>D_,ATTR_URL_PATH:()=>Fdt,ATTR_URL_QUERY:()=>Gdt,ATTR_URL_SCHEME:()=>jdt,ATTR_USER_AGENT_ORIGINAL:()=>wV,AWSECSLAUNCHTYPEVALUES_EC2:()=>dct,AWSECSLAUNCHTYPEVALUES_FARGATE:()=>pct,AwsEcsLaunchtypeValues:()=>fct,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:()=>Vut,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:()=>Yut,CLOUDPLATFORMVALUES_AWS_EC2:()=>Kut,CLOUDPLATFORMVALUES_AWS_ECS:()=>Jut,CLOUDPLATFORMVALUES_AWS_EKS:()=>Zut,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:()=>Xut,CLOUDPLATFORMVALUES_AWS_LAMBDA:()=>Wut,CLOUDPLATFORMVALUES_AZURE_AKS:()=>nct,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:()=>oct,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:()=>tct,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:()=>rct,CLOUDPLATFORMVALUES_AZURE_VM:()=>ect,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:()=>cct,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:()=>uct,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:()=>sct,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:()=>ict,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:()=>act,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:()=>jut,CLOUDPROVIDERVALUES_AWS:()=>zut,CLOUDPROVIDERVALUES_AZURE:()=>Hut,CLOUDPROVIDERVALUES_GCP:()=>$ut,CloudPlatformValues:()=>lct,CloudProviderValues:()=>qut,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:()=>Rit,DBCASSANDRACONSISTENCYLEVELVALUES_ANY:()=>Pit,DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:()=>xit,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:()=>kit,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:()=>Nit,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:()=>Lit,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:()=>Bit,DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:()=>Dit,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:()=>Mit,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:()=>Oit,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:()=>wit,DBSYSTEMVALUES_ADABAS:()=>Jot,DBSYSTEMVALUES_CACHE:()=>Kot,DBSYSTEMVALUES_CASSANDRA:()=>fit,DBSYSTEMVALUES_CLOUDSCAPE:()=>Got,DBSYSTEMVALUES_COCKROACHDB:()=>Cit,DBSYSTEMVALUES_COLDFUSION:()=>pit,DBSYSTEMVALUES_COSMOSDB:()=>Eit,DBSYSTEMVALUES_COUCHBASE:()=>hit,DBSYSTEMVALUES_COUCHDB:()=>_it,DBSYSTEMVALUES_DB2:()=>Lot,DBSYSTEMVALUES_DERBY:()=>Wot,DBSYSTEMVALUES_DYNAMODB:()=>yit,DBSYSTEMVALUES_EDB:()=>Yot,DBSYSTEMVALUES_ELASTICSEARCH:()=>bit,DBSYSTEMVALUES_FILEMAKER:()=>Xot,DBSYSTEMVALUES_FIREBIRD:()=>Zot,DBSYSTEMVALUES_FIRSTSQL:()=>Vot,DBSYSTEMVALUES_GEODE:()=>Tit,DBSYSTEMVALUES_H2:()=>dit,DBSYSTEMVALUES_HANADB:()=>$ot,DBSYSTEMVALUES_HBASE:()=>mit,DBSYSTEMVALUES_HIVE:()=>Fot,DBSYSTEMVALUES_HSQLDB:()=>jot,DBSYSTEMVALUES_INFORMIX:()=>eit,DBSYSTEMVALUES_INGRES:()=>qot,DBSYSTEMVALUES_INSTANTDB:()=>tit,DBSYSTEMVALUES_INTERBASE:()=>nit,DBSYSTEMVALUES_MARIADB:()=>rit,DBSYSTEMVALUES_MAXDB:()=>Hot,DBSYSTEMVALUES_MEMCACHED:()=>Iit,DBSYSTEMVALUES_MONGODB:()=>Ait,DBSYSTEMVALUES_MSSQL:()=>kot,DBSYSTEMVALUES_MYSQL:()=>Pot,DBSYSTEMVALUES_NEO4J:()=>Sit,DBSYSTEMVALUES_NETEZZA:()=>oit,DBSYSTEMVALUES_ORACLE:()=>Mot,DBSYSTEMVALUES_OTHER_SQL:()=>Oot,DBSYSTEMVALUES_PERVASIVE:()=>iit,DBSYSTEMVALUES_POINTBASE:()=>sit,DBSYSTEMVALUES_POSTGRESQL:()=>Uot,DBSYSTEMVALUES_PROGRESS:()=>zot,DBSYSTEMVALUES_REDIS:()=>git,DBSYSTEMVALUES_REDSHIFT:()=>Qot,DBSYSTEMVALUES_SQLITE:()=>ait,DBSYSTEMVALUES_SYBASE:()=>uit,DBSYSTEMVALUES_TERADATA:()=>cit,DBSYSTEMVALUES_VERTICA:()=>lit,DB_SYSTEM_NAME_VALUE_MARIADB:()=>Elt,DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER:()=>ylt,DB_SYSTEM_NAME_VALUE_MYSQL:()=>Slt,DB_SYSTEM_NAME_VALUE_POSTGRESQL:()=>Tlt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN0:()=>Ilt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN1:()=>Clt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN2:()=>vlt,DOTNET_GC_HEAP_GENERATION_VALUE_LOH:()=>ysn,DOTNET_GC_HEAP_GENERATION_VALUE_POH:()=>Ssn,DbCassandraConsistencyLevelValues:()=>Uit,DbSystemValues:()=>vit,ERROR_TYPE_VALUE_OTHER:()=>Rlt,EVENT_EXCEPTION:()=>Fpt,FAASDOCUMENTOPERATIONVALUES_DELETE:()=>Vit,FAASDOCUMENTOPERATIONVALUES_EDIT:()=>qit,FAASDOCUMENTOPERATIONVALUES_INSERT:()=>$it,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:()=>Kit,FAASINVOKEDPROVIDERVALUES_AWS:()=>Jit,FAASINVOKEDPROVIDERVALUES_AZURE:()=>Zit,FAASINVOKEDPROVIDERVALUES_GCP:()=>Wit,FAASTRIGGERVALUES_DATASOURCE:()=>Qit,FAASTRIGGERVALUES_HTTP:()=>Fit,FAASTRIGGERVALUES_OTHER:()=>zit,FAASTRIGGERVALUES_PUBSUB:()=>Git,FAASTRIGGERVALUES_TIMER:()=>jit,FaasDocumentOperationValues:()=>Yit,FaasInvokedProviderValues:()=>Xit,FaasTriggerValues:()=>Hit,HOSTARCHVALUES_AMD64:()=>mct,HOSTARCHVALUES_ARM32:()=>Act,HOSTARCHVALUES_ARM64:()=>gct,HOSTARCHVALUES_IA64:()=>hct,HOSTARCHVALUES_PPC32:()=>_ct,HOSTARCHVALUES_PPC64:()=>Ect,HOSTARCHVALUES_X86:()=>yct,HTTPFLAVORVALUES_HTTP_1_0:()=>Mst,HTTPFLAVORVALUES_HTTP_1_1:()=>Lst,HTTPFLAVORVALUES_HTTP_2_0:()=>Ust,HTTPFLAVORVALUES_QUIC:()=>Fst,HTTPFLAVORVALUES_SPDY:()=>Qst,HTTP_REQUEST_METHOD_VALUE_CONNECT:()=>klt,HTTP_REQUEST_METHOD_VALUE_DELETE:()=>Plt,HTTP_REQUEST_METHOD_VALUE_GET:()=>Tsn,HTTP_REQUEST_METHOD_VALUE_HEAD:()=>Mlt,HTTP_REQUEST_METHOD_VALUE_OPTIONS:()=>Llt,HTTP_REQUEST_METHOD_VALUE_OTHER:()=>Olt,HTTP_REQUEST_METHOD_VALUE_PATCH:()=>Ult,HTTP_REQUEST_METHOD_VALUE_POST:()=>Qlt,HTTP_REQUEST_METHOD_VALUE_PUT:()=>bsn,HTTP_REQUEST_METHOD_VALUE_TRACE:()=>Flt,HostArchValues:()=>Sct,HttpFlavorValues:()=>Gst,JVM_MEMORY_TYPE_VALUE_HEAP:()=>Ylt,JVM_MEMORY_TYPE_VALUE_NON_HEAP:()=>Klt,JVM_THREAD_STATE_VALUE_BLOCKED:()=>Wlt,JVM_THREAD_STATE_VALUE_NEW:()=>Isn,JVM_THREAD_STATE_VALUE_RUNNABLE:()=>Xlt,JVM_THREAD_STATE_VALUE_TERMINATED:()=>edt,JVM_THREAD_STATE_VALUE_TIMED_WAITING:()=>tdt,JVM_THREAD_STATE_VALUE_WAITING:()=>ndt,MESSAGETYPEVALUES_RECEIVED:()=>fat,MESSAGETYPEVALUES_SENT:()=>pat,MESSAGINGDESTINATIONKINDVALUES_QUEUE:()=>jst,MESSAGINGDESTINATIONKINDVALUES_TOPIC:()=>zst,MESSAGINGOPERATIONVALUES_PROCESS:()=>qst,MESSAGINGOPERATIONVALUES_RECEIVE:()=>$st,METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS:()=>zdt,METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES:()=>Hdt,METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS:()=>$dt,METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS:()=>Ydt,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION:()=>Vdt,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE:()=>qdt,METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS:()=>Kdt,METRIC_DB_CLIENT_OPERATION_DURATION:()=>Jdt,METRIC_DOTNET_ASSEMBLY_COUNT:()=>Zdt,METRIC_DOTNET_EXCEPTIONS:()=>Wdt,METRIC_DOTNET_GC_COLLECTIONS:()=>Xdt,METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED:()=>ept,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE:()=>tpt,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE:()=>npt,METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE:()=>rpt,METRIC_DOTNET_GC_PAUSE_TIME:()=>opt,METRIC_DOTNET_JIT_COMPILATION_TIME:()=>ipt,METRIC_DOTNET_JIT_COMPILED_IL_SIZE:()=>spt,METRIC_DOTNET_JIT_COMPILED_METHODS:()=>apt,METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS:()=>upt,METRIC_DOTNET_PROCESS_CPU_COUNT:()=>cpt,METRIC_DOTNET_PROCESS_CPU_TIME:()=>lpt,METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET:()=>dpt,METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH:()=>ppt,METRIC_DOTNET_THREAD_POOL_THREAD_COUNT:()=>fpt,METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT:()=>mpt,METRIC_DOTNET_TIMER_COUNT:()=>Apt,METRIC_HTTP_CLIENT_REQUEST_DURATION:()=>gpt,METRIC_HTTP_SERVER_REQUEST_DURATION:()=>hpt,METRIC_JVM_CLASS_COUNT:()=>_pt,METRIC_JVM_CLASS_LOADED:()=>Ept,METRIC_JVM_CLASS_UNLOADED:()=>ypt,METRIC_JVM_CPU_COUNT:()=>Spt,METRIC_JVM_CPU_RECENT_UTILIZATION:()=>Tpt,METRIC_JVM_CPU_TIME:()=>bpt,METRIC_JVM_GC_DURATION:()=>Ipt,METRIC_JVM_MEMORY_COMMITTED:()=>Cpt,METRIC_JVM_MEMORY_LIMIT:()=>vpt,METRIC_JVM_MEMORY_USED:()=>Rpt,METRIC_JVM_MEMORY_USED_AFTER_LAST_GC:()=>xpt,METRIC_JVM_THREAD_COUNT:()=>Dpt,METRIC_KESTREL_ACTIVE_CONNECTIONS:()=>Npt,METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES:()=>Bpt,METRIC_KESTREL_CONNECTION_DURATION:()=>wpt,METRIC_KESTREL_QUEUED_CONNECTIONS:()=>Opt,METRIC_KESTREL_QUEUED_REQUESTS:()=>kpt,METRIC_KESTREL_REJECTED_CONNECTIONS:()=>Ppt,METRIC_KESTREL_TLS_HANDSHAKE_DURATION:()=>Mpt,METRIC_KESTREL_UPGRADED_CONNECTIONS:()=>Lpt,METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS:()=>Upt,METRIC_SIGNALR_SERVER_CONNECTION_DURATION:()=>Qpt,MessageTypeValues:()=>mat,MessagingDestinationKindValues:()=>Hst,MessagingOperationValues:()=>Vst,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:()=>hst,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:()=>yst,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:()=>Ast,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:()=>Rst,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:()=>_st,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:()=>Est,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:()=>Cst,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:()=>mst,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:()=>Dst,NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:()=>Sst,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:()=>bst,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:()=>xst,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:()=>Tst,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:()=>Ist,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:()=>Bst,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:()=>vst,NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:()=>kst,NETHOSTCONNECTIONSUBTYPEVALUES_NR:()=>wst,NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:()=>Ost,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:()=>Nst,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:()=>gst,NETHOSTCONNECTIONTYPEVALUES_CELL:()=>lst,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:()=>dst,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:()=>pst,NETHOSTCONNECTIONTYPEVALUES_WIFI:()=>ust,NETHOSTCONNECTIONTYPEVALUES_WIRED:()=>cst,NETTRANSPORTVALUES_INPROC:()=>ist,NETTRANSPORTVALUES_IP:()=>nst,NETTRANSPORTVALUES_IP_TCP:()=>est,NETTRANSPORTVALUES_IP_UDP:()=>tst,NETTRANSPORTVALUES_OTHER:()=>sst,NETTRANSPORTVALUES_PIPE:()=>ost,NETTRANSPORTVALUES_UNIX:()=>rst,NETWORK_TRANSPORT_VALUE_PIPE:()=>sdt,NETWORK_TRANSPORT_VALUE_QUIC:()=>adt,NETWORK_TRANSPORT_VALUE_TCP:()=>Csn,NETWORK_TRANSPORT_VALUE_UDP:()=>vsn,NETWORK_TRANSPORT_VALUE_UNIX:()=>udt,NETWORK_TYPE_VALUE_IPV4:()=>ldt,NETWORK_TYPE_VALUE_IPV6:()=>ddt,NetHostConnectionSubtypeValues:()=>Pst,NetHostConnectionTypeValues:()=>fst,NetTransportValues:()=>ast,OSTYPEVALUES_AIX:()=>Nct,OSTYPEVALUES_DARWIN:()=>Ict,OSTYPEVALUES_DRAGONFLYBSD:()=>xct,OSTYPEVALUES_FREEBSD:()=>Cct,OSTYPEVALUES_HPUX:()=>Dct,OSTYPEVALUES_LINUX:()=>bct,OSTYPEVALUES_NETBSD:()=>vct,OSTYPEVALUES_OPENBSD:()=>Rct,OSTYPEVALUES_SOLARIS:()=>Bct,OSTYPEVALUES_WINDOWS:()=>Tct,OSTYPEVALUES_Z_OS:()=>wct,OTEL_STATUS_CODE_VALUE_ERROR:()=>Adt,OTEL_STATUS_CODE_VALUE_OK:()=>Rsn,OsTypeValues:()=>Oct,RPCGRPCSTATUSCODEVALUES_ABORTED:()=>oat,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:()=>eat,RPCGRPCSTATUSCODEVALUES_CANCELLED:()=>Kst,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:()=>cat,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:()=>Wst,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:()=>rat,RPCGRPCSTATUSCODEVALUES_INTERNAL:()=>aat,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:()=>Zst,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:()=>Xst,RPCGRPCSTATUSCODEVALUES_OK:()=>Yst,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:()=>iat,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:()=>tat,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:()=>nat,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:()=>lat,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:()=>uat,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:()=>sat,RPCGRPCSTATUSCODEVALUES_UNKNOWN:()=>Jst,RpcGrpcStatusCodeValues:()=>dat,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:()=>Hrt,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:()=>not,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:()=>Grt,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:()=>Lrt,SEMATTRS_AWS_DYNAMODB_COUNT:()=>eot,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:()=>Krt,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:()=>Vrt,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:()=>rot,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:()=>$rt,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:()=>Urt,SEMATTRS_AWS_DYNAMODB_LIMIT:()=>zrt,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:()=>Yrt,SEMATTRS_AWS_DYNAMODB_PROJECTION:()=>jrt,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:()=>Qrt,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:()=>Frt,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:()=>tot,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:()=>Zrt,SEMATTRS_AWS_DYNAMODB_SEGMENT:()=>Wrt,SEMATTRS_AWS_DYNAMODB_SELECT:()=>qrt,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:()=>Jrt,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:()=>Mrt,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:()=>Xrt,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:()=>xnt,SEMATTRS_CODE_FILEPATH:()=>vrt,SEMATTRS_CODE_FUNCTION:()=>Irt,SEMATTRS_CODE_LINENO:()=>Rrt,SEMATTRS_CODE_NAMESPACE:()=>Crt,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:()=>Lnt,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:()=>jnt,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:()=>Gnt,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:()=>Qnt,SEMATTRS_DB_CASSANDRA_KEYSPACE:()=>Pnt,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:()=>Mnt,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:()=>Fnt,SEMATTRS_DB_CASSANDRA_TABLE:()=>Unt,SEMATTRS_DB_CONNECTION_STRING:()=>Dnt,SEMATTRS_DB_HBASE_NAMESPACE:()=>znt,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:()=>Bnt,SEMATTRS_DB_MONGODB_COLLECTION:()=>$nt,SEMATTRS_DB_MSSQL_INSTANCE_NAME:()=>knt,SEMATTRS_DB_NAME:()=>wnt,SEMATTRS_DB_OPERATION:()=>Ont,SEMATTRS_DB_REDIS_DATABASE_INDEX:()=>Hnt,SEMATTRS_DB_SQL_TABLE:()=>qnt,SEMATTRS_DB_STATEMENT:()=>sV,SEMATTRS_DB_SYSTEM:()=>iV,SEMATTRS_DB_USER:()=>Nnt,SEMATTRS_ENDUSER_ID:()=>Ert,SEMATTRS_ENDUSER_ROLE:()=>yrt,SEMATTRS_ENDUSER_SCOPE:()=>Srt,SEMATTRS_EXCEPTION_ESCAPED:()=>Jnt,SEMATTRS_EXCEPTION_MESSAGE:()=>Ynt,SEMATTRS_EXCEPTION_STACKTRACE:()=>Knt,SEMATTRS_EXCEPTION_TYPE:()=>Vnt,SEMATTRS_FAAS_COLDSTART:()=>ort,SEMATTRS_FAAS_CRON:()=>rrt,SEMATTRS_FAAS_DOCUMENT_COLLECTION:()=>Wnt,SEMATTRS_FAAS_DOCUMENT_NAME:()=>trt,SEMATTRS_FAAS_DOCUMENT_OPERATION:()=>Xnt,SEMATTRS_FAAS_DOCUMENT_TIME:()=>ert,SEMATTRS_FAAS_EXECUTION:()=>Znt,SEMATTRS_FAAS_INVOKED_NAME:()=>irt,SEMATTRS_FAAS_INVOKED_PROVIDER:()=>srt,SEMATTRS_FAAS_INVOKED_REGION:()=>art,SEMATTRS_FAAS_TIME:()=>nrt,SEMATTRS_FAAS_TRIGGER:()=>aV,SEMATTRS_HTTP_CLIENT_IP:()=>Prt,SEMATTRS_HTTP_FLAVOR:()=>Nrt,SEMATTRS_HTTP_HOST:()=>xrt,SEMATTRS_HTTP_METHOD:()=>AB,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:()=>wrt,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:()=>Ort,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:()=>pV,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:()=>fV,SEMATTRS_HTTP_ROUTE:()=>mV,SEMATTRS_HTTP_SCHEME:()=>Drt,SEMATTRS_HTTP_SERVER_NAME:()=>krt,SEMATTRS_HTTP_STATUS_CODE:()=>pS,SEMATTRS_HTTP_TARGET:()=>dV,SEMATTRS_HTTP_URL:()=>MC,SEMATTRS_HTTP_USER_AGENT:()=>Brt,SEMATTRS_MESSAGE_COMPRESSED_SIZE:()=>Not,SEMATTRS_MESSAGE_ID:()=>Dot,SEMATTRS_MESSAGE_TYPE:()=>xot,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:()=>Bot,SEMATTRS_MESSAGING_CONSUMER_ID:()=>Aot,SEMATTRS_MESSAGING_CONVERSATION_ID:()=>dot,SEMATTRS_MESSAGING_DESTINATION:()=>oot,SEMATTRS_MESSAGING_DESTINATION_KIND:()=>iot,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:()=>Eot,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:()=>_ot,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:()=>hot,SEMATTRS_MESSAGING_KAFKA_PARTITION:()=>yot,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:()=>Sot,SEMATTRS_MESSAGING_MESSAGE_ID:()=>lot,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:()=>fot,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:()=>pot,SEMATTRS_MESSAGING_OPERATION:()=>mot,SEMATTRS_MESSAGING_PROTOCOL:()=>aot,SEMATTRS_MESSAGING_PROTOCOL_VERSION:()=>uot,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:()=>got,SEMATTRS_MESSAGING_SYSTEM:()=>AV,SEMATTRS_MESSAGING_TEMP_DESTINATION:()=>sot,SEMATTRS_MESSAGING_URL:()=>cot,SEMATTRS_NET_HOST_CARRIER_ICC:()=>hrt,SEMATTRS_NET_HOST_CARRIER_MCC:()=>Art,SEMATTRS_NET_HOST_CARRIER_MNC:()=>grt,SEMATTRS_NET_HOST_CARRIER_NAME:()=>mrt,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:()=>frt,SEMATTRS_NET_HOST_CONNECTION_TYPE:()=>prt,SEMATTRS_NET_HOST_IP:()=>cV,SEMATTRS_NET_HOST_NAME:()=>drt,SEMATTRS_NET_HOST_PORT:()=>lV,SEMATTRS_NET_PEER_IP:()=>uV,SEMATTRS_NET_PEER_NAME:()=>lrt,SEMATTRS_NET_PEER_PORT:()=>crt,SEMATTRS_NET_TRANSPORT:()=>urt,SEMATTRS_PEER_SERVICE:()=>_rt,SEMATTRS_RPC_GRPC_STATUS_CODE:()=>hV,SEMATTRS_RPC_JSONRPC_ERROR_CODE:()=>vot,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:()=>Rot,SEMATTRS_RPC_JSONRPC_REQUEST_ID:()=>Cot,SEMATTRS_RPC_JSONRPC_VERSION:()=>Iot,SEMATTRS_RPC_METHOD:()=>bot,SEMATTRS_RPC_SERVICE:()=>gV,SEMATTRS_RPC_SYSTEM:()=>Tot,SEMATTRS_THREAD_ID:()=>Trt,SEMATTRS_THREAD_NAME:()=>brt,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:()=>Sat,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:()=>yat,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:()=>Tat,SEMRESATTRS_AWS_ECS_TASK_ARN:()=>bat,SEMRESATTRS_AWS_ECS_TASK_FAMILY:()=>Iat,SEMRESATTRS_AWS_ECS_TASK_REVISION:()=>Cat,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:()=>vat,SEMRESATTRS_AWS_LOG_GROUP_ARNS:()=>xat,SEMRESATTRS_AWS_LOG_GROUP_NAMES:()=>Rat,SEMRESATTRS_AWS_LOG_STREAM_ARNS:()=>Nat,SEMRESATTRS_AWS_LOG_STREAM_NAMES:()=>Dat,SEMRESATTRS_CLOUD_ACCOUNT_ID:()=>gat,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:()=>_at,SEMRESATTRS_CLOUD_PLATFORM:()=>Eat,SEMRESATTRS_CLOUD_PROVIDER:()=>Aat,SEMRESATTRS_CLOUD_REGION:()=>hat,SEMRESATTRS_CONTAINER_ID:()=>wat,SEMRESATTRS_CONTAINER_IMAGE_NAME:()=>kat,SEMRESATTRS_CONTAINER_IMAGE_TAG:()=>Pat,SEMRESATTRS_CONTAINER_NAME:()=>Bat,SEMRESATTRS_CONTAINER_RUNTIME:()=>Oat,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:()=>Mat,SEMRESATTRS_DEVICE_ID:()=>Lat,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:()=>Uat,SEMRESATTRS_DEVICE_MODEL_NAME:()=>Qat,SEMRESATTRS_FAAS_ID:()=>Gat,SEMRESATTRS_FAAS_INSTANCE:()=>zat,SEMRESATTRS_FAAS_MAX_MEMORY:()=>Hat,SEMRESATTRS_FAAS_NAME:()=>Fat,SEMRESATTRS_FAAS_VERSION:()=>jat,SEMRESATTRS_HOST_ARCH:()=>Yat,SEMRESATTRS_HOST_ID:()=>$at,SEMRESATTRS_HOST_IMAGE_ID:()=>Jat,SEMRESATTRS_HOST_IMAGE_NAME:()=>Kat,SEMRESATTRS_HOST_IMAGE_VERSION:()=>Zat,SEMRESATTRS_HOST_NAME:()=>qat,SEMRESATTRS_HOST_TYPE:()=>Vat,SEMRESATTRS_K8S_CLUSTER_NAME:()=>Wat,SEMRESATTRS_K8S_CONTAINER_NAME:()=>out,SEMRESATTRS_K8S_CRONJOB_NAME:()=>gut,SEMRESATTRS_K8S_CRONJOB_UID:()=>Aut,SEMRESATTRS_K8S_DAEMONSET_NAME:()=>put,SEMRESATTRS_K8S_DAEMONSET_UID:()=>dut,SEMRESATTRS_K8S_DEPLOYMENT_NAME:()=>uut,SEMRESATTRS_K8S_DEPLOYMENT_UID:()=>aut,SEMRESATTRS_K8S_JOB_NAME:()=>mut,SEMRESATTRS_K8S_JOB_UID:()=>fut,SEMRESATTRS_K8S_NAMESPACE_NAME:()=>tut,SEMRESATTRS_K8S_NODE_NAME:()=>Xat,SEMRESATTRS_K8S_NODE_UID:()=>eut,SEMRESATTRS_K8S_POD_NAME:()=>rut,SEMRESATTRS_K8S_POD_UID:()=>nut,SEMRESATTRS_K8S_REPLICASET_NAME:()=>sut,SEMRESATTRS_K8S_REPLICASET_UID:()=>iut,SEMRESATTRS_K8S_STATEFULSET_NAME:()=>lut,SEMRESATTRS_K8S_STATEFULSET_UID:()=>cut,SEMRESATTRS_OS_DESCRIPTION:()=>_ut,SEMRESATTRS_OS_NAME:()=>Eut,SEMRESATTRS_OS_TYPE:()=>hut,SEMRESATTRS_OS_VERSION:()=>yut,SEMRESATTRS_PROCESS_COMMAND:()=>Iut,SEMRESATTRS_PROCESS_COMMAND_ARGS:()=>vut,SEMRESATTRS_PROCESS_COMMAND_LINE:()=>Cut,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:()=>Tut,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:()=>but,SEMRESATTRS_PROCESS_OWNER:()=>Rut,SEMRESATTRS_PROCESS_PID:()=>Sut,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:()=>Nut,SEMRESATTRS_PROCESS_RUNTIME_NAME:()=>xut,SEMRESATTRS_PROCESS_RUNTIME_VERSION:()=>Dut,SEMRESATTRS_SERVICE_INSTANCE_ID:()=>wut,SEMRESATTRS_SERVICE_NAME:()=>But,SEMRESATTRS_SERVICE_NAMESPACE:()=>_V,SEMRESATTRS_SERVICE_VERSION:()=>Out,SEMRESATTRS_TELEMETRY_AUTO_VERSION:()=>Lut,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:()=>Put,SEMRESATTRS_TELEMETRY_SDK_NAME:()=>kut,SEMRESATTRS_TELEMETRY_SDK_VERSION:()=>Mut,SEMRESATTRS_WEBENGINE_DESCRIPTION:()=>Fut,SEMRESATTRS_WEBENGINE_NAME:()=>Uut,SEMRESATTRS_WEBENGINE_VERSION:()=>Qut,SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN:()=>ydt,SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE:()=>Sdt,SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT:()=>Tdt,SIGNALR_TRANSPORT_VALUE_LONG_POLLING:()=>Idt,SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS:()=>Cdt,SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS:()=>vdt,SemanticAttributes:()=>wot,SemanticResourceAttributes:()=>Gut,TELEMETRYSDKLANGUAGEVALUES_CPP:()=>kct,TELEMETRYSDKLANGUAGEVALUES_DOTNET:()=>Pct,TELEMETRYSDKLANGUAGEVALUES_ERLANG:()=>Mct,TELEMETRYSDKLANGUAGEVALUES_GO:()=>Lct,TELEMETRYSDKLANGUAGEVALUES_JAVA:()=>Uct,TELEMETRYSDKLANGUAGEVALUES_NODEJS:()=>Qct,TELEMETRYSDKLANGUAGEVALUES_PHP:()=>Fct,TELEMETRYSDKLANGUAGEVALUES_PYTHON:()=>Gct,TELEMETRYSDKLANGUAGEVALUES_RUBY:()=>jct,TELEMETRYSDKLANGUAGEVALUES_WEBJS:()=>zct,TELEMETRY_SDK_LANGUAGE_VALUE_CPP:()=>xsn,TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET:()=>xdt,TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG:()=>Ddt,TELEMETRY_SDK_LANGUAGE_VALUE_GO:()=>Dsn,TELEMETRY_SDK_LANGUAGE_VALUE_JAVA:()=>Ndt,TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:()=>Bdt,TELEMETRY_SDK_LANGUAGE_VALUE_PHP:()=>Nsn,TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON:()=>wdt,TELEMETRY_SDK_LANGUAGE_VALUE_RUBY:()=>Odt,TELEMETRY_SDK_LANGUAGE_VALUE_RUST:()=>kdt,TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT:()=>Pdt,TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS:()=>Mdt,TelemetrySdkLanguageValues:()=>Hct});var Xn=w(()=>{m();uye();kTe();PTe();MTe();LTe()});var UTe=M(dU=>{"use strict";m();Object.defineProperty(dU,"__esModule",{value:!0});dU.ATTR_PROCESS_RUNTIME_NAME=void 0;dU.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name"});var QTe=M(fU=>{"use strict";m();Object.defineProperty(fU,"__esModule",{value:!0});fU.SDK_INFO=void 0;var Gpt=hge(),pU=(Xn(),Me(Hr)),jpt=UTe();fU.SDK_INFO={[pU.ATTR_TELEMETRY_SDK_NAME]:"opentelemetry",[jpt.ATTR_PROCESS_RUNTIME_NAME]:"node",[pU.ATTR_TELEMETRY_SDK_LANGUAGE]:pU.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,[pU.ATTR_TELEMETRY_SDK_VERSION]:Gpt.VERSION}});var FTe=M(au=>{"use strict";m();Object.defineProperty(au,"__esModule",{value:!0});au.otperformance=au.SDK_INFO=au._globalThis=au.getStringListFromEnv=au.getNumberFromEnv=au.getBooleanFromEnv=au.getStringFromEnv=void 0;var mU=Age();Object.defineProperty(au,"getStringFromEnv",{enumerable:!0,get:function(){return mU.getStringFromEnv}});Object.defineProperty(au,"getBooleanFromEnv",{enumerable:!0,get:function(){return mU.getBooleanFromEnv}});Object.defineProperty(au,"getNumberFromEnv",{enumerable:!0,get:function(){return mU.getNumberFromEnv}});Object.defineProperty(au,"getStringListFromEnv",{enumerable:!0,get:function(){return mU.getStringListFromEnv}});var zpt=gge();Object.defineProperty(au,"_globalThis",{enumerable:!0,get:function(){return zpt._globalThis}});var Hpt=QTe();Object.defineProperty(au,"SDK_INFO",{enumerable:!0,get:function(){return Hpt.SDK_INFO}});au.otperformance=performance});var OV=M(uu=>{"use strict";m();Object.defineProperty(uu,"__esModule",{value:!0});uu.getStringListFromEnv=uu.getNumberFromEnv=uu.getStringFromEnv=uu.getBooleanFromEnv=uu.otperformance=uu._globalThis=uu.SDK_INFO=void 0;var AS=FTe();Object.defineProperty(uu,"SDK_INFO",{enumerable:!0,get:function(){return AS.SDK_INFO}});Object.defineProperty(uu,"_globalThis",{enumerable:!0,get:function(){return AS._globalThis}});Object.defineProperty(uu,"otperformance",{enumerable:!0,get:function(){return AS.otperformance}});Object.defineProperty(uu,"getBooleanFromEnv",{enumerable:!0,get:function(){return AS.getBooleanFromEnv}});Object.defineProperty(uu,"getStringFromEnv",{enumerable:!0,get:function(){return AS.getStringFromEnv}});Object.defineProperty(uu,"getNumberFromEnv",{enumerable:!0,get:function(){return AS.getNumberFromEnv}});Object.defineProperty(uu,"getStringListFromEnv",{enumerable:!0,get:function(){return AS.getStringListFromEnv}})});var HTe=M($r=>{"use strict";m();Object.defineProperty($r,"__esModule",{value:!0});$r.addHrTimes=$r.isTimeInput=$r.isTimeInputHrTime=$r.hrTimeToSeconds=$r.hrTimeToMilliseconds=$r.hrTimeToMicroseconds=$r.hrTimeToNanoseconds=$r.hrTimeToTimeStamp=$r.hrTimeDuration=$r.timeInputToHrTime=$r.hrTime=$r.getTimeOrigin=$r.millisToHrTime=void 0;var AU=OV(),GTe=9,$pt=6,qpt=Math.pow(10,$pt),gB=Math.pow(10,GTe);function hB(e){let t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*qpt);return[n,r]}$r.millisToHrTime=hB;function Vpt(){return AU.otperformance.timeOrigin}$r.getTimeOrigin=Vpt;function jTe(e){let t=hB(AU.otperformance.timeOrigin),n=hB(typeof e=="number"?e:AU.otperformance.now());return zTe(t,n)}$r.hrTime=jTe;function Ypt(e){if(kV(e))return e;if(typeof e=="number")return e<AU.otperformance.timeOrigin?jTe(e):hB(e);if(e instanceof Date)return hB(e.getTime());throw TypeError("Invalid input type")}$r.timeInputToHrTime=Ypt;function Kpt(e,t){let n=t[0]-e[0],r=t[1]-e[1];return r<0&&(n-=1,r+=gB),[n,r]}$r.hrTimeDuration=Kpt;function Jpt(e){let t=GTe,n=`${"0".repeat(t)}${e[1]}Z`,r=n.substring(n.length-t-1);return new Date(e[0]*1e3).toISOString().replace("000Z",r)}$r.hrTimeToTimeStamp=Jpt;function Zpt(e){return e[0]*gB+e[1]}$r.hrTimeToNanoseconds=Zpt;function Wpt(e){return e[0]*1e6+e[1]/1e3}$r.hrTimeToMicroseconds=Wpt;function Xpt(e){return e[0]*1e3+e[1]/1e6}$r.hrTimeToMilliseconds=Xpt;function eft(e){return e[0]+e[1]/gB}$r.hrTimeToSeconds=eft;function kV(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}$r.isTimeInputHrTime=kV;function tft(e){return kV(e)||typeof e=="number"||e instanceof Date}$r.isTimeInput=tft;function zTe(e,t){let n=[e[0]+t[0],e[1]+t[1]];return n[1]>=gB&&(n[1]-=gB,n[0]+=1),n}$r.addHrTimes=zTe});var $Te=M(gU=>{"use strict";m();Object.defineProperty(gU,"__esModule",{value:!0});gU.unrefTimer=void 0;function nft(e){typeof e!="number"&&e.unref()}gU.unrefTimer=nft});var qTe=M(_B=>{"use strict";m();Object.defineProperty(_B,"__esModule",{value:!0});_B.ExportResultCode=void 0;var rft;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(rft=_B.ExportResultCode||(_B.ExportResultCode={}))});var YTe=M(hU=>{"use strict";m();Object.defineProperty(hU,"__esModule",{value:!0});hU.CompositePropagator=void 0;var VTe=(He(),Me(tt)),PV=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){VTe.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){VTe.diag.warn(`Failed to extract with ${i.constructor.name}. Err: ${s.message}`)}return o},t)}fields(){return this._fields.slice()}};hU.CompositePropagator=PV});var KTe=M(UC=>{"use strict";m();Object.defineProperty(UC,"__esModule",{value:!0});UC.validateValue=UC.validateKey=void 0;var MV="[_0-9a-z-*/]",oft=`[a-z]${MV}{0,255}`,ift=`[a-z0-9]${MV}{0,240}@[a-z]${MV}{0,13}`,sft=new RegExp(`^(?:${oft}|${ift})$`),aft=/^[ -~]{0,255}[!-~]$/,uft=/,|=/;function cft(e){return sft.test(e)}UC.validateKey=cft;function lft(e){return aft.test(e)&&!uft.test(e)}UC.validateValue=lft});var UV=M(EU=>{"use strict";m();Object.defineProperty(EU,"__esModule",{value:!0});EU.TraceState=void 0;var _U=KTe(),dft=32,JTe=512,ZTe=",",WTe="=",LV=class e{_length;_rawTraceState;_internalState;constructor(t){this._rawTraceState=typeof t=="string"?t:"",this._length=this._rawTraceState.length}set(t,n){if(!(0,_U.validateKey)(t)||!(0,_U.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>JTe)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=ZTe+t),t=`${r[0]}${WTe}${r[1]}`+t,n++;return t}_getState(){if(this._internalState)return this._internalState;let t=this._rawTraceState.split(ZTe),n=new Map,r=0;for(let o of t){let i=o.trim(),s=i.indexOf(WTe);if(s===-1)continue;let u=i.slice(0,s),l=i.slice(s+1);if(!(0,_U.validateKey)(u)||!(0,_U.validateValue)(l))continue;let f=r+i.length+(n.size>0?1:0);if(!(f>JTe)&&(n.set(u,l),r=f,n.size>=dft))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}};EU.TraceState=LV});var ebe=M(cu=>{"use strict";m();Object.defineProperty(cu,"__esModule",{value:!0});cu.W3CTraceContextPropagator=cu.parseTraceParent=cu.TRACE_STATE_HEADER=cu.TRACE_PARENT_HEADER=void 0;var yU=(He(),Me(tt)),pft=fB(),fft=UV();cu.TRACE_PARENT_HEADER="traceparent";cu.TRACE_STATE_HEADER="tracestate";var mft="00",Aft="(?!ff)[\\da-f]{2}",gft="(?![0]{32})[\\da-f]{32}",hft="(?![0]{16})[\\da-f]{16}",_ft="[\\da-f]{2}",Eft=new RegExp(`^\\s?(${Aft})-(${gft})-(${hft})-(${_ft})(-.*)?\\s?$`);function XTe(e){let t=Eft.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}cu.parseTraceParent=XTe;var QV=class{inject(t,n,r){let o=yU.trace.getSpanContext(t);if(!o||(0,pft.isTracingSuppressed)(t)||!(0,yU.isSpanContextValid)(o))return;let i=`${mft}-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||yU.TraceFlags.NONE).toString(16)}`;r.set(n,cu.TRACE_PARENT_HEADER,i),o.traceState&&r.set(n,cu.TRACE_STATE_HEADER,o.traceState.serialize())}extract(t,n,r){let o=r.get(n,cu.TRACE_PARENT_HEADER);if(!o)return t;let i=Array.isArray(o)?o[0]:o;if(typeof i!="string")return t;let s=XTe(i);if(!s)return t;s.isRemote=!0;let u=r.get(n,cu.TRACE_STATE_HEADER);if(u){let l=Array.isArray(u)?u.join(","):u;s.traceState=new fft.TraceState(typeof l=="string"?l:void 0)}return yU.trace.setSpanContext(t,s)}fields(){return[cu.TRACE_PARENT_HEADER,cu.TRACE_STATE_HEADER]}};cu.W3CTraceContextPropagator=QV});var tbe=M(Af=>{"use strict";m();Object.defineProperty(Af,"__esModule",{value:!0});Af.getRPCMetadata=Af.deleteRPCMetadata=Af.setRPCMetadata=Af.RPCType=void 0;var yft=(He(),Me(tt)),FV=(0,yft.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),Sft;(function(e){e.HTTP="http"})(Sft=Af.RPCType||(Af.RPCType={}));function Tft(e,t){return e.setValue(FV,t)}Af.setRPCMetadata=Tft;function bft(e){return e.deleteValue(FV)}Af.deleteRPCMetadata=bft;function Ift(e){return e.getValue(FV)}Af.getRPCMetadata=Ift});var sbe=M(SU=>{"use strict";m();Object.defineProperty(SU,"__esModule",{value:!0});SU.isPlainObject=void 0;var Cft="[object Object]",vft="[object Null]",Rft="[object Undefined]",xft=Function.prototype,nbe=xft.toString,Dft=nbe.call(Object),Nft=Object.getPrototypeOf,rbe=Object.prototype,obe=rbe.hasOwnProperty,gS=Symbol?Symbol.toStringTag:void 0,ibe=rbe.toString;function Bft(e){if(!wft(e)||Oft(e)!==Cft)return!1;let t=Nft(e);if(t===null)return!0;let n=obe.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&nbe.call(n)===Dft}SU.isPlainObject=Bft;function wft(e){return e!=null&&typeof e=="object"}function Oft(e){return e==null?e===void 0?Rft:vft:gS&&gS in Object(e)?kft(e):Pft(e)}function kft(e){let t=obe.call(e,gS),n=e[gS],r=!1;try{e[gS]=void 0,r=!0}catch{}let o=ibe.call(e);return r&&(t?e[gS]=n:delete e[gS]),o}function Pft(e){return ibe.call(e)}});var dbe=M(IU=>{"use strict";m();Object.defineProperty(IU,"__esModule",{value:!0});IU.merge=void 0;var abe=sbe(),Mft=20;function Lft(...e){let t=e.shift(),n=new WeakMap;for(;e.length>0;)t=cbe(t,e.shift(),0,n);return t}IU.merge=Lft;function GV(e){return bU(e)?e.slice():e}function cbe(e,t,n=0,r){let o;if(!(n>Mft)){if(n++,TU(e)||TU(t)||lbe(t))o=GV(t);else if(bU(e)){if(o=e.slice(),bU(t))for(let i=0,s=t.length;i<s;i++)o.push(GV(t[i]));else if(EB(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]=GV(t[l]))}}}else if(EB(e))if(EB(t)){if(!Uft(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 f=t[l];if(TU(f))typeof f>"u"?delete o[l]:o[l]=f;else{let h=o[l],_=f;if(ube(e,l,r)||ube(t,l,r))delete o[l];else{if(EB(h)&&EB(_)){let y=r.get(h)||[],T=r.get(_)||[];y.push({obj:e,key:l}),T.push({obj:t,key:l}),r.set(h,y),r.set(_,T)}o[l]=cbe(o[l],f,n,r)}}}}else o=t;return o}}function ube(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 bU(e){return Array.isArray(e)}function lbe(e){return typeof e=="function"}function EB(e){return!TU(e)&&!bU(e)&&!lbe(e)&&typeof e=="object"}function TU(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function Uft(e,t){return!(!(0,abe.isPlainObject)(e)||!(0,abe.isPlainObject)(t))}});var pbe=M(QC=>{"use strict";m();Object.defineProperty(QC,"__esModule",{value:!0});QC.callWithTimeout=QC.TimeoutError=void 0;var CU=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};QC.TimeoutError=CU;function Qft(e,t){let n,r=new Promise(function(i,s){n=setTimeout(function(){s(new CU("Operation timed out."))},t)});return Promise.race([e,r]).then(o=>(clearTimeout(n),o),o=>{throw clearTimeout(n),o})}QC.callWithTimeout=Qft});var mbe=M(FC=>{"use strict";m();Object.defineProperty(FC,"__esModule",{value:!0});FC.isUrlIgnored=FC.urlMatches=void 0;function fbe(e,t){return typeof t=="string"?e===t:!!e.match(t)}FC.urlMatches=fbe;function Fft(e,t){if(!t)return!1;for(let n of t)if(fbe(e,n))return!0;return!1}FC.isUrlIgnored=Fft});var Abe=M(vU=>{"use strict";m();Object.defineProperty(vU,"__esModule",{value:!0});vU.Deferred=void 0;var jV=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)}};vU.Deferred=jV});var gbe=M(RU=>{"use strict";m();Object.defineProperty(RU,"__esModule",{value:!0});RU.BindOnceFuture=void 0;var Gft=Abe(),zV=class{_isCalled=!1;_deferred=new Gft.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}};RU.BindOnceFuture=zV});var _be=M(xU=>{"use strict";m();Object.defineProperty(xU,"__esModule",{value:!0});xU.diagLogLevelFromString=void 0;var xg=(He(),Me(tt)),hbe={ALL:xg.DiagLogLevel.ALL,VERBOSE:xg.DiagLogLevel.VERBOSE,DEBUG:xg.DiagLogLevel.DEBUG,INFO:xg.DiagLogLevel.INFO,WARN:xg.DiagLogLevel.WARN,ERROR:xg.DiagLogLevel.ERROR,NONE:xg.DiagLogLevel.NONE};function jft(e){if(e==null)return;let t=hbe[e.toUpperCase()];return t??(xg.diag.warn(`Unknown log level "${e}", expected one of ${Object.keys(hbe)}, using default`),xg.DiagLogLevel.INFO)}xU.diagLogLevelFromString=jft});var ybe=M(DU=>{"use strict";m();Object.defineProperty(DU,"__esModule",{value:!0});DU._export=void 0;var Ebe=(He(),Me(tt)),zft=fB();function Hft(e,t){return new Promise(n=>{Ebe.context.with((0,zft.suppressTracing)(Ebe.context.active()),()=>{e.export(t,n)})})}DU._export=Hft});var vr=M(Be=>{"use strict";m();Object.defineProperty(Be,"__esModule",{value:!0});Be.diagLogLevelFromString=Be.BindOnceFuture=Be.urlMatches=Be.isUrlIgnored=Be.callWithTimeout=Be.TimeoutError=Be.merge=Be.TraceState=Be.unsuppressTracing=Be.suppressTracing=Be.isTracingSuppressed=Be.setRPCMetadata=Be.getRPCMetadata=Be.deleteRPCMetadata=Be.RPCType=Be.parseTraceParent=Be.W3CTraceContextPropagator=Be.TRACE_STATE_HEADER=Be.TRACE_PARENT_HEADER=Be.CompositePropagator=Be.otperformance=Be.getStringListFromEnv=Be.getNumberFromEnv=Be.getBooleanFromEnv=Be.getStringFromEnv=Be._globalThis=Be.SDK_INFO=Be.parseKeyPairsIntoRecord=Be.ExportResultCode=Be.unrefTimer=Be.timeInputToHrTime=Be.millisToHrTime=Be.isTimeInputHrTime=Be.isTimeInput=Be.hrTimeToTimeStamp=Be.hrTimeToSeconds=Be.hrTimeToNanoseconds=Be.hrTimeToMilliseconds=Be.hrTimeToMicroseconds=Be.hrTimeDuration=Be.hrTime=Be.getTimeOrigin=Be.addHrTimes=Be.loggingErrorHandler=Be.setGlobalErrorHandler=Be.globalErrorHandler=Be.sanitizeAttributes=Be.isAttributeValue=Be.AnchoredClock=Be.W3CBaggagePropagator=void 0;Be.internal=void 0;var $ft=rge();Object.defineProperty(Be,"W3CBaggagePropagator",{enumerable:!0,get:function(){return $ft.W3CBaggagePropagator}});var qft=oge();Object.defineProperty(Be,"AnchoredClock",{enumerable:!0,get:function(){return qft.AnchoredClock}});var Sbe=cge();Object.defineProperty(Be,"isAttributeValue",{enumerable:!0,get:function(){return Sbe.isAttributeValue}});Object.defineProperty(Be,"sanitizeAttributes",{enumerable:!0,get:function(){return Sbe.sanitizeAttributes}});var Tbe=dge();Object.defineProperty(Be,"globalErrorHandler",{enumerable:!0,get:function(){return Tbe.globalErrorHandler}});Object.defineProperty(Be,"setGlobalErrorHandler",{enumerable:!0,get:function(){return Tbe.setGlobalErrorHandler}});var Vft=rV();Object.defineProperty(Be,"loggingErrorHandler",{enumerable:!0,get:function(){return Vft.loggingErrorHandler}});var Gl=HTe();Object.defineProperty(Be,"addHrTimes",{enumerable:!0,get:function(){return Gl.addHrTimes}});Object.defineProperty(Be,"getTimeOrigin",{enumerable:!0,get:function(){return Gl.getTimeOrigin}});Object.defineProperty(Be,"hrTime",{enumerable:!0,get:function(){return Gl.hrTime}});Object.defineProperty(Be,"hrTimeDuration",{enumerable:!0,get:function(){return Gl.hrTimeDuration}});Object.defineProperty(Be,"hrTimeToMicroseconds",{enumerable:!0,get:function(){return Gl.hrTimeToMicroseconds}});Object.defineProperty(Be,"hrTimeToMilliseconds",{enumerable:!0,get:function(){return Gl.hrTimeToMilliseconds}});Object.defineProperty(Be,"hrTimeToNanoseconds",{enumerable:!0,get:function(){return Gl.hrTimeToNanoseconds}});Object.defineProperty(Be,"hrTimeToSeconds",{enumerable:!0,get:function(){return Gl.hrTimeToSeconds}});Object.defineProperty(Be,"hrTimeToTimeStamp",{enumerable:!0,get:function(){return Gl.hrTimeToTimeStamp}});Object.defineProperty(Be,"isTimeInput",{enumerable:!0,get:function(){return Gl.isTimeInput}});Object.defineProperty(Be,"isTimeInputHrTime",{enumerable:!0,get:function(){return Gl.isTimeInputHrTime}});Object.defineProperty(Be,"millisToHrTime",{enumerable:!0,get:function(){return Gl.millisToHrTime}});Object.defineProperty(Be,"timeInputToHrTime",{enumerable:!0,get:function(){return Gl.timeInputToHrTime}});var Yft=$Te();Object.defineProperty(Be,"unrefTimer",{enumerable:!0,get:function(){return Yft.unrefTimer}});var Kft=qTe();Object.defineProperty(Be,"ExportResultCode",{enumerable:!0,get:function(){return Kft.ExportResultCode}});var Jft=X5();Object.defineProperty(Be,"parseKeyPairsIntoRecord",{enumerable:!0,get:function(){return Jft.parseKeyPairsIntoRecord}});var hS=OV();Object.defineProperty(Be,"SDK_INFO",{enumerable:!0,get:function(){return hS.SDK_INFO}});Object.defineProperty(Be,"_globalThis",{enumerable:!0,get:function(){return hS._globalThis}});Object.defineProperty(Be,"getStringFromEnv",{enumerable:!0,get:function(){return hS.getStringFromEnv}});Object.defineProperty(Be,"getBooleanFromEnv",{enumerable:!0,get:function(){return hS.getBooleanFromEnv}});Object.defineProperty(Be,"getNumberFromEnv",{enumerable:!0,get:function(){return hS.getNumberFromEnv}});Object.defineProperty(Be,"getStringListFromEnv",{enumerable:!0,get:function(){return hS.getStringListFromEnv}});Object.defineProperty(Be,"otperformance",{enumerable:!0,get:function(){return hS.otperformance}});var Zft=YTe();Object.defineProperty(Be,"CompositePropagator",{enumerable:!0,get:function(){return Zft.CompositePropagator}});var NU=ebe();Object.defineProperty(Be,"TRACE_PARENT_HEADER",{enumerable:!0,get:function(){return NU.TRACE_PARENT_HEADER}});Object.defineProperty(Be,"TRACE_STATE_HEADER",{enumerable:!0,get:function(){return NU.TRACE_STATE_HEADER}});Object.defineProperty(Be,"W3CTraceContextPropagator",{enumerable:!0,get:function(){return NU.W3CTraceContextPropagator}});Object.defineProperty(Be,"parseTraceParent",{enumerable:!0,get:function(){return NU.parseTraceParent}});var BU=tbe();Object.defineProperty(Be,"RPCType",{enumerable:!0,get:function(){return BU.RPCType}});Object.defineProperty(Be,"deleteRPCMetadata",{enumerable:!0,get:function(){return BU.deleteRPCMetadata}});Object.defineProperty(Be,"getRPCMetadata",{enumerable:!0,get:function(){return BU.getRPCMetadata}});Object.defineProperty(Be,"setRPCMetadata",{enumerable:!0,get:function(){return BU.setRPCMetadata}});var HV=fB();Object.defineProperty(Be,"isTracingSuppressed",{enumerable:!0,get:function(){return HV.isTracingSuppressed}});Object.defineProperty(Be,"suppressTracing",{enumerable:!0,get:function(){return HV.suppressTracing}});Object.defineProperty(Be,"unsuppressTracing",{enumerable:!0,get:function(){return HV.unsuppressTracing}});var Wft=UV();Object.defineProperty(Be,"TraceState",{enumerable:!0,get:function(){return Wft.TraceState}});var Xft=dbe();Object.defineProperty(Be,"merge",{enumerable:!0,get:function(){return Xft.merge}});var bbe=pbe();Object.defineProperty(Be,"TimeoutError",{enumerable:!0,get:function(){return bbe.TimeoutError}});Object.defineProperty(Be,"callWithTimeout",{enumerable:!0,get:function(){return bbe.callWithTimeout}});var Ibe=mbe();Object.defineProperty(Be,"isUrlIgnored",{enumerable:!0,get:function(){return Ibe.isUrlIgnored}});Object.defineProperty(Be,"urlMatches",{enumerable:!0,get:function(){return Ibe.urlMatches}});var emt=gbe();Object.defineProperty(Be,"BindOnceFuture",{enumerable:!0,get:function(){return emt.BindOnceFuture}});var tmt=_be();Object.defineProperty(Be,"diagLogLevelFromString",{enumerable:!0,get:function(){return tmt.diagLogLevelFromString}});var nmt=ybe();Be.internal={_export:nmt._export}});var Cbe=M(wU=>{"use strict";m();Object.defineProperty(wU,"__esModule",{value:!0});wU.VERSION=void 0;wU.VERSION="0.214.0"});var vbe=M(yB=>{"use strict";m();Object.defineProperty(yB,"__esModule",{value:!0});yB.SeverityNumber=void 0;var rmt;(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"})(rmt=yB.SeverityNumber||(yB.SeverityNumber={}))});var kU=M(GC=>{"use strict";m();Object.defineProperty(GC,"__esModule",{value:!0});GC.NOOP_LOGGER=GC.NoopLogger=void 0;var OU=class{emit(t){}};GC.NoopLogger=OU;GC.NOOP_LOGGER=new OU});var Rbe=M(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 omt(e,t,n){return r=>r===e?t:n}wm.makeGetter=omt;wm.API_BACKWARDS_COMPATIBILITY_VERSION=1});var $V=M(jC=>{"use strict";m();Object.defineProperty(jC,"__esModule",{value:!0});jC.NOOP_LOGGER_PROVIDER=jC.NoopLoggerProvider=void 0;var imt=kU(),PU=class{getLogger(t,n,r){return new imt.NoopLogger}};jC.NoopLoggerProvider=PU;jC.NOOP_LOGGER_PROVIDER=new PU});var xbe=M(MU=>{"use strict";m();Object.defineProperty(MU,"__esModule",{value:!0});MU.ProxyLogger=void 0;var smt=kU(),qV=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):smt.NOOP_LOGGER}};MU.ProxyLogger=qV});var Dbe=M(LU=>{"use strict";m();Object.defineProperty(LU,"__esModule",{value:!0});LU.ProxyLoggerProvider=void 0;var amt=$V(),umt=xbe(),VV=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new umt.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:amt.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)}};LU.ProxyLoggerProvider=VV});var Bbe=M(UU=>{"use strict";m();Object.defineProperty(UU,"__esModule",{value:!0});UU.LogsAPI=void 0;var Vd=Rbe(),cmt=$V(),Nbe=Dbe(),YV=class e{constructor(){this._proxyLoggerProvider=new Nbe.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return Vd._global[Vd.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Vd._global[Vd.GLOBAL_LOGS_API_KEY]=(0,Vd.makeGetter)(Vd.API_BACKWARDS_COMPATIBILITY_VERSION,t,cmt.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=Vd._global[Vd.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(Vd._global,Vd.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete Vd._global[Vd.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new Nbe.ProxyLoggerProvider}};UU.LogsAPI=YV});var KV=M(Om=>{"use strict";m();Object.defineProperty(Om,"__esModule",{value:!0});Om.logs=Om.NoopLogger=Om.NOOP_LOGGER=Om.SeverityNumber=void 0;var lmt=vbe();Object.defineProperty(Om,"SeverityNumber",{enumerable:!0,get:function(){return lmt.SeverityNumber}});var wbe=kU();Object.defineProperty(Om,"NOOP_LOGGER",{enumerable:!0,get:function(){return wbe.NOOP_LOGGER}});Object.defineProperty(Om,"NoopLogger",{enumerable:!0,get:function(){return wbe.NoopLogger}});var dmt=Bbe();Om.logs=dmt.LogsAPI.getInstance()});var Obe=M(zC=>{"use strict";m();Object.defineProperty(zC,"__esModule",{value:!0});zC.disableInstrumentations=zC.enableInstrumentations=void 0;function pmt(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()}}zC.enableInstrumentations=pmt;function fmt(e){e.forEach(t=>t.disable())}zC.disableInstrumentations=fmt});var Mbe=M(QU=>{"use strict";m();Object.defineProperty(QU,"__esModule",{value:!0});QU.registerInstrumentations=void 0;var kbe=(He(),Me(tt)),mmt=KV(),Pbe=Obe();function Amt(e){let t=e.tracerProvider||kbe.trace.getTracerProvider(),n=e.meterProvider||kbe.metrics.getMeterProvider(),r=e.loggerProvider||mmt.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,Pbe.enableInstrumentations)(o,t,n,r),()=>{(0,Pbe.disableInstrumentations)(o)}}QU.registerInstrumentations=Amt});var $be=M(FU=>{"use strict";m();Object.defineProperty(FU,"__esModule",{value:!0});FU.satisfies=void 0;var XV=(He(),Me(tt)),Gbe=/^(?: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-]+)*))?$/,gmt=/^(?<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-]+)*))?$/,hmt={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function _mt(e,t,n){if(!Emt(e))return XV.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=bmt(e);if(!r)return!1;let o=[],i=jbe(r,t,o,n);return i&&!n?.includePrerelease?Smt(r,o):i}FU.satisfies=_mt;function Emt(e){return typeof e=="string"&&Gbe.test(e)}function jbe(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(JV(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=Hmt(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!JV(e,i,n,r))return!1;return!0}return JV(e,t,n,r)}function JV(e,t,n,r){if(t=Tmt(t,r),t.includes(" "))return jbe(e,t,n,r);{let o=Imt(t);return n.push(o),ymt(e,o)}}function ymt(e,t){if(t.invalid)return!1;if(!t.version||WV(t.version))return!0;let n=Ube(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=Ube(r,o)}return hmt[t.op]?.includes(n)}function Smt(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function Tmt(e,t){return e=e.trim(),e=jmt(e,t),e=Gmt(e),e=zmt(e,t),e=e.trim(),e}function $u(e){return!e||e.toLowerCase()==="x"||e==="*"}function bmt(e){let t=e.match(Gbe);if(!t){XV.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 Imt(e){if(!e)return{};let t=e.match(gmt);if(!t)return XV.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 WV(e){return e==="*"||e==="x"||e==="X"}function Lbe(e){let t=parseInt(e,10);return isNaN(t)?e:t}function Cmt(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 vmt(e,t){if(WV(e)||WV(t))return 0;let[n,r]=Cmt(Lbe(e),Lbe(t));return n>r?1:n<r?-1:0}function Ube(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=vmt(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var zbe="[a-zA-Z0-9-]",Hbe="0|[1-9]\\d*",Rmt=`\\d*[a-zA-Z-]${zbe}*`,xmt="((?:<|>)?=?)",Qbe=`(?:${Hbe}|${Rmt})`,Dmt=`(?:-(${Qbe}(?:\\.${Qbe})*))`,Fbe=`${zbe}+`,Nmt=`(?:\\+(${Fbe}(?:\\.${Fbe})*))`,ZV=`${Hbe}|x|X|\\*`,SB=`[v=\\s]*(${ZV})(?:\\.(${ZV})(?:\\.(${ZV})(?:${Dmt})?${Nmt}?)?)?`,Bmt=`^${xmt}\\s*${SB}$`,wmt=new RegExp(Bmt),Omt=`^\\s*(${SB})\\s+-\\s+(${SB})\\s*$`,kmt=new RegExp(Omt),Pmt="(?:~>?)",Mmt=`^${Pmt}${SB}$`,Lmt=new RegExp(Mmt),Umt="(?:\\^)",Qmt=`^${Umt}${SB}$`,Fmt=new RegExp(Qmt);function Gmt(e){let t=Lmt;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 jmt(e,t){let n=Fmt,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,s,u,l)=>{let f;return $u(i)?f="":$u(s)?f=`>=${i}.0.0${r} <${+i+1}.0.0-0`:$u(u)?i==="0"?f=`>=${i}.${s}.0${r} <${i}.${+s+1}.0-0`:f=`>=${i}.${s}.0${r} <${+i+1}.0.0-0`:l?i==="0"?s==="0"?f=`>=${i}.${s}.${u}-${l} <${i}.${s}.${+u+1}-0`:f=`>=${i}.${s}.${u}-${l} <${i}.${+s+1}.0-0`:f=`>=${i}.${s}.${u}-${l} <${+i+1}.0.0-0`:i==="0"?s==="0"?f=`>=${i}.${s}.${u}${r} <${i}.${s}.${+u+1}-0`:f=`>=${i}.${s}.${u}${r} <${i}.${+s+1}.0-0`:f=`>=${i}.${s}.${u} <${+i+1}.0.0-0`,f})}function zmt(e,t){let n=wmt;return e.replace(n,(r,o,i,s,u,l)=>{let f=$u(i),h=f||$u(s),_=h||$u(u),y=_;return o==="="&&y&&(o=""),l=t?.includePrerelease?"-0":"",f?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&y?(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`:_&&(r=`>=${i}.${s}.0${l} <${i}.${+s+1}.0-0`),r})}function Hmt(e,t){let n=kmt;return e.replace(n,(r,o,i,s,u,l,f,h,_,y,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(_)?h="":$u(y)?h=`<${+_+1}.0.0-0`:$u(T)?h=`<${_}.${+y+1}.0-0`:v?h=`<=${_}.${y}.${T}-${v}`:t?.includePrerelease?h=`<${_}.${y}.${+T+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var e7=M(xa=>{"use strict";m();Object.defineProperty(xa,"__esModule",{value:!0});xa.massUnwrap=xa.unwrap=xa.massWrap=xa.wrap=void 0;var qu=console.error.bind(console);function TB(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 $mt=(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 TB(o,"__original",r),TB(o,"__unwrap",()=>{e[t]===o&&TB(e,t,r)}),TB(o,"__wrapped",!0),TB(e,t,o),o};xa.wrap=$mt;var qmt=(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,xa.wrap)(r,o,n)})})};xa.massWrap=qmt;var Vmt=(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}};xa.unwrap=Vmt;var Ymt=(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,xa.unwrap)(n,r)})})};xa.massUnwrap=Ymt;function bB(e){e&&e.logger&&(typeof e.logger!="function"?qu("new logger isn't a function, not replacing"):qu=e.logger)}xa.default=bB;bB.wrap=xa.wrap;bB.massWrap=xa.massWrap;bB.unwrap=xa.unwrap;bB.massUnwrap=xa.massUnwrap});var qbe=M(jU=>{"use strict";m();Object.defineProperty(jU,"__esModule",{value:!0});jU.InstrumentationAbstract=void 0;var t7=(He(),Me(tt)),Kmt=KV(),GU=e7(),n7=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=t7.diag.createComponentLogger({namespace:t}),this._tracer=t7.trace.getTracer(t,n),this._meter=t7.metrics.getMeter(t,n),this._logger=Kmt.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=GU.wrap;_unwrap=GU.unwrap;_massWrap=GU.massWrap;_massUnwrap=GU.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)}}};jU.InstrumentationAbstract=n7});var Ybe=M((iun,Vbe)=>{m();var HC=1e3,$C=HC*60,qC=$C*60,_S=qC*24,Jmt=_S*7,Zmt=_S*365.25;Vbe.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?eAt(e):Xmt(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*Zmt;case"weeks":case"week":case"w":return n*Jmt;case"days":case"day":case"d":return n*_S;case"hours":case"hour":case"hrs":case"hr":case"h":return n*qC;case"minutes":case"minute":case"mins":case"min":case"m":return n*$C;case"seconds":case"second":case"secs":case"sec":case"s":return n*HC;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function Xmt(e){var t=Math.abs(e);return t>=_S?Math.round(e/_S)+"d":t>=qC?Math.round(e/qC)+"h":t>=$C?Math.round(e/$C)+"m":t>=HC?Math.round(e/HC)+"s":e+"ms"}function eAt(e){var t=Math.abs(e);return t>=_S?zU(e,t,_S,"day"):t>=qC?zU(e,t,qC,"hour"):t>=$C?zU(e,t,$C,"minute"):t>=HC?zU(e,t,HC,"second"):e+" ms"}function zU(e,t,n,r){var o=t>=n*1.5;return Math.round(e/n)+" "+r+(o?"s":"")}});var r7=M((aun,Kbe)=>{m();function tAt(e){n.debug=n,n.default=n,n.coerce=l,n.disable=s,n.enable=o,n.enabled=u,n.humanize=Ybe(),n.destroy=f,Object.keys(e).forEach(h=>{n[h]=e[h]}),n.names=[],n.skips=[],n.formatters={};function t(h){let _=0;for(let y=0;y<h.length;y++)_=(_<<5)-_+h.charCodeAt(y),_|=0;return n.colors[Math.abs(_)%n.colors.length]}n.selectColor=t;function n(h){let _,y=null,T,v;function R(...x){if(!R.enabled)return;let O=R,P=Number(new Date),j=P-(_||P);O.diff=j,O.prev=_,O.curr=P,_=P,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 re=n.formatters[ae];if(typeof re=="function"){let _e=x[G];V=re.call(O,_e),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:()=>y!==null?y:(T!==n.namespaces&&(T=n.namespaces,v=n.enabled(h)),v),set:x=>{y=x}}),typeof n.init=="function"&&n.init(R),R}function r(h,_){let y=n(this.namespace+(typeof _>"u"?":":_)+h);return y.log=this.log,y}function o(h){n.save(h),n.namespaces=h,n.names=[],n.skips=[];let _=(typeof h=="string"?h:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let y of _)y[0]==="-"?n.skips.push(y.slice(1)):n.names.push(y)}function i(h,_){let y=0,T=0,v=-1,R=0;for(;y<h.length;)if(T<_.length&&(_[T]===h[y]||_[T]==="*"))_[T]==="*"?(v=T,R=y,T++):(y++,T++);else if(v!==-1)T=v+1,R++,y=R;else return!1;for(;T<_.length&&_[T]==="*";)T++;return T===_.length}function s(){let h=[...n.names,...n.skips.map(_=>"-"+_)].join(",");return n.enable(""),h}function u(h){for(let _ of n.skips)if(i(h,_))return!1;for(let _ of n.names)if(i(h,_))return!0;return!1}function l(h){return h instanceof Error?h.stack||h.message:h}function f(){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}Kbe.exports=tAt});var Jbe=M((Gc,HU)=>{m();Gc.formatArgs=rAt;Gc.save=oAt;Gc.load=iAt;Gc.useColors=nAt;Gc.storage=sAt();Gc.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`."))}})();Gc.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 nAt(){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 rAt(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+HU.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)}Gc.log=console.debug||console.log||(()=>{});function oAt(e){try{e?Gc.storage.setItem("debug",e):Gc.storage.removeItem("debug")}catch{}}function iAt(){let e;try{e=Gc.storage.getItem("debug")||Gc.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function sAt(){try{return localStorage}catch{}}HU.exports=r7()(Gc);var{formatters:aAt}=HU.exports;aAt.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Wbe=M((lun,Zbe)=>{"use strict";m();Zbe.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 tIe=M((pun,eIe)=>{"use strict";m();var uAt=Ue("os"),Xbe=Ue("tty"),Yd=Wbe(),{env:Xs}=process,N_;Yd("no-color")||Yd("no-colors")||Yd("color=false")||Yd("color=never")?N_=0:(Yd("color")||Yd("colors")||Yd("color=true")||Yd("color=always"))&&(N_=1);"FORCE_COLOR"in Xs&&(Xs.FORCE_COLOR==="true"?N_=1:Xs.FORCE_COLOR==="false"?N_=0:N_=Xs.FORCE_COLOR.length===0?1:Math.min(parseInt(Xs.FORCE_COLOR,10),3));function o7(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function i7(e,t){if(N_===0)return 0;if(Yd("color=16m")||Yd("color=full")||Yd("color=truecolor"))return 3;if(Yd("color=256"))return 2;if(e&&!t&&N_===void 0)return 0;let n=N_||0;if(Xs.TERM==="dumb")return n;if(process.platform==="win32"){let r=uAt.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in Xs)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(r=>r in Xs)||Xs.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in Xs)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Xs.TEAMCITY_VERSION)?1:0;if(Xs.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Xs){let r=parseInt((Xs.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Xs.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Xs.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Xs.TERM)||"COLORTERM"in Xs?1:n}function cAt(e){let t=i7(e,e&&e.isTTY);return o7(t)}eIe.exports={supportsColor:cAt,stdout:o7(i7(!0,Xbe.isatty(1))),stderr:o7(i7(!0,Xbe.isatty(2)))}});var rIe=M((ea,qU)=>{m();var lAt=Ue("tty"),$U=Ue("util");ea.init=hAt;ea.log=mAt;ea.formatArgs=pAt;ea.save=AAt;ea.load=gAt;ea.useColors=dAt;ea.destroy=$U.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");ea.colors=[6,2,3,4,5,1];try{let e=tIe();e&&(e.stderr||e).level>=2&&(ea.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{}ea.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 dAt(){return"colors"in ea.inspectOpts?!!ea.inspectOpts.colors:lAt.isatty(process.stderr.fd)}function pAt(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+"+qU.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=fAt()+t+" "+e[0]}function fAt(){return ea.inspectOpts.hideDate?"":new Date().toISOString()+" "}function mAt(...e){return process.stderr.write($U.formatWithOptions(ea.inspectOpts,...e)+`
6
6
  `)}function AAt(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function gAt(){return process.env.DEBUG}function hAt(e){e.inspectOpts={};let t=Object.keys(ea.inspectOpts);for(let n=0;n<t.length;n++)e.inspectOpts[t[n]]=ea.inspectOpts[t[n]]}qU.exports=r7()(ea);var{formatters:nIe}=qU.exports;nIe.o=function(e){return this.inspectOpts.colors=this.useColors,$U.inspect(e,this.inspectOpts).split(`
@@ -35,7 +35,7 @@ Url: ${nF(e)}`),!0}return!1}function O_t(e,t){return t?.length?ZQ(e).some(n=>F_(
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,Qw.safeExecuteInTheMiddle)(()=>!r||t.method==="CONNECT"||n.ignoreRequestHook?.(t),V=>V&&this._diag.error("caught ignoreRequestHook error: ",V),!0))return;let i=(0,$4.hrTime)(),s;try{s=new LIt.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),f={[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"},_=s.hostname,y=s.port||h[u];f[os.ATTR_SERVER_ADDRESS]=_,y&&!isNaN(Number(y))&&(f[os.ATTR_SERVER_PORT]=Number(y));let v=this.parseRequestHeaders(t).get("user-agent");if(v){let V=Array.isArray(v)?v[v.length-1]:v;f[os.ATTR_USER_AGENT_ORIGINAL]=V}let R=(0,Qw.safeExecuteInTheMiddle)(()=>n.startSpanHook?.(t),V=>V&&this._diag.error("caught startSpanHook error: ",V),!0);R&&Object.entries(R).forEach(([V,ae])=>{f[V]=ae});let x=Zl.context.active(),O=Zl.trace.getSpan(x),P;n.requireParentforSpans&&(!O||!Zl.trace.isSpanContextValid(O.spanContext()))?P=Zl.trace.wrapSpanContext(Zl.INVALID_SPAN_CONTEXT):P=this.tracer.startSpan(l==="_OTHER"?"HTTP":l,{kind:Zl.SpanKind.CLIENT,attributes:f},x),(0,Qw.safeExecuteInTheMiddle)(()=>n.requestHook?.(P,t),V=>V&&this._diag.error("caught requestHook error: ",V),!0);let j=Zl.trace.setSpan(Zl.context.active(),P),G={};Zl.propagation.inject(j,G);let H=Object.entries(G);for(let V=0;V<H.length;V++){let[ae,re]=H[V];typeof t.addHeader=="function"?t.addHeader(ae,re):typeof t.headers=="string"?t.headers+=`${ae}: ${re}\r
36
36
  `:Array.isArray(t.headers)&&t.headers.push(ae,re)}this._recordFromReq.set(t,{span:P,attributes:f,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 f=new Set(o.headersToSpanAttributes.requestHeaders.map(_=>_.toLowerCase())),h=this.parseRequestHeaders(t);for(let[_,y]of h.entries())if(f.has(_)){let T=Array.isArray(y)?y:[y];l[`http.request.header.${_}`]=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,Qw.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(f=>l.add(f.toLowerCase()));for(let f=0;f<n.headers.length;f=f+2){let h=n.headers[f].toString().toLowerCase(),_=n.headers[f+1];if(l.has(h)){let y=`http.response.header.${h}`;Object.hasOwn(s,y)?s[y].push(_.toString()):s[y]=[_.toString()]}}}o.setAttributes(s),o.setStatus({code:n.statusCode>=400?Zl.SpanStatusCode.ERROR:Zl.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:Zl.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,$4.hrTimeToMilliseconds)((0,$4.hrTimeDuration)(n,(0,$4.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"}};q4.UndiciInstrumentation=QZ});var swe=M(V4=>{"use strict";m();Object.defineProperty(V4,"__esModule",{value:!0});V4.UndiciInstrumentation=void 0;var UIt=iwe();Object.defineProperty(V4,"UndiciInstrumentation",{enumerable:!0,get:function(){return UIt.UndiciInstrumentation}})});function awe(e,t="/"){let n=`${e}`;return n.endsWith("/")&&t.startsWith("/")?`${n}${t.slice(1)}`:!n.endsWith("/")&&!t.startsWith("/")?`${n}/${t}`:`${n}${t}`}function jIt(e,t={}){return typeof e.spans=="boolean"?e.spans:!t.skipOpenTelemetrySetup&&Mi(t)}function zIt(e={}){return{requireParentforSpans:!1,ignoreRequestHook:n=>{let r=awe(n.origin,n.path),o=e.ignoreOutgoingRequests;return!!(o&&r&&o(r))},startSpanHook:n=>{let r=awe(n.origin,n.path);if(r.startsWith("data:")){let o=Iv(r);return{[Mt]:"auto.http.otel.node_fetch","http.url":o,[$_]:o,[Wd]:`${n.method||"GET"} ${o}`}}return{[Mt]:"auto.http.otel.node_fetch"}},requestHook:e.requestHook,responseHook:e.responseHook,headersToSpanAttributes:e.headersToSpanAttributes}}var uwe,cwe,QIt,FIt,GIt,lwe,dwe=w(()=>{m();uwe=ue(swe(),1);At();_r();cwe="NodeFetch",QIt=ct(cwe,uwe.UndiciInstrumentation,e=>zIt(e)),FIt=ct(`${cwe}.sentry`,GS,e=>e),GIt=((e={})=>({name:"NodeFetch",setupOnce(){jIt(e,Et()?.getOptions())&&QIt(e),FIt(e)}})),lwe=GIt});var Y4=M(Fw=>{"use strict";m();Object.defineProperty(Fw,"__esModule",{value:!0});Fw.ExpressLayerType=void 0;var HIt;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(HIt=Fw.ExpressLayerType||(Fw.ExpressLayerType={}))});var K4=M(Gw=>{"use strict";m();Object.defineProperty(Gw,"__esModule",{value:!0});Gw.AttributeNames=void 0;var $It;(function(e){e.EXPRESS_TYPE="express.type",e.EXPRESS_NAME="express.name"})($It=Gw.AttributeNames||(Gw.AttributeNames={}))});var FZ=M(tR=>{"use strict";m();Object.defineProperty(tR,"__esModule",{value:!0});tR._LAYERS_STORE_PROPERTY=tR.kLayerPatched=void 0;tR.kLayerPatched=Symbol("express-layer-patched");tR._LAYERS_STORE_PROPERTY="__ot_middlewares"});var mwe=M(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 GZ=Y4(),nR=K4(),VS=FZ(),qIt=(e,t)=>(Array.isArray(e[VS._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(e,VS._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),t===void 0?{isLayerPathStored:!1}:(e[VS._LAYERS_STORE_PROPERTY].push(t),{isLayerPathStored:!0}));is.storeLayerPath=qIt;var VIt=(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=VIt;var YIt=(e,t,n)=>{if(t.name==="router"){let r=(0,is.getRouterPath)("",t),o=r||n||e||"/";return{attributes:{[nR.AttributeNames.EXPRESS_NAME]:o,[nR.AttributeNames.EXPRESS_TYPE]:GZ.ExpressLayerType.ROUTER},name:`router - ${o}`}}else return t.name==="bound dispatch"||t.name==="handle"?{attributes:{[nR.AttributeNames.EXPRESS_NAME]:(e||n)??"request handler",[nR.AttributeNames.EXPRESS_TYPE]:GZ.ExpressLayerType.REQUEST_HANDLER},name:`request handler${t.path?` - ${e||n}`:""}`}:{attributes:{[nR.AttributeNames.EXPRESS_NAME]:t.name,[nR.AttributeNames.EXPRESS_TYPE]:GZ.ExpressLayerType.MIDDLEWARE},name:`middleware - ${t.name}`}};is.getLayerMetadata=YIt;var KIt=(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")},JIt=(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(KIt(e,r))return!0}catch{}return!1};is.isLayerIgnored=JIt;var ZIt=e=>e instanceof Error?[e,e.message]:[String(e),String(e)];is.asErrorAndMessage=ZIt;var WIt=e=>{let t=e[0];return Array.isArray(t)?t.map(n=>pwe(n)||"").join(","):pwe(t)};is.getLayerPath=WIt;var pwe=e=>{if(typeof e=="string")return e;if(e instanceof RegExp||typeof e=="number")return e.toString()};function fwe(e){let n=(Array.isArray(e[VS._LAYERS_STORE_PROPERTY])?e[VS._LAYERS_STORE_PROPERTY]:[]).filter(r=>r!=="/"&&r!=="/*");return n.length===1&&n[0]==="*"?"*":n.join("").replace(/\/{2,}/g,"/")}is.getConstructedRoute=fwe;function XIt(e){let t=Array.isArray(e[VS._LAYERS_STORE_PROPERTY])?e[VS._LAYERS_STORE_PROPERTY]:[];if(t.length===0)return;if(t.every(i=>i==="/"))return e.originalUrl==="/"?"/":void 0;let n=fwe(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)||eCt(r))?r:void 0}is.getActualMatchedRoute=XIt;function eCt(e){return e.includes(":")||e.includes("*")}});var Awe=M(rR=>{"use strict";m();Object.defineProperty(rR,"__esModule",{value:!0});rR.PACKAGE_NAME=rR.PACKAGE_VERSION=void 0;rR.PACKAGE_VERSION="0.62.0";rR.PACKAGE_NAME="@opentelemetry/instrumentation-express"});var ywe=M(Z4=>{"use strict";m();Object.defineProperty(Z4,"__esModule",{value:!0});Z4.ExpressInstrumentation=void 0;var gwe=vr(),Yc=(He(),Me(tt)),hwe=Y4(),_we=K4(),Xm=mwe(),Ewe=Awe(),oR=un(),tCt=(Xn(),Me(Hr)),J4=FZ(),jZ=class extends oR.InstrumentationBase{constructor(t={}){super(Ewe.PACKAGE_NAME,Ewe.PACKAGE_VERSION,t)}init(){return[new oR.InstrumentationNodeModuleDefinition("express",[">=4.0.0 <6"],t=>{let n=typeof t?.Router?.prototype?.route=="function",r=n?t.Router.prototype:t.Router;return(0,oR.isWrapped)(r.route)&&this._unwrap(r,"route"),this._wrap(r,"route",this._getRoutePatch()),(0,oR.isWrapped)(r.use)&&this._unwrap(r,"use"),this._wrap(r,"use",this._getRouterUsePatch()),(0,oR.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,Xm.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,Xm.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,Xm.getLayerPath)(i))}return u}}}_applyPatch(t,n){let r=this;t[J4.kLayerPatched]!==!0&&(t[J4.kLayerPatched]=!0,this._wrap(t,"handle",o=>{if(o.length===4)return o;let i=function(s,u){let{isLayerPathStored:l}=(0,Xm.storeLayerPath)(s,n),f=(0,Xm.getConstructedRoute)(s),h=(0,Xm.getActualMatchedRoute)(s),_={[tCt.ATTR_HTTP_ROUTE]:h},y=(0,Xm.getLayerMetadata)(f,t,n),T=y.attributes[_we.AttributeNames.EXPRESS_TYPE],v=(0,gwe.getRPCMetadata)(Yc.context.active());if(v?.type===gwe.RPCType.HTTP&&(v.route=h),(0,Xm.isLayerIgnored)(y.name,T,r.getConfig()))return T===hwe.ExpressLayerType.MIDDLEWARE&&s[J4._LAYERS_STORE_PROPERTY].pop(),o.apply(this,arguments);if(Yc.trace.getSpan(Yc.context.active())===void 0)return o.apply(this,arguments);let R=r._getSpanName({request:s,layerType:T,route:f},y.name),x=r.tracer.startSpan(R,{attributes:Object.assign(_,y.attributes)}),O=Yc.context.active(),P=Yc.trace.setSpan(O,x),{requestHook:j}=r.getConfig();j&&(0,oR.safeExecuteInTheMiddle)(()=>j(x,{request:s,layerType:T,route:f}),re=>{re&&Yc.diag.error("express instrumentation: request hook failed",re)},!0);let G=!1;y.attributes[_we.AttributeNames.EXPRESS_TYPE]===hwe.ExpressLayerType.ROUTER&&(x.end(),G=!0,P=O);let H=()=>{G===!1&&(G=!0,x.end())},V=Array.from(arguments),ae=V.findIndex(re=>typeof re=="function");ae>=0&&(arguments[ae]=function(){let re=arguments[0],_e=![void 0,null,"route","router"].includes(re);if(!G&&_e){let[Tt,ye]=(0,Xm.asErrorAndMessage)(re);x.recordException(Tt),x.setStatus({code:Yc.SpanStatusCode.ERROR,message:ye})}G===!1&&(G=!0,s.res?.removeListener("finish",H),x.end()),!(s.route&&_e)&&l&&s[J4._LAYERS_STORE_PROPERTY].pop();let Qe=V[ae],pt=Yc.context.active(),Ge=Yc.trace.getSpan(O),Pt=Ge?Yc.trace.setSpan(pt,Ge):pt;return Yc.context.bind(Pt,Qe).apply(this,arguments)});try{return Yc.context.bind(P,o).apply(this,arguments)}catch(re){let[_e,Qe]=(0,Xm.asErrorAndMessage)(re);throw x.recordException(_e),x.setStatus({code:Yc.SpanStatusCode.ERROR,message:Qe}),re}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 Yc.diag.error("express instrumentation: error calling span name rewrite hook",o),n}}};Z4.ExpressInstrumentation=jZ});var Swe=M(fE=>{"use strict";m();Object.defineProperty(fE,"__esModule",{value:!0});fE.AttributeNames=fE.ExpressLayerType=fE.ExpressInstrumentation=void 0;var nCt=ywe();Object.defineProperty(fE,"ExpressInstrumentation",{enumerable:!0,get:function(){return nCt.ExpressInstrumentation}});var rCt=Y4();Object.defineProperty(fE,"ExpressLayerType",{enumerable:!0,get:function(){return rCt.ExpressLayerType}});var oCt=K4();Object.defineProperty(fE,"AttributeNames",{enumerable:!0,get:function(){return oCt.AttributeNames}})});var Ds,YS=w(()=>{m();Ds=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__});function iCt(e){qr(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 sCt(e,t){if(Rn()===Zd())return Ds&&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 Twe,bwe,Iwe,aCt,Cwe,vwe=w(()=>{m();Twe=ue(Swe(),1);At();_r();YS();bwe="Express";Iwe=ct(bwe,()=>new Twe.ExpressInstrumentation({requestHook:e=>iCt(e),spanNameHook:(e,t)=>sCt(e,t)})),aCt=(()=>({name:bwe,setupOnce(){Iwe()}})),Cwe=aCt});var Rwe=M(jw=>{"use strict";m();Object.defineProperty(jw,"__esModule",{value:!0});jw.SeverityNumber=void 0;var uCt;(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"})(uCt=jw.SeverityNumber||(jw.SeverityNumber={}))});var e3=M(iR=>{"use strict";m();Object.defineProperty(iR,"__esModule",{value:!0});iR.NOOP_LOGGER=iR.NoopLogger=void 0;var X4=class{emit(t){}};iR.NoopLogger=X4;iR.NOOP_LOGGER=new X4});var xwe=M(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;eA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");eA._global=globalThis;function cCt(e,t,n){return r=>r===e?t:n}eA.makeGetter=cCt;eA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var zZ=M(sR=>{"use strict";m();Object.defineProperty(sR,"__esModule",{value:!0});sR.NOOP_LOGGER_PROVIDER=sR.NoopLoggerProvider=void 0;var lCt=e3(),t3=class{getLogger(t,n,r){return new lCt.NoopLogger}};sR.NoopLoggerProvider=t3;sR.NOOP_LOGGER_PROVIDER=new t3});var Dwe=M(n3=>{"use strict";m();Object.defineProperty(n3,"__esModule",{value:!0});n3.ProxyLogger=void 0;var dCt=e3(),HZ=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):dCt.NOOP_LOGGER}};n3.ProxyLogger=HZ});var Nwe=M(r3=>{"use strict";m();Object.defineProperty(r3,"__esModule",{value:!0});r3.ProxyLoggerProvider=void 0;var pCt=zZ(),fCt=Dwe(),$Z=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new fCt.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:pCt.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)}};r3.ProxyLoggerProvider=$Z});var wwe=M(o3=>{"use strict";m();Object.defineProperty(o3,"__esModule",{value:!0});o3.LogsAPI=void 0;var op=xwe(),mCt=zZ(),Bwe=Nwe(),qZ=class e{constructor(){this._proxyLoggerProvider=new Bwe.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return op._global[op.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(op._global[op.GLOBAL_LOGS_API_KEY]=(0,op.makeGetter)(op.API_BACKWARDS_COMPATIBILITY_VERSION,t,mCt.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=op._global[op.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(op._global,op.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete op._global[op.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new Bwe.ProxyLoggerProvider}};o3.LogsAPI=qZ});var VZ=M(tA=>{"use strict";m();Object.defineProperty(tA,"__esModule",{value:!0});tA.logs=tA.NoopLogger=tA.NOOP_LOGGER=tA.SeverityNumber=void 0;var ACt=Rwe();Object.defineProperty(tA,"SeverityNumber",{enumerable:!0,get:function(){return ACt.SeverityNumber}});var Owe=e3();Object.defineProperty(tA,"NOOP_LOGGER",{enumerable:!0,get:function(){return Owe.NOOP_LOGGER}});Object.defineProperty(tA,"NoopLogger",{enumerable:!0,get:function(){return Owe.NoopLogger}});var gCt=wwe();tA.logs=gCt.LogsAPI.getInstance()});var kwe=M(aR=>{"use strict";m();Object.defineProperty(aR,"__esModule",{value:!0});aR.disableInstrumentations=aR.enableInstrumentations=void 0;function hCt(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()}}aR.enableInstrumentations=hCt;function _Ct(e){e.forEach(t=>t.disable())}aR.disableInstrumentations=_Ct});var Lwe=M(i3=>{"use strict";m();Object.defineProperty(i3,"__esModule",{value:!0});i3.registerInstrumentations=void 0;var Pwe=(He(),Me(tt)),ECt=VZ(),Mwe=kwe();function yCt(e){let t=e.tracerProvider||Pwe.trace.getTracerProvider(),n=e.meterProvider||Pwe.metrics.getMeterProvider(),r=e.loggerProvider||ECt.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,Mwe.enableInstrumentations)(o,t,n,r),()=>{(0,Mwe.disableInstrumentations)(o)}}i3.registerInstrumentations=yCt});var qwe=M(s3=>{"use strict";m();Object.defineProperty(s3,"__esModule",{value:!0});s3.satisfies=void 0;var ZZ=(He(),Me(tt)),jwe=/^(?: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-]+)*))?$/,SCt=/^(?<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-]+)*))?$/,TCt={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function bCt(e,t,n){if(!ICt(e))return ZZ.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=xCt(e);if(!r)return!1;let o=[],i=zwe(r,t,o,n);return i&&!n?.includePrerelease?vCt(r,o):i}s3.satisfies=bCt;function ICt(e){return typeof e=="string"&&jwe.test(e)}function zwe(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(YZ(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=KCt(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!YZ(e,i,n,r))return!1;return!0}return YZ(e,t,n,r)}function YZ(e,t,n,r){if(t=RCt(t,r),t.includes(" "))return zwe(e,t,n,r);{let o=DCt(t);return n.push(o),CCt(e,o)}}function CCt(e,t){if(t.invalid)return!1;if(!t.version||JZ(t.version))return!0;let n=Qwe(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=Qwe(r,o)}return TCt[t.op]?.includes(n)}function vCt(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function RCt(e,t){return e=e.trim(),e=VCt(e,t),e=qCt(e),e=YCt(e,t),e=e.trim(),e}function Xu(e){return!e||e.toLowerCase()==="x"||e==="*"}function xCt(e){let t=e.match(jwe);if(!t){ZZ.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 DCt(e){if(!e)return{};let t=e.match(SCt);if(!t)return ZZ.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 JZ(e){return e==="*"||e==="x"||e==="X"}function Uwe(e){let t=parseInt(e,10);return isNaN(t)?e:t}function NCt(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 BCt(e,t){if(JZ(e)||JZ(t))return 0;let[n,r]=NCt(Uwe(e),Uwe(t));return n>r?1:n<r?-1:0}function Qwe(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=BCt(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var Hwe="[a-zA-Z0-9-]",$we="0|[1-9]\\d*",wCt=`\\d*[a-zA-Z-]${Hwe}*`,OCt="((?:<|>)?=?)",Fwe=`(?:${$we}|${wCt})`,kCt=`(?:-(${Fwe}(?:\\.${Fwe})*))`,Gwe=`${Hwe}+`,PCt=`(?:\\+(${Gwe}(?:\\.${Gwe})*))`,KZ=`${$we}|x|X|\\*`,zw=`[v=\\s]*(${KZ})(?:\\.(${KZ})(?:\\.(${KZ})(?:${kCt})?${PCt}?)?)?`,MCt=`^${OCt}\\s*${zw}$`,LCt=new RegExp(MCt),UCt=`^\\s*(${zw})\\s+-\\s+(${zw})\\s*$`,QCt=new RegExp(UCt),FCt="(?:~>?)",GCt=`^${FCt}${zw}$`,jCt=new RegExp(GCt),zCt="(?:\\^)",HCt=`^${zCt}${zw}$`,$Ct=new RegExp(HCt);function qCt(e){let t=jCt;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 VCt(e,t){let n=$Ct,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,s,u,l)=>{let f;return Xu(i)?f="":Xu(s)?f=`>=${i}.0.0${r} <${+i+1}.0.0-0`:Xu(u)?i==="0"?f=`>=${i}.${s}.0${r} <${i}.${+s+1}.0-0`:f=`>=${i}.${s}.0${r} <${+i+1}.0.0-0`:l?i==="0"?s==="0"?f=`>=${i}.${s}.${u}-${l} <${i}.${s}.${+u+1}-0`:f=`>=${i}.${s}.${u}-${l} <${i}.${+s+1}.0-0`:f=`>=${i}.${s}.${u}-${l} <${+i+1}.0.0-0`:i==="0"?s==="0"?f=`>=${i}.${s}.${u}${r} <${i}.${s}.${+u+1}-0`:f=`>=${i}.${s}.${u}${r} <${i}.${+s+1}.0-0`:f=`>=${i}.${s}.${u} <${+i+1}.0.0-0`,f})}function YCt(e,t){let n=LCt;return e.replace(n,(r,o,i,s,u,l)=>{let f=Xu(i),h=f||Xu(s),_=h||Xu(u),y=_;return o==="="&&y&&(o=""),l=t?.includePrerelease?"-0":"",f?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&y?(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`:_&&(r=`>=${i}.${s}.0${l} <${i}.${+s+1}.0-0`),r})}function KCt(e,t){let n=QCt;return e.replace(n,(r,o,i,s,u,l,f,h,_,y,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(_)?h="":Xu(y)?h=`<${+_+1}.0.0-0`:Xu(T)?h=`<${_}.${+y+1}.0-0`:v?h=`<=${_}.${y}.${T}-${v}`:t?.includePrerelease?h=`<${_}.${y}.${+T+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var WZ=M(Ma=>{"use strict";m();Object.defineProperty(Ma,"__esModule",{value:!0});Ma.massUnwrap=Ma.unwrap=Ma.massWrap=Ma.wrap=void 0;var ec=console.error.bind(console);function Hw(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 JCt=(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 Hw(o,"__original",r),Hw(o,"__unwrap",()=>{e[t]===o&&Hw(e,t,r)}),Hw(o,"__wrapped",!0),Hw(e,t,o),o};Ma.wrap=JCt;var ZCt=(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,Ma.wrap)(r,o,n)})})};Ma.massWrap=ZCt;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}};Ma.unwrap=WCt;var XCt=(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,Ma.unwrap)(n,r)})})};Ma.massUnwrap=XCt;function $w(e){e&&e.logger&&(typeof e.logger!="function"?ec("new logger isn't a function, not replacing"):ec=e.logger)}Ma.default=$w;$w.wrap=Ma.wrap;$w.massWrap=Ma.massWrap;$w.unwrap=Ma.unwrap;$w.massUnwrap=Ma.massUnwrap});var Vwe=M(u3=>{"use strict";m();Object.defineProperty(u3,"__esModule",{value:!0});u3.InstrumentationAbstract=void 0;var XZ=(He(),Me(tt)),evt=VZ(),a3=WZ(),eW=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=XZ.diag.createComponentLogger({namespace:t}),this._tracer=XZ.trace.getTracer(t,n),this._meter=XZ.metrics.getMeter(t,n),this._logger=evt.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=a3.wrap;_unwrap=a3.unwrap;_massWrap=a3.massWrap;_massUnwrap=a3.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)}}};u3.InstrumentationAbstract=eW});var Ywe=M(mE=>{"use strict";m();Object.defineProperty(mE,"__esModule",{value:!0});mE.ModuleNameTrie=mE.ModuleNameSeparator=void 0;mE.ModuleNameSeparator="/";var c3=class{hooks=[];children=new Map},tW=class{_trie=new c3;_counter=0;insert(t){let n=this._trie;for(let r of t.moduleName.split(mE.ModuleNameSeparator)){let o=n.children.get(r);o||(o=new c3,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(mE.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))}};mE.ModuleNameTrie=tW});var Jwe=M(l3=>{"use strict";m();Object.defineProperty(l3,"__esModule",{value:!0});l3.RequireInTheMiddleSingleton=void 0;var tvt=ES(),Kwe=Ue("path"),nW=Ywe(),nvt=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),rW=class e{_moduleNameTrie=new nW.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new tvt.Hook(null,{internals:!0},(t,n,r)=>{let o=rvt(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 nvt?new e:this._instance=this._instance??new e}};l3.RequireInTheMiddleSingleton=rW;function rvt(e){return Kwe.sep!==nW.ModuleNameSeparator?e.split(Kwe.sep).join(nW.ModuleNameSeparator):e}});var tOe=M(qw=>{m();var Zwe=[],oW=new WeakMap,Wwe=new WeakMap,Xwe=new Map,eOe=[],ovt={set(e,t,n){let r=oW.get(e),o=r&&r[t];return typeof o=="function"?o(n):!0},get(e,t){if(t===Symbol.toStringTag)return"Module";let n=Wwe.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=oW.get(e),o=r&&r[t];return typeof o=="function"?o(n.value):!0}};function ivt(e,t,n,r,o){Xwe.set(e,o),oW.set(t,n),Wwe.set(t,r);let i=new Proxy(t,ovt);Zwe.forEach(s=>s(e,i,o)),eOe.push([e,i,o])}qw.register=ivt;qw.importHooks=Zwe;qw.specifiers=Xwe;qw.toHook=eOe});var uW=M((TDn,cR)=>{m();var nOe=Ue("path"),svt=VU(),{fileURLToPath:avt}=Ue("url"),{MessageChannel:uvt}=Ue("worker_threads"),{isBuiltin:iW}=Ue("module");iW||(iW=()=>!0);var{importHooks:sW,specifiers:cvt,toHook:lvt}=tOe();function rOe(e){sW.push(e),lvt.forEach(([t,n,r])=>e(t,n,r))}function oOe(e){let t=sW.indexOf(e);t>-1&&sW.splice(t,1)}function uR(e,t,n,r){let o=e(t,n,r);o&&o!==t&&"default"in t&&(t.default=o)}var aW;function dvt(){let{port1:e,port2:t}=new uvt,n=0,r;aW=u=>{n++,e.postMessage(u)},e.on("message",()=>{n--,r&&n<=0&&r()}).unref();function o(){let u=setInterval(()=>{},1e3),l=new Promise(f=>{r=f}).then(()=>{clearInterval(u)});return n===0&&r(),l}let i=t;return{registerOptions:{data:{addHookMessagePort:i,include:[]},transferList:[i]},addHookMessagePort:i,waitForAllMessagesAcknowledged:o}}function Vw(e,t,n){if(!(this instanceof Vw))return new Vw(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;aW&&Array.isArray(e)&&aW(e),this._iitmHook=(o,i,s)=>{let u=o,l=u.startsWith("node:"),f,h;if(l){let _=o.slice(5);iW(_)&&(o=_)}else if(u.startsWith("file://")){let _=Error.stackTraceLimit;Error.stackTraceLimit=0;try{f=avt(o),o=f}catch{}if(Error.stackTraceLimit=_,f){let y=svt(f);y&&(o=y.name,h=y.basedir)}}if(e)for(let _ of e)if(f&&_===f)uR(n,i,f,void 0);else if(_===o){if(!h)uR(n,i,o,h);else if(h.endsWith(cvt.get(u)))uR(n,i,o,h);else if(r){let y=o+nOe.sep+nOe.relative(h,f);uR(n,i,y,h)}}else _===s&&uR(n,i,s,h);else uR(n,i,o,h)},rOe(this._iitmHook)}Vw.prototype.unhook=function(){oOe(this._iitmHook)};cR.exports=Vw;cR.exports.Hook=Vw;cR.exports.addHook=rOe;cR.exports.removeHook=oOe;cR.exports.createAddHookMessageChannel=dvt});var cW=M(AE=>{"use strict";m();Object.defineProperty(AE,"__esModule",{value:!0});AE.isWrapped=AE.safeExecuteInTheMiddleAsync=AE.safeExecuteInTheMiddle=void 0;function pvt(e,t,n){let r,o;try{o=e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}AE.safeExecuteInTheMiddle=pvt;async function fvt(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}}AE.safeExecuteInTheMiddleAsync=fvt;function mvt(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}AE.isWrapped=mvt});var aOe=M(d3=>{"use strict";m();Object.defineProperty(d3,"__esModule",{value:!0});d3.InstrumentationBase=void 0;var Yw=Ue("path"),iOe=Ue("util"),Avt=qwe(),lW=WZ(),gvt=Vwe(),hvt=Jwe(),_vt=uW(),Kw=(He(),Me(tt)),Evt=ES(),yvt=Ue("fs"),Svt=cW(),dW=class extends gvt.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=hvt.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,Svt.isWrapped)(t[n])&&this._unwrap(t,n),iOe.types.isProxy(t)){let o=(0,lW.wrap)(Object.assign({},t),n,r);return Object.defineProperty(t,n,{value:o}),o}else return(0,lW.wrap)(t,n,r)};_unwrap=(t,n)=>iOe.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,lW.unwrap)(t,n);_massWrap=(t,n,r)=>{if(t)Array.isArray(t)||(t=[t]);else{Kw.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){Kw.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{Kw.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){Kw.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=Ue.resolve(n);Ue.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,yvt.readFileSync)(Yw.join(t,"package.json"),{encoding:"utf8"}),r=JSON.parse(n).version;return typeof r=="string"?r:void 0}catch{Kw.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 sOe(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=Yw.normalize(r);return s.filter(f=>f.name===u&&sOe(f.supportedVersions,i,t.includePrerelease)).reduce((f,h)=>(h.moduleExports=f,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(f,t.moduleVersion)):f),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&&Yw.isAbsolute(u)){let f=Yw.parse(u);u=f.name,l=f.dir}return this._onRequire(t,s,u,l)},r=(s,u,l)=>this._onRequire(t,s,u,l),o=Yw.isAbsolute(t.name)?new Evt.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new _vt.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}};d3.InstrumentationBase=dW;function sOe(e,t,n){return typeof t>"u"?e.includes("*"):e.some(r=>(0,Avt.satisfies)(t,r,{includePrerelease:n}))}});var uOe=M(p3=>{"use strict";m();Object.defineProperty(p3,"__esModule",{value:!0});p3.normalize=void 0;var Tvt=Ue("path");Object.defineProperty(p3,"normalize",{enumerable:!0,get:function(){return Tvt.normalize}})});var cOe=M(lR=>{"use strict";m();Object.defineProperty(lR,"__esModule",{value:!0});lR.normalize=lR.InstrumentationBase=void 0;var bvt=aOe();Object.defineProperty(lR,"InstrumentationBase",{enumerable:!0,get:function(){return bvt.InstrumentationBase}});var Ivt=uOe();Object.defineProperty(lR,"normalize",{enumerable:!0,get:function(){return Ivt.normalize}})});var pW=M(dR=>{"use strict";m();Object.defineProperty(dR,"__esModule",{value:!0});dR.normalize=dR.InstrumentationBase=void 0;var lOe=cOe();Object.defineProperty(dR,"InstrumentationBase",{enumerable:!0,get:function(){return lOe.InstrumentationBase}});Object.defineProperty(dR,"normalize",{enumerable:!0,get:function(){return lOe.normalize}})});var dOe=M(f3=>{"use strict";m();Object.defineProperty(f3,"__esModule",{value:!0});f3.InstrumentationNodeModuleDefinition=void 0;var fW=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}};f3.InstrumentationNodeModuleDefinition=fW});var pOe=M(m3=>{"use strict";m();Object.defineProperty(m3,"__esModule",{value:!0});m3.InstrumentationNodeModuleFile=void 0;var Cvt=pW(),mW=class{name;supportedVersions;patch;unpatch;constructor(t,n,r,o){this.name=(0,Cvt.normalize)(t),this.supportedVersions=n,this.patch=r,this.unpatch=o}};m3.InstrumentationNodeModuleFile=mW});var fOe=M(KS=>{"use strict";m();Object.defineProperty(KS,"__esModule",{value:!0});KS.semconvStabilityFromStr=KS.SemconvStability=void 0;var A3;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(A3=KS.SemconvStability||(KS.SemconvStability={}));function vvt(e,t){let n=A3.OLD,r=t?.split(",").map(o=>o.trim()).filter(o=>o!=="");for(let o of r??[])if(o.toLowerCase()===e+"/dup"){n=A3.DUPLICATE;break}else o.toLowerCase()===e&&(n=A3.STABLE);return n}KS.semconvStabilityFromStr=vvt});var AOe=M(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 Rvt=Lwe();Object.defineProperty(ss,"registerInstrumentations",{enumerable:!0,get:function(){return Rvt.registerInstrumentations}});var xvt=pW();Object.defineProperty(ss,"InstrumentationBase",{enumerable:!0,get:function(){return xvt.InstrumentationBase}});var Dvt=dOe();Object.defineProperty(ss,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return Dvt.InstrumentationNodeModuleDefinition}});var Nvt=pOe();Object.defineProperty(ss,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return Nvt.InstrumentationNodeModuleFile}});var AW=cW();Object.defineProperty(ss,"isWrapped",{enumerable:!0,get:function(){return AW.isWrapped}});Object.defineProperty(ss,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return AW.safeExecuteInTheMiddle}});Object.defineProperty(ss,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return AW.safeExecuteInTheMiddleAsync}});var mOe=fOe();Object.defineProperty(ss,"SemconvStability",{enumerable:!0,get:function(){return mOe.SemconvStability}});Object.defineProperty(ss,"semconvStabilityFromStr",{enumerable:!0,get:function(){return mOe.semconvStabilityFromStr}})});var gOe=M((zDn,Bvt)=>{Bvt.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 _Oe=M(JS=>{"use strict";m();Object.defineProperty(JS,"__esModule",{value:!0});JS.range=JS.balanced=void 0;var wvt=(e,t,n)=>{let r=e instanceof RegExp?hOe(e,n):e,o=t instanceof RegExp?hOe(t,n):t,i=r!==null&&o!=null&&(0,JS.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)}};JS.balanced=wvt;var hOe=(e,t)=>{let n=t.match(e);return n?n[0]:null},Ovt=(e,t,n)=>{let r,o,i,s,u,l=n.indexOf(e),f=n.indexOf(t,l+1),h=l;if(l>=0&&f>0){if(e===t)return[l,f];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 _=r.pop();_!==void 0&&(u=[_,f])}else o=r.pop(),o!==void 0&&o<i&&(i=o,s=f),f=n.indexOf(t,h+1);h=l<f&&l>=0?l:f}r.length&&s!==void 0&&(u=[i,s])}return u};JS.range=Ovt});var COe=M(pR=>{"use strict";m();Object.defineProperty(pR,"__esModule",{value:!0});pR.EXPANSION_MAX=void 0;pR.expand=qvt;var EOe=_Oe(),yOe="\0SLASH"+Math.random()+"\0",SOe="\0OPEN"+Math.random()+"\0",hW="\0CLOSE"+Math.random()+"\0",TOe="\0COMMA"+Math.random()+"\0",bOe="\0PERIOD"+Math.random()+"\0",kvt=new RegExp(yOe,"g"),Pvt=new RegExp(SOe,"g"),Mvt=new RegExp(hW,"g"),Lvt=new RegExp(TOe,"g"),Uvt=new RegExp(bOe,"g"),Qvt=/\\\\/g,Fvt=/\\{/g,Gvt=/\\}/g,jvt=/\\,/g,zvt=/\\\./g;pR.EXPANSION_MAX=1e5;function gW(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function Hvt(e){return e.replace(Qvt,yOe).replace(Fvt,SOe).replace(Gvt,hW).replace(jvt,TOe).replace(zvt,bOe)}function $vt(e){return e.replace(kvt,"\\").replace(Pvt,"{").replace(Mvt,"}").replace(Lvt,",").replace(Uvt,".")}function IOe(e){if(!e)return[""];let t=[],n=(0,EOe.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=IOe(i);return i.length&&(s[s.length-1]+=u.shift(),s.push.apply(s,u)),t.push.apply(t,s),t}function qvt(e,t={}){if(!e)return[];let{max:n=pR.EXPANSION_MAX}=t;return e.slice(0,2)==="{}"&&(e="\\{\\}"+e.slice(2)),Jw(Hvt(e),n,!0).map($vt)}function Vvt(e){return"{"+e+"}"}function Yvt(e){return/^-?0\d/.test(e)}function Kvt(e,t){return e<=t}function Jvt(e,t){return e>=t}function Jw(e,t,n){let r=[],o=(0,EOe.balanced)("{","}",e);if(!o)return[e];let i=o.pre,s=o.post.length?Jw(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),f=u||l,h=o.body.indexOf(",")>=0;if(!f&&!h)return o.post.match(/,(?!,).*\}/)?(e=o.pre+"{"+o.body+hW+o.post,Jw(e,t,!0)):[e];let _;if(f)_=o.body.split(/\.\./);else if(_=IOe(o.body),_.length===1&&_[0]!==void 0&&(_=Jw(_[0],t,!1).map(Vvt),_.length===1))return s.map(T=>o.pre+_[0]+T);let y;if(f&&_[0]!==void 0&&_[1]!==void 0){let T=gW(_[0]),v=gW(_[1]),R=Math.max(_[0].length,_[1].length),x=_.length===3&&_[2]!==void 0?Math.max(Math.abs(gW(_[2])),1):1,O=Kvt;v<T&&(x*=-1,O=Jvt);let j=_.some(Yvt);y=[];for(let G=T;O(G,v)&&y.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}}y.push(H)}}else{y=[];for(let T=0;T<_.length;T++)y.push.apply(y,Jw(_[T],t,!1))}for(let T=0;T<y.length;T++)for(let v=0;v<s.length&&r.length<t;v++){let R=i+y[T]+s[v];(!n||f||R)&&r.push(R)}}return r}});var vOe=M(g3=>{"use strict";m();Object.defineProperty(g3,"__esModule",{value:!0});g3.assertValidPattern=void 0;var Zvt=1024*64,Wvt=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>Zvt)throw new TypeError("pattern is too long")};g3.assertValidPattern=Wvt});var xOe=M(h3=>{"use strict";m();Object.defineProperty(h3,"__esModule",{value:!0});h3.parseClass=void 0;var Xvt={"[: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]},Zw=e=>e.replace(/[[\]\\-]/g,"\\$&"),eRt=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),ROe=e=>e.join(""),tRt=(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,f=!1,h=n,_="";e:for(;i<e.length;){let R=e.charAt(i);if((R==="!"||R==="^")&&i===n+1){f=!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,P,j]]of Object.entries(Xvt))if(e.startsWith(x,i)){if(_)return["$.",!1,e.length-n,!0];i+=x.length,j?o.push(O):r.push(O),u=u||P;continue e}}if(l=!1,_){R>_?r.push(Zw(_)+"-"+Zw(R)):R===_&&r.push(Zw(R)),_="",i++;continue}if(e.startsWith("-]",i+1)){r.push(Zw(R+"-")),i+=2;continue}if(e.startsWith("-",i+1)){_=R,i+=2;continue}r.push(Zw(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])&&!f){let R=r[0].length===2?r[0].slice(-1):r[0];return[eRt(R),!1,h-n,!1]}let y="["+(f?"^":"")+ROe(r)+"]",T="["+(f?"":"^")+ROe(o)+"]";return[r.length&&o.length?"("+y+"|"+T+")":r.length?y:T,u,h-n,!0]};h3.parseClass=tRt});var E3=M(_3=>{"use strict";m();Object.defineProperty(_3,"__esModule",{value:!0});_3.unescape=void 0;var nRt=(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");_3.unescape=nRt});var yW=M(b3=>{"use strict";m();var Kc;Object.defineProperty(b3,"__esModule",{value:!0});b3.AST=void 0;var rRt=xOe(),y3=E3(),oRt=new Set(["!","?","+","*","@"]),_W=e=>oRt.has(e),DOe=e=>_W(e.type),iRt=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),sRt=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),aRt=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),NOe=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),uRt="(?!(?:^|/)\\.\\.?(?:$|/))",S3="(?!\\.)",cRt=new Set(["[","."]),lRt=new Set(["..","."]),dRt=new Set("().*{}+?[]^$\\!"),pRt=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),EW="[^/]",BOe=EW+"*?",wOe=EW+"+?",fRt=0,T3=class{type;#n;#r;#o=!1;#e=[];#t;#a;#c;#u=!1;#i;#s;#l=!1;id=++fRt;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 Kc&&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 Kc&&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 Kc(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,f=-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===f+1?(O==="^"||O==="!")&&(h=!0):O==="]"&&!(R===f+2&&h)&&(l=!1),x+=O;continue}else if(O==="["){l=!0,f=R,h=!1,x+=O;continue}if(!o.noext&&_W(O)&&t.charAt(R)==="("&&i<=s){n.push(x),x="";let j=new Kc(O,n);R=Kc.#d(t,j,R,o,i+1),n.push(j);continue}x+=O}return n.push(x),R}let _=r+1,y=new Kc(null,n),T=[],v="";for(;_<t.length;){let R=t.charAt(_++);if(u||R==="\\"){u=!u,v+=R;continue}if(l){_===f+1?(R==="^"||R==="!")&&(h=!0):R==="]"&&!(_===f+2&&h)&&(l=!1),v+=R;continue}else if(R==="["){l=!0,f=_,h=!1,v+=R;continue}if(!o.noext&&_W(R)&&t.charAt(_)==="("&&(i<=s||n&&n.#p(R))){let O=n&&n.#p(R)?0:1;y.push(v),v="";let P=new Kc(R,y);y.push(P),_=Kc.#d(t,P,_,o,i+O);continue}if(R==="|"){y.push(v),v="",T.push(y),y=new Kc(null,n);continue}if(R===")")return v===""&&n.#e.length===0&&(n.#l=!0),y.push(v),v="",n.push(...T,y),_;v+=R}return n.type=null,n.#r=void 0,n.#e=[t.substring(r-1)],_}#_(t){return this.#m(t,sRt)}#m(t,n=iRt){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=aRt){return!!n.get(this.type)?.includes(t)}#E(t,n){let r=t.#e[0],o=new Kc(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!!NOe.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=NOe.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 Kc(null,void 0,n);return Kc.#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()),!DOe(this)){let l=this.isStart()&&this.isEnd()&&!this.#e.some(T=>typeof T!="string"),f=this.#e.map(T=>{let[v,R,x,O]=typeof T=="string"?Kc.#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&&lRt.has(this.#e[0]))){let v=cRt,R=n&&v.has(f.charAt(0))||f.startsWith("\\.")&&v.has(f.charAt(2))||f.startsWith("\\.\\.")&&v.has(f.charAt(4)),x=!n&&!t&&v.has(f.charAt(0));h=R?uRt:x?S3:""}let _="";return this.isEnd()&&this.#n.#u&&this.#t?.type==="!"&&(_="(?:$|\\/)"),[h+f+_,(0,y3.unescape)(f),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(),f=this;return f.#e=[l],f.type=null,f.#r=void 0,[l,(0,y3.unescape)(this.toString()),!1,!1]}let s=!r||t||n||!S3?"":this.#g(!0);s===i&&(s=""),s&&(i=`(?:${i})(?:${s})*?`);let u="";if(this.type==="!"&&this.#l)u=(this.isStart()&&!n?S3:"")+wOe;else{let l=this.type==="!"?"))"+(this.isStart()&&!n&&!t?S3:"")+BOe+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&s?")":this.type==="*"&&s?")?":`)${this.type}`;u=o+i+l}return[u,(0,y3.unescape)(i),this.#r=!!this.#r,this.#o]}#f(){if(DOe(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 f=t.charAt(l);if(o){o=!1,i+=(dRt.has(f)?"\\":"")+f;continue}if(f==="*"){if(u)continue;u=!0,i+=r&&/^[*]+$/.test(t)?wOe:BOe,n=!0;continue}else u=!1;if(f==="\\"){l===t.length-1?i+="\\\\":o=!0;continue}if(f==="["){let[h,_,y,T]=(0,rRt.parseClass)(t,l);if(y){i+=h,s=s||_,l+=y-1,n=n||T;continue}}if(f==="?"){i+=EW,n=!0;continue}i+=pRt(f)}return[i,(0,y3.unescape)(t),!!n,s]}};b3.AST=T3;Kc=T3});var SW=M(I3=>{"use strict";m();Object.defineProperty(I3,"__esModule",{value:!0});I3.escape=void 0;var mRt=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!1}={})=>n?t?e.replace(/[?*()[\]{}]/g,"[$&]"):e.replace(/[?*()[\]\\{}]/g,"\\$&"):t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");I3.escape=mRt});var QOe=M(gt=>{"use strict";m();Object.defineProperty(gt,"__esModule",{value:!0});gt.unescape=gt.escape=gt.AST=gt.Minimatch=gt.match=gt.makeRe=gt.braceExpand=gt.defaults=gt.filter=gt.GLOBSTAR=gt.sep=gt.minimatch=void 0;var ARt=COe(),C3=vOe(),POe=yW(),gRt=SW(),hRt=E3(),_Rt=(e,t,n={})=>((0,C3.assertValidPattern)(t),!n.nocomment&&t.charAt(0)==="#"?!1:new ZS(t,n).match(e));gt.minimatch=_Rt;var ERt=/^\*+([^+@!?\*\[\(]*)$/,yRt=e=>t=>!t.startsWith(".")&&t.endsWith(e),SRt=e=>t=>t.endsWith(e),TRt=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),bRt=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),IRt=/^\*+\.\*+$/,CRt=e=>!e.startsWith(".")&&e.includes("."),vRt=e=>e!=="."&&e!==".."&&e.includes("."),RRt=/^\.\*+$/,xRt=e=>e!=="."&&e!==".."&&e.startsWith("."),DRt=/^\*+$/,NRt=e=>e.length!==0&&!e.startsWith("."),BRt=e=>e.length!==0&&e!=="."&&e!=="..",wRt=/^\?+([^+@!?\*\[\(]*)?$/,ORt=([e,t=""])=>{let n=MOe([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},kRt=([e,t=""])=>{let n=LOe([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},PRt=([e,t=""])=>{let n=LOe([e]);return t?r=>n(r)&&r.endsWith(t):n},MRt=([e,t=""])=>{let n=MOe([e]);return t?r=>n(r)&&r.endsWith(t):n},MOe=([e])=>{let t=e.length;return n=>n.length===t&&!n.startsWith(".")},LOe=([e])=>{let t=e.length;return n=>n.length===t&&n!=="."&&n!==".."},UOe=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",OOe={win32:{sep:"\\"},posix:{sep:"/"}};gt.sep=UOe==="win32"?OOe.win32.sep:OOe.posix.sep;gt.minimatch.sep=gt.sep;gt.GLOBSTAR=Symbol("globstar **");gt.minimatch.GLOBSTAR=gt.GLOBSTAR;var LRt="[^/]",URt=LRt+"*?",QRt="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",FRt="(?:(?!(?:\\/|^)\\.).)*?",GRt=(e,t={})=>n=>(0,gt.minimatch)(n,e,t);gt.filter=GRt;gt.minimatch.filter=gt.filter;var ip=(e,t={})=>Object.assign({},e,t),jRt=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return gt.minimatch;let t=gt.minimatch;return Object.assign((r,o,i={})=>t(r,o,ip(e,i)),{Minimatch:class extends t.Minimatch{constructor(o,i={}){super(o,ip(e,i))}static defaults(o){return t.defaults(ip(e,o)).Minimatch}},AST:class extends t.AST{constructor(o,i,s={}){super(o,i,ip(e,s))}static fromGlob(o,i={}){return t.AST.fromGlob(o,ip(e,i))}},unescape:(r,o={})=>t.unescape(r,ip(e,o)),escape:(r,o={})=>t.escape(r,ip(e,o)),filter:(r,o={})=>t.filter(r,ip(e,o)),defaults:r=>t.defaults(ip(e,r)),makeRe:(r,o={})=>t.makeRe(r,ip(e,o)),braceExpand:(r,o={})=>t.braceExpand(r,ip(e,o)),match:(r,o,i={})=>t.match(r,o,ip(e,i)),sep:t.sep,GLOBSTAR:gt.GLOBSTAR})};gt.defaults=jRt;gt.minimatch.defaults=gt.defaults;var zRt=(e,t={})=>((0,C3.assertValidPattern)(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,ARt.expand)(e,{max:t.braceExpandMax}));gt.braceExpand=zRt;gt.minimatch.braceExpand=gt.braceExpand;var HRt=(e,t={})=>new ZS(e,t).makeRe();gt.makeRe=HRt;gt.minimatch.makeRe=gt.makeRe;var $Rt=(e,t,n={})=>{let r=new ZS(t,n);return e=e.filter(o=>r.match(o)),r.options.nonull&&!e.length&&e.push(t),e};gt.match=$Rt;gt.minimatch.match=gt.match;var kOe=/[?*]|[+@!]\(.*?\)|\[|\]/,qRt=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),ZS=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(t,n={}){(0,C3.assertValidPattern)(t),n=n||{},this.options=n,this.maxGlobstarRecursion=n.maxGlobstarRecursion??200,this.pattern=t,this.platform=n.platform||UOe,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]==="?"||!kOe.test(i[2]))&&!kOe.test(i[3]),f=/^[a-z]:/i.test(i[0]);if(l)return[...i.slice(0,4),...i.slice(4).map(h=>this.parse(h))];if(f)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],f=r[o+3];if(u!==".."||!l||l==="."||l===".."||!f||f==="."||f==="..")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]),f=typeof n[0]=="string"&&/^[a-z]:$/i.test(n[0]),h=!f&&n[0]===""&&n[1]===""&&n[2]==="?"&&typeof n[3]=="string"&&/^[a-z]:$/i.test(n[3]),_=l?3:u?0:void 0,y=h?3:f?0:void 0;if(typeof _=="number"&&typeof y=="number"){let[T,v]=[t[_],n[y]];T.toLowerCase()===v.toLowerCase()&&(n[y]=T,i=y,o=_)}}let{optimizationLevel:s=1}=this.options;return s>=2&&(t=this.levelTwoFileOptimize(t)),n.includes(gt.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(gt.GLOBSTAR,i),u=n.lastIndexOf(gt.GLOBSTAR),[l,f,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 P=t.slice(o,o+l.length);if(!this.#o(P,l,r,0,0))return!1;o+=l.length,i+=l.length}let _=0;if(h.length){if(h.length+o>t.length)return!1;let P=t.length-h.length;if(this.#o(t,h,r,P,0))_=h.length;else{if(t[t.length-1]!==""||o+h.length===t.length||(P--,!this.#o(t,h,r,P,0)))return!1;_=h.length+1}}if(!f.length){let P=!!_;for(let j=o;j<t.length-_;j++){let G=String(t[j]);if(P=!0,G==="."||G===".."||!this.options.dot&&G.startsWith("."))return!1}return r||P}let y=[[[],0]],T=y[0],v=0,R=[0];for(let P of f)P===gt.GLOBSTAR?(R.push(v),T=[[],0],y.push(T)):(T[0].push(P),v++);let x=y.length-1,O=t.length-_;for(let P of y)P[1]=O-(R[x--]+P[0].length);return!!this.#r(t,y,o,0,r,0,!!_)}#r(t,n,r,o,i,s,u){let l=n[o];if(!l){for(let _=r;_<t.length;_++){u=!0;let y=t[_];if(y==="."||y===".."||!this.options.dot&&y.startsWith("."))return!1}return u}let[f,h]=l;for(;r<=h;){if(this.#o(t.slice(0,r+f.length),f,i,r,0)&&s<this.maxGlobstarRecursion){let T=this.#r(t,n,r+f.length,o+1,i,s+1,u);if(T!==!1)return T}let y=t[r];if(y==="."||y===".."||!this.options.dot&&y.startsWith("."))return!1;r++}return i||null}#o(t,n,r,o,i){let s,u,l,f;for(s=o,u=i,f=t.length,l=n.length;s<f&&u<l;s++,u++){this.debug("matchOne loop");let h=n[u],_=t[s];if(this.debug(n,h,_),h===!1||h===gt.GLOBSTAR)return!1;let y;if(typeof h=="string"?(y=_===h,this.debug("string match",h,_,y)):(y=h.test(_),this.debug("pattern match",h,_,y)),!y)return!1}if(s===f&&u===l)return!0;if(s===f)return r;if(u===l)return s===f-1&&t[s]==="";throw new Error("wtf?")}braceExpand(){return(0,gt.braceExpand)(this.pattern,this.options)}parse(t){(0,C3.assertValidPattern)(t);let n=this.options;if(t==="**")return gt.GLOBSTAR;if(t==="")return"";let r,o=null;(r=t.match(DRt))?o=n.dot?BRt:NRt:(r=t.match(ERt))?o=(n.nocase?n.dot?bRt:TRt:n.dot?SRt:yRt)(r[1]):(r=t.match(wRt))?o=(n.nocase?n.dot?kRt:ORt:n.dot?PRt:MRt)(r):(r=t.match(IRt))?o=n.dot?vRt:CRt:(r=t.match(RRt))&&(o=xRt);let i=POe.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?URt:n.dot?QRt:FRt,o=new Set(n.nocase?["i"]:[]),i=t.map(l=>{let f=l.map(_=>{if(_ instanceof RegExp)for(let y of _.flags.split(""))o.add(y);return typeof _=="string"?qRt(_):_===gt.GLOBSTAR?gt.GLOBSTAR:_._src});f.forEach((_,y)=>{let T=f[y+1],v=f[y-1];_!==gt.GLOBSTAR||v===gt.GLOBSTAR||(v===void 0?T!==void 0&&T!==gt.GLOBSTAR?f[y+1]="(?:\\/|"+r+"\\/)?"+T:f[y]=r:T===void 0?f[y-1]=v+"(?:\\/|\\/"+r+")?":T!==gt.GLOBSTAR&&(f[y-1]=v+"(?:\\/|\\/"+r+"\\/)"+T,f[y+1]=gt.GLOBSTAR))});let h=f.filter(_=>_!==gt.GLOBSTAR);if(this.partial&&h.length>=1){let _=[];for(let y=1;y<=h.length;y++)_.push(h.slice(0,y).join("/"));return"(?:"+_.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],f=o;if(r.matchBase&&l.length===1&&(f=[s]),this.matchOne(f,l,n))return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate}static defaults(t){return gt.minimatch.defaults(t).Minimatch}};gt.Minimatch=ZS;var VRt=yW();Object.defineProperty(gt,"AST",{enumerable:!0,get:function(){return VRt.AST}});var YRt=SW();Object.defineProperty(gt,"escape",{enumerable:!0,get:function(){return YRt.escape}});var KRt=E3();Object.defineProperty(gt,"unescape",{enumerable:!0,get:function(){return KRt.unescape}});gt.minimatch.AST=POe.AST;gt.minimatch.Minimatch=ZS;gt.minimatch.escape=gRt.escape;gt.minimatch.unescape=hRt.unescape});var qOe=M((u1n,IW)=>{"use strict";m();var FOe=Ue("node:diagnostics_channel"),{context:v3,trace:TW,SpanStatusCode:R3,propagation:bW,diag:JRt}=(He(),Me(tt)),{getRPCMetadata:ZRt,RPCType:WRt}=vr(),{ATTR_HTTP_ROUTE:x3,ATTR_HTTP_RESPONSE_STATUS_CODE:GOe,ATTR_HTTP_REQUEST_METHOD:XRt,ATTR_URL_PATH:ext}=(Xn(),Me(Hr)),{InstrumentationBase:txt}=AOe(),{version:nxt,name:jOe}=gOe(),rxt=">=4.0.0 <6",zOe=["onRequest","preParsing","preValidation","preHandler","preSerialization","onSend","onResponse","onError"],Io={HOOK_NAME:"hook.name",FASTIFY_TYPE:"fastify.type",HOOK_CALLBACK_NAME:"hook.callback.name",ROOT:"fastify.root"},gE={ROUTE:"route-hook",INSTANCE:"hook",HANDLER:"request-handler"},Yg="anonymous",hE=Symbol("fastify otel instance"),_E=Symbol("fastify otel request spans"),Ww=Symbol("fastify otel request context"),HOe=Symbol("fastify otel addhook original"),$Oe=Symbol("fastify otel setnotfound original"),Xw=Symbol("fastify otel ignore path"),eO=Symbol("fastify otel record exceptions"),D3=class extends txt{logger=null;_requestHook=null;_lifecycleHook=null;constructor(t){if(super(jOe,nxt,t),this.logger=JRt.createComponentLogger({namespace:jOe}),this[Xw]=null,this[eO]=!0,t?.recordExceptions!=null){if(typeof t.recordExceptions!="boolean")throw new TypeError("recordExceptions must be a boolean");this[eO]=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[Xw]=o=>typeof n=="function"?n(o):(r==null&&(r=QOe().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)},FOe.subscribe("fastify.initialization",this._handleInitialization)),super.enable()}disable(){return this._handleInitialization&&(FOe.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:rxt,name:"@fastify/otel"},n;function n(r,o,i){r.decorate(hE,t),r.decorate(HOe,r.addHook),r.decorate($Oe,r.setNotFoundHandler),r.decorateRequest("opentelemetry",function(){let T=this[Ww],v=this[_E];return{enabled:this.routeOptions.config?.otel!==!1,span:v,tracer:t.tracer,context:T,inject:(R,x)=>bW.inject(T,R,x),extract:(R,x)=>bW.extract(T,R,x)}}),r.decorateRequest(_E,null),r.decorateRequest(Ww,null),r.addHook("onRoute",function(T){if(t[Xw]?.(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 zOe)if(T[v]!=null){let R=T[v];if(typeof R=="function")T[v]=_(R,v,{[Io.HOOK_NAME]:`${this.pluginName} - route -> ${v}`,[Io.FASTIFY_TYPE]:gE.ROUTE,[x3]:T.url,[Io.HOOK_CALLBACK_NAME]:R.name?.length>0?R.name:Yg});else if(Array.isArray(R)){let x=[];for(let O of R)x.push(_(O,v,{[Io.HOOK_NAME]:`${this.pluginName} - route -> ${v}`,[Io.FASTIFY_TYPE]:gE.ROUTE,[x3]:T.url,[Io.HOOK_CALLBACK_NAME]:O.name?.length>0?O.name:Yg}));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=_(T.handler,"handler",{[Io.HOOK_NAME]:`${this.pluginName} - route-handler`,[Io.FASTIFY_TYPE]:gE.HANDLER,[x3]:T.url,[Io.HOOK_CALLBACK_NAME]:T.handler.name.length>0?T.handler.name:Yg})}),r.addHook("onRequest",function(T,v,R){if(this[hE].isEnabled()===!1||T.routeOptions.config?.otel===!1)return R();if(this[hE][Xw]?.({url:T.url,method:T.method})===!0)return this[hE].logger.debug(`Ignoring request ${T.method} ${T.url} because it matches the ignore path`),R();let x=v3.active();TW.getSpan(x)==null&&(x=bW.extract(x,T.headers));let O=ZRt(x);T.routeOptions.url!=null&&O?.type===WRt.HTTP&&(O.route=T.routeOptions.url);let P={[Io.ROOT]:"@fastify/otel",[XRt]:T.method,[ext]:T.url};T.routeOptions.url!=null&&(P[x3]=T.routeOptions.url);let j=this[hE].tracer.startSpan("request",{attributes:P},x);try{this[hE]._requestHook?.(j,T)}catch(G){this[hE].logger.error({err:G},"requestHook threw")}T[Ww]=TW.setSpan(x,j),T[_E]=j,v3.with(T[Ww],()=>{R()})}),r.addHook("onResponse",function(T,v,R){let x=T[_E];x!=null&&(x.setAttributes({[GOe]:v.statusCode}),x.end()),T[_E]=null,R()}),r.addHook=l,r.setNotFoundHandler=f,i();function s(y,T,v,R){let x=y[_E];x!=null&&(T.statusCode>=500&&x.setStatus({code:R3.ERROR}),x.setAttributes({[GOe]:T.statusCode}),x.end()),y[_E]=null,R(null,v)}function u(y,T,v,R){let x=y[_E];x!=null&&(x.setStatus({code:R3.ERROR,message:v.message}),t[eO]!==!1&&x.recordException(v)),R()}function l(y,T){let v=this[HOe];return zOe.includes(y)?v.call(this,y,_(T,y,{[Io.HOOK_NAME]:`${this.pluginName} - ${y}`,[Io.FASTIFY_TYPE]:gE.INSTANCE,[Io.HOOK_CALLBACK_NAME]:T.name?.length>0?T.name:Yg})):v.call(this,y,T)}function f(y,T){let v=this[$Oe];typeof y=="function"?(T=_(y,"notFoundHandler",{[Io.HOOK_NAME]:`${this.pluginName} - not-found-handler`,[Io.FASTIFY_TYPE]:gE.INSTANCE,[Io.HOOK_CALLBACK_NAME]:y.name?.length>0?y.name:Yg}),v.call(this,T)):(y.preValidation!=null&&(y.preValidation=_(y.preValidation,"notFoundHandler - preValidation",{[Io.HOOK_NAME]:`${this.pluginName} - not-found-handler - preValidation`,[Io.FASTIFY_TYPE]:gE.INSTANCE,[Io.HOOK_CALLBACK_NAME]:y.preValidation.name?.length>0?y.preValidation.name:Yg})),y.preHandler!=null&&(y.preHandler=_(y.preHandler,"notFoundHandler - preHandler",{[Io.HOOK_NAME]:`${this.pluginName} - not-found-handler - preHandler`,[Io.FASTIFY_TYPE]:gE.INSTANCE,[Io.HOOK_CALLBACK_NAME]:y.preHandler.name?.length>0?y.preHandler.name:Yg})),T=_(T,"notFoundHandler",{[Io.HOOK_NAME]:`${this.pluginName} - not-found-handler`,[Io.FASTIFY_TYPE]:gE.INSTANCE,[Io.HOOK_CALLBACK_NAME]:T.name?.length>0?T.name:Yg}),v.call(this,y,T))}function h(y){for(let T of y)if(T?.routeOptions&&T.url&&T.method)return T;return null}function _(y,T,v={}){return function(...x){let O=this[hE],P=h(x);if(P===null)return O.logger.debug(`Ignoring route instrumentation because ${T} was called without a Fastify request argument`),y.call(this,...x);if(O.isEnabled()===!1||P.routeOptions.config?.otel===!1)return O.logger.debug(`Ignoring route instrumentation ${P.routeOptions.method} ${P.routeOptions.url} because it is disabled`),y.call(this,...x);if(O[Xw]?.({url:P.url,method:P.method})===!0)return O.logger.debug(`Ignoring route instrumentation ${P.routeOptions.method} ${P.routeOptions.url} because it matches the ignore path`),y.call(this,...x);let j=P[Ww]??v3.active(),G=y.name?.length>0?y.name:this.pluginName??Yg,H=O.tracer.startSpan(`${T} - ${G}`,{attributes:v},j);if(O._lifecycleHook!=null)try{O._lifecycleHook(H,{hookName:T,request:P,handler:G})}catch(V){O.logger.error({err:V},"Execution of lifecycleHook failed")}return v3.with(TW.setSpan(j,H),function(){try{let V=y.call(this,...x);return typeof V?.then=="function"?V.then(ae=>(H.end(),ae),ae=>(H.setStatus({code:R3.ERROR,message:ae.message}),O[eO]!==!1&&H.recordException(ae),H.end(),Promise.reject(ae))):(H.end(),V)}catch(V){throw H.setStatus({code:R3.ERROR,message:V.message}),O[eO]!==!1&&H.recordException(V),H.end(),V}},this)}}}}};IW.exports=D3;IW.exports.FastifyOtelInstrumentation=D3});var Kg,tO,nO,VOe=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})(Kg||(Kg={}));(function(e){let t="middleware";e.MIDDLEWARE=t;let n="request_handler";e.REQUEST_HANDLER=n})(tO||(tO={}));(function(e){let t="middleware";e.MIDDLEWARE=t;let n="request handler";e.REQUEST_HANDLER=n})(nO||(nO={}))});var rO,YOe=w(()=>{m();rO=Symbol("opentelemetry.instrumentation.fastify.request_active_span")});function CW(e,t,n,r={}){let o=t.startSpan(n,{attributes:r}),i=e[rO]||[];return i.push(o),Object.defineProperty(e,rO,{enumerable:!1,configurable:!0,value:i}),o}function N3(e,t){let n=e[rO]||[];n.length&&(n.forEach(r=>{t&&(r.setStatus({code:Ai.ERROR,message:t.message}),r.recordException(t)),r.end()}),delete e[rO])}function JOe(e,t,n){let r,o;try{o=e(),KOe(o)&&o.then(i=>t(void 0,i),i=>t(i))}catch(i){r=i}finally{if(!KOe(o)&&(t(r,o),r))throw r;return o}}function KOe(e){return typeof e=="object"&&e&&typeof Object.getOwnPropertyDescriptor(e,"then")?.value=="function"||!1}var ZOe=w(()=>{m();He();YOe()});function axt(){let e=Et();e&&e.on("spanStart",t=>{XOe(t)})}function XOe(e){let t=kt(e).data,n=t["fastify.type"];if(t[Xt]||!n)return;e.setAttributes({[Mt]:"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 w3,WS,oxt,ixt,WOe,sxt,B3,eke=w(()=>{m();He();w3=ue(vr(),1),WS=ue(un(),1);Xn();At();VOe();ZOe();oxt="0.1.0",ixt="@sentry/instrumentation-fastify-v3",WOe="anonymous",sxt=new Set(["onTimeout","onRequest","preParsing","preValidation","preSerialization","preHandler","onSend","onResponse","onError"]),B3=class extends WS.InstrumentationBase{constructor(t={}){super(ixt,oxt,t)}init(){return[new WS.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,w3.getRPCMetadata)(We.active()),l=s.routeOptions?s.routeOptions.url:r.routerPath;l&&u?.type===w3.RPCType.HTTP&&(u.route=l);let f=r.method||"GET";Rn().setTransactionName(`${f} ${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||WOe,l=`${nO.MIDDLEWARE} - ${u}`,f=s[1],h=CW(f,i.tracer,l,{[Kg.FASTIFY_TYPE]:tO.MIDDLEWARE,[Kg.PLUGIN_NAME]:t,[Kg.HOOK_NAME]:n}),_=o&&s[s.length-1];return _&&(s[s.length-1]=function(...y){N3(f),_.apply(this,y)}),We.with(Vt.setSpan(We.active(),h),()=>JOe(()=>r.apply(this,s),y=>{y instanceof Error&&(h.setStatus({code:Ai.ERROR,message:y.message}),h.recordException(y)),o||N3(f)}))}}_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(!sxt.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()),axt(),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,WS.safeExecuteInTheMiddle)(()=>r.apply(this,i),u=>{!u&&s instanceof Error&&(u=s),N3(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,f=`${nO.REQUEST_HANDLER} - ${l||this.pluginName||WOe}`,h={[Kg.PLUGIN_NAME]:this.pluginName,[Kg.FASTIFY_TYPE]:tO.REQUEST_HANDLER,[mV]:s.routeOptions?s.routeOptions.url:r.routerPath};l&&(h[Kg.FASTIFY_NAME]=l);let _=CW(o,t.tracer,f,h);XOe(_);let{requestHook:y}=t.getConfig();return y&&(0,WS.safeExecuteInTheMiddle)(()=>y(_,{request:r}),T=>{T&&t._diag.error("request hook failed",T)},!0),We.with(Vt.setSpan(We.active(),_),()=>{i()})}}}});import*as vW from"node:diagnostics_channel";function uxt(){let e=Et();if(e)return e.getIntegrationByName(O3)}function tke(e,t,n,r){let o=uxt()?.getShouldHandleError()||ske;if(r==="diagnostics-channel"&&(this.diagnosticsChannelExists=!0),this.diagnosticsChannelExists&&r==="onError-hook"){Ds&&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)&&rn(e,{mechanism:{handled:!1,type:"auto.function.fastify"}})}function ske(e,t,n){let r=n.statusCode;return r>=500||r<=299}function ake(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({[Mt]:"auto.http.otel.fastify",[Xt]:`${l}.fastify`});let f=r["fastify.name"]||r["plugin.name"]||r["hook.name"];if(typeof f=="string"){let h=f.replace(/^fastify -> /,"").replace(/^@fastify\/otel -> /,"");e.updateName(h)}}function lxt(){let e=Et();e&&e.on("spanStart",t=>{ake(t)})}function dxt(e){e.addHook("onRequest",async(t,n)=>{if(t.opentelemetry){let{span:i}=t.opentelemetry();i&&ake(i)}let r=t.routeOptions?.url,o=t.method||"GET";Rn().setTransactionName(`${o} ${r}`)})}var nke,O3,rke,oke,cxt,ike,uke=w(()=>{m();nke=ue(qOe(),1);At();_r();YS();eke();O3="Fastify",rke=ct(`${O3}.v3`,()=>new B3);oke=ct(`${O3}.v5`,()=>{let e=new nke.FastifyOtelInstrumentation,t=e.plugin();return vW.subscribe("fastify.initialization",n=>{let r=n.fastify;r?.register(t).after(o=>{o?Ds&&W.error("Failed to setup Fastify instrumentation",o):(lxt(),r&&dxt(r))})}),vW.subscribe("tracing:fastify.request.handler:error",n=>{let{error:r,request:o,reply:i}=n;tke.call(tke,r,o,i,"diagnostics-channel")}),e}),cxt=(({shouldHandleError:e})=>{let t;return{name:O3,setupOnce(){t=e||ske,rke(),oke()},getShouldHandleError(){return t},setShouldHandleError(n){t=n}}}),ike=(e={})=>cxt(e)});var RW=M(Rf=>{"use strict";m();Object.defineProperty(Rf,"__esModule",{value:!0});Rf.SpanNames=Rf.TokenKind=Rf.AllowedOperationTypes=void 0;var pxt;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(pxt=Rf.AllowedOperationTypes||(Rf.AllowedOperationTypes={}));var fxt;(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"})(fxt=Rf.TokenKind||(Rf.TokenKind={}));var mxt;(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"})(mxt=Rf.SpanNames||(Rf.SpanNames={}))});var xW=M(oO=>{"use strict";m();Object.defineProperty(oO,"__esModule",{value:!0});oO.AttributeNames=void 0;var Axt;(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"})(Axt=oO.AttributeNames||(oO.AttributeNames={}))});var k3=M(fR=>{"use strict";m();Object.defineProperty(fR,"__esModule",{value:!0});fR.OTEL_GRAPHQL_DATA_SYMBOL=fR.OTEL_PATCHED_SYMBOL=void 0;fR.OTEL_PATCHED_SYMBOL=Symbol.for("opentelemetry.patched");fR.OTEL_GRAPHQL_DATA_SYMBOL=Symbol.for("opentelemetry.graphql_data")});var cke=M(P3=>{"use strict";m();Object.defineProperty(P3,"__esModule",{value:!0});P3.OPERATION_NOT_SUPPORTED=void 0;var L1n=k3();P3.OPERATION_NOT_SUPPORTED="Operation$operationName$not supported"});var bke=M(Ns=>{"use strict";m();Object.defineProperty(Ns,"__esModule",{value:!0});Ns.wrapFieldResolver=Ns.wrapFields=Ns.getSourceFromLocation=Ns.getOperation=Ns.endSpan=Ns.addSpanSource=Ns.addInputVariableAttributes=Ns.isPromise=void 0;var mR=(He(),Me(tt)),EE=RW(),XS=xW(),Jg=k3(),lke=Object.values(EE.AllowedOperationTypes),gxt=e=>typeof e?.then=="function";Ns.isPromise=gxt;var hxt=e=>typeof e=="object"&&e!==null;function DW(e,t,n){Array.isArray(n)?n.forEach((r,o)=>{DW(e,`${t}.${o}`,r)}):n instanceof Object?Object.entries(n).forEach(([r,o])=>{DW(e,`${t}.${r}`,o)}):e.setAttribute(`${XS.AttributeNames.VARIABLES}${String(t)}`,n)}function _xt(e,t){Object.entries(t).forEach(([n,r])=>{DW(e,n,r)})}Ns.addInputVariableAttributes=_xt;function mke(e,t,n,r,o){let i=Eke(t,n,r,o);e.setAttribute(XS.AttributeNames.SOURCE,i)}Ns.addSpanSource=mke;function Ext(e,t,n,r,o){let i=Ake(n,o);if(i)return{field:i,spanAdded:!1};let u=t().flatResolveSpans?hke(n):gke(n,o);return i={span:yxt(e,t,n,r,o,u)},bxt(n,o,i),{field:i,spanAdded:!0}}function yxt(e,t,n,r,o,i){let s={[XS.AttributeNames.FIELD_NAME]:r.fieldName,[XS.AttributeNames.FIELD_PATH]:o.join("."),[XS.AttributeNames.FIELD_TYPE]:r.returnType.toString(),[XS.AttributeNames.PARENT_NAME]:r.parentType.name},u=e.startSpan(`${EE.SpanNames.RESOLVE} ${s[XS.AttributeNames.FIELD_PATH]}`,{attributes:s},i?mR.trace.setSpan(mR.context.active(),i):void 0),l=n[Jg.OTEL_GRAPHQL_DATA_SYMBOL].source,f=r.fieldNodes.find(h=>h.kind==="Field");return f&&mke(u,l.loc,t().allowValues,f.loc?.start,f.loc?.end),u}function Sxt(e,t){t&&e.recordException(t),e.end()}Ns.endSpan=Sxt;function Txt(e,t){if(!(!e||!Array.isArray(e.definitions)))return t?e.definitions.filter(n=>lke.indexOf(n?.operation)!==-1).find(n=>t===n?.name?.value):e.definitions.find(n=>lke.indexOf(n?.operation)!==-1)}Ns.getOperation=Txt;function bxt(e,t,n){return e[Jg.OTEL_GRAPHQL_DATA_SYMBOL].fields[t.join(".")]=n}function Ake(e,t){return e[Jg.OTEL_GRAPHQL_DATA_SYMBOL].fields[t.join(".")]}function gke(e,t){for(let n=t.length-1;n>0;n--){let r=Ake(e,t.slice(0,n));if(r)return r.span}return hke(e)}function hke(e){return e[Jg.OTEL_GRAPHQL_DATA_SYMBOL].span}function Ixt(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 Cxt(e){return _ke(`
37
37
  `,e)}function dke(e){return _ke(" ",e)}function _ke(e,t){let n="";for(let r=0;r<t;r++)n+=e;return n}var vxt=[EE.TokenKind.FLOAT,EE.TokenKind.STRING,EE.TokenKind.INT,EE.TokenKind.BLOCK_STRING];function Eke(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 f=u.value||u.kind,h="";!t&&vxt.indexOf(u.kind)>=0&&(f="*"),u.kind===EE.TokenKind.STRING&&(f=`"${f}"`),u.kind===EE.TokenKind.EOF&&(f=""),u.line>l?(o+=Cxt(u.line-l),l=u.line,h=dke(u.column-1)):u.line===u.prev?.line&&(h=dke(u.start-(u.prev?.end||0))),o+=h+f,u&&(u=u.next)}}return o}Ns.getSourceFromLocation=Eke;function yke(e,t,n){if(!e||e[Jg.OTEL_PATCHED_SYMBOL])return;let r=e.getFields();e[Jg.OTEL_PATCHED_SYMBOL]=!0,Object.keys(r).forEach(o=>{let i=r[o];if(i&&(i.resolve&&(i.resolve=Tke(t,n,i.resolve)),i.type)){let s=Ske(i.type);for(let u of s)yke(u,t,n)}})}Ns.wrapFields=yke;function Ske(e){return"ofType"in e?Ske(e.ofType):Rxt(e)?e.getTypes():xxt(e)?[e]:[]}function Rxt(e){return"getTypes"in e&&typeof e.getTypes=="function"}function xxt(e){return"getFields"in e&&typeof e.getFields=="function"}var pke=(e,t,n)=>{n&&(e.recordException(t),e.setStatus({code:mR.SpanStatusCode.ERROR,message:t.message}),e.end())},fke=(e,t)=>{t&&e.end()};function Tke(e,t,n,r=!1){if(o[Jg.OTEL_PATCHED_SYMBOL]||typeof n!="function")return n;function o(i,s,u,l){if(!n)return;let f=t();if(f.ignoreTrivialResolveSpans&&r&&(hxt(i)||typeof i=="function")&&typeof i[l.fieldName]!="function")return n.call(this,i,s,u,l);if(!u[Jg.OTEL_GRAPHQL_DATA_SYMBOL])return n.call(this,i,s,u,l);let h=Ixt(f.mergeItems,l&&l.path),_=h.filter(v=>typeof v=="string").length,y,T=!1;if(f.depth>=0&&f.depth<_)y=gke(u,h);else{let{field:v,spanAdded:R}=Ext(e,t,u,l,h);y=v.span,T=R}return mR.context.with(mR.trace.setSpan(mR.context.active(),y),()=>{try{let v=n.call(this,i,s,u,l);return(0,Ns.isPromise)(v)?v.then(R=>(fke(y,T),R),R=>{throw pke(y,R,T),R}):(fke(y,T),v)}catch(v){throw pke(y,v,T),v}})}return o[Jg.OTEL_PATCHED_SYMBOL]=!0,o}Ns.wrapFieldResolver=Tke});var Ike=M(AR=>{"use strict";m();Object.defineProperty(AR,"__esModule",{value:!0});AR.PACKAGE_NAME=AR.PACKAGE_VERSION=void 0;AR.PACKAGE_VERSION="0.62.0";AR.PACKAGE_NAME="@opentelemetry/instrumentation-graphql"});var Rke=M(U3=>{"use strict";m();Object.defineProperty(U3,"__esModule",{value:!0});U3.GraphQLInstrumentation=void 0;var Zg=(He(),Me(tt)),sp=un(),iO=RW(),M3=xW(),NW=k3(),Dxt=cke(),mu=bke(),Cke=Ike(),vke={mergeItems:!1,depth:-1,allowValues:!1,ignoreResolveSpans:!1},L3=[">=14.0.0 <17"],BW=class extends sp.InstrumentationBase{constructor(t={}){super(Cke.PACKAGE_NAME,Cke.PACKAGE_VERSION,{...vke,...t})}setConfig(t={}){super.setConfig({...vke,...t})}init(){let t=new sp.InstrumentationNodeModuleDefinition("graphql",L3);return t.files.push(this._addPatchingExecute()),t.files.push(this._addPatchingParser()),t.files.push(this._addPatchingValidate()),t}_addPatchingExecute(){return new sp.InstrumentationNodeModuleFile("graphql/execution/execute.js",L3,t=>((0,sp.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 sp.InstrumentationNodeModuleFile("graphql/language/parser.js",L3,t=>((0,sp.isWrapped)(t.parse)&&this._unwrap(t,"parse"),this._wrap(t,"parse",this._patchParse()),t),t=>{t&&this._unwrap(t,"parse")})}_addPatchingValidate(){return new sp.InstrumentationNodeModuleFile("graphql/validation/validate.js",L3,t=>((0,sp.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 f=arguments;s=n._wrapExecuteArgs(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],t)}else{let f=arguments[0];s=n._wrapExecuteArgs(f.schema,f.document,f.rootValue,f.contextValue,f.variableValues,f.operationName,f.fieldResolver,f.typeResolver,t)}let u=(0,mu.getOperation)(s.document,s.operationName),l=n._createExecuteSpan(u,s);return s.contextValue[NW.OTEL_GRAPHQL_DATA_SYMBOL]={source:s.document?s.document||s.document[NW.OTEL_GRAPHQL_DATA_SYMBOL]:void 0,span:l,fields:{}},Zg.context.with(Zg.trace.setSpan(Zg.context.active(),l),()=>(0,sp.safeExecuteInTheMiddle)(()=>o.apply(this,[s]),(f,h)=>{n._handleExecutionResult(l,f,h)}))}}}_handleExecutionResult(t,n,r){let o=this.getConfig();if(r===void 0||n){(0,mu.endSpan)(t,n);return}if((0,mu.isPromise)(r))r.then(i=>{if(typeof o.responseHook!="function"){(0,mu.endSpan)(t);return}this._executeResponseHook(t,i)},i=>{(0,mu.endSpan)(t,i)});else{if(typeof o.responseHook!="function"){(0,mu.endSpan)(t);return}this._executeResponseHook(t,r)}}_executeResponseHook(t,n){let{responseHook:r}=this.getConfig();r&&(0,sp.safeExecuteInTheMiddle)(()=>{r(t,n)},o=>{o&&this._diag.error("Error running response hook",o),(0,mu.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,f){return t._validate(this,r,i,s,u,f,l)}}}_parse(t,n,r,o){let i=this.getConfig(),s=this.tracer.startSpan(iO.SpanNames.PARSE);return Zg.context.with(Zg.trace.setSpan(Zg.context.active(),s),()=>(0,sp.safeExecuteInTheMiddle)(()=>n.call(t,r,o),(u,l)=>{l&&((0,mu.getOperation)(l)?l.loc&&(0,mu.addSpanSource)(s,l.loc,i.allowValues):s.updateName(iO.SpanNames.SCHEMA_PARSE)),(0,mu.endSpan)(s,u)}))}_validate(t,n,r,o,i,s,u){let l=this.tracer.startSpan(iO.SpanNames.VALIDATE,{});return Zg.context.with(Zg.trace.setSpan(Zg.context.active(),l),()=>(0,sp.safeExecuteInTheMiddle)(()=>n.call(t,r,o,i,u,s),(f,h)=>{o.loc||l.updateName(iO.SpanNames.SCHEMA_VALIDATE),h&&h.length&&l.recordException({name:M3.AttributeNames.ERROR_VALIDATION_NAME,message:JSON.stringify(h)}),(0,mu.endSpan)(l,f)}))}_createExecuteSpan(t,n){let r=this.getConfig(),o=this.tracer.startSpan(iO.SpanNames.EXECUTE,{});if(t){let{operation:i,name:s}=t;o.setAttribute(M3.AttributeNames.OPERATION_TYPE,i);let u=s?.value;u?(o.setAttribute(M3.AttributeNames.OPERATION_NAME,u),o.updateName(`${i} ${u}`)):o.updateName(i)}else{let i=" ";n.operationName&&(i=` "${n.operationName}" `),i=Dxt.OPERATION_NOT_SUPPORTED.replace("$operationName$",i),o.setAttribute(M3.AttributeNames.OPERATION_NAME,i)}return n.document?.loc&&(0,mu.addSpanSource)(o,n.document.loc,r.allowValues),n.variableValues&&r.allowValues&&(0,mu.addInputVariableAttributes)(o,n.variableValues),o}_wrapExecuteArgs(t,n,r,o,i,s,u,l,f){if(o||(o={}),o[NW.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,_=u??f;return u=(0,mu.wrapFieldResolver)(this.tracer,()=>this.getConfig(),_,h),t&&((0,mu.wrapFields)(t.getQueryType(),this.tracer,()=>this.getConfig()),(0,mu.wrapFields)(t.getMutationType(),this.tracer,()=>this.getConfig())),{schema:t,document:n,rootValue:r,contextValue:o,variableValues:i,operationName:s,fieldResolver:u,typeResolver:l}}};U3.GraphQLInstrumentation=BW});var xke=M(Q3=>{"use strict";m();Object.defineProperty(Q3,"__esModule",{value:!0});Q3.GraphQLInstrumentation=void 0;var Nxt=Rke();Object.defineProperty(Q3,"GraphQLInstrumentation",{enumerable:!0,get:function(){return Nxt.GraphQLInstrumentation}})});function Oke(e){return{ignoreResolveSpans:!0,ignoreTrivialResolveSpans:!0,useOperationNameForRootSpan:!0,...e}}function wxt(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 Dke,Nke,Bke,Bxt,wke,kke=w(()=>{m();He();Dke=ue(xke(),1);At();_r();Xv();Nke="Graphql",Bke=ct(Nke,Dke.GraphQLInstrumentation,e=>{let t=Oke(e);return{...t,responseHook(n,r){qr(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[Zv]||[],_=u?`${s} ${u}`:`${s}`;Array.isArray(h)?(h.push(_),l.setAttribute(Zv,h)):typeof h=="string"?l.setAttribute(Zv,[h,_]):l.setAttribute(Zv,_),kt(l).data["original-description"]||l.setAttribute("original-description",kt(l).description),l.updateName(`${kt(l).data["original-description"]} (${wxt(h)})`)}}}}),Bxt=((e={})=>({name:Nke,setupOnce(){Bke(Oke(e))}})),wke=Bxt});var Pke=M(F3=>{"use strict";m();Object.defineProperty(F3,"__esModule",{value:!0});F3.EVENT_LISTENERS_SET=void 0;F3.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.kafkajs.eventListenersSet")});var Mke=M(G3=>{"use strict";m();Object.defineProperty(G3,"__esModule",{value:!0});G3.bufferTextMapGetter=void 0;G3.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 Lke=M(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 Uke=M(gR=>{"use strict";m();Object.defineProperty(gR,"__esModule",{value:!0});gR.PACKAGE_NAME=gR.PACKAGE_VERSION=void 0;gR.PACKAGE_VERSION="0.23.0";gR.PACKAGE_NAME="@opentelemetry/instrumentation-kafkajs"});var Hke=M(z3=>{"use strict";m();Object.defineProperty(z3,"__esModule",{value:!0});z3.KafkaJsInstrumentation=void 0;var Vr=(He(),Me(tt)),ap=un(),hR=(Xn(),Me(Hr)),Qke=Pke(),Fke=Mke(),ht=Lke(),Gke=Uke();function j3(e,t,n){return r=>{e.add(t,{...n,...r?{[hR.ATTR_ERROR_TYPE]:r}:{}})}}function jke(e,t,n){return r=>{e.record((Date.now()-t)/1e3,{...n,...r?{[hR.ATTR_ERROR_TYPE]:r}:{}})}}var zke=[.005,.01,.025,.05,.075,.1,.25,.5,.75,1,2.5,5,7.5,10],wW=class extends ap.InstrumentationBase{constructor(t={}){super(Gke.PACKAGE_NAME,Gke.PACKAGE_VERSION,t)}_updateMetricInstruments(){this._clientDuration=this.meter.createHistogram(ht.METRIC_MESSAGING_CLIENT_OPERATION_DURATION,{advice:{explicitBucketBoundaries:zke}}),this._sentMessages=this.meter.createCounter(ht.METRIC_MESSAGING_CLIENT_SENT_MESSAGES),this._consumedMessages=this.meter.createCounter(ht.METRIC_MESSAGING_CLIENT_CONSUMED_MESSAGES),this._processDuration=this.meter.createHistogram(ht.METRIC_MESSAGING_PROCESS_DURATION,{advice:{explicitBucketBoundaries:zke}})}init(){let t=r=>{(0,ap.isWrapped)(r?.Kafka?.prototype.producer)&&this._unwrap(r.Kafka.prototype,"producer"),(0,ap.isWrapped)(r?.Kafka?.prototype.consumer)&&this._unwrap(r.Kafka.prototype,"consumer")};return new ap.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,ap.isWrapped)(i.run)&&t._unwrap(i,"run"),t._wrap(i,"run",t._getConsumerRunPatch()),t._setKafkaEventListeners(i),i}}_setKafkaEventListeners(t){t[Qke.EVENT_LISTENERS_SET]||(t.events?.REQUEST&&t.on(t.events.REQUEST,this._recordClientDurationMetric.bind(this)),t[Qke.EVENT_LISTENERS_SET]=!0)}_recordClientDurationMetric(t){let[n,r]=t.payload.broker.split(":");this._clientDuration.record(t.payload.duration/1e3,{[ht.ATTR_MESSAGING_SYSTEM]:ht.MESSAGING_SYSTEM_VALUE_KAFKA,[ht.ATTR_MESSAGING_OPERATION_NAME]:`${t.payload.apiName}`,[hR.ATTR_SERVER_ADDRESS]:n,[hR.ATTR_SERVER_PORT]:Number.parseInt(r,10)})}_getProducerPatch(){let t=this;return n=>function(...o){let i=n.apply(this,o);return(0,ap.isWrapped)(i.sendBatch)&&t._unwrap(i,"sendBatch"),t._wrap(i,"sendBatch",t._getSendBatchPatch()),(0,ap.isWrapped)(i.send)&&t._unwrap(i,"send"),t._wrap(i,"send",t._getSendPatch()),(0,ap.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,ap.isWrapped)(i.eachMessage)&&t._unwrap(i,"eachMessage"),t._wrap(i,"eachMessage",t._getConsumerEachMessagePatch())),i?.eachBatch&&((0,ap.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=Vr.propagation.extract(Vr.ROOT_CONTEXT,i.message.headers,Fke.bufferTextMapGetter),u=t._startConsumerSpan({topic:i.topic,message:i.message,operationType:ht.MESSAGING_OPERATION_TYPE_VALUE_PROCESS,ctx:s,attributes:{[ht.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.partition)}}),l=[jke(t._processDuration,Date.now(),{[ht.ATTR_MESSAGING_SYSTEM]:ht.MESSAGING_SYSTEM_VALUE_KAFKA,[ht.ATTR_MESSAGING_OPERATION_NAME]:"process",[ht.ATTR_MESSAGING_DESTINATION_NAME]:i.topic,[ht.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.partition)}),j3(t._consumedMessages,1,{[ht.ATTR_MESSAGING_SYSTEM]:ht.MESSAGING_SYSTEM_VALUE_KAFKA,[ht.ATTR_MESSAGING_OPERATION_NAME]:"process",[ht.ATTR_MESSAGING_DESTINATION_NAME]:i.topic,[ht.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.partition)})],f=Vr.context.with(Vr.trace.setSpan(s,u),()=>n.apply(this,o));return t._endSpansOnPromise([u],l,f)}}_getConsumerEachBatchPatch(){return t=>{let n=this;return function(...o){let i=o[0],s=n._startConsumerSpan({topic:i.batch.topic,message:void 0,operationType:ht.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE,ctx:Vr.ROOT_CONTEXT,attributes:{[ht.ATTR_MESSAGING_BATCH_MESSAGE_COUNT]:i.batch.messages.length,[ht.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)}});return Vr.context.with(Vr.trace.setSpan(Vr.context.active(),s),()=>{let u=Date.now(),l=[],f=[j3(n._consumedMessages,i.batch.messages.length,{[ht.ATTR_MESSAGING_SYSTEM]:ht.MESSAGING_SYSTEM_VALUE_KAFKA,[ht.ATTR_MESSAGING_OPERATION_NAME]:"process",[ht.ATTR_MESSAGING_DESTINATION_NAME]:i.batch.topic,[ht.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)})];i.batch.messages.forEach(_=>{let y=Vr.propagation.extract(Vr.ROOT_CONTEXT,_.headers,Fke.bufferTextMapGetter),T=Vr.trace.getSpan(y)?.spanContext(),v;T&&(v={context:T}),l.push(n._startConsumerSpan({topic:i.batch.topic,message:_,operationType:ht.MESSAGING_OPERATION_TYPE_VALUE_PROCESS,link:v,attributes:{[ht.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)}})),f.push(jke(n._processDuration,u,{[ht.ATTR_MESSAGING_SYSTEM]:ht.MESSAGING_SYSTEM_VALUE_KAFKA,[ht.ATTR_MESSAGING_OPERATION_NAME]:"process",[ht.ATTR_MESSAGING_DESTINATION_NAME]:i.batch.topic,[ht.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)}))});let h=t.apply(this,o);return l.unshift(s),n._endSpansOnPromise(l,f,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 Vr.context.with(Vr.trace.setSpan(Vr.context.active(),i),()=>t._getSendPatch()(l).apply(this,T).catch(R=>{throw i.setStatus({code:Vr.SpanStatusCode.ERROR,message:R?.message}),i.recordException(R),R}))};let f=u.sendBatch;u.sendBatch=function(...T){return Vr.context.with(Vr.trace.setSpan(Vr.context.active(),i),()=>t._getSendBatchPatch()(f).apply(this,T).catch(R=>{throw i.setStatus({code:Vr.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:Vr.SpanStatusCode.OK})});return t._endSpansOnPromise([i],[],v)};let _=u.abort;u.abort=function(...T){let v=_.apply(this,T);return t._endSpansOnPromise([i],[],v)}}).catch(u=>{i.setStatus({code:Vr.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(_=>{u.push(t._startProducerSpan(h.topic,_)),l.push(j3(t._sentMessages,1,{[ht.ATTR_MESSAGING_SYSTEM]:ht.MESSAGING_SYSTEM_VALUE_KAFKA,[ht.ATTR_MESSAGING_OPERATION_NAME]:"send",[ht.ATTR_MESSAGING_DESTINATION_NAME]:h.topic,..._.partition!==void 0?{[ht.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(_.partition)}:{}}))})});let f=n.apply(this,o);return t._endSpansOnPromise(u,l,f)}}_getSendPatch(){let t=this;return n=>function(...o){let i=o[0],s=i.messages.map(f=>t._startProducerSpan(i.topic,f)),u=i.messages.map(f=>j3(t._sentMessages,1,{[ht.ATTR_MESSAGING_SYSTEM]:ht.MESSAGING_SYSTEM_VALUE_KAFKA,[ht.ATTR_MESSAGING_OPERATION_NAME]:"send",[ht.ATTR_MESSAGING_DESTINATION_NAME]:i.topic,...f.partition!==void 0?{[ht.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(f.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=hR.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(hR.ATTR_ERROR_TYPE,s),u.setStatus({code:Vr.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===ht.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE?"poll":r,l=this.tracer.startSpan(`${u} ${t}`,{kind:r===ht.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE?Vr.SpanKind.CLIENT:Vr.SpanKind.CONSUMER,attributes:{...s,[ht.ATTR_MESSAGING_SYSTEM]:ht.MESSAGING_SYSTEM_VALUE_KAFKA,[ht.ATTR_MESSAGING_DESTINATION_NAME]:t,[ht.ATTR_MESSAGING_OPERATION_TYPE]:r,[ht.ATTR_MESSAGING_OPERATION_NAME]:u,[ht.ATTR_MESSAGING_KAFKA_MESSAGE_KEY]:n?.key?String(n.key):void 0,[ht.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE]:n?.key&&n.value===null?!0:void 0,[ht.ATTR_MESSAGING_KAFKA_OFFSET]:n?.offset},links:i?[i]:[]},o),{consumerHook:f}=this.getConfig();return f&&n&&(0,ap.safeExecuteInTheMiddle)(()=>f(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:Vr.SpanKind.PRODUCER,attributes:{[ht.ATTR_MESSAGING_SYSTEM]:ht.MESSAGING_SYSTEM_VALUE_KAFKA,[ht.ATTR_MESSAGING_DESTINATION_NAME]:t,[ht.ATTR_MESSAGING_KAFKA_MESSAGE_KEY]:n.key?String(n.key):void 0,[ht.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE]:n.key&&n.value===null?!0:void 0,[ht.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:n.partition!==void 0?String(n.partition):void 0,[ht.ATTR_MESSAGING_OPERATION_NAME]:"send",[ht.ATTR_MESSAGING_OPERATION_TYPE]:ht.MESSAGING_OPERATION_TYPE_VALUE_SEND}});n.headers=n.headers??{},Vr.propagation.inject(Vr.trace.setSpan(Vr.context.active(),r),n.headers);let{producerHook:o}=this.getConfig();return o&&(0,ap.safeExecuteInTheMiddle)(()=>o(r,{topic:t,message:n}),i=>{i&&this._diag.error("producerHook error",i)},!0),r}};z3.KafkaJsInstrumentation=wW});var $ke=M(H3=>{"use strict";m();Object.defineProperty(H3,"__esModule",{value:!0});H3.KafkaJsInstrumentation=void 0;var Oxt=Hke();Object.defineProperty(H3,"KafkaJsInstrumentation",{enumerable:!0,get:function(){return Oxt.KafkaJsInstrumentation}})});var qke,Vke,Yke,kxt,Kke,Jke=w(()=>{m();qke=ue($ke(),1);_r();Vke="Kafka",Yke=ct(Vke,()=>new qke.KafkaJsInstrumentation({consumerHook(e){qr(e,"auto.kafkajs.otel.consumer")},producerHook(e){qr(e,"auto.kafkajs.otel.producer")}})),kxt=(()=>({name:Vke,setupOnce(){Yke()}})),Kke=kxt});var Zke=M(_R=>{"use strict";m();Object.defineProperty(_R,"__esModule",{value:!0});_R.PACKAGE_NAME=_R.PACKAGE_VERSION=void 0;_R.PACKAGE_VERSION="0.58.0";_R.PACKAGE_NAME="@opentelemetry/instrumentation-lru-memoizer"});var tPe=M($3=>{"use strict";m();Object.defineProperty($3,"__esModule",{value:!0});$3.LruMemoizerInstrumentation=void 0;var Wke=(He(),Me(tt)),Xke=un(),ePe=Zke(),OW=class extends Xke.InstrumentationBase{constructor(t={}){super(ePe.PACKAGE_NAME,ePe.PACKAGE_VERSION,t)}init(){return[new Xke.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"?Wke.context.bind(Wke.context.active(),i):i;return o.push(s),r.apply(this,o)}};return n.sync=t.sync,n},void 0)]}};$3.LruMemoizerInstrumentation=OW});var nPe=M(q3=>{"use strict";m();Object.defineProperty(q3,"__esModule",{value:!0});q3.LruMemoizerInstrumentation=void 0;var Pxt=tPe();Object.defineProperty(q3,"LruMemoizerInstrumentation",{enumerable:!0,get:function(){return Pxt.LruMemoizerInstrumentation}})});var rPe,oPe,iPe,Mxt,sPe,aPe=w(()=>{m();rPe=ue(nPe(),1);_r();oPe="LruMemoizer",iPe=ct(oPe,()=>new rPe.LruMemoizerInstrumentation),Mxt=(()=>({name:oPe,setupOnce(){iPe()}})),sPe=Mxt});var uPe=M(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 cPe=M(sO=>{"use strict";m();Object.defineProperty(sO,"__esModule",{value:!0});sO.MongodbCommandType=void 0;var Lxt;(function(e){e.CREATE_INDEXES="createIndexes",e.FIND_AND_MODIFY="findAndModify",e.IS_MASTER="isMaster",e.COUNT="count",e.AGGREGATE="aggregate",e.UNKNOWN="unknown"})(Lxt=sO.MongodbCommandType||(sO.MongodbCommandType={}))});var lPe=M(ER=>{"use strict";m();Object.defineProperty(ER,"__esModule",{value:!0});ER.PACKAGE_NAME=ER.PACKAGE_VERSION=void 0;ER.PACKAGE_VERSION="0.67.0";ER.PACKAGE_NAME="@opentelemetry/instrumentation-mongodb"});var fPe=M(V3=>{"use strict";m();Object.defineProperty(V3,"__esModule",{value:!0});V3.MongoDBInstrumentation=void 0;var ti=(He(),Me(tt)),ir=un(),Wg=(Xn(),Me(Hr)),Wl=uPe(),eT=cPe(),dPe=lPe(),pPe={requireParentSpan:!0},kW=class e extends ir.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(dPe.PACKAGE_NAME,dPe.PACKAGE_VERSION,{...pPe,...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({...pPe,...t})}_updateMetricInstruments(){this._connectionsUsage=this.meter.createUpDownCounter(Wl.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:f}=this._getV4ConnectionPoolPatches(),{v4PatchSessions:h,v4UnpatchSessions:_}=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,f),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,_)])]}_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=ti.context.bind(ti.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,f){let h=ti.trace.getSpan(ti.context.active()),_=n._checkSkipInstrumentation(h),y=typeof l=="function"?l:f;if(_||typeof y!="function"||typeof u!="object")return typeof l=="function"?r.call(this,i,s,u,l):r.call(this,i,s,u,l,f);let T=n._getV3SpanAttributes(s,i,u[0],t),v=n._spanNameFromAttrs(T),R=n.tracer.startSpan(v,{kind:ti.SpanKind.CLIENT,attributes:T}),x=n._patchEnd(R,y);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 f=ti.trace.getSpan(ti.context.active()),h=t._checkSkipInstrumentation(f),_=typeof u=="function"?u:l;if(h||typeof _!="function"||typeof s!="object")return typeof u=="function"?n.call(this,o,i,s,u):n.call(this,o,i,s,u,l);let y=e._getCommandType(s),T=y===eT.MongodbCommandType.UNKNOWN?void 0:y,v=t._getV3SpanAttributes(i,o,s,T),R=t._spanNameFromAttrs(v),x=t.tracer.startSpan(R,{kind:ti.SpanKind.CLIENT,attributes:v}),O=t._patchEnd(x,_);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=ti.trace.getSpan(ti.context.active()),f=t._checkSkipInstrumentation(l),h=u,_=Object.keys(i)[0];if(typeof i!="object"||i.ismaster||i.hello)return n.call(this,o,i,s,u);let y;if(!f){let v=t._getV4SpanAttributes(this,o,i,_),R=t._spanNameFromAttrs(v);y=t.tracer.startSpan(R,{kind:ti.SpanKind.CLIENT,attributes:v})}let T=t._patchEnd(y,h,this.id,_);return n.call(this,o,i,s,T)}}_getV4PatchCommandPromise(){let t=this;return n=>function(...o){let[i,s]=o,u=ti.trace.getSpan(ti.context.active()),l=t._checkSkipInstrumentation(u),f=Object.keys(s)[0],h=()=>{};if(typeof s!="object"||s.ismaster||s.hello)return n.apply(this,o);let _;if(!l){let v=t._getV4SpanAttributes(this,i,s,f),R=t._spanNameFromAttrs(v);_=t.tracer.startSpan(R,{kind:ti.SpanKind.CLIENT,attributes:v})}let y=t._patchEnd(_,h,this.id,f),T=n.apply(this,o);return T.then(v=>y(null,v),v=>y(v)),T}}_getV3PatchFind(){let t=this;return n=>function(o,i,s,u,l,f){let h=ti.trace.getSpan(ti.context.active()),_=t._checkSkipInstrumentation(h),y=typeof l=="function"?l:f;if(_||typeof y!="function"||typeof s!="object")return typeof l=="function"?n.call(this,o,i,s,u,l):n.call(this,o,i,s,u,l,f);let T=t._getV3SpanAttributes(i,o,s,"find"),v=t._spanNameFromAttrs(T),R=t.tracer.startSpan(v,{kind:ti.SpanKind.CLIENT,attributes:T}),x=t._patchEnd(R,y);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,f){let h=ti.trace.getSpan(ti.context.active()),_=t._checkSkipInstrumentation(h),y=typeof l=="function"?l:f;if(_||typeof y!="function")return typeof l=="function"?n.call(this,o,i,s,u,l):n.call(this,o,i,s,u,l,f);let T=t._getV3SpanAttributes(i,o,s.cmd,"getMore"),v=t._spanNameFromAttrs(T),R=t.tracer.startSpan(v,{kind:ti.SpanKind.CLIENT,attributes:T}),x=t._patchEnd(R,y);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?eT.MongodbCommandType.CREATE_INDEXES:t.findandmodify!==void 0?eT.MongodbCommandType.FIND_AND_MODIFY:t.ismaster!==void 0?eT.MongodbCommandType.IS_MASTER:t.count!==void 0?eT.MongodbCommandType.COUNT:t.aggregate!==void 0?eT.MongodbCommandType.AGGREGATE:eT.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 _=h.split(":");i=_[0],s=_[1]}}let[u,l]=t.toString().split("."),f=r?.query??r?.q??r;return this._getSpanAttributes(u,l,i,s,f,o)}_getSpanAttributes(t,n,r,o,i,s){let u={};if(this._dbSemconvStability&ir.SemconvStability.OLD&&(u[Wl.ATTR_DB_SYSTEM]=Wl.DB_SYSTEM_VALUE_MONGODB,u[Wl.ATTR_DB_NAME]=t,u[Wl.ATTR_DB_MONGODB_COLLECTION]=n,u[Wl.ATTR_DB_OPERATION]=s,u[Wl.ATTR_DB_CONNECTION_STRING]=`mongodb://${r}:${o}/${t}`),this._dbSemconvStability&ir.SemconvStability.STABLE&&(u[Wg.ATTR_DB_SYSTEM_NAME]=Wl.DB_SYSTEM_NAME_VALUE_MONGODB,u[Wg.ATTR_DB_NAMESPACE]=t,u[Wg.ATTR_DB_OPERATION_NAME]=s,u[Wg.ATTR_DB_COLLECTION_NAME]=n),r&&o){this._netSemconvStability&ir.SemconvStability.OLD&&(u[Wl.ATTR_NET_PEER_NAME]=r),this._netSemconvStability&ir.SemconvStability.STABLE&&(u[Wg.ATTR_SERVER_ADDRESS]=r);let l=parseInt(o,10);isNaN(l)||(this._netSemconvStability&ir.SemconvStability.OLD&&(u[Wl.ATTR_NET_PEER_PORT]=l),this._netSemconvStability&ir.SemconvStability.STABLE&&(u[Wg.ATTR_SERVER_PORT]=l))}if(i){let{dbStatementSerializer:l}=this.getConfig(),f=typeof l=="function"?l:this._defaultDbStatementSerializer.bind(this);(0,ir.safeExecuteInTheMiddle)(()=>{let h=f(i);this._dbSemconvStability&ir.SemconvStability.OLD&&(u[Wl.ATTR_DB_STATEMENT]=h),this._dbSemconvStability&ir.SemconvStability.STABLE&&(u[Wg.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[Wg.ATTR_DB_OPERATION_NAME],t[Wg.ATTR_DB_COLLECTION_NAME]].filter(r=>r).join(" ")||Wl.DB_SYSTEM_NAME_VALUE_MONGODB:n=`mongodb.${t[Wl.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=ti.context.active(),s=this,u=!1;return function(...f){if(!u){u=!0;let h=f[0];if(t){if(h instanceof Error)t.setStatus({code:ti.SpanStatusCode.ERROR,message:h.message});else{let _=f[1];s._handleExecutionResult(t,_)}t.end()}o==="endSessions"&&s._connCountAdd(-1,s._poolName,"idle")}return ti.context.with(i,()=>n.apply(this,f))}}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}};V3.MongoDBInstrumentation=kW});var mPe=M(aO=>{"use strict";m();Object.defineProperty(aO,"__esModule",{value:!0});aO.MongodbCommandType=void 0;var Uxt;(function(e){e.CREATE_INDEXES="createIndexes",e.FIND_AND_MODIFY="findAndModify",e.IS_MASTER="isMaster",e.COUNT="count",e.UNKNOWN="unknown"})(Uxt=aO.MongodbCommandType||(aO.MongodbCommandType={}))});var APe=M(yR=>{"use strict";m();Object.defineProperty(yR,"__esModule",{value:!0});yR.MongodbCommandType=yR.MongoDBInstrumentation=void 0;var Qxt=fPe();Object.defineProperty(yR,"MongoDBInstrumentation",{enumerable:!0,get:function(){return Qxt.MongoDBInstrumentation}});var Fxt=mPe();Object.defineProperty(yR,"MongodbCommandType",{enumerable:!0,get:function(){return Fxt.MongodbCommandType}})});function Gxt(e){let t=PW(e);return JSON.stringify(t)}function PW(e){if(Array.isArray(e))return e.map(t=>PW(t));if(jxt(e)){let t={};return Object.entries(e).map(([n,r])=>[n,PW(r)]).reduce((n,r)=>(Hxt(r)&&(n[r[0]]=r[1]),n),t)}return"?"}function jxt(e){return typeof e=="object"&&e!==null&&!zxt(e)}function zxt(e){let t=!1;return typeof Buffer<"u"&&(t=Buffer.isBuffer(e)),t}function Hxt(e){return Array.isArray(e)}var gPe,hPe,_Pe,$xt,EPe,yPe=w(()=>{m();gPe=ue(APe(),1);_r();hPe="Mongo",_Pe=ct(hPe,()=>new gPe.MongoDBInstrumentation({dbStatementSerializer:Gxt,responseHook(e){qr(e,"auto.db.otel.mongo")}}));$xt=(()=>({name:hPe,setupOnce(){_Pe()}})),EPe=$xt});var MW=M(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 bPe=M(yE=>{"use strict";m();Object.defineProperty(yE,"__esModule",{value:!0});yE.handleCallbackResponse=yE.handlePromiseResponse=yE.getAttributesFromCollection=void 0;var SPe=(He(),Me(tt)),cO=un(),uO=MW(),Y3=(Xn(),Me(Hr));function qxt(e,t,n){let r={};return t&cO.SemconvStability.OLD&&(r[uO.ATTR_DB_MONGODB_COLLECTION]=e.name,r[uO.ATTR_DB_NAME]=e.conn.name,r[uO.ATTR_DB_USER]=e.conn.user),t&cO.SemconvStability.STABLE&&(r[Y3.ATTR_DB_COLLECTION_NAME]=e.name,r[Y3.ATTR_DB_NAMESPACE]=e.conn.name),n&cO.SemconvStability.OLD&&(r[uO.ATTR_NET_PEER_NAME]=e.conn.host,r[uO.ATTR_NET_PEER_PORT]=e.conn.port),n&cO.SemconvStability.STABLE&&(r[Y3.ATTR_SERVER_ADDRESS]=e.conn.host,r[Y3.ATTR_SERVER_PORT]=e.conn.port),r}yE.getAttributesFromCollection=qxt;function TPe(e,t={}){e.recordException(t),e.setStatus({code:SPe.SpanStatusCode.ERROR,message:`${t.message} ${t.code?`
38
- Mongoose Error Code: ${t.code}`:""}`})}function LW(e,t,n,r=void 0){n&&(0,cO.safeExecuteInTheMiddle)(()=>n(e,{moduleVersion:r,response:t}),o=>{o&&SPe.diag.error("mongoose instrumentation: responseHook error",o)},!0)}function Vxt(e,t,n,r=void 0){return e instanceof Promise?e.then(o=>(LW(t,o,n,r),o)).catch(o=>{throw TPe(t,o),o}).finally(()=>t.end()):(LW(t,e,n,r),t.end(),e)}yE.handlePromiseResponse=Vxt;function Yxt(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,f)=>(l?TPe(r,l):LW(r,f,i,s),r.end(),e(l,f)),t.apply(n,o)}yE.handleCallbackResponse=Yxt});var IPe=M(SR=>{"use strict";m();Object.defineProperty(SR,"__esModule",{value:!0});SR.PACKAGE_NAME=SR.PACKAGE_VERSION=void 0;SR.PACKAGE_VERSION="0.60.0";SR.PACKAGE_NAME="@opentelemetry/instrumentation-mongoose"});var DPe=M(Jc=>{"use strict";m();Object.defineProperty(Jc,"__esModule",{value:!0});Jc.MongooseInstrumentation=Jc._ALREADY_INSTRUMENTED=Jc._STORED_PARENT_SPAN=void 0;var Bs=(He(),Me(tt)),Kxt=vr(),UW=bPe(),La=un(),CPe=IPe(),SE=MW(),tT=(Xn(),Me(Hr)),K3=["deleteOne","deleteMany","find","findOne","estimatedDocumentCount","countDocuments","distinct","where","$where","findOneAndUpdate","findOneAndDelete","findOneAndReplace"],Jxt=["remove","count","findOneAndRemove",...K3],Zxt=["count","findOneAndRemove",...K3],Wxt=[...K3];function vPe(e){return e?e.startsWith("6.")||e.startsWith("5.")?Jxt:e.startsWith("7.")?Zxt:Wxt:K3}function RPe(e){return e&&(e.startsWith("5.")||e.startsWith("6."))||!1}function xPe(e){return!e||!e.startsWith("8.")?!1:parseInt(e.split(".")[1],10)>=21}Jc._STORED_PARENT_SPAN=Symbol("stored-parent-span");Jc._ALREADY_INSTRUMENTED=Symbol("already-instrumented");var QW=class extends La.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(CPe.PACKAGE_NAME,CPe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,La.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,La.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new La.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,RPe(n)&&this._wrap(r.Model.prototype,"remove",this.patchOnModelMethods("remove",n)),xPe(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)),vPe(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=vPe(n);this._unwrap(r.Model.prototype,"save"),r.Model.prototype.$save=r.Model.prototype.save,RPe(n)&&this._unwrap(r.Model.prototype,"remove"),xPe(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&&Bs.trace.getSpan(Bs.context.active())===void 0)return r.apply(this,arguments);let s=this[Jc._STORED_PARENT_SPAN],u={},{dbStatementSerializer:l}=n.getConfig();if(l){let h=l("aggregate",{options:this.options,aggregatePipeline:this._pipeline});n._dbSemconvStability&La.SemconvStability.OLD&&(u[SE.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&La.SemconvStability.STABLE&&(u[tT.ATTR_DB_QUERY_TEXT]=h)}let f=n._startSpan(this._model.collection,this._model?.modelName,"aggregate",u,s);return n._handleResponse(f,r,this,arguments,i,t)}}patchQueryExec(t){let n=this;return r=>function(i){if(this[Jc._ALREADY_INSTRUMENTED])return r.apply(this,arguments);if(n.getConfig().requireParentSpan&&Bs.trace.getSpan(Bs.context.active())===void 0)return r.apply(this,arguments);let s=this[Jc._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&La.SemconvStability.OLD&&(u[SE.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&La.SemconvStability.STABLE&&(u[tT.ATTR_DB_QUERY_TEXT]=h)}let f=n._startSpan(this.mongooseCollection,this.model.modelName,this.op,u,s);return n._handleResponse(f,r,this,arguments,i,t)}}patchOnModelMethods(t,n){let r=this;return o=>function(s,u){if(r.getConfig().requireParentSpan&&Bs.trace.getSpan(Bs.context.active())===void 0)return o.apply(this,arguments);let l={document:this};s&&!(s instanceof Function)&&(l.options=s);let f={},{dbStatementSerializer:h}=r.getConfig();if(h){let y=h(t,l);r._dbSemconvStability&La.SemconvStability.OLD&&(f[SE.ATTR_DB_STATEMENT]=y),r._dbSemconvStability&La.SemconvStability.STABLE&&(f[tT.ATTR_DB_QUERY_TEXT]=y)}let _=r._startSpan(this.constructor.collection,this.constructor.modelName,t,f);return s instanceof Function&&(u=s,s=void 0),r._handleResponse(_,o,this,arguments,u,n)}}_patchDocumentUpdateMethods(t,n){let r=this;return o=>function(s,u,l){if(r.getConfig().requireParentSpan&&Bs.trace.getSpan(Bs.context.active())===void 0)return o.apply(this,arguments);let f=l,h=s,_=u;typeof s=="function"?(f=s,h=void 0,_=void 0):typeof u=="function"&&(f=u,_=void 0);let y={},T=r.getConfig().dbStatementSerializer;if(T){let x=T(t,{condition:{_id:this._id},updates:h,options:_});r._dbSemconvStability&La.SemconvStability.OLD&&(y[SE.ATTR_DB_STATEMENT]=x),r._dbSemconvStability&La.SemconvStability.STABLE&&(y[tT.ATTR_DB_QUERY_TEXT]=x)}let v=r._startSpan(this.constructor.collection,this.constructor.modelName,t,y),R=r._handleResponse(v,o,this,arguments,f,n);return R&&typeof R=="object"&&(R[Jc._ALREADY_INSTRUMENTED]=!0),R}}patchModelStatic(t,n){let r=this;return o=>function(s,u,l){if(r.getConfig().requireParentSpan&&Bs.trace.getSpan(Bs.context.active())===void 0)return o.apply(this,arguments);typeof u=="function"&&(l=u,u=void 0);let f={};switch(t){case"insertMany":f.documents=s;break;case"bulkWrite":f.operations=s;break;default:f.document=s;break}u!==void 0&&(f.options=u);let h={},{dbStatementSerializer:_}=r.getConfig();if(_){let T=_(t,f);r._dbSemconvStability&La.SemconvStability.OLD&&(h[SE.ATTR_DB_STATEMENT]=T),r._dbSemconvStability&La.SemconvStability.STABLE&&(h[tT.ATTR_DB_QUERY_TEXT]=T)}let y=r._startSpan(this.collection,this.modelName,t,h);return r._handleResponse(y,o,this,arguments,l,n)}}patchModelAggregate(){let t=this;return n=>function(){let o=Bs.trace.getSpan(Bs.context.active()),i=t._callOriginalFunction(()=>n.apply(this,arguments));return i&&(i[Jc._STORED_PARENT_SPAN]=o),i}}patchAndCaptureSpanContext(t){let n=this;return r=>function(){return this[Jc._STORED_PARENT_SPAN]=Bs.trace.getSpan(Bs.context.active()),n._callOriginalFunction(()=>r.apply(this,arguments))}}_startSpan(t,n,r,o,i){let s={...o,...(0,UW.getAttributesFromCollection)(t,this._dbSemconvStability,this._netSemconvStability)};this._dbSemconvStability&La.SemconvStability.OLD&&(s[SE.ATTR_DB_OPERATION]=r,s[SE.ATTR_DB_SYSTEM]="mongoose"),this._dbSemconvStability&La.SemconvStability.STABLE&&(s[tT.ATTR_DB_OPERATION_NAME]=r,s[tT.ATTR_DB_SYSTEM_NAME]=SE.DB_SYSTEM_NAME_VALUE_MONGODB);let u=this._dbSemconvStability&La.SemconvStability.STABLE?`${r} ${t.name}`:`mongoose.${n}.${r}`;return this.tracer.startSpan(u,{kind:Bs.SpanKind.CLIENT,attributes:s},i?Bs.trace.setSpan(Bs.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,UW.handleCallbackResponse)(i,n,r,t,o,u.getConfig().responseHook,s));{let l=u._callOriginalFunction(()=>n.apply(r,o));return(0,UW.handlePromiseResponse)(l,t,u.getConfig().responseHook,s)}}_callOriginalFunction(t){return this.getConfig().suppressInternalInstrumentation?Bs.context.with((0,Kxt.suppressTracing)(Bs.context.active()),t):t()}};Jc.MongooseInstrumentation=QW});var NPe=M(J3=>{"use strict";m();Object.defineProperty(J3,"__esModule",{value:!0});J3.MongooseInstrumentation=void 0;var Xxt=DPe();Object.defineProperty(J3,"MongooseInstrumentation",{enumerable:!0,get:function(){return Xxt.MongooseInstrumentation}})});var BPe,wPe,OPe,eDt,kPe,PPe=w(()=>{m();BPe=ue(NPe(),1);_r();wPe="Mongoose",OPe=ct(wPe,()=>new BPe.MongooseInstrumentation({responseHook(e){qr(e,"auto.db.otel.mongoose")}})),eDt=(()=>({name:wPe,setupOnce(){OPe()}})),kPe=eDt});var MPe=M(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 LPe=M(lO=>{"use strict";m();Object.defineProperty(lO,"__esModule",{value:!0});lO.AttributeNames=void 0;var tDt;(function(e){e.MYSQL_VALUES="db.mysql.values"})(tDt=lO.AttributeNames||(lO.AttributeNames={}))});var UPe=M(Au=>{"use strict";m();Object.defineProperty(Au,"__esModule",{value:!0});Au.getPoolNameOld=Au.arrayStringifyHelper=Au.getSpanName=Au.getDbValues=Au.getDbQueryText=Au.getJDBCString=Au.getConfig=void 0;function nDt(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}Au.getConfig=nDt;function rDt(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}Au.getJDBCString=rDt;function oDt(e){return typeof e=="string"?e:e.sql}Au.getDbQueryText=oDt;function iDt(e,t){return FW(typeof e=="string"?t:t||e.values)}Au.getDbValues=iDt;function sDt(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}Au.getSpanName=sDt;function FW(e){return e?`[${e.toString()}]`:""}Au.arrayStringifyHelper=FW;function aDt(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()}Au.getPoolNameOld=aDt});var QPe=M(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-mysql"});var GPe=M(Z3=>{"use strict";m();Object.defineProperty(Z3,"__esModule",{value:!0});Z3.MySQLInstrumentation=void 0;var Zc=(He(),Me(tt)),up=un(),bR=(Xn(),Me(Hr)),Xg=MPe(),uDt=LPe(),nT=UPe(),FPe=QPe(),GW=class extends up.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(FPe.PACKAGE_NAME,FPe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,up.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,up.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._connectionsUsageOld=this.meter.createUpDownCounter(Xg.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 up.InstrumentationNodeModuleDefinition("mysql",[">=2.0.0 <3"],t=>((0,up.isWrapped)(t.createConnection)&&this._unwrap(t,"createConnection"),this._wrap(t,"createConnection",this._patchCreateConnection()),(0,up.isWrapped)(t.createPool)&&this._unwrap(t,"createPool"),this._wrap(t,"createPool",this._patchCreatePool()),(0,up.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,f=(0,nT.getPoolNameOld)(t);r._connCountAdd(-l,f,"used"),r._connCountAdd(-u,f,"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),f=u[l].pool;r._setPoolCallbacks(f,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=Zc.context.active();return function(o,i){i&&((0,up.isWrapped)(i.query)||n._wrap(i,"query",n._patchQuery(i))),typeof t=="function"&&Zc.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:f,database:h,user:_}=(0,nT.getConfig)(t.config),y=parseInt(f,10),T=(0,nT.getDbQueryText)(o);r._dbSemconvStability&up.SemconvStability.OLD&&(u[Xg.ATTR_DB_SYSTEM]=Xg.DB_SYSTEM_VALUE_MYSQL,u[Xg.ATTR_DB_CONNECTION_STRING]=(0,nT.getJDBCString)(l,f,h),u[Xg.ATTR_DB_NAME]=h,u[Xg.ATTR_DB_USER]=_,u[Xg.ATTR_DB_STATEMENT]=T),r._dbSemconvStability&up.SemconvStability.STABLE&&(u[bR.ATTR_DB_SYSTEM_NAME]=bR.DB_SYSTEM_NAME_VALUE_MYSQL,u[bR.ATTR_DB_NAMESPACE]=h,u[bR.ATTR_DB_QUERY_TEXT]=T),r._netSemconvStability&up.SemconvStability.OLD&&(u[Xg.ATTR_NET_PEER_NAME]=l,isNaN(y)||(u[Xg.ATTR_NET_PEER_PORT]=y)),r._netSemconvStability&up.SemconvStability.STABLE&&(u[bR.ATTR_SERVER_ADDRESS]=l,isNaN(y)||(u[bR.ATTR_SERVER_PORT]=y));let v=r.tracer.startSpan((0,nT.getSpanName)(o),{kind:Zc.SpanKind.CLIENT,attributes:u});if(r.getConfig().enhancedDatabaseReporting){let O;Array.isArray(i)?O=i:arguments[2]&&(O=[i]),v.setAttribute(uDt.AttributeNames.MYSQL_VALUES,(0,nT.getDbValues)(o,O))}let R=Array.from(arguments).findIndex(O=>typeof O=="function"),x=Zc.context.active();if(R===-1){let O=Zc.context.with(Zc.trace.setSpan(Zc.context.active(),v),()=>n.apply(t,arguments));return Zc.context.bind(x,O),O.on("error",P=>v.setStatus({code:Zc.SpanStatusCode.ERROR,message:P.message})).on("end",()=>{v.end()})}else return r._wrap(arguments,R,r._patchCallbackQuery(v,x)),Zc.context.with(Zc.trace.setSpan(Zc.context.active(),v),()=>n.apply(t,arguments))}}}_patchCallbackQuery(t,n){return r=>function(o,i,s){return o&&t.setStatus({code:Zc.SpanStatusCode.ERROR,message:o.message}),t.end(),Zc.context.with(n,()=>r(...arguments))}}_setPoolCallbacks(t,n){let r=n||(0,nT.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")})}};Z3.MySQLInstrumentation=GW});var jPe=M(W3=>{"use strict";m();Object.defineProperty(W3,"__esModule",{value:!0});W3.MySQLInstrumentation=void 0;var cDt=GPe();Object.defineProperty(W3,"MySQLInstrumentation",{enumerable:!0,get:function(){return cDt.MySQLInstrumentation}})});var zPe,HPe,$Pe,lDt,qPe,VPe=w(()=>{m();zPe=ue(jPe(),1);_r();HPe="Mysql",$Pe=ct(HPe,()=>new zPe.MySQLInstrumentation({})),lDt=(()=>({name:HPe,setupOnce(){$Pe()}})),qPe=lDt});var jW=M(ua=>{"use strict";m();Object.defineProperty(ua,"__esModule",{value:!0});ua.DB_SYSTEM_VALUE_MYSQL=ua.ATTR_NET_PEER_PORT=ua.ATTR_NET_PEER_NAME=ua.ATTR_DB_USER=ua.ATTR_DB_SYSTEM=ua.ATTR_DB_STATEMENT=ua.ATTR_DB_NAME=ua.ATTR_DB_CONNECTION_STRING=void 0;ua.ATTR_DB_CONNECTION_STRING="db.connection_string";ua.ATTR_DB_NAME="db.name";ua.ATTR_DB_STATEMENT="db.statement";ua.ATTR_DB_SYSTEM="db.system";ua.ATTR_DB_USER="db.user";ua.ATTR_NET_PEER_NAME="net.peer.name";ua.ATTR_NET_PEER_PORT="net.peer.port";ua.DB_SYSTEM_VALUE_MYSQL="mysql"});var HW=M(X3=>{"use strict";m();Object.defineProperty(X3,"__esModule",{value:!0});X3.addSqlCommenterComment=void 0;var zW=(He(),Me(tt)),dDt=vr();function pDt(e){let t=e.indexOf("--");if(t>=0)return!0;if(e.indexOf("/*")<0)return!1;let r=e.indexOf("*/");return t<r}function fDt(e){return encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}function mDt(e,t){if(typeof t!="string"||t.length===0||pDt(t))return t;let n=new dDt.W3CTraceContextPropagator,r={};n.inject(zW.trace.setSpan(zW.ROOT_CONTEXT,e),r,zW.defaultTextMapSetter);let o=Object.keys(r).sort();if(o.length===0)return t;let i=o.map(s=>{let u=fDt(r[s]);return`${s}='${u}'`}).join(",");return`${t} /*${i}*/`}X3.addSqlCommenterComment=mDt});var YPe=M(cp=>{"use strict";m();Object.defineProperty(cp,"__esModule",{value:!0});cp.getConnectionPrototypeToInstrument=cp.once=cp.getSpanName=cp.getQueryText=cp.getConnectionAttributes=void 0;var dO=jW(),e6=un(),$W=(Xn(),Me(Hr));function ADt(e,t,n){let{host:r,port:o,database:i,user:s}=gDt(e),u={};t&e6.SemconvStability.OLD&&(u[dO.ATTR_DB_CONNECTION_STRING]=hDt(r,o,i),u[dO.ATTR_DB_NAME]=i,u[dO.ATTR_DB_USER]=s),t&e6.SemconvStability.STABLE&&(u[$W.ATTR_DB_NAMESPACE]=i);let l=parseInt(o,10);return n&e6.SemconvStability.OLD&&(u[dO.ATTR_NET_PEER_NAME]=r,isNaN(l)||(u[dO.ATTR_NET_PEER_PORT]=l)),n&e6.SemconvStability.STABLE&&(u[$W.ATTR_SERVER_ADDRESS]=r,isNaN(l)||(u[$W.ATTR_SERVER_PORT]=l)),u}cp.getConnectionAttributes=ADt;function gDt(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}function hDt(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}function _Dt(e,t,n,r=!1,o=EDt){let[i,s]=typeof e=="string"?[e,n]:[e.sql,yDt(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"}}cp.getQueryText=_Dt;function EDt(e){return e.replace(/\b\d+\b/g,"?").replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,"?")}function yDt(e){return"values"in e}function SDt(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}cp.getSpanName=SDt;var TDt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};cp.once=TDt;function bDt(e){let t=e.prototype,n=Object.getPrototypeOf(t);return typeof n?.query=="function"&&typeof n?.execute=="function"?n:t}cp.getConnectionPrototypeToInstrument=bDt});var KPe=M(IR=>{"use strict";m();Object.defineProperty(IR,"__esModule",{value:!0});IR.PACKAGE_NAME=IR.PACKAGE_VERSION=void 0;IR.PACKAGE_VERSION="0.60.0";IR.PACKAGE_NAME="@opentelemetry/instrumentation-mysql2"});var XPe=M(t6=>{"use strict";m();Object.defineProperty(t6,"__esModule",{value:!0});t6.MySQL2Instrumentation=void 0;var JPe=(He(),Me(tt)),xf=un(),qW=jW(),ZPe=HW(),CR=YPe(),WPe=KPe(),VW=(Xn(),Me(Hr)),YW=[">=1.4.2 <4"],KW=class extends xf.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(WPe.PACKAGE_NAME,WPe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,xf.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,xf.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,xf.isWrapped)(i.query)&&this._unwrap(i,"query"),this._wrap(i,"query",this._patchQuery(t,!1)),(0,xf.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 xf.InstrumentationNodeModuleDefinition("mysql2",YW,i=>(n(i),i),()=>{},[new xf.InstrumentationNodeModuleFile("mysql2/promise.js",YW,i=>(n(i),i),()=>{}),new xf.InstrumentationNodeModuleFile("mysql2/lib/connection.js",YW,i=>{let s=(0,CR.getConnectionPrototypeToInstrument)(i);return r(s),i},i=>{if(i===void 0)return;let s=(0,CR.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:f,maskStatementHook:h,responseHook:_}=o.getConfig(),y=(0,CR.getConnectionAttributes)(this.config,o._dbSemconvStability,o._netSemconvStability),T=(0,CR.getQueryText)(i,t,l,f,h);o._dbSemconvStability&xf.SemconvStability.OLD&&(y[qW.ATTR_DB_SYSTEM]=qW.DB_SYSTEM_VALUE_MYSQL,y[qW.ATTR_DB_STATEMENT]=T),o._dbSemconvStability&xf.SemconvStability.STABLE&&(y[VW.ATTR_DB_SYSTEM_NAME]=VW.DB_SYSTEM_NAME_VALUE_MYSQL,y[VW.ATTR_DB_QUERY_TEXT]=T);let v=o.tracer.startSpan((0,CR.getSpanName)(i),{kind:JPe.SpanKind.CLIENT,attributes:y});!n&&o.getConfig().addSqlCommenterCommentToQueries&&(arguments[0]=i=typeof i=="string"?(0,ZPe.addSqlCommenterComment)(v,i):Object.assign(i,{sql:(0,ZPe.addSqlCommenterComment)(v,i.sql)}));let R=(0,CR.once)((x,O)=>{x?v.setStatus({code:JPe.SpanStatusCode.ERROR,message:x.message}):typeof _=="function"&&(0,xf.safeExecuteInTheMiddle)(()=>{_(v,{queryResults:O})},P=>{P&&o._diag.warn("Failed executing responseHook",P)},!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)}}};t6.MySQL2Instrumentation=KW});var eMe=M(n6=>{"use strict";m();Object.defineProperty(n6,"__esModule",{value:!0});n6.MySQL2Instrumentation=void 0;var IDt=XPe();Object.defineProperty(n6,"MySQL2Instrumentation",{enumerable:!0,get:function(){return IDt.MySQL2Instrumentation}})});var tMe,nMe,rMe,CDt,oMe,iMe=w(()=>{m();tMe=ue(eMe(),1);_r();nMe="Mysql2",rMe=ct(nMe,()=>new tMe.MySQL2Instrumentation({responseHook(e){qr(e,"auto.db.otel.mysql2")}})),CDt=(()=>({name:nMe,setupOnce(){rMe()}})),oMe=CDt});var sMe=M(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 aMe=M(r6=>{"use strict";m();Object.defineProperty(r6,"__esModule",{value:!0});r6.endSpan=void 0;var vDt=(He(),Me(tt)),RDt=(e,t)=>{t&&(e.recordException(t),e.setStatus({code:vDt.SpanStatusCode.ERROR,message:t.message})),e.end()};r6.endSpan=RDt});var i6=M(o6=>{"use strict";m();Object.defineProperty(o6,"__esModule",{value:!0});o6.defaultDbStatementSerializer=void 0;var xDt=[{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}],DDt=(e,t)=>{if(Array.isArray(t)&&t.length){let n=xDt.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};o6.defaultDbStatementSerializer=DDt});var uMe=M(vR=>{"use strict";m();Object.defineProperty(vR,"__esModule",{value:!0});vR.PACKAGE_NAME=vR.PACKAGE_VERSION=void 0;vR.PACKAGE_VERSION="0.62.0";vR.PACKAGE_NAME="@opentelemetry/instrumentation-ioredis"});var pMe=M(s6=>{"use strict";m();Object.defineProperty(s6,"__esModule",{value:!0});s6.IORedisInstrumentation=void 0;var TE=(He(),Me(tt)),Wc=un(),bE=(Xn(),Me(Hr)),Xc=sMe(),cMe=un(),pO=aMe(),NDt=i6(),lMe=uMe(),dMe={requireParentSpan:!0},JW=class extends Wc.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(lMe.PACKAGE_NAME,lMe.PACKAGE_VERSION,{...dMe,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Wc.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Wc.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...dMe,...t})}init(){return[new Wc.InstrumentationNodeModuleDefinition("ioredis",[">=2.0.0 <6"],(t,n)=>{let r=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,Wc.isWrapped)(r.prototype.sendCommand)&&this._unwrap(r.prototype,"sendCommand"),this._wrap(r.prototype,"sendCommand",this._patchSendCommand(n)),(0,Wc.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||NDt.defaultDbStatementSerializer,u=TE.trace.getSpan(TE.context.active())===void 0;if(i.requireParentSpan===!0&&u)return t.apply(this,arguments);let l={},{host:f,port:h}=this.options,_=s(o.name,o.args);r._dbSemconvStability&Wc.SemconvStability.OLD&&(l[Xc.ATTR_DB_SYSTEM]=Xc.DB_SYSTEM_VALUE_REDIS,l[Xc.ATTR_DB_STATEMENT]=_,l[Xc.ATTR_DB_CONNECTION_STRING]=`redis://${f}:${h}`),r._dbSemconvStability&Wc.SemconvStability.STABLE&&(l[bE.ATTR_DB_SYSTEM_NAME]=Xc.DB_SYSTEM_NAME_VALUE_REDIS,l[bE.ATTR_DB_QUERY_TEXT]=_),r._netSemconvStability&Wc.SemconvStability.OLD&&(l[Xc.ATTR_NET_PEER_NAME]=f,l[Xc.ATTR_NET_PEER_PORT]=h),r._netSemconvStability&Wc.SemconvStability.STABLE&&(l[bE.ATTR_SERVER_ADDRESS]=f,l[bE.ATTR_SERVER_PORT]=h);let y=r.tracer.startSpan(o.name,{kind:TE.SpanKind.CLIENT,attributes:l}),{requestHook:T}=i;T&&(0,cMe.safeExecuteInTheMiddle)(()=>T(y,{moduleVersion:n,cmdName:o.name,cmdArgs:o.args}),v=>{v&&TE.diag.error("ioredis instrumentation: request hook failed",v)},!0);try{let v=t.apply(this,arguments),R=o.resolve;o.resolve=function(O){(0,cMe.safeExecuteInTheMiddle)(()=>i.responseHook?.(y,o.name,o.args,O),P=>{P&&TE.diag.error("ioredis instrumentation: response hook failed",P)},!0),(0,pO.endSpan)(y,null),R(O)};let x=o.reject;return o.reject=function(O){(0,pO.endSpan)(y,O),x(O)},v}catch(v){throw(0,pO.endSpan)(y,v),v}}}_traceConnection(t){let n=this;return function(){let r=TE.trace.getSpan(TE.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&Wc.SemconvStability.OLD&&(o[Xc.ATTR_DB_SYSTEM]=Xc.DB_SYSTEM_VALUE_REDIS,o[Xc.ATTR_DB_STATEMENT]="connect",o[Xc.ATTR_DB_CONNECTION_STRING]=`redis://${i}:${s}`),n._dbSemconvStability&Wc.SemconvStability.STABLE&&(o[bE.ATTR_DB_SYSTEM_NAME]=Xc.DB_SYSTEM_NAME_VALUE_REDIS,o[bE.ATTR_DB_QUERY_TEXT]="connect"),n._netSemconvStability&Wc.SemconvStability.OLD&&(o[Xc.ATTR_NET_PEER_NAME]=i,o[Xc.ATTR_NET_PEER_PORT]=s),n._netSemconvStability&Wc.SemconvStability.STABLE&&(o[bE.ATTR_SERVER_ADDRESS]=i,o[bE.ATTR_SERVER_PORT]=s);let u=n.tracer.startSpan("connect",{kind:TE.SpanKind.CLIENT,attributes:o});try{let l=t.apply(this,arguments);return(0,pO.endSpan)(u,null),l}catch(l){throw(0,pO.endSpan)(u,l),l}}}};s6.IORedisInstrumentation=JW});var fMe=M(a6=>{"use strict";m();Object.defineProperty(a6,"__esModule",{value:!0});a6.IORedisInstrumentation=void 0;var BDt=pMe();Object.defineProperty(a6,"IORedisInstrumentation",{enumerable:!0,get:function(){return BDt.IORedisInstrumentation}})});var u6=M(RR=>{"use strict";m();Object.defineProperty(RR,"__esModule",{value:!0});RR.PACKAGE_NAME=RR.PACKAGE_VERSION=void 0;RR.PACKAGE_VERSION="0.62.0";RR.PACKAGE_NAME="@opentelemetry/instrumentation-redis"});var mMe=M(IE=>{"use strict";m();Object.defineProperty(IE,"__esModule",{value:!0});IE.getTracedCreateStreamTrace=IE.getTracedCreateClient=IE.endSpan=void 0;var fO=(He(),Me(tt)),wDt=(e,t)=>{t&&e.setStatus({code:fO.SpanStatusCode.ERROR,message:t.message}),e.end()};IE.endSpan=wDt;var ODt=e=>function(){let n=e.apply(this,arguments);return fO.context.bind(fO.context.active(),n)};IE.getTracedCreateClient=ODt;var kDt=e=>function(){return Object.prototype.hasOwnProperty.call(this,"stream")||Object.defineProperty(this,"stream",{get(){return this._patched_redis_stream},set(n){fO.context.bind(fO.context.active(),n),this._patched_redis_stream=n}}),e.apply(this,arguments)};IE.getTracedCreateStreamTrace=kDt});var c6=M(hu=>{"use strict";m();Object.defineProperty(hu,"__esModule",{value:!0});hu.DB_SYSTEM_VALUE_REDIS=hu.DB_SYSTEM_NAME_VALUE_REDIS=hu.ATTR_NET_PEER_PORT=hu.ATTR_NET_PEER_NAME=hu.ATTR_DB_SYSTEM=hu.ATTR_DB_STATEMENT=hu.ATTR_DB_CONNECTION_STRING=void 0;hu.ATTR_DB_CONNECTION_STRING="db.connection_string";hu.ATTR_DB_STATEMENT="db.statement";hu.ATTR_DB_SYSTEM="db.system";hu.ATTR_NET_PEER_NAME="net.peer.name";hu.ATTR_NET_PEER_PORT="net.peer.port";hu.DB_SYSTEM_NAME_VALUE_REDIS="redis";hu.DB_SYSTEM_VALUE_REDIS="redis"});var gMe=M(d6=>{"use strict";m();Object.defineProperty(d6,"__esModule",{value:!0});d6.RedisInstrumentationV2_V3=void 0;var Xl=un(),l6=mMe(),AMe=u6(),mO=(He(),Me(tt)),AO=(Xn(),Me(Hr)),rT=c6(),PDt=i6(),ZW=class e extends Xl.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(AMe.PACKAGE_NAME,AMe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Xl.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Xl.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new Xl.InstrumentationNodeModuleDefinition("redis",[">=2.6.0 <4"],t=>((0,Xl.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,Xl.isWrapped)(t.RedisClient.prototype.create_stream)&&this._unwrap(t.RedisClient.prototype,"create_stream"),this._wrap(t.RedisClient.prototype,"create_stream",this._getPatchCreateStream()),(0,Xl.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=mO.trace.getSpan(mO.context.active())===void 0;if(s.requireParentSpan===!0&&u)return r.apply(this,arguments);let l=s?.dbStatementSerializer||PDt.defaultDbStatementSerializer,f={};t._semconvStability&Xl.SemconvStability.OLD&&Object.assign(f,{[rT.ATTR_DB_SYSTEM]:rT.DB_SYSTEM_VALUE_REDIS,[rT.ATTR_DB_STATEMENT]:l(i.command,i.args)}),t._semconvStability&Xl.SemconvStability.STABLE&&Object.assign(f,{[AO.ATTR_DB_SYSTEM_NAME]:rT.DB_SYSTEM_NAME_VALUE_REDIS,[AO.ATTR_DB_OPERATION_NAME]:i.command,[AO.ATTR_DB_QUERY_TEXT]:l(i.command,i.args)});let h=t.tracer.startSpan(`${e.COMPONENT}-${i.command}`,{kind:mO.SpanKind.CLIENT,attributes:f});if(this.connection_options){let y={};t._semconvStability&Xl.SemconvStability.OLD&&Object.assign(y,{[rT.ATTR_NET_PEER_NAME]:this.connection_options.host,[rT.ATTR_NET_PEER_PORT]:this.connection_options.port}),t._semconvStability&Xl.SemconvStability.STABLE&&Object.assign(y,{[AO.ATTR_SERVER_ADDRESS]:this.connection_options.host,[AO.ATTR_SERVER_PORT]:this.connection_options.port}),h.setAttributes(y)}this.address&&t._semconvStability&Xl.SemconvStability.OLD&&h.setAttribute(rT.ATTR_DB_CONNECTION_STRING,`redis://${this.address}`);let _=arguments[0].callback;if(_){let y=mO.context.active();arguments[0].callback=function(v,R){if(s?.responseHook){let x=s.responseHook;(0,Xl.safeExecuteInTheMiddle)(()=>{x(h,i.command,i.args,R)},O=>{O&&t._diag.error("Error executing responseHook",O)},!0)}return(0,l6.endSpan)(h,v),mO.context.with(y,_,this,...arguments)}}try{return r.apply(this,arguments)}catch(y){throw(0,l6.endSpan)(h,y),y}}}}_getPatchCreateClient(){return function(n){return(0,l6.getTracedCreateClient)(n)}}_getPatchCreateStream(){return function(n){return(0,l6.getTracedCreateStreamTrace)(n)}}};d6.RedisInstrumentationV2_V3=ZW});var _Me=M(p6=>{"use strict";m();Object.defineProperty(p6,"__esModule",{value:!0});p6.getClientAttributes=void 0;var WW=(Xn(),Me(Hr)),xR=c6(),hMe=un();function MDt(e,t,n){let r={};return n&hMe.SemconvStability.OLD&&Object.assign(r,{[xR.ATTR_DB_SYSTEM]:xR.DB_SYSTEM_VALUE_REDIS,[xR.ATTR_NET_PEER_NAME]:t?.socket?.host,[xR.ATTR_NET_PEER_PORT]:t?.socket?.port,[xR.ATTR_DB_CONNECTION_STRING]:LDt(e,t?.url)}),n&hMe.SemconvStability.STABLE&&Object.assign(r,{[WW.ATTR_DB_SYSTEM_NAME]:xR.DB_SYSTEM_NAME_VALUE_REDIS,[WW.ATTR_SERVER_ADDRESS]:t?.socket?.host,[WW.ATTR_SERVER_PORT]:t?.socket?.port}),r}p6.getClientAttributes=MDt;function LDt(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 TMe=M(f6=>{"use strict";m();Object.defineProperty(f6,"__esModule",{value:!0});f6.RedisInstrumentationV4_V5=void 0;var lp=(He(),Me(tt)),Co=un(),EMe=_Me(),UDt=i6(),yMe=u6(),XW=(Xn(),Me(Hr)),QDt=c6(),gO=Symbol("opentelemetry.instrumentation.redis.open_spans"),SMe=Symbol("opentelemetry.instrumentation.redis.multi_command_options"),eX=class e extends Co.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(yMe.PACKAGE_NAME,yMe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Co.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Co.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 Co.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,Co.isWrapped)(i?.[l])&&this._unwrap(i,l),this._wrap(i,l,this._getPatchExtendWithCommands(u)),i},i=>{(0,Co.isWrapped)(i?.extendWithCommands)&&this._unwrap(i,"extendWithCommands"),(0,Co.isWrapped)(i?.attachCommands)&&this._unwrap(i,"attachCommands")}),r=new Co.InstrumentationNodeModuleFile(`${t}/dist/lib/client/multi-command.js`,["^1.0.0","^5.0.0"],i=>{let s=i?.default?.prototype;return(0,Co.isWrapped)(s?.exec)&&this._unwrap(s,"exec"),this._wrap(s,"exec",this._getPatchMultiCommandsExec(!1)),(0,Co.isWrapped)(s?.execAsPipeline)&&this._unwrap(s,"execAsPipeline"),this._wrap(s,"execAsPipeline",this._getPatchMultiCommandsExec(!0)),(0,Co.isWrapped)(s?.addCommand)&&this._unwrap(s,"addCommand"),this._wrap(s,"addCommand",this._getPatchMultiCommandsAddCommand()),i},i=>{let s=i?.default?.prototype;(0,Co.isWrapped)(s?.exec)&&this._unwrap(s,"exec"),(0,Co.isWrapped)(s?.addCommand)&&this._unwrap(s,"addCommand")}),o=new Co.InstrumentationNodeModuleFile(`${t}/dist/lib/client/index.js`,["^1.0.0","^5.0.0"],i=>{let s=i?.default?.prototype;return s?.multi&&((0,Co.isWrapped)(s?.multi)&&this._unwrap(s,"multi"),this._wrap(s,"multi",this._getPatchRedisClientMulti())),s?.MULTI&&((0,Co.isWrapped)(s?.MULTI)&&this._unwrap(s,"MULTI"),this._wrap(s,"MULTI",this._getPatchRedisClientMulti())),(0,Co.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,Co.isWrapped)(s?.multi)&&this._unwrap(s,"multi"),(0,Co.isWrapped)(s?.MULTI)&&this._unwrap(s,"MULTI"),(0,Co.isWrapped)(s?.sendCommand)&&this._unwrap(s,"sendCommand")});return new Co.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,f){let h=t(l,f).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[gO];return n._endSpansWithRedisReplies(l,u,t),u}).catch(u=>{let l=this[gO];if(!l)n._diag.error("cannot find open spans to end for multi/pipeline");else{let f=u.constructor.name==="MultiErrorReply"?u.replies:new Array(l.length).fill(u);n._endSpansWithRedisReplies(l,f,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[SMe]=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,EMe.getClientAttributes)(t._diag,i,t._semconvStability),u=t.tracer.startSpan(`${e.COMPONENT}-connect`,{kind:lp.SpanKind.CLIENT,attributes:s});return lp.context.with(lp.trace.setSpan(lp.context.active(),u),()=>r.apply(this)).then(f=>(u.end(),f)).catch(f=>(u.recordException(f),u.setStatus({code:lp.SpanStatusCode.ERROR,message:f.message}),u.end(),Promise.reject(f)))}}}_traceClientCommand(t,n,r,o){if(lp.trace.getSpan(lp.context.active())===void 0&&this.getConfig().requireParentSpan)return t.apply(n,r);let s=n.options||n[SMe],u=o[0],l=o.slice(1),f=this.getConfig().dbStatementSerializer||UDt.defaultDbStatementSerializer,h=(0,EMe.getClientAttributes)(this._diag,s,this._semconvStability);this._semconvStability&Co.SemconvStability.STABLE&&(h[XW.ATTR_DB_OPERATION_NAME]=u);try{let T=f(u,l);T!=null&&(this._semconvStability&Co.SemconvStability.OLD&&(h[QDt.ATTR_DB_STATEMENT]=T),this._semconvStability&Co.SemconvStability.STABLE&&(h[XW.ATTR_DB_QUERY_TEXT]=T))}catch(T){this._diag.error("dbStatementSerializer throw an exception",T,{commandName:u})}let _=this.tracer.startSpan(`${e.COMPONENT}-${u}`,{kind:lp.SpanKind.CLIENT,attributes:h}),y=lp.context.with(lp.trace.setSpan(lp.context.active(),_),()=>t.apply(n,r));if(typeof y?.then=="function")y.then(T=>{this._endSpanWithResponse(_,u,l,T,void 0)},T=>{this._endSpanWithResponse(_,u,l,null,T)});else{let T=y;T[gO]=T[gO]||[],T[gO].push({span:_,commandName:u,commandArgs:l})}return y}_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:f}=t[u],h=n[u],[_,y]=h instanceof Error?[null,h]:[h,void 0];this._semconvStability&Co.SemconvStability.STABLE&&l.setAttribute(XW.ATTR_DB_OPERATION_NAME,s),this._endSpanWithResponse(l,o[u],f,_,y)}}_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:lp.SpanStatusCode.ERROR,message:i?.message})),t.end()}};f6.RedisInstrumentationV4_V5=eX});var CMe=M(m6=>{"use strict";m();Object.defineProperty(m6,"__esModule",{value:!0});m6.RedisInstrumentation=void 0;var FDt=un(),bMe=u6(),GDt=gMe(),jDt=TMe(),IMe={requireParentSpan:!1},tX=class extends FDt.InstrumentationBase{instrumentationV2_V3;instrumentationV4_V5;initialized=!1;constructor(t={}){let n={...IMe,...t};super(bMe.PACKAGE_NAME,bMe.PACKAGE_VERSION,n),this.instrumentationV2_V3=new GDt.RedisInstrumentationV2_V3(this.getConfig()),this.instrumentationV4_V5=new jDt.RedisInstrumentationV4_V5(this.getConfig()),this.initialized=!0}setConfig(t={}){let n={...IMe,...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())}};m6.RedisInstrumentation=tX});var vMe=M(A6=>{"use strict";m();Object.defineProperty(A6,"__esModule",{value:!0});A6.RedisInstrumentation=void 0;var zDt=CMe();Object.defineProperty(A6,"RedisInstrumentation",{enumerable:!0,get:function(){return zDt.RedisInstrumentation}})});function hO(e,t){return e.includes(t.toLowerCase())}function rX(e){return hO(nX,e)?"cache.get":hO($Dt,e)?"cache.put":void 0}function qDt(e,t){return t.some(n=>e.startsWith(n))}function xMe(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)?RMe(o.map(i=>n(i))):["<unknown>"],r=t[0];return hO(HDt,e)&&r!=null?n(r):RMe(t.map(o=>n(o)))}catch{return}}function DMe(e,t,n){if(!rX(e))return!1;for(let r of t)if(qDt(r,n))return!0;return!1}function NMe(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 RMe(e){let t=[],n=r=>{r.forEach(o=>{Array.isArray(o)?n(o):t.push(o)})};return n(e),t}var HDt,nX,$Dt,BMe=w(()=>{m();HDt=["get","set","setex"],nX=["get","mget"],$Dt=["set","setex"]});var wMe,OMe,g6,_O,kMe,VDt,YDt,PMe,KDt,MMe,LMe=w(()=>{m();wMe=ue(fMe(),1),OMe=ue(vMe(),1);At();_r();BMe();g6="Redis",_O={},kMe=(e,t,n,r)=>{e.setAttribute(Mt,"auto.db.otel.redis");let o=xMe(t,n),i=rX(t);if(!o||!i||!_O.cachePrefixes||!DMe(t,o,_O.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=NMe(r);l&&e.setAttribute(aY,l),hO(nX,t)&&l!==void 0&&e.setAttribute(iY,l>0),e.setAttributes({[Xt]:i,[sY]:o});let f=o.join(", ");e.updateName(_O.maxCacheKeyLength?Q_(f,_O.maxCacheKeyLength):f)},VDt=ct(`${g6}.IORedis`,()=>new wMe.IORedisInstrumentation({responseHook:kMe})),YDt=ct(`${g6}.Redis`,()=>new OMe.RedisInstrumentation({responseHook:kMe})),PMe=Object.assign(()=>{VDt(),YDt()},{id:g6}),KDt=((e={})=>({name:g6,setupOnce(){_O=e,PMe()}})),MMe=KDt});var UMe=M(h6=>{"use strict";m();Object.defineProperty(h6,"__esModule",{value:!0});h6.EVENT_LISTENERS_SET=void 0;h6.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.pg.eventListenersSet")});var oX=M(EO=>{"use strict";m();Object.defineProperty(EO,"__esModule",{value:!0});EO.AttributeNames=void 0;var JDt;(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"})(JDt=EO.AttributeNames||(EO.AttributeNames={}))});var iX=M(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 sX=M(yO=>{"use strict";m();Object.defineProperty(yO,"__esModule",{value:!0});yO.SpanNames=void 0;var ZDt;(function(e){e.QUERY_PREFIX="pg.query",e.CONNECT="pg.connect",e.POOL_CONNECT="pg-pool.connect"})(ZDt=yO.SpanNames||(yO.SpanNames={}))});var $Me=M(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 CE=(He(),Me(tt)),_6=oX(),dp=(Xn(),Me(Hr)),Ei=iX(),oT=un(),QMe=sX();function FMe(e,t){if(!t)return QMe.SpanNames.QUERY_PREFIX;let n=typeof t.name=="string"&&t.name?t.name:GMe(t.text);return`${QMe.SpanNames.QUERY_PREFIX}:${n}${e?` ${e}`:""}`}sr.getQuerySpanName=FMe;function GMe(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=GMe;function jMe(e){try{let t=new URL(e);return t.username="",t.password="",t.toString()}catch{return"postgresql://localhost:5432/"}}sr.parseAndMaskConnectionString=jMe;function aX(e){if("connectionString"in e&&e.connectionString)return jMe(e.connectionString);let t=e.host||"localhost",n=e.port||5432,r=e.database||"";return`postgresql://${t}:${n}/${r}`}sr.getConnectionString=aX;function E6(e){if(Number.isInteger(e))return e}function zMe(e,t){let n={};return t&oT.SemconvStability.OLD&&(n={...n,[Ei.ATTR_DB_SYSTEM]:Ei.DB_SYSTEM_VALUE_POSTGRESQL,[Ei.ATTR_DB_NAME]:e.database,[Ei.ATTR_DB_CONNECTION_STRING]:aX(e),[Ei.ATTR_DB_USER]:e.user,[Ei.ATTR_NET_PEER_NAME]:e.host,[Ei.ATTR_NET_PEER_PORT]:E6(e.port)}),t&oT.SemconvStability.STABLE&&(n={...n,[dp.ATTR_DB_SYSTEM_NAME]:dp.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[dp.ATTR_DB_NAMESPACE]:e.namespace,[dp.ATTR_SERVER_ADDRESS]:e.host,[dp.ATTR_SERVER_PORT]:E6(e.port)}),n}sr.getSemanticAttributesFromConnection=zMe;function WDt(e,t){let n;try{n=e.connectionString?new URL(e.connectionString):void 0}catch{n=void 0}let r={[_6.AttributeNames.IDLE_TIMEOUT_MILLIS]:e.idleTimeoutMillis,[_6.AttributeNames.MAX_CLIENT]:e.maxClient};return t&oT.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]:aX(e),[Ei.ATTR_NET_PEER_NAME]:n?.hostname??e.host,[Ei.ATTR_NET_PEER_PORT]:Number(n?.port)||E6(e.port),[Ei.ATTR_DB_USER]:n?.username??e.user}),t&oT.SemconvStability.STABLE&&(r={...r,[dp.ATTR_DB_SYSTEM_NAME]:dp.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[dp.ATTR_DB_NAMESPACE]:e.namespace,[dp.ATTR_SERVER_ADDRESS]:n?.hostname??e.host,[dp.ATTR_SERVER_PORT]:Number(n?.port)||E6(e.port)}),r}sr.getSemanticAttributesFromPoolConnection=WDt;function XDt(e){return e.requireParentSpan===!0&&CE.trace.getSpan(CE.context.active())===void 0}sr.shouldSkipInstrumentation=XDt;function e1t(e,t,n,r){let{connectionParameters:o}=this,i=o.database,s=FMe(i,r),u=e.startSpan(s,{kind:CE.SpanKind.CLIENT,attributes:zMe(o,n)});if(!r)return u;if(r.text&&(n&oT.SemconvStability.OLD&&u.setAttribute(Ei.ATTR_DB_STATEMENT,r.text),n&oT.SemconvStability.STABLE&&u.setAttribute(dp.ATTR_DB_QUERY_TEXT,r.text)),t.enhancedDatabaseReporting&&Array.isArray(r.values))try{let l=r.values.map(f=>f==null?"null":f instanceof Buffer?f.toString():typeof f=="object"?typeof f.toPostgres=="function"?f.toPostgres():JSON.stringify(f):f.toString());u.setAttribute(_6.AttributeNames.PG_VALUES,l)}catch(l){CE.diag.error("failed to stringify ",r.values,l)}return typeof r.name=="string"&&u.setAttribute(_6.AttributeNames.PG_PLAN,r.name),u}sr.handleConfigQuery=e1t;function HMe(e,t,n){typeof e.responseHook=="function"&&(0,oT.safeExecuteInTheMiddle)(()=>{e.responseHook(t,{data:n})},r=>{r&&CE.diag.error("Error running response hook",r)},!0)}sr.handleExecutionResult=HMe;function t1t(e,t,n,r,o){return function(s,u){s?(Object.prototype.hasOwnProperty.call(s,"code")&&(r[dp.ATTR_ERROR_TYPE]=s.code),s instanceof Error&&t.recordException(y6(s)),t.setStatus({code:CE.SpanStatusCode.ERROR,message:s.message})):HMe(e,t,u),o(),t.end(),n.call(this,s,u)}}sr.patchCallback=t1t;function n1t(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=n1t;function r1t(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=r1t;function o1t(e,t){return function(r,o,i){r&&(r instanceof Error&&e.recordException(y6(r)),e.setStatus({code:CE.SpanStatusCode.ERROR,message:r.message})),e.end(),t.call(this,r,o,i)}}sr.patchCallbackPGPool=o1t;function i1t(e,t){return function(r){r&&(r instanceof Error&&e.recordException(y6(r)),e.setStatus({code:CE.SpanStatusCode.ERROR,message:r.message})),e.end(),t.apply(this,arguments)}}sr.patchClientConnectCallback=i1t;function s1t(e){return typeof e=="object"&&e!==null&&"message"in e?String(e.message):void 0}sr.getErrorMessage=s1t;function a1t(e){return typeof e=="object"&&typeof e?.text=="string"}sr.isObjectWithTextString=a1t;function y6(e){let t=e?.name??"PostgreSQLError",n=e?.code??"UNKNOWN";return`PostgreSQL error of type '${t}' occurred (code: ${n})`}sr.sanitizedErrorMessage=y6});var qMe=M(DR=>{"use strict";m();Object.defineProperty(DR,"__esModule",{value:!0});DR.PACKAGE_NAME=DR.PACKAGE_VERSION=void 0;DR.PACKAGE_VERSION="0.66.0";DR.PACKAGE_NAME="@opentelemetry/instrumentation-pg"});var WMe=M(T6=>{"use strict";m();Object.defineProperty(T6,"__esModule",{value:!0});T6.PgInstrumentation=void 0;var tc=un(),Yr=(He(),Me(tt)),VMe=UMe(),ni=$Me(),YMe=HW(),KMe=qMe(),JMe=sX(),S6=vr(),Df=(Xn(),Me(Hr)),SO=iX();function NR(e){return e[Symbol.toStringTag]==="Module"?e.default:e}var uX=class extends tc.InstrumentationBase{_connectionsCounter={used:0,idle:0,pending:0};_semconvStability;constructor(t={}){super(KMe.PACKAGE_NAME,KMe.PACKAGE_VERSION,t),this._semconvStability=(0,tc.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._operationDuration=this.meter.createHistogram(Df.METRIC_DB_CLIENT_OPERATION_DURATION,{description:"Duration of database client operations.",unit:"s",valueType:Yr.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(SO.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(SO.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=NR(u);return this._patchPgClient(l.Client),u},u=>{let l=NR(u);return this._unpatchPgClient(l.Client),u},[o,r]),s=new tc.InstrumentationNodeModuleDefinition("pg-pool",n,u=>{let l=NR(u);return(0,tc.isWrapped)(l.prototype.connect)&&this._unwrap(l.prototype,"connect"),this._wrap(l.prototype,"connect",this._getPoolConnectPatch()),l},u=>{let l=NR(u);(0,tc.isWrapped)(l.prototype.connect)&&this._unwrap(l.prototype,"connect")});return[i,s]}_patchPgClient(t){if(!t)return;let n=NR(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=NR(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(ni.shouldSkipInstrumentation(i)||i.ignoreConnectSpans)return n.call(this,o);let s=t.tracer.startSpan(JMe.SpanNames.CONNECT,{kind:Yr.SpanKind.CLIENT,attributes:ni.getSemanticAttributesFromConnection(this,t._semconvStability)});if(o){let l=Yr.trace.getSpan(Yr.context.active());o=ni.patchClientConnectCallback(s,o),l&&(o=Yr.context.bind(Yr.context.active(),o))}let u=Yr.context.with(Yr.trace.setSpan(Yr.context.active(),s),()=>n.call(this,o));return ZMe(s,u)}}recordOperationDuration(t,n){let r={},o=[Df.ATTR_DB_NAMESPACE,Df.ATTR_ERROR_TYPE,Df.ATTR_SERVER_PORT,Df.ATTR_SERVER_ADDRESS,Df.ATTR_DB_OPERATION_NAME];this._semconvStability&tc.SemconvStability.OLD&&o.push(SO.ATTR_DB_SYSTEM),this._semconvStability&tc.SemconvStability.STABLE&&o.push(Df.ATTR_DB_SYSTEM_NAME),o.forEach(s=>{s in t&&(r[s]=t[s])});let i=(0,S6.hrTimeToMilliseconds)((0,S6.hrTimeDuration)(n,(0,S6.hrTime)()))/1e3;this._operationDuration.record(i,r)}_getClientQueryPatch(){let t=this;return n=>(this._diag.debug("Patching pg.Client.prototype.query"),function(...o){if(ni.shouldSkipInstrumentation(t.getConfig()))return n.apply(this,o);let i=(0,S6.hrTime)(),s=o[0],u=typeof s=="string",l=ni.isObjectWithTextString(s),f=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={[SO.ATTR_DB_SYSTEM]:SO.DB_SYSTEM_VALUE_POSTGRESQL,[Df.ATTR_DB_NAMESPACE]:this.database,[Df.ATTR_SERVER_PORT]:this.connectionParameters.port,[Df.ATTR_SERVER_ADDRESS]:this.connectionParameters.host};f?.text&&(h[Df.ATTR_DB_OPERATION_NAME]=ni.parseNormalizedOperationName(f?.text));let _=()=>{t.recordOperationDuration(h,i)},y=t.getConfig(),T=ni.handleConfigQuery.call(this,t.tracer,y,t._semconvStability,f);if(y.addSqlCommenterCommentToQueries&&(u?o[0]=(0,YMe.addSqlCommenterComment)(T,s):l&&!("name"in s)&&(o[0]={...s,text:(0,YMe.addSqlCommenterComment)(T,s.text)})),o.length>0){let x=Yr.trace.getSpan(Yr.context.active());if(typeof o[o.length-1]=="function")o[o.length-1]=ni.patchCallback(y,T,o[o.length-1],h,_),x&&(o[o.length-1]=Yr.context.bind(Yr.context.active(),o[o.length-1]));else if(typeof f?.callback=="function"){let O=ni.patchCallback(t.getConfig(),T,f.callback,h,_);x&&(O=Yr.context.bind(Yr.context.active(),O)),o[0].callback=O}}let{requestHook:v}=y;typeof v=="function"&&f&&(0,tc.safeExecuteInTheMiddle)(()=>{let{database:x,host:O,port:P,user:j}=this.connectionParameters;v(T,{connection:{database:x,host:O,port:P,user:j},query:{text:f.text,values:f.values,name:f.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(ni.sanitizedErrorMessage(x)),T.setStatus({code:Yr.SpanStatusCode.ERROR,message:ni.getErrorMessage(x)}),T.end(),x}return R instanceof Promise?R.then(x=>new Promise(O=>{ni.handleExecutionResult(t.getConfig(),T,x),_(),T.end(),O(x)})).catch(x=>new Promise((O,P)=>{x instanceof Error&&T.recordException(ni.sanitizedErrorMessage(x)),T.setStatus({code:Yr.SpanStatusCode.ERROR,message:x.message}),_(),T.end(),P(x)})):R})}_setPoolConnectEventListeners(t){if(t[VMe.EVENT_LISTENERS_SET])return;let n=ni.getPoolName(t.options);t.on("connect",()=>{this._connectionsCounter=ni.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("acquire",()=>{this._connectionsCounter=ni.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("remove",()=>{this._connectionsCounter=ni.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("release",()=>{this._connectionsCounter=ni.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t[VMe.EVENT_LISTENERS_SET]=!0}_getPoolConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(ni.shouldSkipInstrumentation(i))return n.call(this,o);if(t._setPoolConnectEventListeners(this),i.ignoreConnectSpans)return n.call(this,o);let s=t.tracer.startSpan(JMe.SpanNames.POOL_CONNECT,{kind:Yr.SpanKind.CLIENT,attributes:ni.getSemanticAttributesFromPoolConnection(this.options,t._semconvStability)});if(o){let l=Yr.trace.getSpan(Yr.context.active());o=ni.patchCallbackPGPool(s,o),l&&(o=Yr.context.bind(Yr.context.active(),o))}let u=Yr.context.with(Yr.trace.setSpan(Yr.context.active(),s),()=>n.call(this,o));return ZMe(s,u)}}};T6.PgInstrumentation=uX;function ZMe(e,t){if(!(t instanceof Promise))return t;let n=t;return Yr.context.bind(Yr.context.active(),n.then(r=>(e.end(),r)).catch(r=>(r instanceof Error&&e.recordException(ni.sanitizedErrorMessage(r)),e.setStatus({code:Yr.SpanStatusCode.ERROR,message:ni.getErrorMessage(r)}),e.end(),Promise.reject(r))))}});var XMe=M(BR=>{"use strict";m();Object.defineProperty(BR,"__esModule",{value:!0});BR.AttributeNames=BR.PgInstrumentation=void 0;var u1t=WMe();Object.defineProperty(BR,"PgInstrumentation",{enumerable:!0,get:function(){return u1t.PgInstrumentation}});var c1t=oX();Object.defineProperty(BR,"AttributeNames",{enumerable:!0,get:function(){return c1t.AttributeNames}})});var e2e,t2e,n2e,l1t,r2e,o2e=w(()=>{m();e2e=ue(XMe(),1);_r();t2e="Postgres",n2e=ct(t2e,e2e.PgInstrumentation,e=>({requireParentSpan:!0,requestHook(t){qr(t,"auto.db.otel.postgres")},ignoreConnectSpans:e?.ignoreConnectSpans??!1})),l1t=(e=>({name:t2e,setupOnce(){n2e(e)}})),r2e=l1t});var vE,lX,i2e,d1t,p1t,s2e,cX,f1t,a2e,u2e=w(()=>{m();He();vE=ue(un(),1);Xn();At();_r();YS();lX="PostgresJs",i2e=[">=3.0.0 <4"],d1t=/^(SELECT|INSERT|UPDATE|DELETE|CREATE|DROP|ALTER)/i,p1t=Symbol.for("sentry.query.from.instrumented.sql"),s2e=ct(lX,e=>new cX({requireParentSpan:e?.requireParentSpan??!0,requestHook:e?.requestHook})),cX=class extends vE.InstrumentationBase{constructor(t){super("sentry-postgres-js",er,t)}init(){let t=new vE.InstrumentationNodeModuleDefinition("postgres",i2e,n=>{try{return this._patchPostgres(n)}catch(r){return Ds&&W.error("Failed to patch postgres module:",r),n}},n=>n);return["src","cf/src","cjs/src"].forEach(n=>{t.files.push(new vE.InstrumentationNodeModuleFile(`postgres/${n}/query.js`,i2e,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 Ds&&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 Ds&&W.warn("postgres() did not return a valid instance"),u;let l=o.getConfig();return cK(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:(gw(t,"default",i),t)}_shouldCreateSpans(){let t=this.getConfig();return Vt.getSpan(We.active())!==void 0||!t.requireParentSpan}_setOperationName(t,n,r){if(r){t.setAttribute(LC,r);return}let o=n?.match(d1t);o?.[1]&&t.setAttribute(LC,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[p1t])return r.apply(this,o);if(!n._shouldCreateSpans())return r.apply(this,o);let i=n._reconstructQuery(this.strings),s=n._sanitizeSqlQuery(i);return oa({name:s||"postgresjs.query",op:"db"},u=>{qr(u,"auto.db.postgresjs"),u.setAttributes({[fS]:"postgres",[SV]:s});let l=n.getConfig(),{requestHook:f}=l;f&&(0,vE.safeExecuteInTheMiddle)(()=>f(u,s,void 0),y=>{y&&(u.setAttribute("sentry.hook.error","requestHook failed"),Ds&&W.error(`Error in requestHook for ${lX} integration:`,y))},!0);let h=this.resolve;this.resolve=new Proxy(h,{apply:(y,T,v)=>{try{n._setOperationName(u,s,v?.[0]?.command),u.end()}catch(R){Ds&&W.error("Error ending span in resolve callback:",R)}return Reflect.apply(y,T,v)}});let _=this.reject;this.reject=new Proxy(_,{apply:(y,T,v)=>{try{u.setStatus({code:2,message:v?.[0]?.message||"unknown_error"}),u.setAttribute(TV,v?.[0]?.code||"unknown"),u.setAttribute(bV,v?.[0]?.name||"unknown"),n._setOperationName(u,s),u.end()}catch(R){Ds&&W.error("Error ending span in reject callback:",R)}return Reflect.apply(y,T,v)}});try{return r.apply(this,o)}catch(y){throw u.setStatus({code:2,message:y instanceof Error?y.message:"unknown_error"}),u.end(),y}})},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}},f1t=(e=>({name:lX,setupOnce(){s2e(e)}})),a2e=f1t});var c2e=M(TO=>{"use strict";m();Object.defineProperty(TO,"__esModule",{value:!0});TO.SeverityNumber=void 0;var m1t;(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"})(m1t=TO.SeverityNumber||(TO.SeverityNumber={}))});var I6=M(wR=>{"use strict";m();Object.defineProperty(wR,"__esModule",{value:!0});wR.NOOP_LOGGER=wR.NoopLogger=void 0;var b6=class{emit(t){}};wR.NoopLogger=b6;wR.NOOP_LOGGER=new b6});var v6=M(OR=>{"use strict";m();Object.defineProperty(OR,"__esModule",{value:!0});OR.NOOP_LOGGER_PROVIDER=OR.NoopLoggerProvider=void 0;var A1t=I6(),C6=class{getLogger(t,n,r){return new A1t.NoopLogger}};OR.NoopLoggerProvider=C6;OR.NOOP_LOGGER_PROVIDER=new C6});var pX=M(R6=>{"use strict";m();Object.defineProperty(R6,"__esModule",{value:!0});R6.ProxyLogger=void 0;var g1t=I6(),dX=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):g1t.NOOP_LOGGER}};R6.ProxyLogger=dX});var mX=M(x6=>{"use strict";m();Object.defineProperty(x6,"__esModule",{value:!0});x6.ProxyLoggerProvider=void 0;var h1t=v6(),_1t=pX(),fX=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new _1t.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:h1t.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)}};x6.ProxyLoggerProvider=fX});var l2e=M(D6=>{"use strict";m();Object.defineProperty(D6,"__esModule",{value:!0});D6._globalThis=void 0;D6._globalThis=typeof globalThis=="object"?globalThis:global});var d2e=M(N6=>{"use strict";m();Object.defineProperty(N6,"__esModule",{value:!0});N6._globalThis=void 0;var E1t=l2e();Object.defineProperty(N6,"_globalThis",{enumerable:!0,get:function(){return E1t._globalThis}})});var p2e=M(B6=>{"use strict";m();Object.defineProperty(B6,"__esModule",{value:!0});B6._globalThis=void 0;var y1t=d2e();Object.defineProperty(B6,"_globalThis",{enumerable:!0,get:function(){return y1t._globalThis}})});var f2e=M(nA=>{"use strict";m();Object.defineProperty(nA,"__esModule",{value:!0});nA.API_BACKWARDS_COMPATIBILITY_VERSION=nA.makeGetter=nA._global=nA.GLOBAL_LOGS_API_KEY=void 0;var S1t=p2e();nA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");nA._global=S1t._globalThis;function T1t(e,t,n){return r=>r===e?t:n}nA.makeGetter=T1t;nA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var A2e=M(w6=>{"use strict";m();Object.defineProperty(w6,"__esModule",{value:!0});w6.LogsAPI=void 0;var pp=f2e(),b1t=v6(),m2e=mX(),AX=class e{constructor(){this._proxyLoggerProvider=new m2e.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return pp._global[pp.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(pp._global[pp.GLOBAL_LOGS_API_KEY]=(0,pp.makeGetter)(pp.API_BACKWARDS_COMPATIBILITY_VERSION,t,b1t.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=pp._global[pp.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(pp._global,pp.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete pp._global[pp.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new m2e.ProxyLoggerProvider}};w6.LogsAPI=AX});var gX=M(ca=>{"use strict";m();Object.defineProperty(ca,"__esModule",{value:!0});ca.logs=ca.ProxyLoggerProvider=ca.ProxyLogger=ca.NoopLoggerProvider=ca.NOOP_LOGGER_PROVIDER=ca.NoopLogger=ca.NOOP_LOGGER=ca.SeverityNumber=void 0;var I1t=c2e();Object.defineProperty(ca,"SeverityNumber",{enumerable:!0,get:function(){return I1t.SeverityNumber}});var g2e=I6();Object.defineProperty(ca,"NOOP_LOGGER",{enumerable:!0,get:function(){return g2e.NOOP_LOGGER}});Object.defineProperty(ca,"NoopLogger",{enumerable:!0,get:function(){return g2e.NoopLogger}});var h2e=v6();Object.defineProperty(ca,"NOOP_LOGGER_PROVIDER",{enumerable:!0,get:function(){return h2e.NOOP_LOGGER_PROVIDER}});Object.defineProperty(ca,"NoopLoggerProvider",{enumerable:!0,get:function(){return h2e.NoopLoggerProvider}});var C1t=pX();Object.defineProperty(ca,"ProxyLogger",{enumerable:!0,get:function(){return C1t.ProxyLogger}});var v1t=mX();Object.defineProperty(ca,"ProxyLoggerProvider",{enumerable:!0,get:function(){return v1t.ProxyLoggerProvider}});var R1t=A2e();ca.logs=R1t.LogsAPI.getInstance()});var _2e=M(kR=>{"use strict";m();Object.defineProperty(kR,"__esModule",{value:!0});kR.disableInstrumentations=kR.enableInstrumentations=void 0;function x1t(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()}}kR.enableInstrumentations=x1t;function D1t(e){e.forEach(t=>t.disable())}kR.disableInstrumentations=D1t});var S2e=M(O6=>{"use strict";m();Object.defineProperty(O6,"__esModule",{value:!0});O6.registerInstrumentations=void 0;var E2e=(He(),Me(tt)),N1t=gX(),y2e=_2e();function B1t(e){let t=e.tracerProvider||E2e.trace.getTracerProvider(),n=e.meterProvider||E2e.metrics.getMeterProvider(),r=e.loggerProvider||N1t.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,y2e.enableInstrumentations)(o,t,n,r),()=>{(0,y2e.disableInstrumentations)(o)}}O6.registerInstrumentations=B1t});var N2e=M(k6=>{"use strict";m();Object.defineProperty(k6,"__esModule",{value:!0});k6.satisfies=void 0;var yX=(He(),Me(tt)),v2e=/^(?: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-]+)*))?$/,w1t=/^(?<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-]+)*))?$/,O1t={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function k1t(e,t,n){if(!P1t(e))return yX.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=Q1t(e);if(!r)return!1;let o=[],i=R2e(r,t,o,n);return i&&!n?.includePrerelease?L1t(r,o):i}k6.satisfies=k1t;function P1t(e){return typeof e=="string"&&v2e.test(e)}function R2e(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(hX(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=sNt(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!hX(e,i,n,r))return!1;return!0}return hX(e,t,n,r)}function hX(e,t,n,r){if(t=U1t(t,r),t.includes(" "))return R2e(e,t,n,r);{let o=F1t(t);return n.push(o),M1t(e,o)}}function M1t(e,t){if(t.invalid)return!1;if(!t.version||EX(t.version))return!0;let n=b2e(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=b2e(r,o)}return O1t[t.op]?.includes(n)}function L1t(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function U1t(e,t){return e=e.trim(),e=oNt(e,t),e=rNt(e),e=iNt(e,t),e=e.trim(),e}function nc(e){return!e||e.toLowerCase()==="x"||e==="*"}function Q1t(e){let t=e.match(v2e);if(!t){yX.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 F1t(e){if(!e)return{};let t=e.match(w1t);if(!t)return yX.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 EX(e){return e==="*"||e==="x"||e==="X"}function T2e(e){let t=parseInt(e,10);return isNaN(t)?e:t}function G1t(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 j1t(e,t){if(EX(e)||EX(t))return 0;let[n,r]=G1t(T2e(e),T2e(t));return n>r?1:n<r?-1:0}function b2e(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=j1t(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var x2e="[a-zA-Z0-9-]",D2e="0|[1-9]\\d*",z1t=`\\d*[a-zA-Z-]${x2e}*`,H1t="((?:<|>)?=?)",I2e=`(?:${D2e}|${z1t})`,$1t=`(?:-(${I2e}(?:\\.${I2e})*))`,C2e=`${x2e}+`,q1t=`(?:\\+(${C2e}(?:\\.${C2e})*))`,_X=`${D2e}|x|X|\\*`,bO=`[v=\\s]*(${_X})(?:\\.(${_X})(?:\\.(${_X})(?:${$1t})?${q1t}?)?)?`,V1t=`^${H1t}\\s*${bO}$`,Y1t=new RegExp(V1t),K1t=`^\\s*(${bO})\\s+-\\s+(${bO})\\s*$`,J1t=new RegExp(K1t),Z1t="(?:~>?)",W1t=`^${Z1t}${bO}$`,X1t=new RegExp(W1t),eNt="(?:\\^)",tNt=`^${eNt}${bO}$`,nNt=new RegExp(tNt);function rNt(e){let t=X1t;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 oNt(e,t){let n=nNt,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,s,u,l)=>{let f;return nc(i)?f="":nc(s)?f=`>=${i}.0.0${r} <${+i+1}.0.0-0`:nc(u)?i==="0"?f=`>=${i}.${s}.0${r} <${i}.${+s+1}.0-0`:f=`>=${i}.${s}.0${r} <${+i+1}.0.0-0`:l?i==="0"?s==="0"?f=`>=${i}.${s}.${u}-${l} <${i}.${s}.${+u+1}-0`:f=`>=${i}.${s}.${u}-${l} <${i}.${+s+1}.0-0`:f=`>=${i}.${s}.${u}-${l} <${+i+1}.0.0-0`:i==="0"?s==="0"?f=`>=${i}.${s}.${u}${r} <${i}.${s}.${+u+1}-0`:f=`>=${i}.${s}.${u}${r} <${i}.${+s+1}.0-0`:f=`>=${i}.${s}.${u} <${+i+1}.0.0-0`,f})}function iNt(e,t){let n=Y1t;return e.replace(n,(r,o,i,s,u,l)=>{let f=nc(i),h=f||nc(s),_=h||nc(u),y=_;return o==="="&&y&&(o=""),l=t?.includePrerelease?"-0":"",f?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&y?(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`:_&&(r=`>=${i}.${s}.0${l} <${i}.${+s+1}.0-0`),r})}function sNt(e,t){let n=J1t;return e.replace(n,(r,o,i,s,u,l,f,h,_,y,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(_)?h="":nc(y)?h=`<${+_+1}.0.0-0`:nc(T)?h=`<${_}.${+y+1}.0-0`:v?h=`<=${_}.${y}.${T}-${v}`:t?.includePrerelease?h=`<${_}.${y}.${+T+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var SX=M(Ua=>{"use strict";m();Object.defineProperty(Ua,"__esModule",{value:!0});Ua.massUnwrap=Ua.unwrap=Ua.massWrap=Ua.wrap=void 0;var rc=console.error.bind(console);function IO(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 aNt=(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 IO(o,"__original",r),IO(o,"__unwrap",()=>{e[t]===o&&IO(e,t,r)}),IO(o,"__wrapped",!0),IO(e,t,o),o};Ua.wrap=aNt;var uNt=(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,Ua.wrap)(r,o,n)})})};Ua.massWrap=uNt;var cNt=(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}};Ua.unwrap=cNt;var lNt=(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,Ua.unwrap)(n,r)})})};Ua.massUnwrap=lNt;function CO(e){e&&e.logger&&(typeof e.logger!="function"?rc("new logger isn't a function, not replacing"):rc=e.logger)}Ua.default=CO;CO.wrap=Ua.wrap;CO.massWrap=Ua.massWrap;CO.unwrap=Ua.unwrap;CO.massUnwrap=Ua.massUnwrap});var B2e=M(M6=>{"use strict";m();Object.defineProperty(M6,"__esModule",{value:!0});M6.InstrumentationAbstract=void 0;var TX=(He(),Me(tt)),dNt=gX(),P6=SX(),bX=class{instrumentationName;instrumentationVersion;_config={};_tracer;_meter;_logger;_diag;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=TX.diag.createComponentLogger({namespace:t}),this._tracer=TX.trace.getTracer(t,n),this._meter=TX.metrics.getMeter(t,n),this._logger=dNt.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=P6.wrap;_unwrap=P6.unwrap;_massWrap=P6.massWrap;_massUnwrap=P6.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)}}};M6.InstrumentationAbstract=bX});var w2e=M(RE=>{"use strict";m();Object.defineProperty(RE,"__esModule",{value:!0});RE.ModuleNameTrie=RE.ModuleNameSeparator=void 0;RE.ModuleNameSeparator="/";var L6=class{hooks=[];children=new Map},IX=class{_trie=new L6;_counter=0;insert(t){let n=this._trie;for(let r of t.moduleName.split(RE.ModuleNameSeparator)){let o=n.children.get(r);o||(o=new L6,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(RE.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))}};RE.ModuleNameTrie=IX});var k2e=M(U6=>{"use strict";m();Object.defineProperty(U6,"__esModule",{value:!0});U6.RequireInTheMiddleSingleton=void 0;var pNt=ES(),O2e=Ue("path"),CX=w2e(),fNt=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),vX=class e{_moduleNameTrie=new CX.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new pNt.Hook(null,{internals:!0},(t,n,r)=>{let o=mNt(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 fNt?new e:this._instance=this._instance??new e}};U6.RequireInTheMiddleSingleton=vX;function mNt(e){return O2e.sep!==CX.ModuleNameSeparator?e.split(O2e.sep).join(CX.ModuleNameSeparator):e}});var RX=M(xE=>{"use strict";m();Object.defineProperty(xE,"__esModule",{value:!0});xE.isWrapped=xE.safeExecuteInTheMiddleAsync=xE.safeExecuteInTheMiddle=void 0;function ANt(e,t,n){let r,o;try{o=e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}xE.safeExecuteInTheMiddle=ANt;async function gNt(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}}xE.safeExecuteInTheMiddleAsync=gNt;function hNt(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}xE.isWrapped=hNt});var L2e=M(Q6=>{"use strict";m();Object.defineProperty(Q6,"__esModule",{value:!0});Q6.InstrumentationBase=void 0;var vO=Ue("path"),P2e=Ue("util"),_Nt=N2e(),xX=SX(),ENt=B2e(),yNt=k2e(),SNt=uW(),RO=(He(),Me(tt)),TNt=ES(),bNt=Ue("fs"),INt=RX(),DX=class extends ENt.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=yNt.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,INt.isWrapped)(t[n])&&this._unwrap(t,n),P2e.types.isProxy(t)){let o=(0,xX.wrap)(Object.assign({},t),n,r);return Object.defineProperty(t,n,{value:o}),o}else return(0,xX.wrap)(t,n,r)};_unwrap=(t,n)=>P2e.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,xX.unwrap)(t,n);_massWrap=(t,n,r)=>{if(t)Array.isArray(t)||(t=[t]);else{RO.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){RO.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{RO.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){RO.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=Ue.resolve(n);Ue.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,bNt.readFileSync)(vO.join(t,"package.json"),{encoding:"utf8"}),r=JSON.parse(n).version;return typeof r=="string"?r:void 0}catch{RO.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 M2e(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=vO.normalize(r);return s.filter(f=>f.name===u).filter(f=>M2e(f.supportedVersions,i,t.includePrerelease)).reduce((f,h)=>(h.moduleExports=f,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(f,t.moduleVersion)):f),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&&vO.isAbsolute(u)){let f=vO.parse(u);u=f.name,l=f.dir}return this._onRequire(t,s,u,l)},r=(s,u,l)=>this._onRequire(t,s,u,l),o=vO.isAbsolute(t.name)?new TNt.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new SNt.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}};Q6.InstrumentationBase=DX;function M2e(e,t,n){return typeof t>"u"?e.includes("*"):e.some(r=>(0,_Nt.satisfies)(t,r,{includePrerelease:n}))}});var U2e=M(F6=>{"use strict";m();Object.defineProperty(F6,"__esModule",{value:!0});F6.normalize=void 0;var CNt=Ue("path");Object.defineProperty(F6,"normalize",{enumerable:!0,get:function(){return CNt.normalize}})});var Q2e=M(PR=>{"use strict";m();Object.defineProperty(PR,"__esModule",{value:!0});PR.normalize=PR.InstrumentationBase=void 0;var vNt=L2e();Object.defineProperty(PR,"InstrumentationBase",{enumerable:!0,get:function(){return vNt.InstrumentationBase}});var RNt=U2e();Object.defineProperty(PR,"normalize",{enumerable:!0,get:function(){return RNt.normalize}})});var NX=M(MR=>{"use strict";m();Object.defineProperty(MR,"__esModule",{value:!0});MR.normalize=MR.InstrumentationBase=void 0;var F2e=Q2e();Object.defineProperty(MR,"InstrumentationBase",{enumerable:!0,get:function(){return F2e.InstrumentationBase}});Object.defineProperty(MR,"normalize",{enumerable:!0,get:function(){return F2e.normalize}})});var G2e=M(G6=>{"use strict";m();Object.defineProperty(G6,"__esModule",{value:!0});G6.InstrumentationNodeModuleDefinition=void 0;var BX=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||[]}};G6.InstrumentationNodeModuleDefinition=BX});var j2e=M(j6=>{"use strict";m();Object.defineProperty(j6,"__esModule",{value:!0});j6.InstrumentationNodeModuleFile=void 0;var xNt=NX(),wX=class{supportedVersions;patch;unpatch;name;constructor(t,n,r,o){this.supportedVersions=n,this.patch=r,this.unpatch=o,this.name=(0,xNt.normalize)(t)}};j6.InstrumentationNodeModuleFile=wX});var z2e=M(iT=>{"use strict";m();Object.defineProperty(iT,"__esModule",{value:!0});iT.semconvStabilityFromStr=iT.SemconvStability=void 0;var z6;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(z6=iT.SemconvStability||(iT.SemconvStability={}));function DNt(e,t){let n=z6.OLD,r=t?.split(",").map(o=>o.trim()).filter(o=>o!=="");for(let o of r??[])if(o.toLowerCase()===e+"/dup"){n=z6.DUPLICATE;break}else o.toLowerCase()===e&&(n=z6.STABLE);return n}iT.semconvStabilityFromStr=DNt});var $2e=M(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 NNt=S2e();Object.defineProperty(cs,"registerInstrumentations",{enumerable:!0,get:function(){return NNt.registerInstrumentations}});var BNt=NX();Object.defineProperty(cs,"InstrumentationBase",{enumerable:!0,get:function(){return BNt.InstrumentationBase}});var wNt=G2e();Object.defineProperty(cs,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return wNt.InstrumentationNodeModuleDefinition}});var ONt=j2e();Object.defineProperty(cs,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return ONt.InstrumentationNodeModuleFile}});var OX=RX();Object.defineProperty(cs,"isWrapped",{enumerable:!0,get:function(){return OX.isWrapped}});Object.defineProperty(cs,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return OX.safeExecuteInTheMiddle}});Object.defineProperty(cs,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return OX.safeExecuteInTheMiddleAsync}});var H2e=z2e();Object.defineProperty(cs,"SemconvStability",{enumerable:!0,get:function(){return H2e.SemconvStability}});Object.defineProperty(cs,"semconvStabilityFromStr",{enumerable:!0,get:function(){return H2e.semconvStabilityFromStr}})});function MNt(){let e=LR[PX];return e?.helper?e.helper:LR[kX]?.helper}function LNt(e){let t={helper:e};LR[PX]=t,LR[kX]=t}function UNt(){delete LR[PX],delete LR[kX]}function GNt(e){return e==="client"?fo.CLIENT:fo.INTERNAL}function Y2e(e,t,n,r,o){if(K2e(t.name,o))return;let i={attributes:t.attributes,kind:GNt(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 f=r.get(l);return f?{context:{spanId:f,traceId:s.spanContext().traceId,traceFlags:s.spanContext().traceFlags}}:[]}));let u=n.filter(l=>l.parentId===t.id);for(let l of u)Y2e(e,l,n,r,o);s.end(t.endTime)})}function q2e(e,t){return zNt(t)?t.then(n=>(e.end(),n),n=>{throw e.end(),n}):(e.end(),t)}function zNt(e){return e!=null&&typeof e.then=="function"}function K2e(e,t){return t.some(n=>typeof n=="string"?n===e:n.test(e))}var H6,kNt,PNt,kX,PX,LR,QNt,FNt,jNt,J2e,V2e,HNt,$Nt,Z2e,W2e=w(()=>{m();He();H6=ue($2e(),1);He();kNt={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"}},PNt=kNt.version.split(".")[0],kX="PRISMA_INSTRUMENTATION",PX=`V${PNt}_PRISMA_INSTRUMENTATION`,LR=globalThis;QNt=process.env.PRISMA_SHOW_ALL_TRACES==="true",FNt="00-10-10-00";jNt=class{tracerProvider;ignoreSpanTypes;constructor({tracerProvider:e,ignoreSpanTypes:t}){this.tracerProvider=e,this.ignoreSpanTypes=t}isEnabled(){return!0}getTraceParent(e){let t=Vt.getSpanContext(e??We.active());return t?`00-${t.traceId}-${t.spanId}-0${t.traceFlags}`:FNt}dispatchEngineSpans(e){let t=this.tracerProvider.getTracer("prisma"),n=new Map,r=e.filter(o=>o.parentId===null);for(let o of r)Y2e(t,o,e,n,this.ignoreSpanTypes)}getActiveContext(){return We.active()}runInChildSpan(e,t){if(typeof e=="string"&&(e={name:e}),e.internal&&!QNt)return t();let n=this.tracerProvider.getTracer("prisma"),r=e.context??this.getActiveContext(),o=`prisma:client:${e.name}`;if(K2e(o,this.ignoreSpanTypes))return t();if(e.active===!1){let i=n.startSpan(o,e,r);return q2e(i,t(i,r))}return n.startActiveSpan(o,e,i=>q2e(i,t(i,r)))}};J2e={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},V2e=J2e.version,HNt=J2e.name,$Nt="@prisma/client",Z2e=class extends H6.InstrumentationBase{tracerProvider;constructor(e={}){super(HNt,V2e,e)}setTracerProvider(e){this.tracerProvider=e}init(){return[new H6.InstrumentationNodeModuleDefinition($Nt,[V2e])]}enable(){let e=this._config;LNt(new jNt({tracerProvider:this.tracerProvider??Vt.getTracerProvider(),ignoreSpanTypes:e.ignoreSpanTypes??[]}))}disable(){UNt()}isEnabled(){return MNt()!==void 0}}});function qNt(e){return!!e&&typeof e=="object"&&"dispatchEngineSpans"in e}function eLe(){let e=globalThis.PRISMA_INSTRUMENTATION;return e&&typeof e=="object"&&"helper"in e?e.helper:void 0}function VNt(e){return e==="client"?fo.CLIENT:fo.INTERNAL}var X2e,MX,YNt,tLe,nLe=w(()=>{m();He();W2e();At();_r();X2e="Prisma";MX=class extends Z2e{constructor(t){super(t?.instrumentationConfig)}enable(){super.enable();let t=eLe();qNt(t)&&(t.createEngineSpan=n=>{let r=Vt.getTracer("prismaV5Compatibility"),o=r._idGenerator;if(!o){Xo(()=>{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=VNt(i.kind),u=i.parent_span_id,l=i.span_id,f=i.trace_id,h=i.links?.map(y=>({context:{traceId:y.trace_id,spanId:y.span_id,traceFlags:iu.SAMPLED}})),_=Vt.setSpanContext(We.active(),{traceId:f,spanId:u,traceFlags:iu.SAMPLED});We.with(_,()=>{let y={generateTraceId:()=>f,generateSpanId:()=>l};r._idGenerator=y,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}})}};YNt=ct(X2e,e=>new MX(e)),tLe=e=>({name:X2e,setupOnce(){YNt(e)},setup(t){eLe()&&t.on("spanStart",n=>{let r=kt(n);r.description?.startsWith("prisma:")&&n.setAttribute(Mt,"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 rLe=M(UR=>{"use strict";m();Object.defineProperty(UR,"__esModule",{value:!0});UR.PACKAGE_NAME=UR.PACKAGE_VERSION=void 0;UR.PACKAGE_VERSION="0.60.0";UR.PACKAGE_NAME="@opentelemetry/instrumentation-hapi"});var LX=M(rA=>{"use strict";m();Object.defineProperty(rA,"__esModule",{value:!0});rA.HapiLifecycleMethodNames=rA.HapiLayerType=rA.handlerPatched=rA.HapiComponentName=void 0;rA.HapiComponentName="@hapi/hapi";rA.handlerPatched=Symbol("hapi-handler-patched");rA.HapiLayerType={ROUTER:"router",PLUGIN:"plugin",EXT:"server.ext"};rA.HapiLifecycleMethodNames=new Set(["onPreAuth","onCredentials","onPostAuth","onPreHandler","onPostHandler","onPreResponse","onRequest"])});var oLe=M($6=>{"use strict";m();Object.defineProperty($6,"__esModule",{value:!0});$6.ATTR_HTTP_METHOD=void 0;$6.ATTR_HTTP_METHOD="http.method"});var UX=M(xO=>{"use strict";m();Object.defineProperty(xO,"__esModule",{value:!0});xO.AttributeNames=void 0;var KNt;(function(e){e.HAPI_TYPE="hapi.type",e.PLUGIN_NAME="hapi.plugin.name",e.EXT_TYPE="server.ext.type"})(KNt=xO.AttributeNames||(xO.AttributeNames={}))});var aLe=M(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 iLe=(Xn(),Me(Hr)),JNt=oLe(),DO=LX(),DE=UX(),sLe=un();function ZNt(e){return e.name?e.name:e.pkg.name}ls.getPluginName=ZNt;var WNt=e=>typeof e=="string"&&DO.HapiLifecycleMethodNames.has(e);ls.isLifecycleExtType=WNt;var XNt=e=>{let t=e?.type;return t!==void 0&&(0,ls.isLifecycleExtType)(t)};ls.isLifecycleExtEventObj=XNt;var eBt=e=>Array.isArray(e)&&e.length<=3&&(0,ls.isLifecycleExtType)(e[0])&&typeof e[1]=="function";ls.isDirectExtInput=eBt;var tBt=e=>!Array.isArray(e);ls.isPatchableExtMethod=tBt;var nBt=(e,t,n)=>{let r={[iLe.ATTR_HTTP_ROUTE]:e.path};t&sLe.SemconvStability.OLD&&(r[JNt.ATTR_HTTP_METHOD]=e.method),t&sLe.SemconvStability.STABLE&&(r[iLe.ATTR_HTTP_REQUEST_METHOD]=e.method);let o;return n?(r[DE.AttributeNames.HAPI_TYPE]=DO.HapiLayerType.PLUGIN,r[DE.AttributeNames.PLUGIN_NAME]=n,o=`${n}: route - ${e.path}`):(r[DE.AttributeNames.HAPI_TYPE]=DO.HapiLayerType.ROUTER,o=`route - ${e.path}`),{attributes:r,name:o}};ls.getRouteMetadata=nBt;var rBt=(e,t,n)=>{let r=`ext - ${e}`;return n&&n!=="method"&&(r=`ext - ${e} - ${n}`),t?{attributes:{[DE.AttributeNames.EXT_TYPE]:e,[DE.AttributeNames.HAPI_TYPE]:DO.HapiLayerType.EXT,[DE.AttributeNames.PLUGIN_NAME]:t},name:`${t}: ${r}`}:{attributes:{[DE.AttributeNames.EXT_TYPE]:e,[DE.AttributeNames.HAPI_TYPE]:DO.HapiLayerType.EXT},name:r}};ls.getExtMetadata=rBt;var oBt=e=>"plugin"in e?"plugin"in e.plugin?e.plugin.plugin:e.plugin:e;ls.getPluginFromInput=oBt});var lLe=M(q6=>{"use strict";m();Object.defineProperty(q6,"__esModule",{value:!0});q6.HapiInstrumentation=void 0;var ed=(He(),Me(tt)),uLe=vr(),NO=un(),cLe=rLe(),BO=LX(),eh=aLe(),QX=class extends NO.InstrumentationBase{_semconvStability;constructor(t={}){super(cLe.PACKAGE_NAME,cLe.PACKAGE_VERSION,t),this._semconvStability=(0,NO.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new NO.InstrumentationNodeModuleDefinition(BO.HapiComponentName,[">=17.0.0 <22"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,NO.isWrapped)(n.server)||this._wrap(n,"server",this._getServerPatch.bind(this)),(0,NO.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,eh.getPluginFromInput)(s);n._wrapRegisterHandler(u)}else{let s=(0,eh.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,eh.isLifecycleExtType)(l.type)){let f=l,h=r._wrapExtMethods(f.method,l.type,n);f.method=h,s[u]=f}}return t.apply(this,i)}else if((0,eh.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,eh.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,eh.getPluginName)(t),o=t.register,i=this,s=function(u,l){return i._wrap(u,"route",f=>n._getServerRoutePatch.bind(n)(f,r)),i._wrap(u,"ext",f=>n._getServerExtPatch.bind(n)(f,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,eh.isPatchableExtMethod)(t))return t[BO.handlerPatched]===!0?t:(t[BO.handlerPatched]=!0,async function(...s){if(ed.trace.getSpan(ed.context.active())===void 0)return await t.apply(this,s);let u=(0,eh.getExtMetadata)(n,r,t.name),l=o.tracer.startSpan(u.name,{attributes:u.attributes});try{return await ed.context.with(ed.trace.setSpan(ed.context.active(),l),t,void 0,...s)}catch(f){throw l.recordException(f),l.setStatus({code:ed.SpanStatusCode.ERROR,message:f.message}),f}finally{l.end()}});return t}_wrapRouteHandler(t,n){let r=this;if(t[BO.handlerPatched]===!0)return t;t[BO.handlerPatched]=!0;let o=i=>async function(...s){if(ed.trace.getSpan(ed.context.active())===void 0)return await i.call(this,...s);let u=(0,uLe.getRPCMetadata)(ed.context.active());u?.type===uLe.RPCType.HTTP&&(u.route=t.path);let l=(0,eh.getRouteMetadata)(t,r._semconvStability,n),f=r.tracer.startSpan(l.name,{attributes:l.attributes});try{return await ed.context.with(ed.trace.setSpan(ed.context.active(),f),()=>i.call(this,...s))}catch(h){throw f.recordException(h),f.setStatus({code:ed.SpanStatusCode.ERROR,message:h.message}),h}finally{f.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}};q6.HapiInstrumentation=QX});var dLe=M(QR=>{"use strict";m();Object.defineProperty(QR,"__esModule",{value:!0});QR.AttributeNames=QR.HapiInstrumentation=void 0;var iBt=lLe();Object.defineProperty(QR,"HapiInstrumentation",{enumerable:!0,get:function(){return iBt.HapiInstrumentation}});var sBt=UX();Object.defineProperty(QR,"AttributeNames",{enumerable:!0,get:function(){return sBt.AttributeNames}})});var pLe,fLe,mLe,aBt,ALe,gLe=w(()=>{m();pLe=ue(dLe(),1);_r();fLe="Hapi",mLe=ct(fLe,()=>new pLe.HapiInstrumentation),aBt=(()=>({name:fLe,setupOnce(){mLe()}})),ALe=aBt});var NE,wO,FX=w(()=>{m();NE={HONO_TYPE:"hono.type",HONO_NAME:"hono.name"},wO={MIDDLEWARE:"middleware",REQUEST_HANDLER:"request_handler"}});var Y6,uBt,cBt,V6,hLe=w(()=>{m();He();Y6=ue(un(),1);At();FX();uBt="@sentry/instrumentation-hono",cBt="0.0.1",V6=class extends Y6.InstrumentationBase{constructor(t={}){super(uBt,cBt,t)}init(){return[new Y6.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 We.with(Vt.setSpan(We.active(),s),()=>n._safeExecute(()=>{let u=t.apply(this,[r,o]);if(Da(u))return u.then(l=>{let f=n._determineHandlerType(l);return s.setAttributes({[NE.HONO_TYPE]:f,[NE.HONO_NAME]:f===wO.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(s),l});{let l=n._determineHandlerType(u);return s.setAttributes({[NE.HONO_TYPE]:l,[NE.HONO_NAME]:l===wO.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 Da(o)?o.then(()=>n(),i=>r(i)):n(),o}catch(o){throw r(o),o}}_determineHandlerType(t){return t===void 0?wO.MIDDLEWARE:wO.REQUEST_HANDLER}_handleError(t,n){n instanceof Error&&(t.setStatus({code:Ai.ERROR,message:n.message}),t.recordException(n))}}});function lBt(e){let t=kt(e).data,n=t[NE.HONO_TYPE];if(t[Xt]||!n)return;e.setAttributes({[Mt]:"auto.http.otel.hono",[Xt]:`${n}.hono`});let r=t[NE.HONO_NAME];if(typeof r=="string"&&e.updateName(r),Rn()===Zd()){Ds&&W.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let o=t[Rg],i=t[mS];typeof o=="string"&&typeof i=="string"&&Rn().setTransactionName(`${i} ${o}`)}var _Le,ELe,dBt,yLe,SLe=w(()=>{m();Xn();At();_r();YS();FX();hLe();_Le="Hono";ELe=ct(_Le,()=>new V6({responseHook:e=>{lBt(e)}})),dBt=(()=>({name:_Le,setupOnce(){ELe()}})),yLe=dBt});var K6=M(OO=>{"use strict";m();Object.defineProperty(OO,"__esModule",{value:!0});OO.KoaLayerType=void 0;var pBt;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware"})(pBt=OO.KoaLayerType||(OO.KoaLayerType={}))});var TLe=M(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-koa"});var GX=M(kO=>{"use strict";m();Object.defineProperty(kO,"__esModule",{value:!0});kO.AttributeNames=void 0;var fBt;(function(e){e.KOA_TYPE="koa.type",e.KOA_NAME="koa.name"})(fBt=kO.AttributeNames||(kO.AttributeNames={}))});var ILe=M(GR=>{"use strict";m();Object.defineProperty(GR,"__esModule",{value:!0});GR.isLayerIgnored=GR.getMiddlewareMetadata=void 0;var bLe=K6(),J6=GX(),mBt=(Xn(),Me(Hr)),ABt=(e,t,n,r)=>n?{attributes:{[J6.AttributeNames.KOA_NAME]:r?.toString(),[J6.AttributeNames.KOA_TYPE]:bLe.KoaLayerType.ROUTER,[mBt.ATTR_HTTP_ROUTE]:r?.toString()},name:e._matchedRouteName||`router - ${r}`}:{attributes:{[J6.AttributeNames.KOA_NAME]:t.name??"middleware",[J6.AttributeNames.KOA_TYPE]:bLe.KoaLayerType.MIDDLEWARE},name:`middleware - ${t.name}`};GR.getMiddlewareMetadata=ABt;var gBt=(e,t)=>!!(Array.isArray(t?.ignoreLayersType)&&t?.ignoreLayersType?.includes(e));GR.isLayerIgnored=gBt});var CLe=M(Z6=>{"use strict";m();Object.defineProperty(Z6,"__esModule",{value:!0});Z6.kLayerPatched=void 0;Z6.kLayerPatched=Symbol("koa-layer-patched")});var BLe=M(W6=>{"use strict";m();Object.defineProperty(W6,"__esModule",{value:!0});W6.KoaInstrumentation=void 0;var oA=(He(),Me(tt)),PO=un(),vLe=K6(),RLe=TLe(),xLe=ILe(),DLe=vr(),NLe=CLe(),jX=class extends PO.InstrumentationBase{constructor(t={}){super(RLe.PACKAGE_NAME,RLe.PACKAGE_VERSION,t)}init(){return new PO.InstrumentationNodeModuleDefinition("koa",[">=2.0.0 <4"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return n==null?n:((0,PO.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,PO.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){oA.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?vLe.KoaLayerType.ROUTER:vLe.KoaLayerType.MIDDLEWARE;return t[NLe.kLayerPatched]===!0||(0,xLe.isLayerIgnored)(o,this.getConfig())?t:t.constructor.name==="GeneratorFunction"||t.constructor.name==="AsyncGeneratorFunction"?(oA.diag.debug("ignoring generator-based Koa middleware layer"),t):(t[NLe.kLayerPatched]=!0,oA.diag.debug("patching Koa middleware layer"),async(i,s)=>{if(oA.trace.getSpan(oA.context.active())===void 0)return t(i,s);let l=(0,xLe.getMiddlewareMetadata)(i,t,n,r),f=this.tracer.startSpan(l.name,{attributes:l.attributes}),h=(0,DLe.getRPCMetadata)(oA.context.active());h?.type===DLe.RPCType.HTTP&&i._matchedRoute&&(h.route=i._matchedRoute.toString());let{requestHook:_}=this.getConfig();_&&(0,PO.safeExecuteInTheMiddle)(()=>_(f,{context:i,middlewareLayer:t,layerType:o}),T=>{T&&oA.diag.error("koa instrumentation: request hook failed",T)},!0);let y=oA.trace.setSpan(oA.context.active(),f);return oA.context.with(y,async()=>{try{return await t(i,s)}catch(T){throw f.recordException(T),T}finally{f.end()}})})}};W6.KoaInstrumentation=jX});var wLe=M(BE=>{"use strict";m();Object.defineProperty(BE,"__esModule",{value:!0});BE.KoaLayerType=BE.AttributeNames=BE.KoaInstrumentation=void 0;var hBt=BLe();Object.defineProperty(BE,"KoaInstrumentation",{enumerable:!0,get:function(){return hBt.KoaInstrumentation}});var _Bt=GX();Object.defineProperty(BE,"AttributeNames",{enumerable:!0,get:function(){return _Bt.AttributeNames}});var EBt=K6();Object.defineProperty(BE,"KoaLayerType",{enumerable:!0,get:function(){return EBt.KoaLayerType}})});var OLe,kLe,PLe,yBt,MLe,LLe=w(()=>{m();OLe=ue(wLe(),1);Xn();At();_r();YS();kLe="Koa",PLe=ct(kLe,OLe.KoaInstrumentation,(e={})=>({ignoreLayersType:e.ignoreLayersType,requestHook(t,n){qr(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()===Zd()){Ds&&W.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let s=r[Rg],u=n.context?.request?.method?.toUpperCase()||"GET";s&&Rn().setTransactionName(`${u} ${s}`)}})),yBt=((e={})=>({name:kLe,setupOnce(){PLe(e)}})),MLe=yBt});var zX=M(Nf=>{"use strict";m();Object.defineProperty(Nf,"__esModule",{value:!0});Nf.ConnectNames=Nf.ConnectTypes=Nf.AttributeNames=void 0;var SBt;(function(e){e.CONNECT_TYPE="connect.type",e.CONNECT_NAME="connect.name"})(SBt=Nf.AttributeNames||(Nf.AttributeNames={}));var TBt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(TBt=Nf.ConnectTypes||(Nf.ConnectTypes={}));var bBt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request handler"})(bBt=Nf.ConnectNames||(Nf.ConnectNames={}))});var ULe=M(jR=>{"use strict";m();Object.defineProperty(jR,"__esModule",{value:!0});jR.PACKAGE_NAME=jR.PACKAGE_VERSION=void 0;jR.PACKAGE_VERSION="0.57.0";jR.PACKAGE_NAME="@opentelemetry/instrumentation-connect"});var QLe=M(X6=>{"use strict";m();Object.defineProperty(X6,"__esModule",{value:!0});X6._LAYERS_STORE_PROPERTY=void 0;X6._LAYERS_STORE_PROPERTY=Symbol("opentelemetry.instrumentation-connect.request-route-stack")});var FLe=M(OE=>{"use strict";m();Object.defineProperty(OE,"__esModule",{value:!0});OE.generateRoute=OE.replaceCurrentStackRoute=OE.addNewStackLayer=void 0;var IBt=(He(),Me(tt)),wE=QLe(),CBt=e=>{Array.isArray(e[wE._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(e,wE._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),e[wE._LAYERS_STORE_PROPERTY].push("/");let t=e[wE._LAYERS_STORE_PROPERTY].length;return()=>{t===e[wE._LAYERS_STORE_PROPERTY].length?e[wE._LAYERS_STORE_PROPERTY].pop():IBt.diag.warn("Connect: Trying to pop the stack multiple time")}};OE.addNewStackLayer=CBt;var vBt=(e,t)=>{t&&e[wE._LAYERS_STORE_PROPERTY].splice(-1,1,t)};OE.replaceCurrentStackRoute=vBt;var RBt=e=>e[wE._LAYERS_STORE_PROPERTY].reduce((t,n)=>t.replace(/\/+$/,"")+n);OE.generateRoute=RBt});var zLe=M(kE=>{"use strict";m();Object.defineProperty(kE,"__esModule",{value:!0});kE.ConnectInstrumentation=kE.ANONYMOUS_NAME=void 0;var xBt=(He(),Me(tt)),GLe=vr(),zR=zX(),jLe=ULe(),eG=un(),DBt=(Xn(),Me(Hr)),HX=FLe();kE.ANONYMOUS_NAME="anonymous";var $X=class extends eG.InstrumentationBase{constructor(t={}){super(jLe.PACKAGE_NAME,jLe.PACKAGE_VERSION,t)}init(){return[new eG.InstrumentationNodeModuleDefinition("connect",[">=3.0.0 <4"],t=>this._patchConstructor(t))]}_patchApp(t){(0,eG.isWrapped)(t.use)||this._wrap(t,"use",this._patchUse.bind(this)),(0,eG.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=zR.ConnectTypes.REQUEST_HANDLER,i=zR.ConnectNames.REQUEST_HANDLER,o=t):(r=zR.ConnectTypes.MIDDLEWARE,i=zR.ConnectNames.MIDDLEWARE,o=n.name||kE.ANONYMOUS_NAME);let s=`${i} - ${o}`,u={attributes:{[DBt.ATTR_HTTP_ROUTE]:t.length>0?t:"/",[zR.AttributeNames.CONNECT_TYPE]:r,[zR.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],f=arguments[s],h=arguments[u],_=arguments[l];(0,HX.replaceCurrentStackRoute)(f,t);let y=(0,GLe.getRPCMetadata)(xBt.context.active());t&&y?.type===GLe.RPCType.HTTP&&(y.route=(0,HX.generateRoute)(f));let T="";t?T=`request handler - ${t}`:T=`middleware - ${n.name||kE.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(_,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,HX.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)}}};kE.ConnectInstrumentation=$X});var $Le=M(fp=>{"use strict";m();Object.defineProperty(fp,"__esModule",{value:!0});fp.ConnectTypes=fp.ConnectNames=fp.AttributeNames=fp.ANONYMOUS_NAME=fp.ConnectInstrumentation=void 0;var HLe=zLe();Object.defineProperty(fp,"ConnectInstrumentation",{enumerable:!0,get:function(){return HLe.ConnectInstrumentation}});Object.defineProperty(fp,"ANONYMOUS_NAME",{enumerable:!0,get:function(){return HLe.ANONYMOUS_NAME}});var qX=zX();Object.defineProperty(fp,"AttributeNames",{enumerable:!0,get:function(){return qX.AttributeNames}});Object.defineProperty(fp,"ConnectNames",{enumerable:!0,get:function(){return qX.ConnectNames}});Object.defineProperty(fp,"ConnectTypes",{enumerable:!0,get:function(){return qX.ConnectTypes}})});var qLe,VLe,YLe,NBt,KLe,JLe=w(()=>{m();qLe=ue($Le(),1);_r();VLe="Connect",YLe=ct(VLe,()=>new qLe.ConnectInstrumentation),NBt=(()=>({name:VLe,setupOnce(){YLe()}})),KLe=NBt});var ZLe=M(la=>{"use strict";m();Object.defineProperty(la,"__esModule",{value:!0});la.DB_SYSTEM_VALUE_MSSQL=la.ATTR_NET_PEER_PORT=la.ATTR_NET_PEER_NAME=la.ATTR_DB_USER=la.ATTR_DB_SYSTEM=la.ATTR_DB_STATEMENT=la.ATTR_DB_SQL_TABLE=la.ATTR_DB_NAME=void 0;la.ATTR_DB_NAME="db.name";la.ATTR_DB_SQL_TABLE="db.sql.table";la.ATTR_DB_STATEMENT="db.statement";la.ATTR_DB_SYSTEM="db.system";la.ATTR_DB_USER="db.user";la.ATTR_NET_PEER_NAME="net.peer.name";la.ATTR_NET_PEER_PORT="net.peer.port";la.DB_SYSTEM_VALUE_MSSQL="mssql"});var WLe=M(HR=>{"use strict";m();Object.defineProperty(HR,"__esModule",{value:!0});HR.once=HR.getSpanName=void 0;function BBt(e,t,n,r){return e==="execBulkLoad"&&r&&t?`${e} ${r} ${t}`:e==="callProcedure"?t?`${e} ${n} ${t}`:`${e} ${n}`:t?`${e} ${t}`:`${e}`}HR.getSpanName=BBt;var wBt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};HR.once=wBt});var XLe=M($R=>{"use strict";m();Object.defineProperty($R,"__esModule",{value:!0});$R.PACKAGE_NAME=$R.PACKAGE_VERSION=void 0;$R.PACKAGE_VERSION="0.33.0";$R.PACKAGE_NAME="@opentelemetry/instrumentation-tedious"});var oUe=M(ME=>{"use strict";m();Object.defineProperty(ME,"__esModule",{value:!0});ME.TediousInstrumentation=ME.INJECTED_CTX=void 0;var qR=(He(),Me(tt)),OBt=Ue("events"),iA=un(),sT=(Xn(),Me(Hr)),PE=ZLe(),eUe=WLe(),tUe=XLe(),rUe=Symbol("opentelemetry.instrumentation-tedious.current-database");ME.INJECTED_CTX=Symbol("opentelemetry.instrumentation-tedious.context-info-injected");var nUe=["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"];function tG(e){Object.defineProperty(this,rUe,{value:e,writable:!0})}var VX=class e extends iA.InstrumentationBase{static COMPONENT="tedious";_netSemconvStability;_dbSemconvStability;constructor(t={}){super(tUe.PACKAGE_NAME,tUe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,iA.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,iA.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new iA.InstrumentationNodeModuleDefinition(e.COMPONENT,[">=1.11.0 <20"],t=>{let n=t.Connection.prototype;for(let r of nUe)(0,iA.isWrapped)(n[r])&&this._unwrap(n,r),this._wrap(n,r,this._patchQuery(r,t));return(0,iA.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 nUe)this._unwrap(n,r);this._unwrap(n,"connect")})]}_patchConnect(t){return function(){return tG.call(this,this.config?.options?.database),this.removeListener("databaseChange",tG),this.on("databaseChange",tG),this.once("end",()=>{this.removeListener("databaseChange",tG)}),t.apply(this,arguments)}}_buildTraceparent(t){let n=t.spanContext();return`00-${n.traceId}-${n.spanId}-0${Number(n.traceFlags||qR.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,ME.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?.[ME.INJECTED_CTX])return r.apply(this,arguments);if(!(s instanceof OBt.EventEmitter))return o._diag.warn(`Unexpected invocation of patched ${t} method. Span not recorded`),r.apply(this,arguments);let u=0,l=0,f=()=>l++,h=()=>u++,_=this[rUe],y=(G=>G.sqlTextOrProcedure==="sp_prepare"&&G.parametersByName?.stmt?.value?G.parametersByName.stmt.value:G.sqlTextOrProcedure)(s),T={};o._dbSemconvStability&iA.SemconvStability.OLD&&(T[PE.ATTR_DB_SYSTEM]=PE.DB_SYSTEM_VALUE_MSSQL,T[PE.ATTR_DB_NAME]=_,T[PE.ATTR_DB_USER]=this.config?.userName??this.config?.authentication?.options?.userName,T[PE.ATTR_DB_STATEMENT]=y,T[PE.ATTR_DB_SQL_TABLE]=s.table),o._dbSemconvStability&iA.SemconvStability.STABLE&&(T[sT.ATTR_DB_NAMESPACE]=_,T[sT.ATTR_DB_SYSTEM_NAME]=sT.DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER,T[sT.ATTR_DB_QUERY_TEXT]=y,T[sT.ATTR_DB_COLLECTION_NAME]=s.table),o._netSemconvStability&iA.SemconvStability.OLD&&(T[PE.ATTR_NET_PEER_NAME]=this.config?.server,T[PE.ATTR_NET_PEER_PORT]=this.config?.options?.port),o._netSemconvStability&iA.SemconvStability.STABLE&&(T[sT.ATTR_SERVER_ADDRESS]=this.config?.server,T[sT.ATTR_SERVER_PORT]=this.config?.options?.port);let v=o.tracer.startSpan((0,eUe.getSpanName)(t,_,y,s.table),{kind:qR.SpanKind.CLIENT,attributes:T}),R=(0,eUe.once)(G=>{s.removeListener("done",f),s.removeListener("doneInProc",f),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:qR.SpanStatusCode.ERROR,message:G.message}),v.end()});s.on("done",f),s.on("doneInProc",f),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=()=>qR.context.with(qR.trace.setSpan(qR.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)}}};ME.TediousInstrumentation=VX});var iUe=M(nG=>{"use strict";m();Object.defineProperty(nG,"__esModule",{value:!0});nG.TediousInstrumentation=void 0;var kBt=oUe();Object.defineProperty(nG,"TediousInstrumentation",{enumerable:!0,get:function(){return kBt.TediousInstrumentation}})});var sUe,PBt,aUe,uUe,MBt,cUe,lUe=w(()=>{m();sUe=ue(iUe(),1);At();_r();PBt=new Set(["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"]),aUe="Tedious",uUe=ct(aUe,()=>new sUe.TediousInstrumentation({})),MBt=(()=>{let e;return{name:aUe,setupOnce(){let t=uUe();e=_w(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]||"";PBt.has(i)&&n.setAttribute(Mt,"auto.db.otel.tedious")}))}}}),cUe=MBt});var dUe=M(VR=>{"use strict";m();Object.defineProperty(VR,"__esModule",{value:!0});VR.PACKAGE_NAME=VR.PACKAGE_VERSION=void 0;VR.PACKAGE_VERSION="0.57.0";VR.PACKAGE_NAME="@opentelemetry/instrumentation-generic-pool"});var fUe=M(rG=>{"use strict";m();Object.defineProperty(rG,"__esModule",{value:!0});rG.GenericPoolInstrumentation=void 0;var YR=(He(),Me(tt)),aT=un(),pUe=dUe(),YX="generic-pool",KX=class extends aT.InstrumentationBase{_isDisabled=!1;constructor(t={}){super(pUe.PACKAGE_NAME,pUe.PACKAGE_VERSION,t)}init(){return[new aT.InstrumentationNodeModuleDefinition(YX,[">=3.0.0 <4"],t=>{let n=t.Pool;return(0,aT.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 aT.InstrumentationNodeModuleDefinition(YX,[">=2.4.0 <3"],t=>{let n=t.Pool;return(0,aT.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 aT.InstrumentationNodeModuleDefinition(YX,[">=2.0.0 <2.4"],t=>(this._isDisabled=!1,(0,aT.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=YR.context.active(),s=n.tracer.startSpan("generic-pool.acquire",{},i);return YR.context.with(YR.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=YR.context.active(),u=n.tracer.startSpan("generic-pool.acquire",{},s);return YR.context.with(YR.trace.setSpan(s,u),()=>{t.call(this,(l,f)=>{if(u.end(),o)return o(l,f)},i)})}}};rG.GenericPoolInstrumentation=KX});var mUe=M(oG=>{"use strict";m();Object.defineProperty(oG,"__esModule",{value:!0});oG.GenericPoolInstrumentation=void 0;var LBt=fUe();Object.defineProperty(oG,"GenericPoolInstrumentation",{enumerable:!0,get:function(){return LBt.GenericPoolInstrumentation}})});var AUe,gUe,hUe,UBt,_Ue,EUe=w(()=>{m();AUe=ue(mUe(),1);At();_r();gUe="GenericPool",hUe=ct(gUe,()=>new AUe.GenericPoolInstrumentation({})),UBt=(()=>{let e;return{name:gUe,setupOnce(){let t=hUe();e=_w(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let o=kt(n).description;(o==="generic-pool.aquire"||o==="generic-pool.acquire")&&n.setAttribute(Mt,"auto.db.otel.generic_pool")}))}}}),_Ue=UBt});var JX=M(sA=>{"use strict";m();Object.defineProperty(sA,"__esModule",{value:!0});sA.ATTR_NET_PEER_PORT=sA.ATTR_NET_PEER_NAME=sA.ATTR_MESSAGING_SYSTEM=sA.ATTR_MESSAGING_OPERATION=void 0;sA.ATTR_MESSAGING_OPERATION="messaging.operation";sA.ATTR_MESSAGING_SYSTEM="messaging.system";sA.ATTR_NET_PEER_NAME="net.peer.name";sA.ATTR_NET_PEER_PORT="net.peer.port"});var ZX=M(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 WX=M(uT=>{"use strict";m();Object.defineProperty(uT,"__esModule",{value:!0});uT.DEFAULT_CONFIG=uT.EndOperation=void 0;var QBt;(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"})(QBt=uT.EndOperation||(uT.EndOperation={}));uT.DEFAULT_CONFIG={consumeTimeoutMs:1e3*60,useLinksForConsume:!1}});var bUe=M(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 XX=(He(),Me(tt)),LE=un(),iG=(Xn(),Me(Hr)),MO=JX(),sG=ZX();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 eee=(0,XX.createContextKey)("opentelemetry.amqplib.channel.is-confirm-channel"),FBt=e=>e!==""?e:"<default>";Si.normalizeExchange=FBt;var GBt=e=>e.replace(/:[^:@/]*@/,":***@"),yUe=(e,t)=>e||(t==="AMQP"?5672:5671),SUe=e=>{let t=e||"amqp";return(t.endsWith(":")?t.substring(0,t.length-1):t).toUpperCase()},TUe=e=>e||"localhost",aA=(e,t,n,r)=>n?{[t]:n}:(XX.diag.error(`amqplib instrumentation: could not extract connection attribute ${r} from user supplied url`,{url:e}),{}),jBt=e=>{let t=e.serverProperties.product?.toLowerCase?.();return t?{[MO.ATTR_MESSAGING_SYSTEM]:t}:{}};Si.getConnectionAttributesFromServer=jBt;var zBt=(e,t)=>{let n={[sG.ATTR_MESSAGING_PROTOCOL_VERSION]:"0.9.1"};if(e=e||"amqp://localhost",typeof e=="object"){let r=e,o=SUe(r?.protocol);Object.assign(n,{...aA(e,sG.ATTR_MESSAGING_PROTOCOL,o,"protocol")});let i=TUe(r?.hostname);t&LE.SemconvStability.OLD&&Object.assign(n,{...aA(e,MO.ATTR_NET_PEER_NAME,i,"hostname")}),t&LE.SemconvStability.STABLE&&Object.assign(n,{...aA(e,iG.ATTR_SERVER_ADDRESS,i,"hostname")});let s=yUe(r.port,o);t&LE.SemconvStability.OLD&&Object.assign(n,aA(e,MO.ATTR_NET_PEER_PORT,s,"port")),t&LE.SemconvStability.STABLE&&Object.assign(n,aA(e,iG.ATTR_SERVER_PORT,s,"port"))}else{let r=GBt(e);n[sG.ATTR_MESSAGING_URL]=r;try{let o=new URL(r),i=SUe(o.protocol);Object.assign(n,{...aA(r,sG.ATTR_MESSAGING_PROTOCOL,i,"protocol")});let s=TUe(o.hostname);t&LE.SemconvStability.OLD&&Object.assign(n,{...aA(r,MO.ATTR_NET_PEER_NAME,s,"hostname")}),t&LE.SemconvStability.STABLE&&Object.assign(n,{...aA(r,iG.ATTR_SERVER_ADDRESS,s,"hostname")});let u=yUe(o.port?parseInt(o.port):void 0,i);t&LE.SemconvStability.OLD&&Object.assign(n,aA(r,MO.ATTR_NET_PEER_PORT,u,"port")),t&LE.SemconvStability.STABLE&&Object.assign(n,aA(r,iG.ATTR_SERVER_PORT,u,"port"))}catch(o){XX.diag.error("amqplib instrumentation: error while extracting connection details from connection url",{censoredUrl:r,err:o})}}return n};Si.getConnectionAttributesFromUrl=zBt;var HBt=e=>e.setValue(eee,!0);Si.markConfirmChannelTracing=HBt;var $Bt=e=>e.deleteValue(eee);Si.unmarkConfirmChannelTracing=$Bt;var qBt=e=>e.getValue(eee)===!0;Si.isConfirmChannelTracing=qBt});var IUe=M(KR=>{"use strict";m();Object.defineProperty(KR,"__esModule",{value:!0});KR.PACKAGE_NAME=KR.PACKAGE_VERSION=void 0;KR.PACKAGE_VERSION="0.61.0";KR.PACKAGE_NAME="@opentelemetry/instrumentation-amqplib"});var vUe=M(cG=>{"use strict";m();Object.defineProperty(cG,"__esModule",{value:!0});cG.AmqplibInstrumentation=void 0;var ri=(He(),Me(tt)),aG=vr(),xr=un(),VBt=JX(),td=ZX(),oc=WX(),Ti=bUe(),CUe=IUe(),uG=[">=0.5.5 <1"],tee=class extends xr.InstrumentationBase{_netSemconvStability;constructor(t={}){super(CUe.PACKAGE_NAME,CUe.PACKAGE_VERSION,{...oc.DEFAULT_CONFIG,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,xr.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...oc.DEFAULT_CONFIG,...t})}init(){let t=new xr.InstrumentationNodeModuleFile("amqplib/lib/channel_model.js",uG,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),n=new xr.InstrumentationNodeModuleFile("amqplib/lib/callback_model.js",uG,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),r=new xr.InstrumentationNodeModuleFile("amqplib/lib/connect.js",uG,this.patchConnect.bind(this),this.unpatchConnect.bind(this));return new xr.InstrumentationNodeModuleDefinition("amqplib",uG,void 0,void 0,[t,r,n])}patchConnect(t){return t=this.unpatchConnect(t),(0,xr.isWrapped)(t.connect)||this._wrap(t,"connect",this.getConnectPatch.bind(this)),t}unpatchConnect(t){return(0,xr.isWrapped)(t.connect)&&this._unwrap(t,"connect"),t}patchChannelModel(t,n){return(0,xr.isWrapped)(t.Channel.prototype.publish)||this._wrap(t.Channel.prototype,"publish",this.getPublishPatch.bind(this,n)),(0,xr.isWrapped)(t.Channel.prototype.consume)||this._wrap(t.Channel.prototype,"consume",this.getConsumePatch.bind(this,n)),(0,xr.isWrapped)(t.Channel.prototype.ack)||this._wrap(t.Channel.prototype,"ack",this.getAckPatch.bind(this,!1,oc.EndOperation.Ack)),(0,xr.isWrapped)(t.Channel.prototype.nack)||this._wrap(t.Channel.prototype,"nack",this.getAckPatch.bind(this,!0,oc.EndOperation.Nack)),(0,xr.isWrapped)(t.Channel.prototype.reject)||this._wrap(t.Channel.prototype,"reject",this.getAckPatch.bind(this,!0,oc.EndOperation.Reject)),(0,xr.isWrapped)(t.Channel.prototype.ackAll)||this._wrap(t.Channel.prototype,"ackAll",this.getAckAllPatch.bind(this,!1,oc.EndOperation.AckAll)),(0,xr.isWrapped)(t.Channel.prototype.nackAll)||this._wrap(t.Channel.prototype,"nackAll",this.getAckAllPatch.bind(this,!0,oc.EndOperation.NackAll)),(0,xr.isWrapped)(t.Channel.prototype.emit)||this._wrap(t.Channel.prototype,"emit",this.getChannelEmitPatch.bind(this)),(0,xr.isWrapped)(t.ConfirmChannel.prototype.publish)||this._wrap(t.ConfirmChannel.prototype,"publish",this.getConfirmedPublishPatch.bind(this,n)),t}unpatchChannelModel(t){return(0,xr.isWrapped)(t.Channel.prototype.publish)&&this._unwrap(t.Channel.prototype,"publish"),(0,xr.isWrapped)(t.Channel.prototype.consume)&&this._unwrap(t.Channel.prototype,"consume"),(0,xr.isWrapped)(t.Channel.prototype.ack)&&this._unwrap(t.Channel.prototype,"ack"),(0,xr.isWrapped)(t.Channel.prototype.nack)&&this._unwrap(t.Channel.prototype,"nack"),(0,xr.isWrapped)(t.Channel.prototype.reject)&&this._unwrap(t.Channel.prototype,"reject"),(0,xr.isWrapped)(t.Channel.prototype.ackAll)&&this._unwrap(t.Channel.prototype,"ackAll"),(0,xr.isWrapped)(t.Channel.prototype.nackAll)&&this._unwrap(t.Channel.prototype,"nackAll"),(0,xr.isWrapped)(t.Channel.prototype.emit)&&this._unwrap(t.Channel.prototype,"emit"),(0,xr.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 f=(0,Ti.getConnectionAttributesFromUrl)(o,n._netSemconvStability),h=(0,Ti.getConnectionAttributesFromServer)(l);l[Ti.CONNECTION_ATTRIBUTES]={...f,...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 f=this,h=n===oc.EndOperation.Reject?u:l,_=f[Ti.CHANNEL_SPANS_NOT_ENDED]??[],y=_.findIndex(T=>T.msg===s);if(y<0)o.endConsumerSpan(s,t,n,h);else if(n!==oc.EndOperation.Reject&&u){for(let T=0;T<=y;T++)o.endConsumerSpan(_[T].msg,t,n,h);_.splice(0,y+1)}else o.endConsumerSpan(s,t,n,h),_.splice(y,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 _=setInterval(()=>{r.checkConsumeTimeoutOnChannel(l)},h);_.unref(),l[Ti.CHANNEL_CONSUME_TIMEOUT_TIMER]=_}l[Ti.CHANNEL_SPANS_NOT_ENDED]=[]}let f=function(h){if(!h)return s.call(this,h);let _=h.properties.headers??{},y=ri.propagation.extract(ri.ROOT_CONTEXT,_),T=h.fields?.exchange,v;if(r._config.useLinksForConsume){let P=y?ri.trace.getSpan(y)?.spanContext():void 0;y=void 0,P&&(v=[{context:P}])}let R=r.tracer.startSpan(`${i} process`,{kind:ri.SpanKind.CONSUMER,attributes:{...l?.connection?.[Ti.CONNECTION_ATTRIBUTES],[td.ATTR_MESSAGING_DESTINATION]:T,[td.ATTR_MESSAGING_DESTINATION_KIND]:td.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[td.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:h.fields?.routingKey,[VBt.ATTR_MESSAGING_OPERATION]:td.MESSAGING_OPERATION_VALUE_PROCESS,[td.OLD_ATTR_MESSAGING_MESSAGE_ID]:h?.properties.messageId,[td.ATTR_MESSAGING_CONVERSATION_ID]:h?.properties.correlationId},links:v},y),{consumeHook:x}=r.getConfig();x&&(0,xr.safeExecuteInTheMiddle)(()=>x(R,{moduleVersion:t,msg:h}),P=>{P&&ri.diag.error("amqplib instrumentation: consumerHook error",P)},!0),u?.noAck||(l[Ti.CHANNEL_SPANS_NOT_ENDED].push({msg:h,timeOfConsume:(0,aG.hrTime)()}),h[Ti.MESSAGE_STORED_SPAN]=R);let O=y||ri.ROOT_CONTEXT;ri.context.with(ri.trace.setSpan(O,R),()=>{s.call(this,h)}),u?.noAck&&(r.callConsumeEndHook(R,h,!1,oc.EndOperation.AutoAck),R.end())};return arguments[1]=f,n.apply(this,arguments)}}getConfirmedPublishPatch(t,n){let r=this;return function(i,s,u,l,f){let h=this,{span:_,modifiedOptions:y}=r.createPublishSpan(r,i,s,h,l),{publishHook:T}=r.getConfig();T&&(0,xr.safeExecuteInTheMiddle)(()=>T(_,{moduleVersion:t,exchange:i,routingKey:s,content:u,options:y,isConfirmChannel:!0}),O=>{O&&ri.diag.error("amqplib instrumentation: publishHook error",O)},!0);let v=function(O,P){try{f?.call(this,O,P)}finally{let{publishConfirmHook:j}=r.getConfig();j&&(0,xr.safeExecuteInTheMiddle)(()=>j(_,{moduleVersion:t,exchange:i,routingKey:s,content:u,options:l,isConfirmChannel:!0,confirmError:O}),G=>{G&&ri.diag.error("amqplib instrumentation: publishConfirmHook error",G)},!0),O&&_.setStatus({code:ri.SpanStatusCode.ERROR,message:"message confirmation has been nack'ed"}),_.end()}},R=(0,Ti.markConfirmChannelTracing)(ri.context.active()),x=[...arguments];return x[3]=y,x[4]=ri.context.bind((0,Ti.unmarkConfirmChannelTracing)(ri.trace.setSpan(R,_)),v),ri.context.with(R,n.bind(this,...x))}}getPublishPatch(t,n){let r=this;return function(i,s,u,l){if((0,Ti.isConfirmChannelTracing)(ri.context.active()))return n.apply(this,arguments);{let f=this,{span:h,modifiedOptions:_}=r.createPublishSpan(r,i,s,f,l),{publishHook:y}=r.getConfig();y&&(0,xr.safeExecuteInTheMiddle)(()=>y(h,{moduleVersion:t,exchange:i,routingKey:s,content:u,options:_,isConfirmChannel:!1}),R=>{R&&ri.diag.error("amqplib instrumentation: publishHook error",R)},!0);let T=[...arguments];T[3]=_;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:ri.SpanKind.PRODUCER,attributes:{...o.connection[Ti.CONNECTION_ATTRIBUTES],[td.ATTR_MESSAGING_DESTINATION]:n,[td.ATTR_MESSAGING_DESTINATION_KIND]:td.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[td.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:r,[td.OLD_ATTR_MESSAGING_MESSAGE_ID]:i?.messageId,[td.ATTR_MESSAGING_CONVERSATION_ID]:i?.correlationId}}),l=i??{};return l.headers=l.headers??{},ri.propagation.inject(ri.trace.setSpan(ri.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:ri.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,xr.safeExecuteInTheMiddle)(()=>i(t,{msg:n,rejected:r,endOperation:o}),s=>{s&&ri.diag.error("amqplib instrumentation: consumerEndHook error",s)},!0)}checkConsumeTimeoutOnChannel(t){let n=(0,aG.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,aG.hrTimeDuration)(s.timeOfConsume,n);if((0,aG.hrTimeToMilliseconds)(u)<i)break;this.endConsumerSpan(s.msg,null,oc.EndOperation.InstrumentationTimeout,!0)}r.splice(0,o)}};cG.AmqplibInstrumentation=tee});var xUe=M(UE=>{"use strict";m();Object.defineProperty(UE,"__esModule",{value:!0});UE.EndOperation=UE.DEFAULT_CONFIG=UE.AmqplibInstrumentation=void 0;var YBt=vUe();Object.defineProperty(UE,"AmqplibInstrumentation",{enumerable:!0,get:function(){return YBt.AmqplibInstrumentation}});var RUe=WX();Object.defineProperty(UE,"DEFAULT_CONFIG",{enumerable:!0,get:function(){return RUe.DEFAULT_CONFIG}});Object.defineProperty(UE,"EndOperation",{enumerable:!0,get:function(){return RUe.EndOperation}})});var DUe,NUe,KBt,BUe,JBt,wUe,OUe=w(()=>{m();DUe=ue(xUe(),1);_r();NUe="Amqplib",KBt={consumeEndHook:e=>{qr(e,"auto.amqplib.otel.consumer")},publishHook:e=>{qr(e,"auto.amqplib.otel.publisher")}},BUe=ct(NUe,()=>new DUe.AmqplibInstrumentation(KBt)),JBt=(()=>({name:NUe,setupOnce(){BUe()}})),wUe=JBt});var LO,nee=w(()=>{m();LO="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 XBt(e){if(typeof e!="object"||e===null||!("content"in e))return;let t=e;Array.isArray(t.content)&&(ewt(t.content),twt(t.content))}function ewt(e){for(let t of e){if(!WBt(t))continue;let n=wK(t.toolCallId);n?zl(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"),rn(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})}):zl(r=>{r.setTag("vercel.ai.tool.name",t.toolName),r.setTag("vercel.ai.tool.callId",t.toolCallId),r.setLevel("error"),rn(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})})}}function twt(e){for(let t of e)typeof t=="object"&&t!==null&&"toolCallId"in t&&typeof t.toolCallId=="string"&&OK(t.toolCallId)}function nwt(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 dG,ZBt,kUe,lG,PUe=w(()=>{m();dG=ue(un(),1);At();nee();ZBt=[">=3.0.0 <7"],kUe=["generateText","streamText","generateObject","streamObject","embed","embedMany","rerank"];lG=class e extends dG.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 dG.InstrumentationNodeModuleDefinition("ai",ZBt,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,f=Et(),h=f?.getIntegrationByName(LO),_=h?.options,y=h?!!f?.getOptions().sendDefaultPii:!1,{recordInputs:T,recordOutputs:v}=nwt(_,u,l,y);return s[0].experimental_telemetry={...u,isEnabled:l!==void 0?l:!0,recordInputs:T,recordOutputs:v},If(()=>Reflect.apply(o,i,s),R=>{R&&typeof R=="object"&&ns(R,"_sentry_active_span",Hc())},()=>{},R=>{XBt(R)})}});if(Object.prototype.toString.call(t)==="[object Module]"){for(let r of kUe)t[r]!=null&&(t[r]=n(t[r]));return t}else{let r=kUe.reduce((o,i)=>(t[i]!=null&&(o[i]=n(t[i])),o),{});return{...t,...r}}}}});function rwt(e){return!!e.getIntegrationByName("Modules")?.getModules?.()?.ai}var MUe,owt,LUe,UUe=w(()=>{m();At();_r();nee();PUe();MUe=ct(LO,()=>new lG({}));owt=((e={})=>{let t;return{name:LO,options:e,setupOnce(){t=MUe()},afterAllSetup(n){e.force??rwt(n)?gF(n):t?.callWhenPatched(()=>gF(n))}}}),LUe=owt});var fG,iwt,pG,QUe=w(()=>{m();fG=ue(un(),1);At();iwt=[">=4.0.0 <7"],pG=class extends fG.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-openai",er,t)}init(){return new fG.InstrumentationNodeModuleDefinition("openai",iwt,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(BS(uE))return Reflect.construct(r,s);let u=Reflect.construct(r,s);return EF(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 FUe,swt,GUe,jUe=w(()=>{m();At();_r();QUe();FUe=ct(uE,e=>new pG(e)),swt=((e={})=>({name:uE,setupOnce(){FUe(e)}})),GUe=swt});var AG,awt,mG,zUe=w(()=>{m();AG=ue(un(),1);At();awt=[">=0.19.2 <1.0.0"],mG=class extends AG.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-anthropic-ai",er,t)}init(){return new AG.InstrumentationNodeModuleDefinition("@anthropic-ai/sdk",awt,this._patch.bind(this))}_patch(t){let n=t.Anthropic,r=this.getConfig(),o=function(...i){if(BS(cE))return Reflect.construct(n,i);let s=Reflect.construct(n,i);return yF(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 HUe,uwt,$Ue,qUe=w(()=>{m();At();_r();zUe();HUe=ct(cE,e=>new mG(e)),uwt=((e={})=>({name:cE,options:e,setupOnce(){HUe(e)}})),$Ue=uwt});var JR,VUe,gG,YUe=w(()=>{m();JR=ue(un(),1);At();VUe=[">=0.10.0 <2"],gG=class extends JR.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-google-genai",er,t)}init(){return new JR.InstrumentationNodeModuleDefinition("@google/genai",VUe,n=>this._patch(n),n=>n,[new JR.InstrumentationNodeModuleFile("@google/genai/dist/node/index.cjs",VUe,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(BS(lE))return Reflect.construct(n,i);let s=Reflect.construct(n,i);return SF(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 gw(t,"GoogleGenAI",o),t}}});var KUe,cwt,JUe,ZUe=w(()=>{m();At();_r();YUe();KUe=ct(lE,e=>new gG(e)),cwt=((e={})=>({name:lE,setupOnce(){KUe(e)}})),JUe=cwt});function lwt(e,t){return e?Array.isArray(e)?e.includes(t)?e:[...e,t]:typeof e=="object"?[e,t]:e:[t]}function dwt(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,f=lwt(l,t);return u.callbacks=f,Reflect.apply(r,o,i)}})}var QE,hG,_G,WUe=w(()=>{m();QE=ue(un(),1);At();hG=[">=0.1.0 <2.0.0"];_G=class extends QE.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 QE.InstrumentationNodeModuleDefinition(r,hG,this._patch.bind(this),o=>o,[new QE.InstrumentationNodeModuleFile(`${r}/dist/index.cjs`,hG,this._patch.bind(this),o=>o)]));return t.push(new QE.InstrumentationNodeModuleDefinition("langchain",hG,this._patch.bind(this),r=>r,[new QE.InstrumentationNodeModuleFile("langchain/dist/chat_models/universal.cjs",hG,this._patch.bind(this),r=>r)])),t}_patch(t){KY([uE,cE,lE]);let n=CF(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 f=s[l];typeof f=="function"&&(s[l]=dwt(f,n))}}}});var XUe,pwt,eQe,tQe=w(()=>{m();At();_r();WUe();XUe=ct(TF,e=>new _G(e)),pwt=((e={})=>({name:TF,setupOnce(){XUe(e)}})),eQe=pwt});var ZR,nQe,EG,rQe=w(()=>{m();ZR=ue(un(),1);At();nQe=[">=0.0.0 <2.0.0"],EG=class extends ZR.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langgraph",er,t)}init(){return new ZR.InstrumentationNodeModuleDefinition("@langchain/langgraph",nQe,this._patch.bind(this),n=>n,[new ZR.InstrumentationNodeModuleFile("@langchain/langgraph/dist/index.cjs",nQe,this._patch.bind(this),n=>n)])}_patch(t){return t.StateGraph&&typeof t.StateGraph=="function"&&RF(t.StateGraph.prototype,this.getConfig()),t}}});var oQe,fwt,iQe,sQe=w(()=>{m();At();_r();rQe();oQe=ct(vF,e=>new EG(e)),fwt=((e={})=>({name:vF,setupOnce(){oQe(e)}})),iQe=fwt});import*as uQe from"node:net";function cQe(e,t,n,r,o){let s=()=>{},u=o.firestoreSpanCreationHook;typeof u=="function"&&(s=h=>{(0,th.safeExecuteInTheMiddle)(()=>u(h),_=>{_&&Fl.error(_?.message)},!0)});let l=new th.InstrumentationNodeModuleDefinition("@firebase/firestore",t,h=>aQe(h,n,r,e,s)),f=["@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 f)l.files.push(new th.InstrumentationNodeModuleFile(h,t,_=>aQe(_,n,r,e,s),_=>lQe(_,r)));return l}function aQe(e,t,n,r,o){return lQe(e,n),t(e,"addDoc",mwt(r,o)),t(e,"getDocs",gwt(r,o)),t(e,"setDoc",hwt(r,o)),t(e,"deleteDoc",Awt(r,o)),e}function lQe(e,t){for(let n of["addDoc","getDocs","setDoc","deleteDoc"])(0,th.isWrapped)(e[n])&&t(e,n);return e}function mwt(e,t){return function(r){return function(o,i){let s=SG(e,"addDoc",o);return t(s),yG(s,()=>r(o,i))}}}function Awt(e,t){return function(r){return function(o){let i=SG(e,"deleteDoc",o.parent||o);return t(i),yG(i,()=>r(o))}}}function gwt(e,t){return function(r){return function(o){let i=SG(e,"getDocs",o);return t(i),yG(i,()=>r(o))}}}function hwt(e,t){return function(r){return function(o,i,s){let u=SG(e,"setDoc",o.parent||o);return t(u),yG(u,()=>typeof s<"u"?r(o,i,s):r(o,i))}}}function yG(e,t){return We.with(Vt.setSpan(We.active(),e),()=>(0,th.safeExecuteInTheMiddle)(()=>t(),n=>{n&&e.recordException(n),e.end()},!0))}function SG(e,t,n){let r=e.startSpan(`${t} ${n.path}`,{kind:fo.CLIENT});return Ewt(r,n),r.setAttribute(LC,t),r}function _wt(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(uQe.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 Ewt(e,t){let n=t.firestore.app,r=n.options,i=(t.firestore.toJSON()||{}).settings||{},s={[EV]:t.path,[yV]:n.name,[fS]:"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}=_wt(i);u&&(s[xV]=u),l&&(s[DV]=l),e.setAttributes(s)}var th,dQe=w(()=>{m();He();th=ue(un(),1);Xn()});function pQe(e,t,n,r,o){let i=()=>{},s=()=>{},u=o.functions?.errorHook,l=o.functions?.requestHook,f=o.functions?.responseHook;typeof f=="function"&&(s=(y,T)=>{(0,nh.safeExecuteInTheMiddle)(()=>f(y,T),v=>{v&&Fl.error(v?.message)},!0)}),typeof l=="function"&&(i=y=>{(0,nh.safeExecuteInTheMiddle)(()=>l(y),T=>{T&&Fl.error(T?.message)},!0)});let h=new nh.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:y,triggerType:T})=>{h.files.push(new nh.InstrumentationNodeModuleFile(y,t,v=>ywt(v,n,r,e,{requestHook:i,responseHook:s,errorHook:u},T),v=>fQe(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(...f){let h=process.env.FUNCTION_TARGET||process.env.K_SERVICE||"unknown",_=e.startSpan(`firebase.function.${n}`,{kind:fo.SERVER}),y={"faas.name":h,"faas.trigger":n,"faas.provider":"firebase"};return process.env.GCLOUD_PROJECT&&(y["cloud.project_id"]=process.env.GCLOUD_PROJECT),process.env.EVENTARC_CLOUD_EVENT_SOURCE&&(y["cloud.event_source"]=process.env.EVENTARC_CLOUD_EVENT_SOURCE),_.setAttributes(y),t?.requestHook?.(_),We.with(Vt.setSpan(We.active(),_),async()=>{let T,v;try{v=await s.apply(this,f)}catch(R){T=R}if(t?.responseHook?.(_,T),T&&_.recordException(T),_.end(),T)throw await t?.errorHook?.(_,T),T;return v})};return u?o.call(this,u,l):o.call(this,l)}}}function ywt(e,t,n,r,o,i){switch(fQe(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 fQe(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,nh.isWrapped)(e[r])&&t(e,r);return e}var nh,mQe=w(()=>{m();He();nh=ue(un(),1)});var gQe,AQe,Swt,Twt,TG,hQe=w(()=>{m();gQe=ue(un(),1);At();dQe();mQe();AQe={},Swt=[">=3.0.0 <5"],Twt=[">=6.0.0 <7"],TG=class extends gQe.InstrumentationBase{constructor(t=AQe){super("@sentry/instrumentation-firebase",er,t)}setConfig(t={}){super.setConfig({...AQe,...t})}init(){let t=[];return t.push(cQe(this.tracer,Swt,this._wrap,this._unwrap,this.getConfig())),t.push(pQe(this.tracer,Twt,this._wrap,this._unwrap,this.getConfig())),t}}});var _Qe,bwt,EQe,Iwt,yQe,SQe=w(()=>{m();At();_r();hQe();_Qe="Firebase",bwt={firestoreSpanCreationHook:e=>{qr(e,"auto.firebase.otel.firestore"),e.setAttribute(Xt,"db.query")},functions:{requestHook:e=>{qr(e,"auto.firebase.otel.functions"),e.setAttribute(Xt,"http.request")},errorHook:async(e,t)=>{t&&(rn(t,{mechanism:{type:"auto.firebase.otel.functions",handled:!1}}),await Sv(2e3))}}},EQe=ct(_Qe,()=>new TG(bwt)),Iwt=(()=>({name:_Qe,setupOnce(){EQe()}})),yQe=Iwt});function TQe(){return[Cwe(),ike(),wke(),yLe(),EPe(),kPe(),qPe(),oMe(),MMe(),r2e(),tLe(),ALe(),MLe(),KLe(),cUe(),_Ue(),Kke(),wUe(),sPe(),eQe(),iQe(),LUe(),GUe(),$Ue(),JUe(),a2e(),yQe()]}var bQe=w(()=>{m();OUe();qUe();JLe();vwe();uke();SQe();EUe();ZUe();kke();gLe();SLe();Jke();LLe();tQe();sQe();aPe();yPe();PPe();VPe();iMe();jUe();o2e();u2e();nLe();LMe();lUe();UUe()});function CQe(e,t={}){e.getOptions().debug&&lZ();let[n,r]=Cwt(e,t);e.traceProvider=n,e.asyncLocalStorageLookup=r}function Cwt(e,t={}){let n=new IQe.BasicTracerProvider({sampler:new O4(e),resource:(0,bG.defaultResource)().merge((0,bG.resourceFromAttributes)({[NV]:"node",[_V]:"sentry",[BV]:er})),forceFlushTimeoutMillis:500,spanProcessors:[new w4({timeout:vwt(e.getOptions().maxSpanWaitDuration)}),...t.spanProcessors||[]]});Vt.setGlobalTracerProvider(n),mf.setGlobalPropagator(new B4);let r=new P4;return We.setGlobalContextManager(r),[n,r.getAsyncLocalStorageLookup()]}function vwt(e){if(e!=null){if(e>ree)return Ds&&W.warn(`\`maxSpanWaitDuration\` is too high, using the maximum value of ${ree}`),ree;if(e<=0||Number.isNaN(e)){Ds&&W.warn("`maxSpanWaitDuration` must be a positive number, using default value instead.");return}return e}}var bG,IQe,ree,vQe=w(()=>{m();He();bG=ue(bJ(),1),IQe=ue(KJ(),1);Xn();At();_r();Xv();YS();ree=1e6});function RQe(){return j4().filter(t=>t.name!=="Http"&&t.name!=="NodeFetch").concat(twe(),lwe())}function xQe(e){return[...RQe(),...Mi(e)?TQe():[]]}function oee(e={}){return Rwt(e,xQe)}function Rwt(e={},t){wS(e,"node");let n=MZ({...e,defaultIntegrations:e.defaultIntegrations??t(e)});return n&&!e.skipOpenTelemetrySetup&&(CQe(n,{spanProcessors:e.openTelemetrySpanProcessors}),z4()),n}var DQe=w(()=>{m();At();_r();nwe();dwe();bQe();vQe()});var WR=w(()=>{m();DQe();At();_r()});function to(){return xwt}function _u(){return NQe}function BQe(){return Dwt}var xwt,NQe,Dwt,sc=w(()=>{"use strict";m();xwt="prod",NQe="0.1.196",Dwt=`@loredotlink/cli/${NQe}`});function kwt(e=""){if(!wwt.test(e))return e!==e.toLowerCase()}function wQe(e,t){let n=t??Owt,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 f=kwt(u);if(s===!1){if(i===!1&&f===!0){r.push(o),o=u,i=f;continue}if(i===!0&&f===!1&&o.length>1){let h=o.at(-1);r.push(o.slice(0,Math.max(0,o.length-1))),o=h+u,i=f;continue}}o+=u,i=f,s=l}return r.push(o),r}function Pwt(e){return e?e[0].toUpperCase()+e.slice(1):""}function Mwt(e){return e?e[0].toLowerCase()+e.slice(1):""}function Lwt(e,t){return e?(Array.isArray(e)?e:wQe(e)).map(n=>Pwt(t?.normalize?n.toLowerCase():n)).join(""):""}function QO(e,t){return Mwt(Lwt(e||"",t))}function IG(e,t){return e?(Array.isArray(e)?e:wQe(e)).map(n=>n.toLowerCase()).join(t??"-"):""}function OQe(e){return IG(e||"","_")}var wwt,Owt,kQe=w(()=>{m();wwt=/\d/,Owt=["-","_","/","."]});import{parseArgs as Uwt}from"node:util";function xG(e){return Array.isArray(e)?e:e===void 0?[]:[e]}function iee(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 LW(e,t,n,r=void 0){n&&(0,cO.safeExecuteInTheMiddle)(()=>n(e,{moduleVersion:r,response:t}),o=>{o&&SPe.diag.error("mongoose instrumentation: responseHook error",o)},!0)}function Vxt(e,t,n,r=void 0){return e instanceof Promise?e.then(o=>(LW(t,o,n,r),o)).catch(o=>{throw TPe(t,o),o}).finally(()=>t.end()):(LW(t,e,n,r),t.end(),e)}yE.handlePromiseResponse=Vxt;function Yxt(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,f)=>(l?TPe(r,l):LW(r,f,i,s),r.end(),e(l,f)),t.apply(n,o)}yE.handleCallbackResponse=Yxt});var IPe=M(SR=>{"use strict";m();Object.defineProperty(SR,"__esModule",{value:!0});SR.PACKAGE_NAME=SR.PACKAGE_VERSION=void 0;SR.PACKAGE_VERSION="0.60.0";SR.PACKAGE_NAME="@opentelemetry/instrumentation-mongoose"});var DPe=M(Jc=>{"use strict";m();Object.defineProperty(Jc,"__esModule",{value:!0});Jc.MongooseInstrumentation=Jc._ALREADY_INSTRUMENTED=Jc._STORED_PARENT_SPAN=void 0;var Bs=(He(),Me(tt)),Kxt=vr(),UW=bPe(),La=un(),CPe=IPe(),SE=MW(),tT=(Xn(),Me(Hr)),K3=["deleteOne","deleteMany","find","findOne","estimatedDocumentCount","countDocuments","distinct","where","$where","findOneAndUpdate","findOneAndDelete","findOneAndReplace"],Jxt=["remove","count","findOneAndRemove",...K3],Zxt=["count","findOneAndRemove",...K3],Wxt=[...K3];function vPe(e){return e?e.startsWith("6.")||e.startsWith("5.")?Jxt:e.startsWith("7.")?Zxt:Wxt:K3}function RPe(e){return e&&(e.startsWith("5.")||e.startsWith("6."))||!1}function xPe(e){return!e||!e.startsWith("8.")?!1:parseInt(e.split(".")[1],10)>=21}Jc._STORED_PARENT_SPAN=Symbol("stored-parent-span");Jc._ALREADY_INSTRUMENTED=Symbol("already-instrumented");var QW=class extends La.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(CPe.PACKAGE_NAME,CPe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,La.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,La.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new La.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,RPe(n)&&this._wrap(r.Model.prototype,"remove",this.patchOnModelMethods("remove",n)),xPe(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)),vPe(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=vPe(n);this._unwrap(r.Model.prototype,"save"),r.Model.prototype.$save=r.Model.prototype.save,RPe(n)&&this._unwrap(r.Model.prototype,"remove"),xPe(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&&Bs.trace.getSpan(Bs.context.active())===void 0)return r.apply(this,arguments);let s=this[Jc._STORED_PARENT_SPAN],u={},{dbStatementSerializer:l}=n.getConfig();if(l){let h=l("aggregate",{options:this.options,aggregatePipeline:this._pipeline});n._dbSemconvStability&La.SemconvStability.OLD&&(u[SE.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&La.SemconvStability.STABLE&&(u[tT.ATTR_DB_QUERY_TEXT]=h)}let f=n._startSpan(this._model.collection,this._model?.modelName,"aggregate",u,s);return n._handleResponse(f,r,this,arguments,i,t)}}patchQueryExec(t){let n=this;return r=>function(i){if(this[Jc._ALREADY_INSTRUMENTED])return r.apply(this,arguments);if(n.getConfig().requireParentSpan&&Bs.trace.getSpan(Bs.context.active())===void 0)return r.apply(this,arguments);let s=this[Jc._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&La.SemconvStability.OLD&&(u[SE.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&La.SemconvStability.STABLE&&(u[tT.ATTR_DB_QUERY_TEXT]=h)}let f=n._startSpan(this.mongooseCollection,this.model.modelName,this.op,u,s);return n._handleResponse(f,r,this,arguments,i,t)}}patchOnModelMethods(t,n){let r=this;return o=>function(s,u){if(r.getConfig().requireParentSpan&&Bs.trace.getSpan(Bs.context.active())===void 0)return o.apply(this,arguments);let l={document:this};s&&!(s instanceof Function)&&(l.options=s);let f={},{dbStatementSerializer:h}=r.getConfig();if(h){let y=h(t,l);r._dbSemconvStability&La.SemconvStability.OLD&&(f[SE.ATTR_DB_STATEMENT]=y),r._dbSemconvStability&La.SemconvStability.STABLE&&(f[tT.ATTR_DB_QUERY_TEXT]=y)}let _=r._startSpan(this.constructor.collection,this.constructor.modelName,t,f);return s instanceof Function&&(u=s,s=void 0),r._handleResponse(_,o,this,arguments,u,n)}}_patchDocumentUpdateMethods(t,n){let r=this;return o=>function(s,u,l){if(r.getConfig().requireParentSpan&&Bs.trace.getSpan(Bs.context.active())===void 0)return o.apply(this,arguments);let f=l,h=s,_=u;typeof s=="function"?(f=s,h=void 0,_=void 0):typeof u=="function"&&(f=u,_=void 0);let y={},T=r.getConfig().dbStatementSerializer;if(T){let x=T(t,{condition:{_id:this._id},updates:h,options:_});r._dbSemconvStability&La.SemconvStability.OLD&&(y[SE.ATTR_DB_STATEMENT]=x),r._dbSemconvStability&La.SemconvStability.STABLE&&(y[tT.ATTR_DB_QUERY_TEXT]=x)}let v=r._startSpan(this.constructor.collection,this.constructor.modelName,t,y),R=r._handleResponse(v,o,this,arguments,f,n);return R&&typeof R=="object"&&(R[Jc._ALREADY_INSTRUMENTED]=!0),R}}patchModelStatic(t,n){let r=this;return o=>function(s,u,l){if(r.getConfig().requireParentSpan&&Bs.trace.getSpan(Bs.context.active())===void 0)return o.apply(this,arguments);typeof u=="function"&&(l=u,u=void 0);let f={};switch(t){case"insertMany":f.documents=s;break;case"bulkWrite":f.operations=s;break;default:f.document=s;break}u!==void 0&&(f.options=u);let h={},{dbStatementSerializer:_}=r.getConfig();if(_){let T=_(t,f);r._dbSemconvStability&La.SemconvStability.OLD&&(h[SE.ATTR_DB_STATEMENT]=T),r._dbSemconvStability&La.SemconvStability.STABLE&&(h[tT.ATTR_DB_QUERY_TEXT]=T)}let y=r._startSpan(this.collection,this.modelName,t,h);return r._handleResponse(y,o,this,arguments,l,n)}}patchModelAggregate(){let t=this;return n=>function(){let o=Bs.trace.getSpan(Bs.context.active()),i=t._callOriginalFunction(()=>n.apply(this,arguments));return i&&(i[Jc._STORED_PARENT_SPAN]=o),i}}patchAndCaptureSpanContext(t){let n=this;return r=>function(){return this[Jc._STORED_PARENT_SPAN]=Bs.trace.getSpan(Bs.context.active()),n._callOriginalFunction(()=>r.apply(this,arguments))}}_startSpan(t,n,r,o,i){let s={...o,...(0,UW.getAttributesFromCollection)(t,this._dbSemconvStability,this._netSemconvStability)};this._dbSemconvStability&La.SemconvStability.OLD&&(s[SE.ATTR_DB_OPERATION]=r,s[SE.ATTR_DB_SYSTEM]="mongoose"),this._dbSemconvStability&La.SemconvStability.STABLE&&(s[tT.ATTR_DB_OPERATION_NAME]=r,s[tT.ATTR_DB_SYSTEM_NAME]=SE.DB_SYSTEM_NAME_VALUE_MONGODB);let u=this._dbSemconvStability&La.SemconvStability.STABLE?`${r} ${t.name}`:`mongoose.${n}.${r}`;return this.tracer.startSpan(u,{kind:Bs.SpanKind.CLIENT,attributes:s},i?Bs.trace.setSpan(Bs.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,UW.handleCallbackResponse)(i,n,r,t,o,u.getConfig().responseHook,s));{let l=u._callOriginalFunction(()=>n.apply(r,o));return(0,UW.handlePromiseResponse)(l,t,u.getConfig().responseHook,s)}}_callOriginalFunction(t){return this.getConfig().suppressInternalInstrumentation?Bs.context.with((0,Kxt.suppressTracing)(Bs.context.active()),t):t()}};Jc.MongooseInstrumentation=QW});var NPe=M(J3=>{"use strict";m();Object.defineProperty(J3,"__esModule",{value:!0});J3.MongooseInstrumentation=void 0;var Xxt=DPe();Object.defineProperty(J3,"MongooseInstrumentation",{enumerable:!0,get:function(){return Xxt.MongooseInstrumentation}})});var BPe,wPe,OPe,eDt,kPe,PPe=w(()=>{m();BPe=ue(NPe(),1);_r();wPe="Mongoose",OPe=ct(wPe,()=>new BPe.MongooseInstrumentation({responseHook(e){qr(e,"auto.db.otel.mongoose")}})),eDt=(()=>({name:wPe,setupOnce(){OPe()}})),kPe=eDt});var MPe=M(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 LPe=M(lO=>{"use strict";m();Object.defineProperty(lO,"__esModule",{value:!0});lO.AttributeNames=void 0;var tDt;(function(e){e.MYSQL_VALUES="db.mysql.values"})(tDt=lO.AttributeNames||(lO.AttributeNames={}))});var UPe=M(Au=>{"use strict";m();Object.defineProperty(Au,"__esModule",{value:!0});Au.getPoolNameOld=Au.arrayStringifyHelper=Au.getSpanName=Au.getDbValues=Au.getDbQueryText=Au.getJDBCString=Au.getConfig=void 0;function nDt(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}Au.getConfig=nDt;function rDt(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}Au.getJDBCString=rDt;function oDt(e){return typeof e=="string"?e:e.sql}Au.getDbQueryText=oDt;function iDt(e,t){return FW(typeof e=="string"?t:t||e.values)}Au.getDbValues=iDt;function sDt(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}Au.getSpanName=sDt;function FW(e){return e?`[${e.toString()}]`:""}Au.arrayStringifyHelper=FW;function aDt(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()}Au.getPoolNameOld=aDt});var QPe=M(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-mysql"});var GPe=M(Z3=>{"use strict";m();Object.defineProperty(Z3,"__esModule",{value:!0});Z3.MySQLInstrumentation=void 0;var Zc=(He(),Me(tt)),up=un(),bR=(Xn(),Me(Hr)),Xg=MPe(),uDt=LPe(),nT=UPe(),FPe=QPe(),GW=class extends up.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(FPe.PACKAGE_NAME,FPe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,up.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,up.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._connectionsUsageOld=this.meter.createUpDownCounter(Xg.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 up.InstrumentationNodeModuleDefinition("mysql",[">=2.0.0 <3"],t=>((0,up.isWrapped)(t.createConnection)&&this._unwrap(t,"createConnection"),this._wrap(t,"createConnection",this._patchCreateConnection()),(0,up.isWrapped)(t.createPool)&&this._unwrap(t,"createPool"),this._wrap(t,"createPool",this._patchCreatePool()),(0,up.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,f=(0,nT.getPoolNameOld)(t);r._connCountAdd(-l,f,"used"),r._connCountAdd(-u,f,"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),f=u[l].pool;r._setPoolCallbacks(f,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=Zc.context.active();return function(o,i){i&&((0,up.isWrapped)(i.query)||n._wrap(i,"query",n._patchQuery(i))),typeof t=="function"&&Zc.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:f,database:h,user:_}=(0,nT.getConfig)(t.config),y=parseInt(f,10),T=(0,nT.getDbQueryText)(o);r._dbSemconvStability&up.SemconvStability.OLD&&(u[Xg.ATTR_DB_SYSTEM]=Xg.DB_SYSTEM_VALUE_MYSQL,u[Xg.ATTR_DB_CONNECTION_STRING]=(0,nT.getJDBCString)(l,f,h),u[Xg.ATTR_DB_NAME]=h,u[Xg.ATTR_DB_USER]=_,u[Xg.ATTR_DB_STATEMENT]=T),r._dbSemconvStability&up.SemconvStability.STABLE&&(u[bR.ATTR_DB_SYSTEM_NAME]=bR.DB_SYSTEM_NAME_VALUE_MYSQL,u[bR.ATTR_DB_NAMESPACE]=h,u[bR.ATTR_DB_QUERY_TEXT]=T),r._netSemconvStability&up.SemconvStability.OLD&&(u[Xg.ATTR_NET_PEER_NAME]=l,isNaN(y)||(u[Xg.ATTR_NET_PEER_PORT]=y)),r._netSemconvStability&up.SemconvStability.STABLE&&(u[bR.ATTR_SERVER_ADDRESS]=l,isNaN(y)||(u[bR.ATTR_SERVER_PORT]=y));let v=r.tracer.startSpan((0,nT.getSpanName)(o),{kind:Zc.SpanKind.CLIENT,attributes:u});if(r.getConfig().enhancedDatabaseReporting){let O;Array.isArray(i)?O=i:arguments[2]&&(O=[i]),v.setAttribute(uDt.AttributeNames.MYSQL_VALUES,(0,nT.getDbValues)(o,O))}let R=Array.from(arguments).findIndex(O=>typeof O=="function"),x=Zc.context.active();if(R===-1){let O=Zc.context.with(Zc.trace.setSpan(Zc.context.active(),v),()=>n.apply(t,arguments));return Zc.context.bind(x,O),O.on("error",P=>v.setStatus({code:Zc.SpanStatusCode.ERROR,message:P.message})).on("end",()=>{v.end()})}else return r._wrap(arguments,R,r._patchCallbackQuery(v,x)),Zc.context.with(Zc.trace.setSpan(Zc.context.active(),v),()=>n.apply(t,arguments))}}}_patchCallbackQuery(t,n){return r=>function(o,i,s){return o&&t.setStatus({code:Zc.SpanStatusCode.ERROR,message:o.message}),t.end(),Zc.context.with(n,()=>r(...arguments))}}_setPoolCallbacks(t,n){let r=n||(0,nT.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")})}};Z3.MySQLInstrumentation=GW});var jPe=M(W3=>{"use strict";m();Object.defineProperty(W3,"__esModule",{value:!0});W3.MySQLInstrumentation=void 0;var cDt=GPe();Object.defineProperty(W3,"MySQLInstrumentation",{enumerable:!0,get:function(){return cDt.MySQLInstrumentation}})});var zPe,HPe,$Pe,lDt,qPe,VPe=w(()=>{m();zPe=ue(jPe(),1);_r();HPe="Mysql",$Pe=ct(HPe,()=>new zPe.MySQLInstrumentation({})),lDt=(()=>({name:HPe,setupOnce(){$Pe()}})),qPe=lDt});var jW=M(ua=>{"use strict";m();Object.defineProperty(ua,"__esModule",{value:!0});ua.DB_SYSTEM_VALUE_MYSQL=ua.ATTR_NET_PEER_PORT=ua.ATTR_NET_PEER_NAME=ua.ATTR_DB_USER=ua.ATTR_DB_SYSTEM=ua.ATTR_DB_STATEMENT=ua.ATTR_DB_NAME=ua.ATTR_DB_CONNECTION_STRING=void 0;ua.ATTR_DB_CONNECTION_STRING="db.connection_string";ua.ATTR_DB_NAME="db.name";ua.ATTR_DB_STATEMENT="db.statement";ua.ATTR_DB_SYSTEM="db.system";ua.ATTR_DB_USER="db.user";ua.ATTR_NET_PEER_NAME="net.peer.name";ua.ATTR_NET_PEER_PORT="net.peer.port";ua.DB_SYSTEM_VALUE_MYSQL="mysql"});var HW=M(X3=>{"use strict";m();Object.defineProperty(X3,"__esModule",{value:!0});X3.addSqlCommenterComment=void 0;var zW=(He(),Me(tt)),dDt=vr();function pDt(e){let t=e.indexOf("--");if(t>=0)return!0;if(e.indexOf("/*")<0)return!1;let r=e.indexOf("*/");return t<r}function fDt(e){return encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}function mDt(e,t){if(typeof t!="string"||t.length===0||pDt(t))return t;let n=new dDt.W3CTraceContextPropagator,r={};n.inject(zW.trace.setSpan(zW.ROOT_CONTEXT,e),r,zW.defaultTextMapSetter);let o=Object.keys(r).sort();if(o.length===0)return t;let i=o.map(s=>{let u=fDt(r[s]);return`${s}='${u}'`}).join(",");return`${t} /*${i}*/`}X3.addSqlCommenterComment=mDt});var YPe=M(cp=>{"use strict";m();Object.defineProperty(cp,"__esModule",{value:!0});cp.getConnectionPrototypeToInstrument=cp.once=cp.getSpanName=cp.getQueryText=cp.getConnectionAttributes=void 0;var dO=jW(),e6=un(),$W=(Xn(),Me(Hr));function ADt(e,t,n){let{host:r,port:o,database:i,user:s}=gDt(e),u={};t&e6.SemconvStability.OLD&&(u[dO.ATTR_DB_CONNECTION_STRING]=hDt(r,o,i),u[dO.ATTR_DB_NAME]=i,u[dO.ATTR_DB_USER]=s),t&e6.SemconvStability.STABLE&&(u[$W.ATTR_DB_NAMESPACE]=i);let l=parseInt(o,10);return n&e6.SemconvStability.OLD&&(u[dO.ATTR_NET_PEER_NAME]=r,isNaN(l)||(u[dO.ATTR_NET_PEER_PORT]=l)),n&e6.SemconvStability.STABLE&&(u[$W.ATTR_SERVER_ADDRESS]=r,isNaN(l)||(u[$W.ATTR_SERVER_PORT]=l)),u}cp.getConnectionAttributes=ADt;function gDt(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}function hDt(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}function _Dt(e,t,n,r=!1,o=EDt){let[i,s]=typeof e=="string"?[e,n]:[e.sql,yDt(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"}}cp.getQueryText=_Dt;function EDt(e){return e.replace(/\b\d+\b/g,"?").replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,"?")}function yDt(e){return"values"in e}function SDt(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}cp.getSpanName=SDt;var TDt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};cp.once=TDt;function bDt(e){let t=e.prototype,n=Object.getPrototypeOf(t);return typeof n?.query=="function"&&typeof n?.execute=="function"?n:t}cp.getConnectionPrototypeToInstrument=bDt});var KPe=M(IR=>{"use strict";m();Object.defineProperty(IR,"__esModule",{value:!0});IR.PACKAGE_NAME=IR.PACKAGE_VERSION=void 0;IR.PACKAGE_VERSION="0.60.0";IR.PACKAGE_NAME="@opentelemetry/instrumentation-mysql2"});var XPe=M(t6=>{"use strict";m();Object.defineProperty(t6,"__esModule",{value:!0});t6.MySQL2Instrumentation=void 0;var JPe=(He(),Me(tt)),xf=un(),qW=jW(),ZPe=HW(),CR=YPe(),WPe=KPe(),VW=(Xn(),Me(Hr)),YW=[">=1.4.2 <4"],KW=class extends xf.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(WPe.PACKAGE_NAME,WPe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,xf.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,xf.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,xf.isWrapped)(i.query)&&this._unwrap(i,"query"),this._wrap(i,"query",this._patchQuery(t,!1)),(0,xf.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 xf.InstrumentationNodeModuleDefinition("mysql2",YW,i=>(n(i),i),()=>{},[new xf.InstrumentationNodeModuleFile("mysql2/promise.js",YW,i=>(n(i),i),()=>{}),new xf.InstrumentationNodeModuleFile("mysql2/lib/connection.js",YW,i=>{let s=(0,CR.getConnectionPrototypeToInstrument)(i);return r(s),i},i=>{if(i===void 0)return;let s=(0,CR.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:f,maskStatementHook:h,responseHook:_}=o.getConfig(),y=(0,CR.getConnectionAttributes)(this.config,o._dbSemconvStability,o._netSemconvStability),T=(0,CR.getQueryText)(i,t,l,f,h);o._dbSemconvStability&xf.SemconvStability.OLD&&(y[qW.ATTR_DB_SYSTEM]=qW.DB_SYSTEM_VALUE_MYSQL,y[qW.ATTR_DB_STATEMENT]=T),o._dbSemconvStability&xf.SemconvStability.STABLE&&(y[VW.ATTR_DB_SYSTEM_NAME]=VW.DB_SYSTEM_NAME_VALUE_MYSQL,y[VW.ATTR_DB_QUERY_TEXT]=T);let v=o.tracer.startSpan((0,CR.getSpanName)(i),{kind:JPe.SpanKind.CLIENT,attributes:y});!n&&o.getConfig().addSqlCommenterCommentToQueries&&(arguments[0]=i=typeof i=="string"?(0,ZPe.addSqlCommenterComment)(v,i):Object.assign(i,{sql:(0,ZPe.addSqlCommenterComment)(v,i.sql)}));let R=(0,CR.once)((x,O)=>{x?v.setStatus({code:JPe.SpanStatusCode.ERROR,message:x.message}):typeof _=="function"&&(0,xf.safeExecuteInTheMiddle)(()=>{_(v,{queryResults:O})},P=>{P&&o._diag.warn("Failed executing responseHook",P)},!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)}}};t6.MySQL2Instrumentation=KW});var eMe=M(n6=>{"use strict";m();Object.defineProperty(n6,"__esModule",{value:!0});n6.MySQL2Instrumentation=void 0;var IDt=XPe();Object.defineProperty(n6,"MySQL2Instrumentation",{enumerable:!0,get:function(){return IDt.MySQL2Instrumentation}})});var tMe,nMe,rMe,CDt,oMe,iMe=w(()=>{m();tMe=ue(eMe(),1);_r();nMe="Mysql2",rMe=ct(nMe,()=>new tMe.MySQL2Instrumentation({responseHook(e){qr(e,"auto.db.otel.mysql2")}})),CDt=(()=>({name:nMe,setupOnce(){rMe()}})),oMe=CDt});var sMe=M(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 aMe=M(r6=>{"use strict";m();Object.defineProperty(r6,"__esModule",{value:!0});r6.endSpan=void 0;var vDt=(He(),Me(tt)),RDt=(e,t)=>{t&&(e.recordException(t),e.setStatus({code:vDt.SpanStatusCode.ERROR,message:t.message})),e.end()};r6.endSpan=RDt});var i6=M(o6=>{"use strict";m();Object.defineProperty(o6,"__esModule",{value:!0});o6.defaultDbStatementSerializer=void 0;var xDt=[{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}],DDt=(e,t)=>{if(Array.isArray(t)&&t.length){let n=xDt.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};o6.defaultDbStatementSerializer=DDt});var uMe=M(vR=>{"use strict";m();Object.defineProperty(vR,"__esModule",{value:!0});vR.PACKAGE_NAME=vR.PACKAGE_VERSION=void 0;vR.PACKAGE_VERSION="0.62.0";vR.PACKAGE_NAME="@opentelemetry/instrumentation-ioredis"});var pMe=M(s6=>{"use strict";m();Object.defineProperty(s6,"__esModule",{value:!0});s6.IORedisInstrumentation=void 0;var TE=(He(),Me(tt)),Wc=un(),bE=(Xn(),Me(Hr)),Xc=sMe(),cMe=un(),pO=aMe(),NDt=i6(),lMe=uMe(),dMe={requireParentSpan:!0},JW=class extends Wc.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(lMe.PACKAGE_NAME,lMe.PACKAGE_VERSION,{...dMe,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Wc.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Wc.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...dMe,...t})}init(){return[new Wc.InstrumentationNodeModuleDefinition("ioredis",[">=2.0.0 <6"],(t,n)=>{let r=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,Wc.isWrapped)(r.prototype.sendCommand)&&this._unwrap(r.prototype,"sendCommand"),this._wrap(r.prototype,"sendCommand",this._patchSendCommand(n)),(0,Wc.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||NDt.defaultDbStatementSerializer,u=TE.trace.getSpan(TE.context.active())===void 0;if(i.requireParentSpan===!0&&u)return t.apply(this,arguments);let l={},{host:f,port:h}=this.options,_=s(o.name,o.args);r._dbSemconvStability&Wc.SemconvStability.OLD&&(l[Xc.ATTR_DB_SYSTEM]=Xc.DB_SYSTEM_VALUE_REDIS,l[Xc.ATTR_DB_STATEMENT]=_,l[Xc.ATTR_DB_CONNECTION_STRING]=`redis://${f}:${h}`),r._dbSemconvStability&Wc.SemconvStability.STABLE&&(l[bE.ATTR_DB_SYSTEM_NAME]=Xc.DB_SYSTEM_NAME_VALUE_REDIS,l[bE.ATTR_DB_QUERY_TEXT]=_),r._netSemconvStability&Wc.SemconvStability.OLD&&(l[Xc.ATTR_NET_PEER_NAME]=f,l[Xc.ATTR_NET_PEER_PORT]=h),r._netSemconvStability&Wc.SemconvStability.STABLE&&(l[bE.ATTR_SERVER_ADDRESS]=f,l[bE.ATTR_SERVER_PORT]=h);let y=r.tracer.startSpan(o.name,{kind:TE.SpanKind.CLIENT,attributes:l}),{requestHook:T}=i;T&&(0,cMe.safeExecuteInTheMiddle)(()=>T(y,{moduleVersion:n,cmdName:o.name,cmdArgs:o.args}),v=>{v&&TE.diag.error("ioredis instrumentation: request hook failed",v)},!0);try{let v=t.apply(this,arguments),R=o.resolve;o.resolve=function(O){(0,cMe.safeExecuteInTheMiddle)(()=>i.responseHook?.(y,o.name,o.args,O),P=>{P&&TE.diag.error("ioredis instrumentation: response hook failed",P)},!0),(0,pO.endSpan)(y,null),R(O)};let x=o.reject;return o.reject=function(O){(0,pO.endSpan)(y,O),x(O)},v}catch(v){throw(0,pO.endSpan)(y,v),v}}}_traceConnection(t){let n=this;return function(){let r=TE.trace.getSpan(TE.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&Wc.SemconvStability.OLD&&(o[Xc.ATTR_DB_SYSTEM]=Xc.DB_SYSTEM_VALUE_REDIS,o[Xc.ATTR_DB_STATEMENT]="connect",o[Xc.ATTR_DB_CONNECTION_STRING]=`redis://${i}:${s}`),n._dbSemconvStability&Wc.SemconvStability.STABLE&&(o[bE.ATTR_DB_SYSTEM_NAME]=Xc.DB_SYSTEM_NAME_VALUE_REDIS,o[bE.ATTR_DB_QUERY_TEXT]="connect"),n._netSemconvStability&Wc.SemconvStability.OLD&&(o[Xc.ATTR_NET_PEER_NAME]=i,o[Xc.ATTR_NET_PEER_PORT]=s),n._netSemconvStability&Wc.SemconvStability.STABLE&&(o[bE.ATTR_SERVER_ADDRESS]=i,o[bE.ATTR_SERVER_PORT]=s);let u=n.tracer.startSpan("connect",{kind:TE.SpanKind.CLIENT,attributes:o});try{let l=t.apply(this,arguments);return(0,pO.endSpan)(u,null),l}catch(l){throw(0,pO.endSpan)(u,l),l}}}};s6.IORedisInstrumentation=JW});var fMe=M(a6=>{"use strict";m();Object.defineProperty(a6,"__esModule",{value:!0});a6.IORedisInstrumentation=void 0;var BDt=pMe();Object.defineProperty(a6,"IORedisInstrumentation",{enumerable:!0,get:function(){return BDt.IORedisInstrumentation}})});var u6=M(RR=>{"use strict";m();Object.defineProperty(RR,"__esModule",{value:!0});RR.PACKAGE_NAME=RR.PACKAGE_VERSION=void 0;RR.PACKAGE_VERSION="0.62.0";RR.PACKAGE_NAME="@opentelemetry/instrumentation-redis"});var mMe=M(IE=>{"use strict";m();Object.defineProperty(IE,"__esModule",{value:!0});IE.getTracedCreateStreamTrace=IE.getTracedCreateClient=IE.endSpan=void 0;var fO=(He(),Me(tt)),wDt=(e,t)=>{t&&e.setStatus({code:fO.SpanStatusCode.ERROR,message:t.message}),e.end()};IE.endSpan=wDt;var ODt=e=>function(){let n=e.apply(this,arguments);return fO.context.bind(fO.context.active(),n)};IE.getTracedCreateClient=ODt;var kDt=e=>function(){return Object.prototype.hasOwnProperty.call(this,"stream")||Object.defineProperty(this,"stream",{get(){return this._patched_redis_stream},set(n){fO.context.bind(fO.context.active(),n),this._patched_redis_stream=n}}),e.apply(this,arguments)};IE.getTracedCreateStreamTrace=kDt});var c6=M(hu=>{"use strict";m();Object.defineProperty(hu,"__esModule",{value:!0});hu.DB_SYSTEM_VALUE_REDIS=hu.DB_SYSTEM_NAME_VALUE_REDIS=hu.ATTR_NET_PEER_PORT=hu.ATTR_NET_PEER_NAME=hu.ATTR_DB_SYSTEM=hu.ATTR_DB_STATEMENT=hu.ATTR_DB_CONNECTION_STRING=void 0;hu.ATTR_DB_CONNECTION_STRING="db.connection_string";hu.ATTR_DB_STATEMENT="db.statement";hu.ATTR_DB_SYSTEM="db.system";hu.ATTR_NET_PEER_NAME="net.peer.name";hu.ATTR_NET_PEER_PORT="net.peer.port";hu.DB_SYSTEM_NAME_VALUE_REDIS="redis";hu.DB_SYSTEM_VALUE_REDIS="redis"});var gMe=M(d6=>{"use strict";m();Object.defineProperty(d6,"__esModule",{value:!0});d6.RedisInstrumentationV2_V3=void 0;var Xl=un(),l6=mMe(),AMe=u6(),mO=(He(),Me(tt)),AO=(Xn(),Me(Hr)),rT=c6(),PDt=i6(),ZW=class e extends Xl.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(AMe.PACKAGE_NAME,AMe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Xl.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Xl.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new Xl.InstrumentationNodeModuleDefinition("redis",[">=2.6.0 <4"],t=>((0,Xl.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,Xl.isWrapped)(t.RedisClient.prototype.create_stream)&&this._unwrap(t.RedisClient.prototype,"create_stream"),this._wrap(t.RedisClient.prototype,"create_stream",this._getPatchCreateStream()),(0,Xl.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=mO.trace.getSpan(mO.context.active())===void 0;if(s.requireParentSpan===!0&&u)return r.apply(this,arguments);let l=s?.dbStatementSerializer||PDt.defaultDbStatementSerializer,f={};t._semconvStability&Xl.SemconvStability.OLD&&Object.assign(f,{[rT.ATTR_DB_SYSTEM]:rT.DB_SYSTEM_VALUE_REDIS,[rT.ATTR_DB_STATEMENT]:l(i.command,i.args)}),t._semconvStability&Xl.SemconvStability.STABLE&&Object.assign(f,{[AO.ATTR_DB_SYSTEM_NAME]:rT.DB_SYSTEM_NAME_VALUE_REDIS,[AO.ATTR_DB_OPERATION_NAME]:i.command,[AO.ATTR_DB_QUERY_TEXT]:l(i.command,i.args)});let h=t.tracer.startSpan(`${e.COMPONENT}-${i.command}`,{kind:mO.SpanKind.CLIENT,attributes:f});if(this.connection_options){let y={};t._semconvStability&Xl.SemconvStability.OLD&&Object.assign(y,{[rT.ATTR_NET_PEER_NAME]:this.connection_options.host,[rT.ATTR_NET_PEER_PORT]:this.connection_options.port}),t._semconvStability&Xl.SemconvStability.STABLE&&Object.assign(y,{[AO.ATTR_SERVER_ADDRESS]:this.connection_options.host,[AO.ATTR_SERVER_PORT]:this.connection_options.port}),h.setAttributes(y)}this.address&&t._semconvStability&Xl.SemconvStability.OLD&&h.setAttribute(rT.ATTR_DB_CONNECTION_STRING,`redis://${this.address}`);let _=arguments[0].callback;if(_){let y=mO.context.active();arguments[0].callback=function(v,R){if(s?.responseHook){let x=s.responseHook;(0,Xl.safeExecuteInTheMiddle)(()=>{x(h,i.command,i.args,R)},O=>{O&&t._diag.error("Error executing responseHook",O)},!0)}return(0,l6.endSpan)(h,v),mO.context.with(y,_,this,...arguments)}}try{return r.apply(this,arguments)}catch(y){throw(0,l6.endSpan)(h,y),y}}}}_getPatchCreateClient(){return function(n){return(0,l6.getTracedCreateClient)(n)}}_getPatchCreateStream(){return function(n){return(0,l6.getTracedCreateStreamTrace)(n)}}};d6.RedisInstrumentationV2_V3=ZW});var _Me=M(p6=>{"use strict";m();Object.defineProperty(p6,"__esModule",{value:!0});p6.getClientAttributes=void 0;var WW=(Xn(),Me(Hr)),xR=c6(),hMe=un();function MDt(e,t,n){let r={};return n&hMe.SemconvStability.OLD&&Object.assign(r,{[xR.ATTR_DB_SYSTEM]:xR.DB_SYSTEM_VALUE_REDIS,[xR.ATTR_NET_PEER_NAME]:t?.socket?.host,[xR.ATTR_NET_PEER_PORT]:t?.socket?.port,[xR.ATTR_DB_CONNECTION_STRING]:LDt(e,t?.url)}),n&hMe.SemconvStability.STABLE&&Object.assign(r,{[WW.ATTR_DB_SYSTEM_NAME]:xR.DB_SYSTEM_NAME_VALUE_REDIS,[WW.ATTR_SERVER_ADDRESS]:t?.socket?.host,[WW.ATTR_SERVER_PORT]:t?.socket?.port}),r}p6.getClientAttributes=MDt;function LDt(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 TMe=M(f6=>{"use strict";m();Object.defineProperty(f6,"__esModule",{value:!0});f6.RedisInstrumentationV4_V5=void 0;var lp=(He(),Me(tt)),Co=un(),EMe=_Me(),UDt=i6(),yMe=u6(),XW=(Xn(),Me(Hr)),QDt=c6(),gO=Symbol("opentelemetry.instrumentation.redis.open_spans"),SMe=Symbol("opentelemetry.instrumentation.redis.multi_command_options"),eX=class e extends Co.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(yMe.PACKAGE_NAME,yMe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Co.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Co.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 Co.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,Co.isWrapped)(i?.[l])&&this._unwrap(i,l),this._wrap(i,l,this._getPatchExtendWithCommands(u)),i},i=>{(0,Co.isWrapped)(i?.extendWithCommands)&&this._unwrap(i,"extendWithCommands"),(0,Co.isWrapped)(i?.attachCommands)&&this._unwrap(i,"attachCommands")}),r=new Co.InstrumentationNodeModuleFile(`${t}/dist/lib/client/multi-command.js`,["^1.0.0","^5.0.0"],i=>{let s=i?.default?.prototype;return(0,Co.isWrapped)(s?.exec)&&this._unwrap(s,"exec"),this._wrap(s,"exec",this._getPatchMultiCommandsExec(!1)),(0,Co.isWrapped)(s?.execAsPipeline)&&this._unwrap(s,"execAsPipeline"),this._wrap(s,"execAsPipeline",this._getPatchMultiCommandsExec(!0)),(0,Co.isWrapped)(s?.addCommand)&&this._unwrap(s,"addCommand"),this._wrap(s,"addCommand",this._getPatchMultiCommandsAddCommand()),i},i=>{let s=i?.default?.prototype;(0,Co.isWrapped)(s?.exec)&&this._unwrap(s,"exec"),(0,Co.isWrapped)(s?.addCommand)&&this._unwrap(s,"addCommand")}),o=new Co.InstrumentationNodeModuleFile(`${t}/dist/lib/client/index.js`,["^1.0.0","^5.0.0"],i=>{let s=i?.default?.prototype;return s?.multi&&((0,Co.isWrapped)(s?.multi)&&this._unwrap(s,"multi"),this._wrap(s,"multi",this._getPatchRedisClientMulti())),s?.MULTI&&((0,Co.isWrapped)(s?.MULTI)&&this._unwrap(s,"MULTI"),this._wrap(s,"MULTI",this._getPatchRedisClientMulti())),(0,Co.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,Co.isWrapped)(s?.multi)&&this._unwrap(s,"multi"),(0,Co.isWrapped)(s?.MULTI)&&this._unwrap(s,"MULTI"),(0,Co.isWrapped)(s?.sendCommand)&&this._unwrap(s,"sendCommand")});return new Co.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,f){let h=t(l,f).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[gO];return n._endSpansWithRedisReplies(l,u,t),u}).catch(u=>{let l=this[gO];if(!l)n._diag.error("cannot find open spans to end for multi/pipeline");else{let f=u.constructor.name==="MultiErrorReply"?u.replies:new Array(l.length).fill(u);n._endSpansWithRedisReplies(l,f,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[SMe]=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,EMe.getClientAttributes)(t._diag,i,t._semconvStability),u=t.tracer.startSpan(`${e.COMPONENT}-connect`,{kind:lp.SpanKind.CLIENT,attributes:s});return lp.context.with(lp.trace.setSpan(lp.context.active(),u),()=>r.apply(this)).then(f=>(u.end(),f)).catch(f=>(u.recordException(f),u.setStatus({code:lp.SpanStatusCode.ERROR,message:f.message}),u.end(),Promise.reject(f)))}}}_traceClientCommand(t,n,r,o){if(lp.trace.getSpan(lp.context.active())===void 0&&this.getConfig().requireParentSpan)return t.apply(n,r);let s=n.options||n[SMe],u=o[0],l=o.slice(1),f=this.getConfig().dbStatementSerializer||UDt.defaultDbStatementSerializer,h=(0,EMe.getClientAttributes)(this._diag,s,this._semconvStability);this._semconvStability&Co.SemconvStability.STABLE&&(h[XW.ATTR_DB_OPERATION_NAME]=u);try{let T=f(u,l);T!=null&&(this._semconvStability&Co.SemconvStability.OLD&&(h[QDt.ATTR_DB_STATEMENT]=T),this._semconvStability&Co.SemconvStability.STABLE&&(h[XW.ATTR_DB_QUERY_TEXT]=T))}catch(T){this._diag.error("dbStatementSerializer throw an exception",T,{commandName:u})}let _=this.tracer.startSpan(`${e.COMPONENT}-${u}`,{kind:lp.SpanKind.CLIENT,attributes:h}),y=lp.context.with(lp.trace.setSpan(lp.context.active(),_),()=>t.apply(n,r));if(typeof y?.then=="function")y.then(T=>{this._endSpanWithResponse(_,u,l,T,void 0)},T=>{this._endSpanWithResponse(_,u,l,null,T)});else{let T=y;T[gO]=T[gO]||[],T[gO].push({span:_,commandName:u,commandArgs:l})}return y}_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:f}=t[u],h=n[u],[_,y]=h instanceof Error?[null,h]:[h,void 0];this._semconvStability&Co.SemconvStability.STABLE&&l.setAttribute(XW.ATTR_DB_OPERATION_NAME,s),this._endSpanWithResponse(l,o[u],f,_,y)}}_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:lp.SpanStatusCode.ERROR,message:i?.message})),t.end()}};f6.RedisInstrumentationV4_V5=eX});var CMe=M(m6=>{"use strict";m();Object.defineProperty(m6,"__esModule",{value:!0});m6.RedisInstrumentation=void 0;var FDt=un(),bMe=u6(),GDt=gMe(),jDt=TMe(),IMe={requireParentSpan:!1},tX=class extends FDt.InstrumentationBase{instrumentationV2_V3;instrumentationV4_V5;initialized=!1;constructor(t={}){let n={...IMe,...t};super(bMe.PACKAGE_NAME,bMe.PACKAGE_VERSION,n),this.instrumentationV2_V3=new GDt.RedisInstrumentationV2_V3(this.getConfig()),this.instrumentationV4_V5=new jDt.RedisInstrumentationV4_V5(this.getConfig()),this.initialized=!0}setConfig(t={}){let n={...IMe,...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())}};m6.RedisInstrumentation=tX});var vMe=M(A6=>{"use strict";m();Object.defineProperty(A6,"__esModule",{value:!0});A6.RedisInstrumentation=void 0;var zDt=CMe();Object.defineProperty(A6,"RedisInstrumentation",{enumerable:!0,get:function(){return zDt.RedisInstrumentation}})});function hO(e,t){return e.includes(t.toLowerCase())}function rX(e){return hO(nX,e)?"cache.get":hO($Dt,e)?"cache.put":void 0}function qDt(e,t){return t.some(n=>e.startsWith(n))}function xMe(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)?RMe(o.map(i=>n(i))):["<unknown>"],r=t[0];return hO(HDt,e)&&r!=null?n(r):RMe(t.map(o=>n(o)))}catch{return}}function DMe(e,t,n){if(!rX(e))return!1;for(let r of t)if(qDt(r,n))return!0;return!1}function NMe(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 RMe(e){let t=[],n=r=>{r.forEach(o=>{Array.isArray(o)?n(o):t.push(o)})};return n(e),t}var HDt,nX,$Dt,BMe=w(()=>{m();HDt=["get","set","setex"],nX=["get","mget"],$Dt=["set","setex"]});var wMe,OMe,g6,_O,kMe,VDt,YDt,PMe,KDt,MMe,LMe=w(()=>{m();wMe=ue(fMe(),1),OMe=ue(vMe(),1);At();_r();BMe();g6="Redis",_O={},kMe=(e,t,n,r)=>{e.setAttribute(Mt,"auto.db.otel.redis");let o=xMe(t,n),i=rX(t);if(!o||!i||!_O.cachePrefixes||!DMe(t,o,_O.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=NMe(r);l&&e.setAttribute(aY,l),hO(nX,t)&&l!==void 0&&e.setAttribute(iY,l>0),e.setAttributes({[Xt]:i,[sY]:o});let f=o.join(", ");e.updateName(_O.maxCacheKeyLength?Q_(f,_O.maxCacheKeyLength):f)},VDt=ct(`${g6}.IORedis`,()=>new wMe.IORedisInstrumentation({responseHook:kMe})),YDt=ct(`${g6}.Redis`,()=>new OMe.RedisInstrumentation({responseHook:kMe})),PMe=Object.assign(()=>{VDt(),YDt()},{id:g6}),KDt=((e={})=>({name:g6,setupOnce(){_O=e,PMe()}})),MMe=KDt});var UMe=M(h6=>{"use strict";m();Object.defineProperty(h6,"__esModule",{value:!0});h6.EVENT_LISTENERS_SET=void 0;h6.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.pg.eventListenersSet")});var oX=M(EO=>{"use strict";m();Object.defineProperty(EO,"__esModule",{value:!0});EO.AttributeNames=void 0;var JDt;(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"})(JDt=EO.AttributeNames||(EO.AttributeNames={}))});var iX=M(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 sX=M(yO=>{"use strict";m();Object.defineProperty(yO,"__esModule",{value:!0});yO.SpanNames=void 0;var ZDt;(function(e){e.QUERY_PREFIX="pg.query",e.CONNECT="pg.connect",e.POOL_CONNECT="pg-pool.connect"})(ZDt=yO.SpanNames||(yO.SpanNames={}))});var $Me=M(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 CE=(He(),Me(tt)),_6=oX(),dp=(Xn(),Me(Hr)),Ei=iX(),oT=un(),QMe=sX();function FMe(e,t){if(!t)return QMe.SpanNames.QUERY_PREFIX;let n=typeof t.name=="string"&&t.name?t.name:GMe(t.text);return`${QMe.SpanNames.QUERY_PREFIX}:${n}${e?` ${e}`:""}`}sr.getQuerySpanName=FMe;function GMe(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=GMe;function jMe(e){try{let t=new URL(e);return t.username="",t.password="",t.toString()}catch{return"postgresql://localhost:5432/"}}sr.parseAndMaskConnectionString=jMe;function aX(e){if("connectionString"in e&&e.connectionString)return jMe(e.connectionString);let t=e.host||"localhost",n=e.port||5432,r=e.database||"";return`postgresql://${t}:${n}/${r}`}sr.getConnectionString=aX;function E6(e){if(Number.isInteger(e))return e}function zMe(e,t){let n={};return t&oT.SemconvStability.OLD&&(n={...n,[Ei.ATTR_DB_SYSTEM]:Ei.DB_SYSTEM_VALUE_POSTGRESQL,[Ei.ATTR_DB_NAME]:e.database,[Ei.ATTR_DB_CONNECTION_STRING]:aX(e),[Ei.ATTR_DB_USER]:e.user,[Ei.ATTR_NET_PEER_NAME]:e.host,[Ei.ATTR_NET_PEER_PORT]:E6(e.port)}),t&oT.SemconvStability.STABLE&&(n={...n,[dp.ATTR_DB_SYSTEM_NAME]:dp.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[dp.ATTR_DB_NAMESPACE]:e.namespace,[dp.ATTR_SERVER_ADDRESS]:e.host,[dp.ATTR_SERVER_PORT]:E6(e.port)}),n}sr.getSemanticAttributesFromConnection=zMe;function WDt(e,t){let n;try{n=e.connectionString?new URL(e.connectionString):void 0}catch{n=void 0}let r={[_6.AttributeNames.IDLE_TIMEOUT_MILLIS]:e.idleTimeoutMillis,[_6.AttributeNames.MAX_CLIENT]:e.maxClient};return t&oT.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]:aX(e),[Ei.ATTR_NET_PEER_NAME]:n?.hostname??e.host,[Ei.ATTR_NET_PEER_PORT]:Number(n?.port)||E6(e.port),[Ei.ATTR_DB_USER]:n?.username??e.user}),t&oT.SemconvStability.STABLE&&(r={...r,[dp.ATTR_DB_SYSTEM_NAME]:dp.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[dp.ATTR_DB_NAMESPACE]:e.namespace,[dp.ATTR_SERVER_ADDRESS]:n?.hostname??e.host,[dp.ATTR_SERVER_PORT]:Number(n?.port)||E6(e.port)}),r}sr.getSemanticAttributesFromPoolConnection=WDt;function XDt(e){return e.requireParentSpan===!0&&CE.trace.getSpan(CE.context.active())===void 0}sr.shouldSkipInstrumentation=XDt;function e1t(e,t,n,r){let{connectionParameters:o}=this,i=o.database,s=FMe(i,r),u=e.startSpan(s,{kind:CE.SpanKind.CLIENT,attributes:zMe(o,n)});if(!r)return u;if(r.text&&(n&oT.SemconvStability.OLD&&u.setAttribute(Ei.ATTR_DB_STATEMENT,r.text),n&oT.SemconvStability.STABLE&&u.setAttribute(dp.ATTR_DB_QUERY_TEXT,r.text)),t.enhancedDatabaseReporting&&Array.isArray(r.values))try{let l=r.values.map(f=>f==null?"null":f instanceof Buffer?f.toString():typeof f=="object"?typeof f.toPostgres=="function"?f.toPostgres():JSON.stringify(f):f.toString());u.setAttribute(_6.AttributeNames.PG_VALUES,l)}catch(l){CE.diag.error("failed to stringify ",r.values,l)}return typeof r.name=="string"&&u.setAttribute(_6.AttributeNames.PG_PLAN,r.name),u}sr.handleConfigQuery=e1t;function HMe(e,t,n){typeof e.responseHook=="function"&&(0,oT.safeExecuteInTheMiddle)(()=>{e.responseHook(t,{data:n})},r=>{r&&CE.diag.error("Error running response hook",r)},!0)}sr.handleExecutionResult=HMe;function t1t(e,t,n,r,o){return function(s,u){s?(Object.prototype.hasOwnProperty.call(s,"code")&&(r[dp.ATTR_ERROR_TYPE]=s.code),s instanceof Error&&t.recordException(y6(s)),t.setStatus({code:CE.SpanStatusCode.ERROR,message:s.message})):HMe(e,t,u),o(),t.end(),n.call(this,s,u)}}sr.patchCallback=t1t;function n1t(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=n1t;function r1t(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=r1t;function o1t(e,t){return function(r,o,i){r&&(r instanceof Error&&e.recordException(y6(r)),e.setStatus({code:CE.SpanStatusCode.ERROR,message:r.message})),e.end(),t.call(this,r,o,i)}}sr.patchCallbackPGPool=o1t;function i1t(e,t){return function(r){r&&(r instanceof Error&&e.recordException(y6(r)),e.setStatus({code:CE.SpanStatusCode.ERROR,message:r.message})),e.end(),t.apply(this,arguments)}}sr.patchClientConnectCallback=i1t;function s1t(e){return typeof e=="object"&&e!==null&&"message"in e?String(e.message):void 0}sr.getErrorMessage=s1t;function a1t(e){return typeof e=="object"&&typeof e?.text=="string"}sr.isObjectWithTextString=a1t;function y6(e){let t=e?.name??"PostgreSQLError",n=e?.code??"UNKNOWN";return`PostgreSQL error of type '${t}' occurred (code: ${n})`}sr.sanitizedErrorMessage=y6});var qMe=M(DR=>{"use strict";m();Object.defineProperty(DR,"__esModule",{value:!0});DR.PACKAGE_NAME=DR.PACKAGE_VERSION=void 0;DR.PACKAGE_VERSION="0.66.0";DR.PACKAGE_NAME="@opentelemetry/instrumentation-pg"});var WMe=M(T6=>{"use strict";m();Object.defineProperty(T6,"__esModule",{value:!0});T6.PgInstrumentation=void 0;var tc=un(),Yr=(He(),Me(tt)),VMe=UMe(),ni=$Me(),YMe=HW(),KMe=qMe(),JMe=sX(),S6=vr(),Df=(Xn(),Me(Hr)),SO=iX();function NR(e){return e[Symbol.toStringTag]==="Module"?e.default:e}var uX=class extends tc.InstrumentationBase{_connectionsCounter={used:0,idle:0,pending:0};_semconvStability;constructor(t={}){super(KMe.PACKAGE_NAME,KMe.PACKAGE_VERSION,t),this._semconvStability=(0,tc.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._operationDuration=this.meter.createHistogram(Df.METRIC_DB_CLIENT_OPERATION_DURATION,{description:"Duration of database client operations.",unit:"s",valueType:Yr.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(SO.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(SO.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=NR(u);return this._patchPgClient(l.Client),u},u=>{let l=NR(u);return this._unpatchPgClient(l.Client),u},[o,r]),s=new tc.InstrumentationNodeModuleDefinition("pg-pool",n,u=>{let l=NR(u);return(0,tc.isWrapped)(l.prototype.connect)&&this._unwrap(l.prototype,"connect"),this._wrap(l.prototype,"connect",this._getPoolConnectPatch()),l},u=>{let l=NR(u);(0,tc.isWrapped)(l.prototype.connect)&&this._unwrap(l.prototype,"connect")});return[i,s]}_patchPgClient(t){if(!t)return;let n=NR(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=NR(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(ni.shouldSkipInstrumentation(i)||i.ignoreConnectSpans)return n.call(this,o);let s=t.tracer.startSpan(JMe.SpanNames.CONNECT,{kind:Yr.SpanKind.CLIENT,attributes:ni.getSemanticAttributesFromConnection(this,t._semconvStability)});if(o){let l=Yr.trace.getSpan(Yr.context.active());o=ni.patchClientConnectCallback(s,o),l&&(o=Yr.context.bind(Yr.context.active(),o))}let u=Yr.context.with(Yr.trace.setSpan(Yr.context.active(),s),()=>n.call(this,o));return ZMe(s,u)}}recordOperationDuration(t,n){let r={},o=[Df.ATTR_DB_NAMESPACE,Df.ATTR_ERROR_TYPE,Df.ATTR_SERVER_PORT,Df.ATTR_SERVER_ADDRESS,Df.ATTR_DB_OPERATION_NAME];this._semconvStability&tc.SemconvStability.OLD&&o.push(SO.ATTR_DB_SYSTEM),this._semconvStability&tc.SemconvStability.STABLE&&o.push(Df.ATTR_DB_SYSTEM_NAME),o.forEach(s=>{s in t&&(r[s]=t[s])});let i=(0,S6.hrTimeToMilliseconds)((0,S6.hrTimeDuration)(n,(0,S6.hrTime)()))/1e3;this._operationDuration.record(i,r)}_getClientQueryPatch(){let t=this;return n=>(this._diag.debug("Patching pg.Client.prototype.query"),function(...o){if(ni.shouldSkipInstrumentation(t.getConfig()))return n.apply(this,o);let i=(0,S6.hrTime)(),s=o[0],u=typeof s=="string",l=ni.isObjectWithTextString(s),f=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={[SO.ATTR_DB_SYSTEM]:SO.DB_SYSTEM_VALUE_POSTGRESQL,[Df.ATTR_DB_NAMESPACE]:this.database,[Df.ATTR_SERVER_PORT]:this.connectionParameters.port,[Df.ATTR_SERVER_ADDRESS]:this.connectionParameters.host};f?.text&&(h[Df.ATTR_DB_OPERATION_NAME]=ni.parseNormalizedOperationName(f?.text));let _=()=>{t.recordOperationDuration(h,i)},y=t.getConfig(),T=ni.handleConfigQuery.call(this,t.tracer,y,t._semconvStability,f);if(y.addSqlCommenterCommentToQueries&&(u?o[0]=(0,YMe.addSqlCommenterComment)(T,s):l&&!("name"in s)&&(o[0]={...s,text:(0,YMe.addSqlCommenterComment)(T,s.text)})),o.length>0){let x=Yr.trace.getSpan(Yr.context.active());if(typeof o[o.length-1]=="function")o[o.length-1]=ni.patchCallback(y,T,o[o.length-1],h,_),x&&(o[o.length-1]=Yr.context.bind(Yr.context.active(),o[o.length-1]));else if(typeof f?.callback=="function"){let O=ni.patchCallback(t.getConfig(),T,f.callback,h,_);x&&(O=Yr.context.bind(Yr.context.active(),O)),o[0].callback=O}}let{requestHook:v}=y;typeof v=="function"&&f&&(0,tc.safeExecuteInTheMiddle)(()=>{let{database:x,host:O,port:P,user:j}=this.connectionParameters;v(T,{connection:{database:x,host:O,port:P,user:j},query:{text:f.text,values:f.values,name:f.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(ni.sanitizedErrorMessage(x)),T.setStatus({code:Yr.SpanStatusCode.ERROR,message:ni.getErrorMessage(x)}),T.end(),x}return R instanceof Promise?R.then(x=>new Promise(O=>{ni.handleExecutionResult(t.getConfig(),T,x),_(),T.end(),O(x)})).catch(x=>new Promise((O,P)=>{x instanceof Error&&T.recordException(ni.sanitizedErrorMessage(x)),T.setStatus({code:Yr.SpanStatusCode.ERROR,message:x.message}),_(),T.end(),P(x)})):R})}_setPoolConnectEventListeners(t){if(t[VMe.EVENT_LISTENERS_SET])return;let n=ni.getPoolName(t.options);t.on("connect",()=>{this._connectionsCounter=ni.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("acquire",()=>{this._connectionsCounter=ni.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("remove",()=>{this._connectionsCounter=ni.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("release",()=>{this._connectionsCounter=ni.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t[VMe.EVENT_LISTENERS_SET]=!0}_getPoolConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(ni.shouldSkipInstrumentation(i))return n.call(this,o);if(t._setPoolConnectEventListeners(this),i.ignoreConnectSpans)return n.call(this,o);let s=t.tracer.startSpan(JMe.SpanNames.POOL_CONNECT,{kind:Yr.SpanKind.CLIENT,attributes:ni.getSemanticAttributesFromPoolConnection(this.options,t._semconvStability)});if(o){let l=Yr.trace.getSpan(Yr.context.active());o=ni.patchCallbackPGPool(s,o),l&&(o=Yr.context.bind(Yr.context.active(),o))}let u=Yr.context.with(Yr.trace.setSpan(Yr.context.active(),s),()=>n.call(this,o));return ZMe(s,u)}}};T6.PgInstrumentation=uX;function ZMe(e,t){if(!(t instanceof Promise))return t;let n=t;return Yr.context.bind(Yr.context.active(),n.then(r=>(e.end(),r)).catch(r=>(r instanceof Error&&e.recordException(ni.sanitizedErrorMessage(r)),e.setStatus({code:Yr.SpanStatusCode.ERROR,message:ni.getErrorMessage(r)}),e.end(),Promise.reject(r))))}});var XMe=M(BR=>{"use strict";m();Object.defineProperty(BR,"__esModule",{value:!0});BR.AttributeNames=BR.PgInstrumentation=void 0;var u1t=WMe();Object.defineProperty(BR,"PgInstrumentation",{enumerable:!0,get:function(){return u1t.PgInstrumentation}});var c1t=oX();Object.defineProperty(BR,"AttributeNames",{enumerable:!0,get:function(){return c1t.AttributeNames}})});var e2e,t2e,n2e,l1t,r2e,o2e=w(()=>{m();e2e=ue(XMe(),1);_r();t2e="Postgres",n2e=ct(t2e,e2e.PgInstrumentation,e=>({requireParentSpan:!0,requestHook(t){qr(t,"auto.db.otel.postgres")},ignoreConnectSpans:e?.ignoreConnectSpans??!1})),l1t=(e=>({name:t2e,setupOnce(){n2e(e)}})),r2e=l1t});var vE,lX,i2e,d1t,p1t,s2e,cX,f1t,a2e,u2e=w(()=>{m();He();vE=ue(un(),1);Xn();At();_r();YS();lX="PostgresJs",i2e=[">=3.0.0 <4"],d1t=/^(SELECT|INSERT|UPDATE|DELETE|CREATE|DROP|ALTER)/i,p1t=Symbol.for("sentry.query.from.instrumented.sql"),s2e=ct(lX,e=>new cX({requireParentSpan:e?.requireParentSpan??!0,requestHook:e?.requestHook})),cX=class extends vE.InstrumentationBase{constructor(t){super("sentry-postgres-js",er,t)}init(){let t=new vE.InstrumentationNodeModuleDefinition("postgres",i2e,n=>{try{return this._patchPostgres(n)}catch(r){return Ds&&W.error("Failed to patch postgres module:",r),n}},n=>n);return["src","cf/src","cjs/src"].forEach(n=>{t.files.push(new vE.InstrumentationNodeModuleFile(`postgres/${n}/query.js`,i2e,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 Ds&&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 Ds&&W.warn("postgres() did not return a valid instance"),u;let l=o.getConfig();return cK(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:(gw(t,"default",i),t)}_shouldCreateSpans(){let t=this.getConfig();return Vt.getSpan(We.active())!==void 0||!t.requireParentSpan}_setOperationName(t,n,r){if(r){t.setAttribute(LC,r);return}let o=n?.match(d1t);o?.[1]&&t.setAttribute(LC,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[p1t])return r.apply(this,o);if(!n._shouldCreateSpans())return r.apply(this,o);let i=n._reconstructQuery(this.strings),s=n._sanitizeSqlQuery(i);return oa({name:s||"postgresjs.query",op:"db"},u=>{qr(u,"auto.db.postgresjs"),u.setAttributes({[fS]:"postgres",[SV]:s});let l=n.getConfig(),{requestHook:f}=l;f&&(0,vE.safeExecuteInTheMiddle)(()=>f(u,s,void 0),y=>{y&&(u.setAttribute("sentry.hook.error","requestHook failed"),Ds&&W.error(`Error in requestHook for ${lX} integration:`,y))},!0);let h=this.resolve;this.resolve=new Proxy(h,{apply:(y,T,v)=>{try{n._setOperationName(u,s,v?.[0]?.command),u.end()}catch(R){Ds&&W.error("Error ending span in resolve callback:",R)}return Reflect.apply(y,T,v)}});let _=this.reject;this.reject=new Proxy(_,{apply:(y,T,v)=>{try{u.setStatus({code:2,message:v?.[0]?.message||"unknown_error"}),u.setAttribute(TV,v?.[0]?.code||"unknown"),u.setAttribute(bV,v?.[0]?.name||"unknown"),n._setOperationName(u,s),u.end()}catch(R){Ds&&W.error("Error ending span in reject callback:",R)}return Reflect.apply(y,T,v)}});try{return r.apply(this,o)}catch(y){throw u.setStatus({code:2,message:y instanceof Error?y.message:"unknown_error"}),u.end(),y}})},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}},f1t=(e=>({name:lX,setupOnce(){s2e(e)}})),a2e=f1t});var c2e=M(TO=>{"use strict";m();Object.defineProperty(TO,"__esModule",{value:!0});TO.SeverityNumber=void 0;var m1t;(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"})(m1t=TO.SeverityNumber||(TO.SeverityNumber={}))});var I6=M(wR=>{"use strict";m();Object.defineProperty(wR,"__esModule",{value:!0});wR.NOOP_LOGGER=wR.NoopLogger=void 0;var b6=class{emit(t){}};wR.NoopLogger=b6;wR.NOOP_LOGGER=new b6});var v6=M(OR=>{"use strict";m();Object.defineProperty(OR,"__esModule",{value:!0});OR.NOOP_LOGGER_PROVIDER=OR.NoopLoggerProvider=void 0;var A1t=I6(),C6=class{getLogger(t,n,r){return new A1t.NoopLogger}};OR.NoopLoggerProvider=C6;OR.NOOP_LOGGER_PROVIDER=new C6});var pX=M(R6=>{"use strict";m();Object.defineProperty(R6,"__esModule",{value:!0});R6.ProxyLogger=void 0;var g1t=I6(),dX=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):g1t.NOOP_LOGGER}};R6.ProxyLogger=dX});var mX=M(x6=>{"use strict";m();Object.defineProperty(x6,"__esModule",{value:!0});x6.ProxyLoggerProvider=void 0;var h1t=v6(),_1t=pX(),fX=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new _1t.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:h1t.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)}};x6.ProxyLoggerProvider=fX});var l2e=M(D6=>{"use strict";m();Object.defineProperty(D6,"__esModule",{value:!0});D6._globalThis=void 0;D6._globalThis=typeof globalThis=="object"?globalThis:global});var d2e=M(N6=>{"use strict";m();Object.defineProperty(N6,"__esModule",{value:!0});N6._globalThis=void 0;var E1t=l2e();Object.defineProperty(N6,"_globalThis",{enumerable:!0,get:function(){return E1t._globalThis}})});var p2e=M(B6=>{"use strict";m();Object.defineProperty(B6,"__esModule",{value:!0});B6._globalThis=void 0;var y1t=d2e();Object.defineProperty(B6,"_globalThis",{enumerable:!0,get:function(){return y1t._globalThis}})});var f2e=M(nA=>{"use strict";m();Object.defineProperty(nA,"__esModule",{value:!0});nA.API_BACKWARDS_COMPATIBILITY_VERSION=nA.makeGetter=nA._global=nA.GLOBAL_LOGS_API_KEY=void 0;var S1t=p2e();nA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");nA._global=S1t._globalThis;function T1t(e,t,n){return r=>r===e?t:n}nA.makeGetter=T1t;nA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var A2e=M(w6=>{"use strict";m();Object.defineProperty(w6,"__esModule",{value:!0});w6.LogsAPI=void 0;var pp=f2e(),b1t=v6(),m2e=mX(),AX=class e{constructor(){this._proxyLoggerProvider=new m2e.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return pp._global[pp.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(pp._global[pp.GLOBAL_LOGS_API_KEY]=(0,pp.makeGetter)(pp.API_BACKWARDS_COMPATIBILITY_VERSION,t,b1t.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=pp._global[pp.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(pp._global,pp.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete pp._global[pp.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new m2e.ProxyLoggerProvider}};w6.LogsAPI=AX});var gX=M(ca=>{"use strict";m();Object.defineProperty(ca,"__esModule",{value:!0});ca.logs=ca.ProxyLoggerProvider=ca.ProxyLogger=ca.NoopLoggerProvider=ca.NOOP_LOGGER_PROVIDER=ca.NoopLogger=ca.NOOP_LOGGER=ca.SeverityNumber=void 0;var I1t=c2e();Object.defineProperty(ca,"SeverityNumber",{enumerable:!0,get:function(){return I1t.SeverityNumber}});var g2e=I6();Object.defineProperty(ca,"NOOP_LOGGER",{enumerable:!0,get:function(){return g2e.NOOP_LOGGER}});Object.defineProperty(ca,"NoopLogger",{enumerable:!0,get:function(){return g2e.NoopLogger}});var h2e=v6();Object.defineProperty(ca,"NOOP_LOGGER_PROVIDER",{enumerable:!0,get:function(){return h2e.NOOP_LOGGER_PROVIDER}});Object.defineProperty(ca,"NoopLoggerProvider",{enumerable:!0,get:function(){return h2e.NoopLoggerProvider}});var C1t=pX();Object.defineProperty(ca,"ProxyLogger",{enumerable:!0,get:function(){return C1t.ProxyLogger}});var v1t=mX();Object.defineProperty(ca,"ProxyLoggerProvider",{enumerable:!0,get:function(){return v1t.ProxyLoggerProvider}});var R1t=A2e();ca.logs=R1t.LogsAPI.getInstance()});var _2e=M(kR=>{"use strict";m();Object.defineProperty(kR,"__esModule",{value:!0});kR.disableInstrumentations=kR.enableInstrumentations=void 0;function x1t(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()}}kR.enableInstrumentations=x1t;function D1t(e){e.forEach(t=>t.disable())}kR.disableInstrumentations=D1t});var S2e=M(O6=>{"use strict";m();Object.defineProperty(O6,"__esModule",{value:!0});O6.registerInstrumentations=void 0;var E2e=(He(),Me(tt)),N1t=gX(),y2e=_2e();function B1t(e){let t=e.tracerProvider||E2e.trace.getTracerProvider(),n=e.meterProvider||E2e.metrics.getMeterProvider(),r=e.loggerProvider||N1t.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,y2e.enableInstrumentations)(o,t,n,r),()=>{(0,y2e.disableInstrumentations)(o)}}O6.registerInstrumentations=B1t});var N2e=M(k6=>{"use strict";m();Object.defineProperty(k6,"__esModule",{value:!0});k6.satisfies=void 0;var yX=(He(),Me(tt)),v2e=/^(?: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-]+)*))?$/,w1t=/^(?<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-]+)*))?$/,O1t={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function k1t(e,t,n){if(!P1t(e))return yX.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=Q1t(e);if(!r)return!1;let o=[],i=R2e(r,t,o,n);return i&&!n?.includePrerelease?L1t(r,o):i}k6.satisfies=k1t;function P1t(e){return typeof e=="string"&&v2e.test(e)}function R2e(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(hX(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=sNt(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!hX(e,i,n,r))return!1;return!0}return hX(e,t,n,r)}function hX(e,t,n,r){if(t=U1t(t,r),t.includes(" "))return R2e(e,t,n,r);{let o=F1t(t);return n.push(o),M1t(e,o)}}function M1t(e,t){if(t.invalid)return!1;if(!t.version||EX(t.version))return!0;let n=b2e(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=b2e(r,o)}return O1t[t.op]?.includes(n)}function L1t(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function U1t(e,t){return e=e.trim(),e=oNt(e,t),e=rNt(e),e=iNt(e,t),e=e.trim(),e}function nc(e){return!e||e.toLowerCase()==="x"||e==="*"}function Q1t(e){let t=e.match(v2e);if(!t){yX.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 F1t(e){if(!e)return{};let t=e.match(w1t);if(!t)return yX.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 EX(e){return e==="*"||e==="x"||e==="X"}function T2e(e){let t=parseInt(e,10);return isNaN(t)?e:t}function G1t(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 j1t(e,t){if(EX(e)||EX(t))return 0;let[n,r]=G1t(T2e(e),T2e(t));return n>r?1:n<r?-1:0}function b2e(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=j1t(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var x2e="[a-zA-Z0-9-]",D2e="0|[1-9]\\d*",z1t=`\\d*[a-zA-Z-]${x2e}*`,H1t="((?:<|>)?=?)",I2e=`(?:${D2e}|${z1t})`,$1t=`(?:-(${I2e}(?:\\.${I2e})*))`,C2e=`${x2e}+`,q1t=`(?:\\+(${C2e}(?:\\.${C2e})*))`,_X=`${D2e}|x|X|\\*`,bO=`[v=\\s]*(${_X})(?:\\.(${_X})(?:\\.(${_X})(?:${$1t})?${q1t}?)?)?`,V1t=`^${H1t}\\s*${bO}$`,Y1t=new RegExp(V1t),K1t=`^\\s*(${bO})\\s+-\\s+(${bO})\\s*$`,J1t=new RegExp(K1t),Z1t="(?:~>?)",W1t=`^${Z1t}${bO}$`,X1t=new RegExp(W1t),eNt="(?:\\^)",tNt=`^${eNt}${bO}$`,nNt=new RegExp(tNt);function rNt(e){let t=X1t;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 oNt(e,t){let n=nNt,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,s,u,l)=>{let f;return nc(i)?f="":nc(s)?f=`>=${i}.0.0${r} <${+i+1}.0.0-0`:nc(u)?i==="0"?f=`>=${i}.${s}.0${r} <${i}.${+s+1}.0-0`:f=`>=${i}.${s}.0${r} <${+i+1}.0.0-0`:l?i==="0"?s==="0"?f=`>=${i}.${s}.${u}-${l} <${i}.${s}.${+u+1}-0`:f=`>=${i}.${s}.${u}-${l} <${i}.${+s+1}.0-0`:f=`>=${i}.${s}.${u}-${l} <${+i+1}.0.0-0`:i==="0"?s==="0"?f=`>=${i}.${s}.${u}${r} <${i}.${s}.${+u+1}-0`:f=`>=${i}.${s}.${u}${r} <${i}.${+s+1}.0-0`:f=`>=${i}.${s}.${u} <${+i+1}.0.0-0`,f})}function iNt(e,t){let n=Y1t;return e.replace(n,(r,o,i,s,u,l)=>{let f=nc(i),h=f||nc(s),_=h||nc(u),y=_;return o==="="&&y&&(o=""),l=t?.includePrerelease?"-0":"",f?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&y?(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`:_&&(r=`>=${i}.${s}.0${l} <${i}.${+s+1}.0-0`),r})}function sNt(e,t){let n=J1t;return e.replace(n,(r,o,i,s,u,l,f,h,_,y,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(_)?h="":nc(y)?h=`<${+_+1}.0.0-0`:nc(T)?h=`<${_}.${+y+1}.0-0`:v?h=`<=${_}.${y}.${T}-${v}`:t?.includePrerelease?h=`<${_}.${y}.${+T+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var SX=M(Ua=>{"use strict";m();Object.defineProperty(Ua,"__esModule",{value:!0});Ua.massUnwrap=Ua.unwrap=Ua.massWrap=Ua.wrap=void 0;var rc=console.error.bind(console);function IO(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 aNt=(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 IO(o,"__original",r),IO(o,"__unwrap",()=>{e[t]===o&&IO(e,t,r)}),IO(o,"__wrapped",!0),IO(e,t,o),o};Ua.wrap=aNt;var uNt=(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,Ua.wrap)(r,o,n)})})};Ua.massWrap=uNt;var cNt=(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}};Ua.unwrap=cNt;var lNt=(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,Ua.unwrap)(n,r)})})};Ua.massUnwrap=lNt;function CO(e){e&&e.logger&&(typeof e.logger!="function"?rc("new logger isn't a function, not replacing"):rc=e.logger)}Ua.default=CO;CO.wrap=Ua.wrap;CO.massWrap=Ua.massWrap;CO.unwrap=Ua.unwrap;CO.massUnwrap=Ua.massUnwrap});var B2e=M(M6=>{"use strict";m();Object.defineProperty(M6,"__esModule",{value:!0});M6.InstrumentationAbstract=void 0;var TX=(He(),Me(tt)),dNt=gX(),P6=SX(),bX=class{instrumentationName;instrumentationVersion;_config={};_tracer;_meter;_logger;_diag;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=TX.diag.createComponentLogger({namespace:t}),this._tracer=TX.trace.getTracer(t,n),this._meter=TX.metrics.getMeter(t,n),this._logger=dNt.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=P6.wrap;_unwrap=P6.unwrap;_massWrap=P6.massWrap;_massUnwrap=P6.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)}}};M6.InstrumentationAbstract=bX});var w2e=M(RE=>{"use strict";m();Object.defineProperty(RE,"__esModule",{value:!0});RE.ModuleNameTrie=RE.ModuleNameSeparator=void 0;RE.ModuleNameSeparator="/";var L6=class{hooks=[];children=new Map},IX=class{_trie=new L6;_counter=0;insert(t){let n=this._trie;for(let r of t.moduleName.split(RE.ModuleNameSeparator)){let o=n.children.get(r);o||(o=new L6,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(RE.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))}};RE.ModuleNameTrie=IX});var k2e=M(U6=>{"use strict";m();Object.defineProperty(U6,"__esModule",{value:!0});U6.RequireInTheMiddleSingleton=void 0;var pNt=ES(),O2e=Ue("path"),CX=w2e(),fNt=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),vX=class e{_moduleNameTrie=new CX.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new pNt.Hook(null,{internals:!0},(t,n,r)=>{let o=mNt(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 fNt?new e:this._instance=this._instance??new e}};U6.RequireInTheMiddleSingleton=vX;function mNt(e){return O2e.sep!==CX.ModuleNameSeparator?e.split(O2e.sep).join(CX.ModuleNameSeparator):e}});var RX=M(xE=>{"use strict";m();Object.defineProperty(xE,"__esModule",{value:!0});xE.isWrapped=xE.safeExecuteInTheMiddleAsync=xE.safeExecuteInTheMiddle=void 0;function ANt(e,t,n){let r,o;try{o=e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}xE.safeExecuteInTheMiddle=ANt;async function gNt(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}}xE.safeExecuteInTheMiddleAsync=gNt;function hNt(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}xE.isWrapped=hNt});var L2e=M(Q6=>{"use strict";m();Object.defineProperty(Q6,"__esModule",{value:!0});Q6.InstrumentationBase=void 0;var vO=Ue("path"),P2e=Ue("util"),_Nt=N2e(),xX=SX(),ENt=B2e(),yNt=k2e(),SNt=uW(),RO=(He(),Me(tt)),TNt=ES(),bNt=Ue("fs"),INt=RX(),DX=class extends ENt.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=yNt.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,INt.isWrapped)(t[n])&&this._unwrap(t,n),P2e.types.isProxy(t)){let o=(0,xX.wrap)(Object.assign({},t),n,r);return Object.defineProperty(t,n,{value:o}),o}else return(0,xX.wrap)(t,n,r)};_unwrap=(t,n)=>P2e.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,xX.unwrap)(t,n);_massWrap=(t,n,r)=>{if(t)Array.isArray(t)||(t=[t]);else{RO.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){RO.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{RO.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){RO.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=Ue.resolve(n);Ue.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,bNt.readFileSync)(vO.join(t,"package.json"),{encoding:"utf8"}),r=JSON.parse(n).version;return typeof r=="string"?r:void 0}catch{RO.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 M2e(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=vO.normalize(r);return s.filter(f=>f.name===u).filter(f=>M2e(f.supportedVersions,i,t.includePrerelease)).reduce((f,h)=>(h.moduleExports=f,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(f,t.moduleVersion)):f),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&&vO.isAbsolute(u)){let f=vO.parse(u);u=f.name,l=f.dir}return this._onRequire(t,s,u,l)},r=(s,u,l)=>this._onRequire(t,s,u,l),o=vO.isAbsolute(t.name)?new TNt.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new SNt.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}};Q6.InstrumentationBase=DX;function M2e(e,t,n){return typeof t>"u"?e.includes("*"):e.some(r=>(0,_Nt.satisfies)(t,r,{includePrerelease:n}))}});var U2e=M(F6=>{"use strict";m();Object.defineProperty(F6,"__esModule",{value:!0});F6.normalize=void 0;var CNt=Ue("path");Object.defineProperty(F6,"normalize",{enumerable:!0,get:function(){return CNt.normalize}})});var Q2e=M(PR=>{"use strict";m();Object.defineProperty(PR,"__esModule",{value:!0});PR.normalize=PR.InstrumentationBase=void 0;var vNt=L2e();Object.defineProperty(PR,"InstrumentationBase",{enumerable:!0,get:function(){return vNt.InstrumentationBase}});var RNt=U2e();Object.defineProperty(PR,"normalize",{enumerable:!0,get:function(){return RNt.normalize}})});var NX=M(MR=>{"use strict";m();Object.defineProperty(MR,"__esModule",{value:!0});MR.normalize=MR.InstrumentationBase=void 0;var F2e=Q2e();Object.defineProperty(MR,"InstrumentationBase",{enumerable:!0,get:function(){return F2e.InstrumentationBase}});Object.defineProperty(MR,"normalize",{enumerable:!0,get:function(){return F2e.normalize}})});var G2e=M(G6=>{"use strict";m();Object.defineProperty(G6,"__esModule",{value:!0});G6.InstrumentationNodeModuleDefinition=void 0;var BX=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||[]}};G6.InstrumentationNodeModuleDefinition=BX});var j2e=M(j6=>{"use strict";m();Object.defineProperty(j6,"__esModule",{value:!0});j6.InstrumentationNodeModuleFile=void 0;var xNt=NX(),wX=class{supportedVersions;patch;unpatch;name;constructor(t,n,r,o){this.supportedVersions=n,this.patch=r,this.unpatch=o,this.name=(0,xNt.normalize)(t)}};j6.InstrumentationNodeModuleFile=wX});var z2e=M(iT=>{"use strict";m();Object.defineProperty(iT,"__esModule",{value:!0});iT.semconvStabilityFromStr=iT.SemconvStability=void 0;var z6;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(z6=iT.SemconvStability||(iT.SemconvStability={}));function DNt(e,t){let n=z6.OLD,r=t?.split(",").map(o=>o.trim()).filter(o=>o!=="");for(let o of r??[])if(o.toLowerCase()===e+"/dup"){n=z6.DUPLICATE;break}else o.toLowerCase()===e&&(n=z6.STABLE);return n}iT.semconvStabilityFromStr=DNt});var $2e=M(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 NNt=S2e();Object.defineProperty(cs,"registerInstrumentations",{enumerable:!0,get:function(){return NNt.registerInstrumentations}});var BNt=NX();Object.defineProperty(cs,"InstrumentationBase",{enumerable:!0,get:function(){return BNt.InstrumentationBase}});var wNt=G2e();Object.defineProperty(cs,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return wNt.InstrumentationNodeModuleDefinition}});var ONt=j2e();Object.defineProperty(cs,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return ONt.InstrumentationNodeModuleFile}});var OX=RX();Object.defineProperty(cs,"isWrapped",{enumerable:!0,get:function(){return OX.isWrapped}});Object.defineProperty(cs,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return OX.safeExecuteInTheMiddle}});Object.defineProperty(cs,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return OX.safeExecuteInTheMiddleAsync}});var H2e=z2e();Object.defineProperty(cs,"SemconvStability",{enumerable:!0,get:function(){return H2e.SemconvStability}});Object.defineProperty(cs,"semconvStabilityFromStr",{enumerable:!0,get:function(){return H2e.semconvStabilityFromStr}})});function MNt(){let e=LR[PX];return e?.helper?e.helper:LR[kX]?.helper}function LNt(e){let t={helper:e};LR[PX]=t,LR[kX]=t}function UNt(){delete LR[PX],delete LR[kX]}function GNt(e){return e==="client"?fo.CLIENT:fo.INTERNAL}function Y2e(e,t,n,r,o){if(K2e(t.name,o))return;let i={attributes:t.attributes,kind:GNt(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 f=r.get(l);return f?{context:{spanId:f,traceId:s.spanContext().traceId,traceFlags:s.spanContext().traceFlags}}:[]}));let u=n.filter(l=>l.parentId===t.id);for(let l of u)Y2e(e,l,n,r,o);s.end(t.endTime)})}function q2e(e,t){return zNt(t)?t.then(n=>(e.end(),n),n=>{throw e.end(),n}):(e.end(),t)}function zNt(e){return e!=null&&typeof e.then=="function"}function K2e(e,t){return t.some(n=>typeof n=="string"?n===e:n.test(e))}var H6,kNt,PNt,kX,PX,LR,QNt,FNt,jNt,J2e,V2e,HNt,$Nt,Z2e,W2e=w(()=>{m();He();H6=ue($2e(),1);He();kNt={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"}},PNt=kNt.version.split(".")[0],kX="PRISMA_INSTRUMENTATION",PX=`V${PNt}_PRISMA_INSTRUMENTATION`,LR=globalThis;QNt=process.env.PRISMA_SHOW_ALL_TRACES==="true",FNt="00-10-10-00";jNt=class{tracerProvider;ignoreSpanTypes;constructor({tracerProvider:e,ignoreSpanTypes:t}){this.tracerProvider=e,this.ignoreSpanTypes=t}isEnabled(){return!0}getTraceParent(e){let t=Vt.getSpanContext(e??We.active());return t?`00-${t.traceId}-${t.spanId}-0${t.traceFlags}`:FNt}dispatchEngineSpans(e){let t=this.tracerProvider.getTracer("prisma"),n=new Map,r=e.filter(o=>o.parentId===null);for(let o of r)Y2e(t,o,e,n,this.ignoreSpanTypes)}getActiveContext(){return We.active()}runInChildSpan(e,t){if(typeof e=="string"&&(e={name:e}),e.internal&&!QNt)return t();let n=this.tracerProvider.getTracer("prisma"),r=e.context??this.getActiveContext(),o=`prisma:client:${e.name}`;if(K2e(o,this.ignoreSpanTypes))return t();if(e.active===!1){let i=n.startSpan(o,e,r);return q2e(i,t(i,r))}return n.startActiveSpan(o,e,i=>q2e(i,t(i,r)))}};J2e={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},V2e=J2e.version,HNt=J2e.name,$Nt="@prisma/client",Z2e=class extends H6.InstrumentationBase{tracerProvider;constructor(e={}){super(HNt,V2e,e)}setTracerProvider(e){this.tracerProvider=e}init(){return[new H6.InstrumentationNodeModuleDefinition($Nt,[V2e])]}enable(){let e=this._config;LNt(new jNt({tracerProvider:this.tracerProvider??Vt.getTracerProvider(),ignoreSpanTypes:e.ignoreSpanTypes??[]}))}disable(){UNt()}isEnabled(){return MNt()!==void 0}}});function qNt(e){return!!e&&typeof e=="object"&&"dispatchEngineSpans"in e}function eLe(){let e=globalThis.PRISMA_INSTRUMENTATION;return e&&typeof e=="object"&&"helper"in e?e.helper:void 0}function VNt(e){return e==="client"?fo.CLIENT:fo.INTERNAL}var X2e,MX,YNt,tLe,nLe=w(()=>{m();He();W2e();At();_r();X2e="Prisma";MX=class extends Z2e{constructor(t){super(t?.instrumentationConfig)}enable(){super.enable();let t=eLe();qNt(t)&&(t.createEngineSpan=n=>{let r=Vt.getTracer("prismaV5Compatibility"),o=r._idGenerator;if(!o){Xo(()=>{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=VNt(i.kind),u=i.parent_span_id,l=i.span_id,f=i.trace_id,h=i.links?.map(y=>({context:{traceId:y.trace_id,spanId:y.span_id,traceFlags:iu.SAMPLED}})),_=Vt.setSpanContext(We.active(),{traceId:f,spanId:u,traceFlags:iu.SAMPLED});We.with(_,()=>{let y={generateTraceId:()=>f,generateSpanId:()=>l};r._idGenerator=y,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}})}};YNt=ct(X2e,e=>new MX(e)),tLe=e=>({name:X2e,setupOnce(){YNt(e)},setup(t){eLe()&&t.on("spanStart",n=>{let r=kt(n);r.description?.startsWith("prisma:")&&n.setAttribute(Mt,"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 rLe=M(UR=>{"use strict";m();Object.defineProperty(UR,"__esModule",{value:!0});UR.PACKAGE_NAME=UR.PACKAGE_VERSION=void 0;UR.PACKAGE_VERSION="0.60.0";UR.PACKAGE_NAME="@opentelemetry/instrumentation-hapi"});var LX=M(rA=>{"use strict";m();Object.defineProperty(rA,"__esModule",{value:!0});rA.HapiLifecycleMethodNames=rA.HapiLayerType=rA.handlerPatched=rA.HapiComponentName=void 0;rA.HapiComponentName="@hapi/hapi";rA.handlerPatched=Symbol("hapi-handler-patched");rA.HapiLayerType={ROUTER:"router",PLUGIN:"plugin",EXT:"server.ext"};rA.HapiLifecycleMethodNames=new Set(["onPreAuth","onCredentials","onPostAuth","onPreHandler","onPostHandler","onPreResponse","onRequest"])});var oLe=M($6=>{"use strict";m();Object.defineProperty($6,"__esModule",{value:!0});$6.ATTR_HTTP_METHOD=void 0;$6.ATTR_HTTP_METHOD="http.method"});var UX=M(xO=>{"use strict";m();Object.defineProperty(xO,"__esModule",{value:!0});xO.AttributeNames=void 0;var KNt;(function(e){e.HAPI_TYPE="hapi.type",e.PLUGIN_NAME="hapi.plugin.name",e.EXT_TYPE="server.ext.type"})(KNt=xO.AttributeNames||(xO.AttributeNames={}))});var aLe=M(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 iLe=(Xn(),Me(Hr)),JNt=oLe(),DO=LX(),DE=UX(),sLe=un();function ZNt(e){return e.name?e.name:e.pkg.name}ls.getPluginName=ZNt;var WNt=e=>typeof e=="string"&&DO.HapiLifecycleMethodNames.has(e);ls.isLifecycleExtType=WNt;var XNt=e=>{let t=e?.type;return t!==void 0&&(0,ls.isLifecycleExtType)(t)};ls.isLifecycleExtEventObj=XNt;var eBt=e=>Array.isArray(e)&&e.length<=3&&(0,ls.isLifecycleExtType)(e[0])&&typeof e[1]=="function";ls.isDirectExtInput=eBt;var tBt=e=>!Array.isArray(e);ls.isPatchableExtMethod=tBt;var nBt=(e,t,n)=>{let r={[iLe.ATTR_HTTP_ROUTE]:e.path};t&sLe.SemconvStability.OLD&&(r[JNt.ATTR_HTTP_METHOD]=e.method),t&sLe.SemconvStability.STABLE&&(r[iLe.ATTR_HTTP_REQUEST_METHOD]=e.method);let o;return n?(r[DE.AttributeNames.HAPI_TYPE]=DO.HapiLayerType.PLUGIN,r[DE.AttributeNames.PLUGIN_NAME]=n,o=`${n}: route - ${e.path}`):(r[DE.AttributeNames.HAPI_TYPE]=DO.HapiLayerType.ROUTER,o=`route - ${e.path}`),{attributes:r,name:o}};ls.getRouteMetadata=nBt;var rBt=(e,t,n)=>{let r=`ext - ${e}`;return n&&n!=="method"&&(r=`ext - ${e} - ${n}`),t?{attributes:{[DE.AttributeNames.EXT_TYPE]:e,[DE.AttributeNames.HAPI_TYPE]:DO.HapiLayerType.EXT,[DE.AttributeNames.PLUGIN_NAME]:t},name:`${t}: ${r}`}:{attributes:{[DE.AttributeNames.EXT_TYPE]:e,[DE.AttributeNames.HAPI_TYPE]:DO.HapiLayerType.EXT},name:r}};ls.getExtMetadata=rBt;var oBt=e=>"plugin"in e?"plugin"in e.plugin?e.plugin.plugin:e.plugin:e;ls.getPluginFromInput=oBt});var lLe=M(q6=>{"use strict";m();Object.defineProperty(q6,"__esModule",{value:!0});q6.HapiInstrumentation=void 0;var ed=(He(),Me(tt)),uLe=vr(),NO=un(),cLe=rLe(),BO=LX(),eh=aLe(),QX=class extends NO.InstrumentationBase{_semconvStability;constructor(t={}){super(cLe.PACKAGE_NAME,cLe.PACKAGE_VERSION,t),this._semconvStability=(0,NO.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new NO.InstrumentationNodeModuleDefinition(BO.HapiComponentName,[">=17.0.0 <22"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,NO.isWrapped)(n.server)||this._wrap(n,"server",this._getServerPatch.bind(this)),(0,NO.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,eh.getPluginFromInput)(s);n._wrapRegisterHandler(u)}else{let s=(0,eh.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,eh.isLifecycleExtType)(l.type)){let f=l,h=r._wrapExtMethods(f.method,l.type,n);f.method=h,s[u]=f}}return t.apply(this,i)}else if((0,eh.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,eh.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,eh.getPluginName)(t),o=t.register,i=this,s=function(u,l){return i._wrap(u,"route",f=>n._getServerRoutePatch.bind(n)(f,r)),i._wrap(u,"ext",f=>n._getServerExtPatch.bind(n)(f,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,eh.isPatchableExtMethod)(t))return t[BO.handlerPatched]===!0?t:(t[BO.handlerPatched]=!0,async function(...s){if(ed.trace.getSpan(ed.context.active())===void 0)return await t.apply(this,s);let u=(0,eh.getExtMetadata)(n,r,t.name),l=o.tracer.startSpan(u.name,{attributes:u.attributes});try{return await ed.context.with(ed.trace.setSpan(ed.context.active(),l),t,void 0,...s)}catch(f){throw l.recordException(f),l.setStatus({code:ed.SpanStatusCode.ERROR,message:f.message}),f}finally{l.end()}});return t}_wrapRouteHandler(t,n){let r=this;if(t[BO.handlerPatched]===!0)return t;t[BO.handlerPatched]=!0;let o=i=>async function(...s){if(ed.trace.getSpan(ed.context.active())===void 0)return await i.call(this,...s);let u=(0,uLe.getRPCMetadata)(ed.context.active());u?.type===uLe.RPCType.HTTP&&(u.route=t.path);let l=(0,eh.getRouteMetadata)(t,r._semconvStability,n),f=r.tracer.startSpan(l.name,{attributes:l.attributes});try{return await ed.context.with(ed.trace.setSpan(ed.context.active(),f),()=>i.call(this,...s))}catch(h){throw f.recordException(h),f.setStatus({code:ed.SpanStatusCode.ERROR,message:h.message}),h}finally{f.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}};q6.HapiInstrumentation=QX});var dLe=M(QR=>{"use strict";m();Object.defineProperty(QR,"__esModule",{value:!0});QR.AttributeNames=QR.HapiInstrumentation=void 0;var iBt=lLe();Object.defineProperty(QR,"HapiInstrumentation",{enumerable:!0,get:function(){return iBt.HapiInstrumentation}});var sBt=UX();Object.defineProperty(QR,"AttributeNames",{enumerable:!0,get:function(){return sBt.AttributeNames}})});var pLe,fLe,mLe,aBt,ALe,gLe=w(()=>{m();pLe=ue(dLe(),1);_r();fLe="Hapi",mLe=ct(fLe,()=>new pLe.HapiInstrumentation),aBt=(()=>({name:fLe,setupOnce(){mLe()}})),ALe=aBt});var NE,wO,FX=w(()=>{m();NE={HONO_TYPE:"hono.type",HONO_NAME:"hono.name"},wO={MIDDLEWARE:"middleware",REQUEST_HANDLER:"request_handler"}});var Y6,uBt,cBt,V6,hLe=w(()=>{m();He();Y6=ue(un(),1);At();FX();uBt="@sentry/instrumentation-hono",cBt="0.0.1",V6=class extends Y6.InstrumentationBase{constructor(t={}){super(uBt,cBt,t)}init(){return[new Y6.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 We.with(Vt.setSpan(We.active(),s),()=>n._safeExecute(()=>{let u=t.apply(this,[r,o]);if(Da(u))return u.then(l=>{let f=n._determineHandlerType(l);return s.setAttributes({[NE.HONO_TYPE]:f,[NE.HONO_NAME]:f===wO.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(s),l});{let l=n._determineHandlerType(u);return s.setAttributes({[NE.HONO_TYPE]:l,[NE.HONO_NAME]:l===wO.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 Da(o)?o.then(()=>n(),i=>r(i)):n(),o}catch(o){throw r(o),o}}_determineHandlerType(t){return t===void 0?wO.MIDDLEWARE:wO.REQUEST_HANDLER}_handleError(t,n){n instanceof Error&&(t.setStatus({code:Ai.ERROR,message:n.message}),t.recordException(n))}}});function lBt(e){let t=kt(e).data,n=t[NE.HONO_TYPE];if(t[Xt]||!n)return;e.setAttributes({[Mt]:"auto.http.otel.hono",[Xt]:`${n}.hono`});let r=t[NE.HONO_NAME];if(typeof r=="string"&&e.updateName(r),Rn()===Zd()){Ds&&W.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let o=t[Rg],i=t[mS];typeof o=="string"&&typeof i=="string"&&Rn().setTransactionName(`${i} ${o}`)}var _Le,ELe,dBt,yLe,SLe=w(()=>{m();Xn();At();_r();YS();FX();hLe();_Le="Hono";ELe=ct(_Le,()=>new V6({responseHook:e=>{lBt(e)}})),dBt=(()=>({name:_Le,setupOnce(){ELe()}})),yLe=dBt});var K6=M(OO=>{"use strict";m();Object.defineProperty(OO,"__esModule",{value:!0});OO.KoaLayerType=void 0;var pBt;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware"})(pBt=OO.KoaLayerType||(OO.KoaLayerType={}))});var TLe=M(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-koa"});var GX=M(kO=>{"use strict";m();Object.defineProperty(kO,"__esModule",{value:!0});kO.AttributeNames=void 0;var fBt;(function(e){e.KOA_TYPE="koa.type",e.KOA_NAME="koa.name"})(fBt=kO.AttributeNames||(kO.AttributeNames={}))});var ILe=M(GR=>{"use strict";m();Object.defineProperty(GR,"__esModule",{value:!0});GR.isLayerIgnored=GR.getMiddlewareMetadata=void 0;var bLe=K6(),J6=GX(),mBt=(Xn(),Me(Hr)),ABt=(e,t,n,r)=>n?{attributes:{[J6.AttributeNames.KOA_NAME]:r?.toString(),[J6.AttributeNames.KOA_TYPE]:bLe.KoaLayerType.ROUTER,[mBt.ATTR_HTTP_ROUTE]:r?.toString()},name:e._matchedRouteName||`router - ${r}`}:{attributes:{[J6.AttributeNames.KOA_NAME]:t.name??"middleware",[J6.AttributeNames.KOA_TYPE]:bLe.KoaLayerType.MIDDLEWARE},name:`middleware - ${t.name}`};GR.getMiddlewareMetadata=ABt;var gBt=(e,t)=>!!(Array.isArray(t?.ignoreLayersType)&&t?.ignoreLayersType?.includes(e));GR.isLayerIgnored=gBt});var CLe=M(Z6=>{"use strict";m();Object.defineProperty(Z6,"__esModule",{value:!0});Z6.kLayerPatched=void 0;Z6.kLayerPatched=Symbol("koa-layer-patched")});var BLe=M(W6=>{"use strict";m();Object.defineProperty(W6,"__esModule",{value:!0});W6.KoaInstrumentation=void 0;var oA=(He(),Me(tt)),PO=un(),vLe=K6(),RLe=TLe(),xLe=ILe(),DLe=vr(),NLe=CLe(),jX=class extends PO.InstrumentationBase{constructor(t={}){super(RLe.PACKAGE_NAME,RLe.PACKAGE_VERSION,t)}init(){return new PO.InstrumentationNodeModuleDefinition("koa",[">=2.0.0 <4"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return n==null?n:((0,PO.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,PO.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){oA.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?vLe.KoaLayerType.ROUTER:vLe.KoaLayerType.MIDDLEWARE;return t[NLe.kLayerPatched]===!0||(0,xLe.isLayerIgnored)(o,this.getConfig())?t:t.constructor.name==="GeneratorFunction"||t.constructor.name==="AsyncGeneratorFunction"?(oA.diag.debug("ignoring generator-based Koa middleware layer"),t):(t[NLe.kLayerPatched]=!0,oA.diag.debug("patching Koa middleware layer"),async(i,s)=>{if(oA.trace.getSpan(oA.context.active())===void 0)return t(i,s);let l=(0,xLe.getMiddlewareMetadata)(i,t,n,r),f=this.tracer.startSpan(l.name,{attributes:l.attributes}),h=(0,DLe.getRPCMetadata)(oA.context.active());h?.type===DLe.RPCType.HTTP&&i._matchedRoute&&(h.route=i._matchedRoute.toString());let{requestHook:_}=this.getConfig();_&&(0,PO.safeExecuteInTheMiddle)(()=>_(f,{context:i,middlewareLayer:t,layerType:o}),T=>{T&&oA.diag.error("koa instrumentation: request hook failed",T)},!0);let y=oA.trace.setSpan(oA.context.active(),f);return oA.context.with(y,async()=>{try{return await t(i,s)}catch(T){throw f.recordException(T),T}finally{f.end()}})})}};W6.KoaInstrumentation=jX});var wLe=M(BE=>{"use strict";m();Object.defineProperty(BE,"__esModule",{value:!0});BE.KoaLayerType=BE.AttributeNames=BE.KoaInstrumentation=void 0;var hBt=BLe();Object.defineProperty(BE,"KoaInstrumentation",{enumerable:!0,get:function(){return hBt.KoaInstrumentation}});var _Bt=GX();Object.defineProperty(BE,"AttributeNames",{enumerable:!0,get:function(){return _Bt.AttributeNames}});var EBt=K6();Object.defineProperty(BE,"KoaLayerType",{enumerable:!0,get:function(){return EBt.KoaLayerType}})});var OLe,kLe,PLe,yBt,MLe,LLe=w(()=>{m();OLe=ue(wLe(),1);Xn();At();_r();YS();kLe="Koa",PLe=ct(kLe,OLe.KoaInstrumentation,(e={})=>({ignoreLayersType:e.ignoreLayersType,requestHook(t,n){qr(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()===Zd()){Ds&&W.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let s=r[Rg],u=n.context?.request?.method?.toUpperCase()||"GET";s&&Rn().setTransactionName(`${u} ${s}`)}})),yBt=((e={})=>({name:kLe,setupOnce(){PLe(e)}})),MLe=yBt});var zX=M(Nf=>{"use strict";m();Object.defineProperty(Nf,"__esModule",{value:!0});Nf.ConnectNames=Nf.ConnectTypes=Nf.AttributeNames=void 0;var SBt;(function(e){e.CONNECT_TYPE="connect.type",e.CONNECT_NAME="connect.name"})(SBt=Nf.AttributeNames||(Nf.AttributeNames={}));var TBt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(TBt=Nf.ConnectTypes||(Nf.ConnectTypes={}));var bBt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request handler"})(bBt=Nf.ConnectNames||(Nf.ConnectNames={}))});var ULe=M(jR=>{"use strict";m();Object.defineProperty(jR,"__esModule",{value:!0});jR.PACKAGE_NAME=jR.PACKAGE_VERSION=void 0;jR.PACKAGE_VERSION="0.57.0";jR.PACKAGE_NAME="@opentelemetry/instrumentation-connect"});var QLe=M(X6=>{"use strict";m();Object.defineProperty(X6,"__esModule",{value:!0});X6._LAYERS_STORE_PROPERTY=void 0;X6._LAYERS_STORE_PROPERTY=Symbol("opentelemetry.instrumentation-connect.request-route-stack")});var FLe=M(OE=>{"use strict";m();Object.defineProperty(OE,"__esModule",{value:!0});OE.generateRoute=OE.replaceCurrentStackRoute=OE.addNewStackLayer=void 0;var IBt=(He(),Me(tt)),wE=QLe(),CBt=e=>{Array.isArray(e[wE._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(e,wE._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),e[wE._LAYERS_STORE_PROPERTY].push("/");let t=e[wE._LAYERS_STORE_PROPERTY].length;return()=>{t===e[wE._LAYERS_STORE_PROPERTY].length?e[wE._LAYERS_STORE_PROPERTY].pop():IBt.diag.warn("Connect: Trying to pop the stack multiple time")}};OE.addNewStackLayer=CBt;var vBt=(e,t)=>{t&&e[wE._LAYERS_STORE_PROPERTY].splice(-1,1,t)};OE.replaceCurrentStackRoute=vBt;var RBt=e=>e[wE._LAYERS_STORE_PROPERTY].reduce((t,n)=>t.replace(/\/+$/,"")+n);OE.generateRoute=RBt});var zLe=M(kE=>{"use strict";m();Object.defineProperty(kE,"__esModule",{value:!0});kE.ConnectInstrumentation=kE.ANONYMOUS_NAME=void 0;var xBt=(He(),Me(tt)),GLe=vr(),zR=zX(),jLe=ULe(),eG=un(),DBt=(Xn(),Me(Hr)),HX=FLe();kE.ANONYMOUS_NAME="anonymous";var $X=class extends eG.InstrumentationBase{constructor(t={}){super(jLe.PACKAGE_NAME,jLe.PACKAGE_VERSION,t)}init(){return[new eG.InstrumentationNodeModuleDefinition("connect",[">=3.0.0 <4"],t=>this._patchConstructor(t))]}_patchApp(t){(0,eG.isWrapped)(t.use)||this._wrap(t,"use",this._patchUse.bind(this)),(0,eG.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=zR.ConnectTypes.REQUEST_HANDLER,i=zR.ConnectNames.REQUEST_HANDLER,o=t):(r=zR.ConnectTypes.MIDDLEWARE,i=zR.ConnectNames.MIDDLEWARE,o=n.name||kE.ANONYMOUS_NAME);let s=`${i} - ${o}`,u={attributes:{[DBt.ATTR_HTTP_ROUTE]:t.length>0?t:"/",[zR.AttributeNames.CONNECT_TYPE]:r,[zR.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],f=arguments[s],h=arguments[u],_=arguments[l];(0,HX.replaceCurrentStackRoute)(f,t);let y=(0,GLe.getRPCMetadata)(xBt.context.active());t&&y?.type===GLe.RPCType.HTTP&&(y.route=(0,HX.generateRoute)(f));let T="";t?T=`request handler - ${t}`:T=`middleware - ${n.name||kE.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(_,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,HX.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)}}};kE.ConnectInstrumentation=$X});var $Le=M(fp=>{"use strict";m();Object.defineProperty(fp,"__esModule",{value:!0});fp.ConnectTypes=fp.ConnectNames=fp.AttributeNames=fp.ANONYMOUS_NAME=fp.ConnectInstrumentation=void 0;var HLe=zLe();Object.defineProperty(fp,"ConnectInstrumentation",{enumerable:!0,get:function(){return HLe.ConnectInstrumentation}});Object.defineProperty(fp,"ANONYMOUS_NAME",{enumerable:!0,get:function(){return HLe.ANONYMOUS_NAME}});var qX=zX();Object.defineProperty(fp,"AttributeNames",{enumerable:!0,get:function(){return qX.AttributeNames}});Object.defineProperty(fp,"ConnectNames",{enumerable:!0,get:function(){return qX.ConnectNames}});Object.defineProperty(fp,"ConnectTypes",{enumerable:!0,get:function(){return qX.ConnectTypes}})});var qLe,VLe,YLe,NBt,KLe,JLe=w(()=>{m();qLe=ue($Le(),1);_r();VLe="Connect",YLe=ct(VLe,()=>new qLe.ConnectInstrumentation),NBt=(()=>({name:VLe,setupOnce(){YLe()}})),KLe=NBt});var ZLe=M(la=>{"use strict";m();Object.defineProperty(la,"__esModule",{value:!0});la.DB_SYSTEM_VALUE_MSSQL=la.ATTR_NET_PEER_PORT=la.ATTR_NET_PEER_NAME=la.ATTR_DB_USER=la.ATTR_DB_SYSTEM=la.ATTR_DB_STATEMENT=la.ATTR_DB_SQL_TABLE=la.ATTR_DB_NAME=void 0;la.ATTR_DB_NAME="db.name";la.ATTR_DB_SQL_TABLE="db.sql.table";la.ATTR_DB_STATEMENT="db.statement";la.ATTR_DB_SYSTEM="db.system";la.ATTR_DB_USER="db.user";la.ATTR_NET_PEER_NAME="net.peer.name";la.ATTR_NET_PEER_PORT="net.peer.port";la.DB_SYSTEM_VALUE_MSSQL="mssql"});var WLe=M(HR=>{"use strict";m();Object.defineProperty(HR,"__esModule",{value:!0});HR.once=HR.getSpanName=void 0;function BBt(e,t,n,r){return e==="execBulkLoad"&&r&&t?`${e} ${r} ${t}`:e==="callProcedure"?t?`${e} ${n} ${t}`:`${e} ${n}`:t?`${e} ${t}`:`${e}`}HR.getSpanName=BBt;var wBt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};HR.once=wBt});var XLe=M($R=>{"use strict";m();Object.defineProperty($R,"__esModule",{value:!0});$R.PACKAGE_NAME=$R.PACKAGE_VERSION=void 0;$R.PACKAGE_VERSION="0.33.0";$R.PACKAGE_NAME="@opentelemetry/instrumentation-tedious"});var oUe=M(ME=>{"use strict";m();Object.defineProperty(ME,"__esModule",{value:!0});ME.TediousInstrumentation=ME.INJECTED_CTX=void 0;var qR=(He(),Me(tt)),OBt=Ue("events"),iA=un(),sT=(Xn(),Me(Hr)),PE=ZLe(),eUe=WLe(),tUe=XLe(),rUe=Symbol("opentelemetry.instrumentation-tedious.current-database");ME.INJECTED_CTX=Symbol("opentelemetry.instrumentation-tedious.context-info-injected");var nUe=["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"];function tG(e){Object.defineProperty(this,rUe,{value:e,writable:!0})}var VX=class e extends iA.InstrumentationBase{static COMPONENT="tedious";_netSemconvStability;_dbSemconvStability;constructor(t={}){super(tUe.PACKAGE_NAME,tUe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,iA.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,iA.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new iA.InstrumentationNodeModuleDefinition(e.COMPONENT,[">=1.11.0 <20"],t=>{let n=t.Connection.prototype;for(let r of nUe)(0,iA.isWrapped)(n[r])&&this._unwrap(n,r),this._wrap(n,r,this._patchQuery(r,t));return(0,iA.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 nUe)this._unwrap(n,r);this._unwrap(n,"connect")})]}_patchConnect(t){return function(){return tG.call(this,this.config?.options?.database),this.removeListener("databaseChange",tG),this.on("databaseChange",tG),this.once("end",()=>{this.removeListener("databaseChange",tG)}),t.apply(this,arguments)}}_buildTraceparent(t){let n=t.spanContext();return`00-${n.traceId}-${n.spanId}-0${Number(n.traceFlags||qR.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,ME.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?.[ME.INJECTED_CTX])return r.apply(this,arguments);if(!(s instanceof OBt.EventEmitter))return o._diag.warn(`Unexpected invocation of patched ${t} method. Span not recorded`),r.apply(this,arguments);let u=0,l=0,f=()=>l++,h=()=>u++,_=this[rUe],y=(G=>G.sqlTextOrProcedure==="sp_prepare"&&G.parametersByName?.stmt?.value?G.parametersByName.stmt.value:G.sqlTextOrProcedure)(s),T={};o._dbSemconvStability&iA.SemconvStability.OLD&&(T[PE.ATTR_DB_SYSTEM]=PE.DB_SYSTEM_VALUE_MSSQL,T[PE.ATTR_DB_NAME]=_,T[PE.ATTR_DB_USER]=this.config?.userName??this.config?.authentication?.options?.userName,T[PE.ATTR_DB_STATEMENT]=y,T[PE.ATTR_DB_SQL_TABLE]=s.table),o._dbSemconvStability&iA.SemconvStability.STABLE&&(T[sT.ATTR_DB_NAMESPACE]=_,T[sT.ATTR_DB_SYSTEM_NAME]=sT.DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER,T[sT.ATTR_DB_QUERY_TEXT]=y,T[sT.ATTR_DB_COLLECTION_NAME]=s.table),o._netSemconvStability&iA.SemconvStability.OLD&&(T[PE.ATTR_NET_PEER_NAME]=this.config?.server,T[PE.ATTR_NET_PEER_PORT]=this.config?.options?.port),o._netSemconvStability&iA.SemconvStability.STABLE&&(T[sT.ATTR_SERVER_ADDRESS]=this.config?.server,T[sT.ATTR_SERVER_PORT]=this.config?.options?.port);let v=o.tracer.startSpan((0,eUe.getSpanName)(t,_,y,s.table),{kind:qR.SpanKind.CLIENT,attributes:T}),R=(0,eUe.once)(G=>{s.removeListener("done",f),s.removeListener("doneInProc",f),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:qR.SpanStatusCode.ERROR,message:G.message}),v.end()});s.on("done",f),s.on("doneInProc",f),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=()=>qR.context.with(qR.trace.setSpan(qR.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)}}};ME.TediousInstrumentation=VX});var iUe=M(nG=>{"use strict";m();Object.defineProperty(nG,"__esModule",{value:!0});nG.TediousInstrumentation=void 0;var kBt=oUe();Object.defineProperty(nG,"TediousInstrumentation",{enumerable:!0,get:function(){return kBt.TediousInstrumentation}})});var sUe,PBt,aUe,uUe,MBt,cUe,lUe=w(()=>{m();sUe=ue(iUe(),1);At();_r();PBt=new Set(["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"]),aUe="Tedious",uUe=ct(aUe,()=>new sUe.TediousInstrumentation({})),MBt=(()=>{let e;return{name:aUe,setupOnce(){let t=uUe();e=_w(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]||"";PBt.has(i)&&n.setAttribute(Mt,"auto.db.otel.tedious")}))}}}),cUe=MBt});var dUe=M(VR=>{"use strict";m();Object.defineProperty(VR,"__esModule",{value:!0});VR.PACKAGE_NAME=VR.PACKAGE_VERSION=void 0;VR.PACKAGE_VERSION="0.57.0";VR.PACKAGE_NAME="@opentelemetry/instrumentation-generic-pool"});var fUe=M(rG=>{"use strict";m();Object.defineProperty(rG,"__esModule",{value:!0});rG.GenericPoolInstrumentation=void 0;var YR=(He(),Me(tt)),aT=un(),pUe=dUe(),YX="generic-pool",KX=class extends aT.InstrumentationBase{_isDisabled=!1;constructor(t={}){super(pUe.PACKAGE_NAME,pUe.PACKAGE_VERSION,t)}init(){return[new aT.InstrumentationNodeModuleDefinition(YX,[">=3.0.0 <4"],t=>{let n=t.Pool;return(0,aT.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 aT.InstrumentationNodeModuleDefinition(YX,[">=2.4.0 <3"],t=>{let n=t.Pool;return(0,aT.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 aT.InstrumentationNodeModuleDefinition(YX,[">=2.0.0 <2.4"],t=>(this._isDisabled=!1,(0,aT.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=YR.context.active(),s=n.tracer.startSpan("generic-pool.acquire",{},i);return YR.context.with(YR.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=YR.context.active(),u=n.tracer.startSpan("generic-pool.acquire",{},s);return YR.context.with(YR.trace.setSpan(s,u),()=>{t.call(this,(l,f)=>{if(u.end(),o)return o(l,f)},i)})}}};rG.GenericPoolInstrumentation=KX});var mUe=M(oG=>{"use strict";m();Object.defineProperty(oG,"__esModule",{value:!0});oG.GenericPoolInstrumentation=void 0;var LBt=fUe();Object.defineProperty(oG,"GenericPoolInstrumentation",{enumerable:!0,get:function(){return LBt.GenericPoolInstrumentation}})});var AUe,gUe,hUe,UBt,_Ue,EUe=w(()=>{m();AUe=ue(mUe(),1);At();_r();gUe="GenericPool",hUe=ct(gUe,()=>new AUe.GenericPoolInstrumentation({})),UBt=(()=>{let e;return{name:gUe,setupOnce(){let t=hUe();e=_w(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let o=kt(n).description;(o==="generic-pool.aquire"||o==="generic-pool.acquire")&&n.setAttribute(Mt,"auto.db.otel.generic_pool")}))}}}),_Ue=UBt});var JX=M(sA=>{"use strict";m();Object.defineProperty(sA,"__esModule",{value:!0});sA.ATTR_NET_PEER_PORT=sA.ATTR_NET_PEER_NAME=sA.ATTR_MESSAGING_SYSTEM=sA.ATTR_MESSAGING_OPERATION=void 0;sA.ATTR_MESSAGING_OPERATION="messaging.operation";sA.ATTR_MESSAGING_SYSTEM="messaging.system";sA.ATTR_NET_PEER_NAME="net.peer.name";sA.ATTR_NET_PEER_PORT="net.peer.port"});var ZX=M(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 WX=M(uT=>{"use strict";m();Object.defineProperty(uT,"__esModule",{value:!0});uT.DEFAULT_CONFIG=uT.EndOperation=void 0;var QBt;(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"})(QBt=uT.EndOperation||(uT.EndOperation={}));uT.DEFAULT_CONFIG={consumeTimeoutMs:1e3*60,useLinksForConsume:!1}});var bUe=M(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 XX=(He(),Me(tt)),LE=un(),iG=(Xn(),Me(Hr)),MO=JX(),sG=ZX();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 eee=(0,XX.createContextKey)("opentelemetry.amqplib.channel.is-confirm-channel"),FBt=e=>e!==""?e:"<default>";Si.normalizeExchange=FBt;var GBt=e=>e.replace(/:[^:@/]*@/,":***@"),yUe=(e,t)=>e||(t==="AMQP"?5672:5671),SUe=e=>{let t=e||"amqp";return(t.endsWith(":")?t.substring(0,t.length-1):t).toUpperCase()},TUe=e=>e||"localhost",aA=(e,t,n,r)=>n?{[t]:n}:(XX.diag.error(`amqplib instrumentation: could not extract connection attribute ${r} from user supplied url`,{url:e}),{}),jBt=e=>{let t=e.serverProperties.product?.toLowerCase?.();return t?{[MO.ATTR_MESSAGING_SYSTEM]:t}:{}};Si.getConnectionAttributesFromServer=jBt;var zBt=(e,t)=>{let n={[sG.ATTR_MESSAGING_PROTOCOL_VERSION]:"0.9.1"};if(e=e||"amqp://localhost",typeof e=="object"){let r=e,o=SUe(r?.protocol);Object.assign(n,{...aA(e,sG.ATTR_MESSAGING_PROTOCOL,o,"protocol")});let i=TUe(r?.hostname);t&LE.SemconvStability.OLD&&Object.assign(n,{...aA(e,MO.ATTR_NET_PEER_NAME,i,"hostname")}),t&LE.SemconvStability.STABLE&&Object.assign(n,{...aA(e,iG.ATTR_SERVER_ADDRESS,i,"hostname")});let s=yUe(r.port,o);t&LE.SemconvStability.OLD&&Object.assign(n,aA(e,MO.ATTR_NET_PEER_PORT,s,"port")),t&LE.SemconvStability.STABLE&&Object.assign(n,aA(e,iG.ATTR_SERVER_PORT,s,"port"))}else{let r=GBt(e);n[sG.ATTR_MESSAGING_URL]=r;try{let o=new URL(r),i=SUe(o.protocol);Object.assign(n,{...aA(r,sG.ATTR_MESSAGING_PROTOCOL,i,"protocol")});let s=TUe(o.hostname);t&LE.SemconvStability.OLD&&Object.assign(n,{...aA(r,MO.ATTR_NET_PEER_NAME,s,"hostname")}),t&LE.SemconvStability.STABLE&&Object.assign(n,{...aA(r,iG.ATTR_SERVER_ADDRESS,s,"hostname")});let u=yUe(o.port?parseInt(o.port):void 0,i);t&LE.SemconvStability.OLD&&Object.assign(n,aA(r,MO.ATTR_NET_PEER_PORT,u,"port")),t&LE.SemconvStability.STABLE&&Object.assign(n,aA(r,iG.ATTR_SERVER_PORT,u,"port"))}catch(o){XX.diag.error("amqplib instrumentation: error while extracting connection details from connection url",{censoredUrl:r,err:o})}}return n};Si.getConnectionAttributesFromUrl=zBt;var HBt=e=>e.setValue(eee,!0);Si.markConfirmChannelTracing=HBt;var $Bt=e=>e.deleteValue(eee);Si.unmarkConfirmChannelTracing=$Bt;var qBt=e=>e.getValue(eee)===!0;Si.isConfirmChannelTracing=qBt});var IUe=M(KR=>{"use strict";m();Object.defineProperty(KR,"__esModule",{value:!0});KR.PACKAGE_NAME=KR.PACKAGE_VERSION=void 0;KR.PACKAGE_VERSION="0.61.0";KR.PACKAGE_NAME="@opentelemetry/instrumentation-amqplib"});var vUe=M(cG=>{"use strict";m();Object.defineProperty(cG,"__esModule",{value:!0});cG.AmqplibInstrumentation=void 0;var ri=(He(),Me(tt)),aG=vr(),xr=un(),VBt=JX(),td=ZX(),oc=WX(),Ti=bUe(),CUe=IUe(),uG=[">=0.5.5 <1"],tee=class extends xr.InstrumentationBase{_netSemconvStability;constructor(t={}){super(CUe.PACKAGE_NAME,CUe.PACKAGE_VERSION,{...oc.DEFAULT_CONFIG,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,xr.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...oc.DEFAULT_CONFIG,...t})}init(){let t=new xr.InstrumentationNodeModuleFile("amqplib/lib/channel_model.js",uG,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),n=new xr.InstrumentationNodeModuleFile("amqplib/lib/callback_model.js",uG,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),r=new xr.InstrumentationNodeModuleFile("amqplib/lib/connect.js",uG,this.patchConnect.bind(this),this.unpatchConnect.bind(this));return new xr.InstrumentationNodeModuleDefinition("amqplib",uG,void 0,void 0,[t,r,n])}patchConnect(t){return t=this.unpatchConnect(t),(0,xr.isWrapped)(t.connect)||this._wrap(t,"connect",this.getConnectPatch.bind(this)),t}unpatchConnect(t){return(0,xr.isWrapped)(t.connect)&&this._unwrap(t,"connect"),t}patchChannelModel(t,n){return(0,xr.isWrapped)(t.Channel.prototype.publish)||this._wrap(t.Channel.prototype,"publish",this.getPublishPatch.bind(this,n)),(0,xr.isWrapped)(t.Channel.prototype.consume)||this._wrap(t.Channel.prototype,"consume",this.getConsumePatch.bind(this,n)),(0,xr.isWrapped)(t.Channel.prototype.ack)||this._wrap(t.Channel.prototype,"ack",this.getAckPatch.bind(this,!1,oc.EndOperation.Ack)),(0,xr.isWrapped)(t.Channel.prototype.nack)||this._wrap(t.Channel.prototype,"nack",this.getAckPatch.bind(this,!0,oc.EndOperation.Nack)),(0,xr.isWrapped)(t.Channel.prototype.reject)||this._wrap(t.Channel.prototype,"reject",this.getAckPatch.bind(this,!0,oc.EndOperation.Reject)),(0,xr.isWrapped)(t.Channel.prototype.ackAll)||this._wrap(t.Channel.prototype,"ackAll",this.getAckAllPatch.bind(this,!1,oc.EndOperation.AckAll)),(0,xr.isWrapped)(t.Channel.prototype.nackAll)||this._wrap(t.Channel.prototype,"nackAll",this.getAckAllPatch.bind(this,!0,oc.EndOperation.NackAll)),(0,xr.isWrapped)(t.Channel.prototype.emit)||this._wrap(t.Channel.prototype,"emit",this.getChannelEmitPatch.bind(this)),(0,xr.isWrapped)(t.ConfirmChannel.prototype.publish)||this._wrap(t.ConfirmChannel.prototype,"publish",this.getConfirmedPublishPatch.bind(this,n)),t}unpatchChannelModel(t){return(0,xr.isWrapped)(t.Channel.prototype.publish)&&this._unwrap(t.Channel.prototype,"publish"),(0,xr.isWrapped)(t.Channel.prototype.consume)&&this._unwrap(t.Channel.prototype,"consume"),(0,xr.isWrapped)(t.Channel.prototype.ack)&&this._unwrap(t.Channel.prototype,"ack"),(0,xr.isWrapped)(t.Channel.prototype.nack)&&this._unwrap(t.Channel.prototype,"nack"),(0,xr.isWrapped)(t.Channel.prototype.reject)&&this._unwrap(t.Channel.prototype,"reject"),(0,xr.isWrapped)(t.Channel.prototype.ackAll)&&this._unwrap(t.Channel.prototype,"ackAll"),(0,xr.isWrapped)(t.Channel.prototype.nackAll)&&this._unwrap(t.Channel.prototype,"nackAll"),(0,xr.isWrapped)(t.Channel.prototype.emit)&&this._unwrap(t.Channel.prototype,"emit"),(0,xr.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 f=(0,Ti.getConnectionAttributesFromUrl)(o,n._netSemconvStability),h=(0,Ti.getConnectionAttributesFromServer)(l);l[Ti.CONNECTION_ATTRIBUTES]={...f,...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 f=this,h=n===oc.EndOperation.Reject?u:l,_=f[Ti.CHANNEL_SPANS_NOT_ENDED]??[],y=_.findIndex(T=>T.msg===s);if(y<0)o.endConsumerSpan(s,t,n,h);else if(n!==oc.EndOperation.Reject&&u){for(let T=0;T<=y;T++)o.endConsumerSpan(_[T].msg,t,n,h);_.splice(0,y+1)}else o.endConsumerSpan(s,t,n,h),_.splice(y,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 _=setInterval(()=>{r.checkConsumeTimeoutOnChannel(l)},h);_.unref(),l[Ti.CHANNEL_CONSUME_TIMEOUT_TIMER]=_}l[Ti.CHANNEL_SPANS_NOT_ENDED]=[]}let f=function(h){if(!h)return s.call(this,h);let _=h.properties.headers??{},y=ri.propagation.extract(ri.ROOT_CONTEXT,_),T=h.fields?.exchange,v;if(r._config.useLinksForConsume){let P=y?ri.trace.getSpan(y)?.spanContext():void 0;y=void 0,P&&(v=[{context:P}])}let R=r.tracer.startSpan(`${i} process`,{kind:ri.SpanKind.CONSUMER,attributes:{...l?.connection?.[Ti.CONNECTION_ATTRIBUTES],[td.ATTR_MESSAGING_DESTINATION]:T,[td.ATTR_MESSAGING_DESTINATION_KIND]:td.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[td.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:h.fields?.routingKey,[VBt.ATTR_MESSAGING_OPERATION]:td.MESSAGING_OPERATION_VALUE_PROCESS,[td.OLD_ATTR_MESSAGING_MESSAGE_ID]:h?.properties.messageId,[td.ATTR_MESSAGING_CONVERSATION_ID]:h?.properties.correlationId},links:v},y),{consumeHook:x}=r.getConfig();x&&(0,xr.safeExecuteInTheMiddle)(()=>x(R,{moduleVersion:t,msg:h}),P=>{P&&ri.diag.error("amqplib instrumentation: consumerHook error",P)},!0),u?.noAck||(l[Ti.CHANNEL_SPANS_NOT_ENDED].push({msg:h,timeOfConsume:(0,aG.hrTime)()}),h[Ti.MESSAGE_STORED_SPAN]=R);let O=y||ri.ROOT_CONTEXT;ri.context.with(ri.trace.setSpan(O,R),()=>{s.call(this,h)}),u?.noAck&&(r.callConsumeEndHook(R,h,!1,oc.EndOperation.AutoAck),R.end())};return arguments[1]=f,n.apply(this,arguments)}}getConfirmedPublishPatch(t,n){let r=this;return function(i,s,u,l,f){let h=this,{span:_,modifiedOptions:y}=r.createPublishSpan(r,i,s,h,l),{publishHook:T}=r.getConfig();T&&(0,xr.safeExecuteInTheMiddle)(()=>T(_,{moduleVersion:t,exchange:i,routingKey:s,content:u,options:y,isConfirmChannel:!0}),O=>{O&&ri.diag.error("amqplib instrumentation: publishHook error",O)},!0);let v=function(O,P){try{f?.call(this,O,P)}finally{let{publishConfirmHook:j}=r.getConfig();j&&(0,xr.safeExecuteInTheMiddle)(()=>j(_,{moduleVersion:t,exchange:i,routingKey:s,content:u,options:l,isConfirmChannel:!0,confirmError:O}),G=>{G&&ri.diag.error("amqplib instrumentation: publishConfirmHook error",G)},!0),O&&_.setStatus({code:ri.SpanStatusCode.ERROR,message:"message confirmation has been nack'ed"}),_.end()}},R=(0,Ti.markConfirmChannelTracing)(ri.context.active()),x=[...arguments];return x[3]=y,x[4]=ri.context.bind((0,Ti.unmarkConfirmChannelTracing)(ri.trace.setSpan(R,_)),v),ri.context.with(R,n.bind(this,...x))}}getPublishPatch(t,n){let r=this;return function(i,s,u,l){if((0,Ti.isConfirmChannelTracing)(ri.context.active()))return n.apply(this,arguments);{let f=this,{span:h,modifiedOptions:_}=r.createPublishSpan(r,i,s,f,l),{publishHook:y}=r.getConfig();y&&(0,xr.safeExecuteInTheMiddle)(()=>y(h,{moduleVersion:t,exchange:i,routingKey:s,content:u,options:_,isConfirmChannel:!1}),R=>{R&&ri.diag.error("amqplib instrumentation: publishHook error",R)},!0);let T=[...arguments];T[3]=_;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:ri.SpanKind.PRODUCER,attributes:{...o.connection[Ti.CONNECTION_ATTRIBUTES],[td.ATTR_MESSAGING_DESTINATION]:n,[td.ATTR_MESSAGING_DESTINATION_KIND]:td.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[td.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:r,[td.OLD_ATTR_MESSAGING_MESSAGE_ID]:i?.messageId,[td.ATTR_MESSAGING_CONVERSATION_ID]:i?.correlationId}}),l=i??{};return l.headers=l.headers??{},ri.propagation.inject(ri.trace.setSpan(ri.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:ri.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,xr.safeExecuteInTheMiddle)(()=>i(t,{msg:n,rejected:r,endOperation:o}),s=>{s&&ri.diag.error("amqplib instrumentation: consumerEndHook error",s)},!0)}checkConsumeTimeoutOnChannel(t){let n=(0,aG.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,aG.hrTimeDuration)(s.timeOfConsume,n);if((0,aG.hrTimeToMilliseconds)(u)<i)break;this.endConsumerSpan(s.msg,null,oc.EndOperation.InstrumentationTimeout,!0)}r.splice(0,o)}};cG.AmqplibInstrumentation=tee});var xUe=M(UE=>{"use strict";m();Object.defineProperty(UE,"__esModule",{value:!0});UE.EndOperation=UE.DEFAULT_CONFIG=UE.AmqplibInstrumentation=void 0;var YBt=vUe();Object.defineProperty(UE,"AmqplibInstrumentation",{enumerable:!0,get:function(){return YBt.AmqplibInstrumentation}});var RUe=WX();Object.defineProperty(UE,"DEFAULT_CONFIG",{enumerable:!0,get:function(){return RUe.DEFAULT_CONFIG}});Object.defineProperty(UE,"EndOperation",{enumerable:!0,get:function(){return RUe.EndOperation}})});var DUe,NUe,KBt,BUe,JBt,wUe,OUe=w(()=>{m();DUe=ue(xUe(),1);_r();NUe="Amqplib",KBt={consumeEndHook:e=>{qr(e,"auto.amqplib.otel.consumer")},publishHook:e=>{qr(e,"auto.amqplib.otel.publisher")}},BUe=ct(NUe,()=>new DUe.AmqplibInstrumentation(KBt)),JBt=(()=>({name:NUe,setupOnce(){BUe()}})),wUe=JBt});var LO,nee=w(()=>{m();LO="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 XBt(e){if(typeof e!="object"||e===null||!("content"in e))return;let t=e;Array.isArray(t.content)&&(ewt(t.content),twt(t.content))}function ewt(e){for(let t of e){if(!WBt(t))continue;let n=wK(t.toolCallId);n?zl(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"),rn(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})}):zl(r=>{r.setTag("vercel.ai.tool.name",t.toolName),r.setTag("vercel.ai.tool.callId",t.toolCallId),r.setLevel("error"),rn(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})})}}function twt(e){for(let t of e)typeof t=="object"&&t!==null&&"toolCallId"in t&&typeof t.toolCallId=="string"&&OK(t.toolCallId)}function nwt(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 dG,ZBt,kUe,lG,PUe=w(()=>{m();dG=ue(un(),1);At();nee();ZBt=[">=3.0.0 <7"],kUe=["generateText","streamText","generateObject","streamObject","embed","embedMany","rerank"];lG=class e extends dG.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 dG.InstrumentationNodeModuleDefinition("ai",ZBt,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,f=Et(),h=f?.getIntegrationByName(LO),_=h?.options,y=h?!!f?.getOptions().sendDefaultPii:!1,{recordInputs:T,recordOutputs:v}=nwt(_,u,l,y);return s[0].experimental_telemetry={...u,isEnabled:l!==void 0?l:!0,recordInputs:T,recordOutputs:v},If(()=>Reflect.apply(o,i,s),R=>{R&&typeof R=="object"&&ns(R,"_sentry_active_span",Hc())},()=>{},R=>{XBt(R)})}});if(Object.prototype.toString.call(t)==="[object Module]"){for(let r of kUe)t[r]!=null&&(t[r]=n(t[r]));return t}else{let r=kUe.reduce((o,i)=>(t[i]!=null&&(o[i]=n(t[i])),o),{});return{...t,...r}}}}});function rwt(e){return!!e.getIntegrationByName("Modules")?.getModules?.()?.ai}var MUe,owt,LUe,UUe=w(()=>{m();At();_r();nee();PUe();MUe=ct(LO,()=>new lG({}));owt=((e={})=>{let t;return{name:LO,options:e,setupOnce(){t=MUe()},afterAllSetup(n){e.force??rwt(n)?gF(n):t?.callWhenPatched(()=>gF(n))}}}),LUe=owt});var fG,iwt,pG,QUe=w(()=>{m();fG=ue(un(),1);At();iwt=[">=4.0.0 <7"],pG=class extends fG.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-openai",er,t)}init(){return new fG.InstrumentationNodeModuleDefinition("openai",iwt,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(BS(uE))return Reflect.construct(r,s);let u=Reflect.construct(r,s);return EF(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 FUe,swt,GUe,jUe=w(()=>{m();At();_r();QUe();FUe=ct(uE,e=>new pG(e)),swt=((e={})=>({name:uE,setupOnce(){FUe(e)}})),GUe=swt});var AG,awt,mG,zUe=w(()=>{m();AG=ue(un(),1);At();awt=[">=0.19.2 <1.0.0"],mG=class extends AG.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-anthropic-ai",er,t)}init(){return new AG.InstrumentationNodeModuleDefinition("@anthropic-ai/sdk",awt,this._patch.bind(this))}_patch(t){let n=t.Anthropic,r=this.getConfig(),o=function(...i){if(BS(cE))return Reflect.construct(n,i);let s=Reflect.construct(n,i);return yF(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 HUe,uwt,$Ue,qUe=w(()=>{m();At();_r();zUe();HUe=ct(cE,e=>new mG(e)),uwt=((e={})=>({name:cE,options:e,setupOnce(){HUe(e)}})),$Ue=uwt});var JR,VUe,gG,YUe=w(()=>{m();JR=ue(un(),1);At();VUe=[">=0.10.0 <2"],gG=class extends JR.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-google-genai",er,t)}init(){return new JR.InstrumentationNodeModuleDefinition("@google/genai",VUe,n=>this._patch(n),n=>n,[new JR.InstrumentationNodeModuleFile("@google/genai/dist/node/index.cjs",VUe,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(BS(lE))return Reflect.construct(n,i);let s=Reflect.construct(n,i);return SF(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 gw(t,"GoogleGenAI",o),t}}});var KUe,cwt,JUe,ZUe=w(()=>{m();At();_r();YUe();KUe=ct(lE,e=>new gG(e)),cwt=((e={})=>({name:lE,setupOnce(){KUe(e)}})),JUe=cwt});function lwt(e,t){return e?Array.isArray(e)?e.includes(t)?e:[...e,t]:typeof e=="object"?[e,t]:e:[t]}function dwt(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,f=lwt(l,t);return u.callbacks=f,Reflect.apply(r,o,i)}})}var QE,hG,_G,WUe=w(()=>{m();QE=ue(un(),1);At();hG=[">=0.1.0 <2.0.0"];_G=class extends QE.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 QE.InstrumentationNodeModuleDefinition(r,hG,this._patch.bind(this),o=>o,[new QE.InstrumentationNodeModuleFile(`${r}/dist/index.cjs`,hG,this._patch.bind(this),o=>o)]));return t.push(new QE.InstrumentationNodeModuleDefinition("langchain",hG,this._patch.bind(this),r=>r,[new QE.InstrumentationNodeModuleFile("langchain/dist/chat_models/universal.cjs",hG,this._patch.bind(this),r=>r)])),t}_patch(t){KY([uE,cE,lE]);let n=CF(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 f=s[l];typeof f=="function"&&(s[l]=dwt(f,n))}}}});var XUe,pwt,eQe,tQe=w(()=>{m();At();_r();WUe();XUe=ct(TF,e=>new _G(e)),pwt=((e={})=>({name:TF,setupOnce(){XUe(e)}})),eQe=pwt});var ZR,nQe,EG,rQe=w(()=>{m();ZR=ue(un(),1);At();nQe=[">=0.0.0 <2.0.0"],EG=class extends ZR.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langgraph",er,t)}init(){return new ZR.InstrumentationNodeModuleDefinition("@langchain/langgraph",nQe,this._patch.bind(this),n=>n,[new ZR.InstrumentationNodeModuleFile("@langchain/langgraph/dist/index.cjs",nQe,this._patch.bind(this),n=>n)])}_patch(t){return t.StateGraph&&typeof t.StateGraph=="function"&&RF(t.StateGraph.prototype,this.getConfig()),t}}});var oQe,fwt,iQe,sQe=w(()=>{m();At();_r();rQe();oQe=ct(vF,e=>new EG(e)),fwt=((e={})=>({name:vF,setupOnce(){oQe(e)}})),iQe=fwt});import*as uQe from"node:net";function cQe(e,t,n,r,o){let s=()=>{},u=o.firestoreSpanCreationHook;typeof u=="function"&&(s=h=>{(0,th.safeExecuteInTheMiddle)(()=>u(h),_=>{_&&Fl.error(_?.message)},!0)});let l=new th.InstrumentationNodeModuleDefinition("@firebase/firestore",t,h=>aQe(h,n,r,e,s)),f=["@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 f)l.files.push(new th.InstrumentationNodeModuleFile(h,t,_=>aQe(_,n,r,e,s),_=>lQe(_,r)));return l}function aQe(e,t,n,r,o){return lQe(e,n),t(e,"addDoc",mwt(r,o)),t(e,"getDocs",gwt(r,o)),t(e,"setDoc",hwt(r,o)),t(e,"deleteDoc",Awt(r,o)),e}function lQe(e,t){for(let n of["addDoc","getDocs","setDoc","deleteDoc"])(0,th.isWrapped)(e[n])&&t(e,n);return e}function mwt(e,t){return function(r){return function(o,i){let s=SG(e,"addDoc",o);return t(s),yG(s,()=>r(o,i))}}}function Awt(e,t){return function(r){return function(o){let i=SG(e,"deleteDoc",o.parent||o);return t(i),yG(i,()=>r(o))}}}function gwt(e,t){return function(r){return function(o){let i=SG(e,"getDocs",o);return t(i),yG(i,()=>r(o))}}}function hwt(e,t){return function(r){return function(o,i,s){let u=SG(e,"setDoc",o.parent||o);return t(u),yG(u,()=>typeof s<"u"?r(o,i,s):r(o,i))}}}function yG(e,t){return We.with(Vt.setSpan(We.active(),e),()=>(0,th.safeExecuteInTheMiddle)(()=>t(),n=>{n&&e.recordException(n),e.end()},!0))}function SG(e,t,n){let r=e.startSpan(`${t} ${n.path}`,{kind:fo.CLIENT});return Ewt(r,n),r.setAttribute(LC,t),r}function _wt(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(uQe.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 Ewt(e,t){let n=t.firestore.app,r=n.options,i=(t.firestore.toJSON()||{}).settings||{},s={[EV]:t.path,[yV]:n.name,[fS]:"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}=_wt(i);u&&(s[xV]=u),l&&(s[DV]=l),e.setAttributes(s)}var th,dQe=w(()=>{m();He();th=ue(un(),1);Xn()});function pQe(e,t,n,r,o){let i=()=>{},s=()=>{},u=o.functions?.errorHook,l=o.functions?.requestHook,f=o.functions?.responseHook;typeof f=="function"&&(s=(y,T)=>{(0,nh.safeExecuteInTheMiddle)(()=>f(y,T),v=>{v&&Fl.error(v?.message)},!0)}),typeof l=="function"&&(i=y=>{(0,nh.safeExecuteInTheMiddle)(()=>l(y),T=>{T&&Fl.error(T?.message)},!0)});let h=new nh.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:y,triggerType:T})=>{h.files.push(new nh.InstrumentationNodeModuleFile(y,t,v=>ywt(v,n,r,e,{requestHook:i,responseHook:s,errorHook:u},T),v=>fQe(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(...f){let h=process.env.FUNCTION_TARGET||process.env.K_SERVICE||"unknown",_=e.startSpan(`firebase.function.${n}`,{kind:fo.SERVER}),y={"faas.name":h,"faas.trigger":n,"faas.provider":"firebase"};return process.env.GCLOUD_PROJECT&&(y["cloud.project_id"]=process.env.GCLOUD_PROJECT),process.env.EVENTARC_CLOUD_EVENT_SOURCE&&(y["cloud.event_source"]=process.env.EVENTARC_CLOUD_EVENT_SOURCE),_.setAttributes(y),t?.requestHook?.(_),We.with(Vt.setSpan(We.active(),_),async()=>{let T,v;try{v=await s.apply(this,f)}catch(R){T=R}if(t?.responseHook?.(_,T),T&&_.recordException(T),_.end(),T)throw await t?.errorHook?.(_,T),T;return v})};return u?o.call(this,u,l):o.call(this,l)}}}function ywt(e,t,n,r,o,i){switch(fQe(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 fQe(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,nh.isWrapped)(e[r])&&t(e,r);return e}var nh,mQe=w(()=>{m();He();nh=ue(un(),1)});var gQe,AQe,Swt,Twt,TG,hQe=w(()=>{m();gQe=ue(un(),1);At();dQe();mQe();AQe={},Swt=[">=3.0.0 <5"],Twt=[">=6.0.0 <7"],TG=class extends gQe.InstrumentationBase{constructor(t=AQe){super("@sentry/instrumentation-firebase",er,t)}setConfig(t={}){super.setConfig({...AQe,...t})}init(){let t=[];return t.push(cQe(this.tracer,Swt,this._wrap,this._unwrap,this.getConfig())),t.push(pQe(this.tracer,Twt,this._wrap,this._unwrap,this.getConfig())),t}}});var _Qe,bwt,EQe,Iwt,yQe,SQe=w(()=>{m();At();_r();hQe();_Qe="Firebase",bwt={firestoreSpanCreationHook:e=>{qr(e,"auto.firebase.otel.firestore"),e.setAttribute(Xt,"db.query")},functions:{requestHook:e=>{qr(e,"auto.firebase.otel.functions"),e.setAttribute(Xt,"http.request")},errorHook:async(e,t)=>{t&&(rn(t,{mechanism:{type:"auto.firebase.otel.functions",handled:!1}}),await Sv(2e3))}}},EQe=ct(_Qe,()=>new TG(bwt)),Iwt=(()=>({name:_Qe,setupOnce(){EQe()}})),yQe=Iwt});function TQe(){return[Cwe(),ike(),wke(),yLe(),EPe(),kPe(),qPe(),oMe(),MMe(),r2e(),tLe(),ALe(),MLe(),KLe(),cUe(),_Ue(),Kke(),wUe(),sPe(),eQe(),iQe(),LUe(),GUe(),$Ue(),JUe(),a2e(),yQe()]}var bQe=w(()=>{m();OUe();qUe();JLe();vwe();uke();SQe();EUe();ZUe();kke();gLe();SLe();Jke();LLe();tQe();sQe();aPe();yPe();PPe();VPe();iMe();jUe();o2e();u2e();nLe();LMe();lUe();UUe()});function CQe(e,t={}){e.getOptions().debug&&lZ();let[n,r]=Cwt(e,t);e.traceProvider=n,e.asyncLocalStorageLookup=r}function Cwt(e,t={}){let n=new IQe.BasicTracerProvider({sampler:new O4(e),resource:(0,bG.defaultResource)().merge((0,bG.resourceFromAttributes)({[NV]:"node",[_V]:"sentry",[BV]:er})),forceFlushTimeoutMillis:500,spanProcessors:[new w4({timeout:vwt(e.getOptions().maxSpanWaitDuration)}),...t.spanProcessors||[]]});Vt.setGlobalTracerProvider(n),mf.setGlobalPropagator(new B4);let r=new P4;return We.setGlobalContextManager(r),[n,r.getAsyncLocalStorageLookup()]}function vwt(e){if(e!=null){if(e>ree)return Ds&&W.warn(`\`maxSpanWaitDuration\` is too high, using the maximum value of ${ree}`),ree;if(e<=0||Number.isNaN(e)){Ds&&W.warn("`maxSpanWaitDuration` must be a positive number, using default value instead.");return}return e}}var bG,IQe,ree,vQe=w(()=>{m();He();bG=ue(bJ(),1),IQe=ue(KJ(),1);Xn();At();_r();Xv();YS();ree=1e6});function RQe(){return j4().filter(t=>t.name!=="Http"&&t.name!=="NodeFetch").concat(twe(),lwe())}function xQe(e){return[...RQe(),...Mi(e)?TQe():[]]}function oee(e={}){return Rwt(e,xQe)}function Rwt(e={},t){wS(e,"node");let n=MZ({...e,defaultIntegrations:e.defaultIntegrations??t(e)});return n&&!e.skipOpenTelemetrySetup&&(CQe(n,{spanProcessors:e.openTelemetrySpanProcessors}),z4()),n}var DQe=w(()=>{m();At();_r();nwe();dwe();bQe();vQe()});var WR=w(()=>{m();DQe();At();_r()});function to(){return xwt}function _u(){return NQe}function BQe(){return Dwt}var xwt,NQe,Dwt,sc=w(()=>{"use strict";m();xwt="prod",NQe="0.1.197",Dwt=`@loredotlink/cli/${NQe}`});function kwt(e=""){if(!wwt.test(e))return e!==e.toLowerCase()}function wQe(e,t){let n=t??Owt,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 f=kwt(u);if(s===!1){if(i===!1&&f===!0){r.push(o),o=u,i=f;continue}if(i===!0&&f===!1&&o.length>1){let h=o.at(-1);r.push(o.slice(0,Math.max(0,o.length-1))),o=h+u,i=f;continue}}o+=u,i=f,s=l}return r.push(o),r}function Pwt(e){return e?e[0].toUpperCase()+e.slice(1):""}function Mwt(e){return e?e[0].toLowerCase()+e.slice(1):""}function Lwt(e,t){return e?(Array.isArray(e)?e:wQe(e)).map(n=>Pwt(t?.normalize?n.toLowerCase():n)).join(""):""}function QO(e,t){return Mwt(Lwt(e||"",t))}function IG(e,t){return e?(Array.isArray(e)?e:wQe(e)).map(n=>n.toLowerCase()).join(t??"-"):""}function OQe(e){return IG(e||"","_")}var wwt,Owt,kQe=w(()=>{m();wwt=/\d/,Owt=["-","_","/","."]});import{parseArgs as Uwt}from"node:util";function xG(e){return Array.isArray(e)?e:e===void 0?[]:[e]}function iee(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 nd(e){return typeof e=="function"?e():e}function Qwt(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 P=O;for(let j of P)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 f(x){if(n.has(x))return"boolean";let O=u.get(x)||[];for(let P of O)if(n.has(P))return"boolean";return"string"}function h(x){if(r.has(x))return!0;let O=u.get(x)||[];for(let P of O)if(r.has(P))return!0;return!1}let _=new Set([...n,...r,...Object.keys(o),...Object.values(o).flat(),...Object.keys(i)]);for(let x of _)l[x]||(l[x]={type:f(x),default:i[x]});for(let[x,O]of s.entries())x.length===1&&l[O]&&!l[O].short&&(l[O].short=x);let y=[],T={};for(let x=0;x<e.length;x++){let O=e[x];if(O==="--"){y.push(...e.slice(x));break}if(O.startsWith("--no-")){let P=O.slice(5);T[P]=!0;continue}y.push(O)}let v;try{v=Uwt({args:y,options:Object.keys(l).length>0?l:void 0,allowPositionals:!0,strict:!1})}catch{v={values:{},positionals:y}}let R={_:[]};R._=v.positionals;for(let[x,O]of Object.entries(v.values)){let P=O;f(x)==="boolean"&&typeof O=="string"?P=O!=="false":h(x)&&typeof O=="boolean"&&(P=""),R[x]=P}for(let[x]of Object.entries(T)){R[x]=!1;let O=s.get(x);O&&(R[O]=!1);let P=u.get(x);if(P)for(let j of P)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 Gwt(e,t){let n={boolean:[],string:[],alias:{},default:{}},r=LQe(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=QO(u.name),f=IG(u.name);if(l!==u.name||f!==u.name){let h=xG(n.alias[u.name]||[]);l!==u.name&&!h.includes(l)&&h.push(l),f!==u.name&&!h.includes(f)&&h.push(f),h.length>0&&(n.alias[u.name]=h)}}let o=Qwt(e,n),[...i]=o._,s=new Proxy(o,{get(u,l){return u[l]??u[QO(l)]??u[IG(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 cT(`Missing required positional argument: ${u.name.toUpperCase()}`,"EARG");s[u.name]=u.default}}else if(u.type==="enum"){let l=s[u.name],f=u.options||[];if(l!==void 0&&f.length>0&&!f.includes(l))throw new cT(`Invalid value for argument: ${Bf(`--${u.name}`)} (${Bf(l)}). Expected one of: ${f.map(h=>Bf(h)).join(", ")}.`,"EARG")}else if(u.required&&s[u.name]===void 0)throw new cT(`Missing required argument: --${u.name}`,"EARG");return s}function LQe(e){let t=[];for(let[n,r]of Object.entries(e||{}))t.push({...r,name:n,alias:xG(r.alias)});return t}async function jwt(e){return Promise.all(e.map(t=>nd(t)))}async function lT(e,t){let n=await nd(e.args||{}),r=Gwt(t.rawArgs,n),o={rawArgs:t.rawArgs,args:r,data:t.data,cmd:e},i=await jwt(e.plugins??[]),s,u;try{for(let h of i)await h.setup?.(o);typeof e.setup=="function"&&await e.setup(o);let f=await nd(e.subCommands);if(f&&Object.keys(f).length>0){let h=zwt(t.rawArgs,n),_=t.rawArgs[h];if(_){let y=await PQe(f,_);if(!y)throw new cT(`Unknown command ${Bf(_)}`,"E_UNKNOWN_COMMAND");await lT(y,{rawArgs:t.rawArgs.slice(h+1)})}else{let y=await nd(e.default);if(y){if(e.run)throw new cT("Cannot specify both 'run' and 'default' on the same command.","E_DEFAULT_CONFLICT");let T=await PQe(f,y);if(!T)throw new cT(`Default sub command ${Bf(y)} not found in subCommands.`,"E_UNKNOWN_COMMAND");await lT(T,{rawArgs:t.rawArgs})}else if(!e.run)throw new cT("No command specified.","E_NO_COMMAND")}}typeof e.run=="function"&&(s=await e.run(o))}catch(f){u=f}let l=[];if(typeof e.cleanup=="function")try{await e.cleanup(o)}catch(f){l.push(f)}for(let f of[...i].reverse())try{await f.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 PQe(e,t){if(t in e)return nd(e[t]);for(let n of Object.values(e)){let r=await nd(n),o=await nd(r?.meta);if(o?.alias&&xG(o.alias).includes(t))return r}}function zwt(e,t){for(let n=0;n<e.length;n++){let r=e[n];if(r==="--")return-1;if(r.startsWith("-")){!r.includes("=")&&Hwt(r,t)&&n++;continue}return n}return-1}function Hwt(e,t){let n=e.replace(/^-{1,2}/,""),r=QO(n);for(let[o,i]of Object.entries(t))if(!(i.type!=="string"&&i.type!=="enum")&&(r===QO(o)||(Array.isArray(i.alias)?i.alias:i.alias?[i.alias]:[]).includes(n)))return!0;return!1}async function aee(e,t){let n=await nd(e.meta||{}),r=LQe(await nd(e.args||{})),o=await nd(t?.meta||{}),i=`${o.name?`${o.name} `:""}`+(n.name||process.argv[1]),s=[],u=[],l=[],f=[];for(let T of r)if(T.type==="positional"){let v=T.name.toUpperCase(),R=T.required!==!1&&T.default===void 0;u.push([Bf(v+see(T)),MQe(T,R)]),f.push(R?`<${v}>`:`[${v}]`)}else{let v=T.required===!0&&T.default===void 0,R=[...(T.alias||[]).map(x=>`-${x}`),`--${T.name}`].join(", ")+see(T);if(s.push([Bf(R),MQe(T,v)]),T.type==="boolean"&&(T.default===!0||T.negativeDescription)&&!$wt.test(T.name)){let x=[...(T.alias||[]).map(O=>`--no-${O}`),`--no-${T.name}`].join(", ");s.push([Bf(x),[T.negativeDescription,v?RG("(Required)"):""].filter(Boolean).join(" ")])}v&&f.push(`--${T.name}`+see(T))}if(e.subCommands){let T=[],v=await nd(e.subCommands);for(let[R,x]of Object.entries(v)){let O=await nd((await nd(x))?.meta);if(O?.hidden)continue;let P=xG(O?.alias),j=[R,...P].join(", ");l.push([Bf(j),O?.description||""]),T.push(R,...P)}f.push(T.join("|"))}let h=[],_=n.version||o.version;h.push(RG(`${n.description} (${i+(_?` v${_}`:"")})`),"");let y=s.length>0||u.length>0;return h.push(`${vG(CG("USAGE"))} ${Bf(`${i}${y?" [OPTIONS]":""} ${f.join(" ")}`)}`,""),u.length>0&&(h.push(vG(CG("ARGUMENTS")),""),h.push(iee(u," ")),h.push("")),s.length>0&&(h.push(vG(CG("OPTIONS")),""),h.push(iee(s," ")),h.push("")),l.length>0&&(h.push(vG(CG("COMMANDS")),""),h.push(iee(l," ")),h.push("",`Use ${Bf(`${i} <command> --help`)} for more information about a command.`)),h.filter(T=>typeof T=="string").join(`
40
40
  `)}function see(e){let t=e.valueHint?`=<${e.valueHint}>`:"",n=t||`=<${OQe(e.name)}>`;return!e.type||e.type==="positional"||e.type==="boolean"?t:e.type==="enum"&&e.options?.length?`=<${e.options.join("|")}>`:n}function MQe(e,t){let n=t?RG("(Required)"):"",r=e.default===void 0?"":RG(`(Default: ${e.default})`);return[e.description,n,r].filter(Boolean).join(" ")}var cT,Fwt,DG,CG,Bf,RG,vG,$wt,uee=w(()=>{m();kQe();cT=class extends Error{code;constructor(e,t){super(e),this.name="CLIError",this.code=t}};Fwt=(()=>{let e=globalThis.process?.env??{};return e.NO_COLOR==="1"||e.TERM==="dumb"||e.TEST||e.CI})(),DG=(e,t=39)=>n=>Fwt?n:`\x1B[${e}m${n}\x1B[${t}m`,CG=DG(1,22),Bf=DG(36),RG=DG(90),vG=DG(4,24);$wt=/^no[-A-Z]/});var cee,UQe,qwt,QQe,QLn,lee=w(()=>{"use strict";m();cee=["free","creator","team"],UQe=typeof process<"u"&&process.env?.NODE_ENV!=="production",qwt={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:UQe?"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:UQe?"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}}]}},QQe=qwt.stripe.plans,QLn=Object.freeze(Object.fromEntries(QQe.map(e=>[e.tier,e])))});var FQe=w(()=>{"use strict";m();lee();lee()});function Ywt(e){HQe=e}function BG(){return HQe}function lt(e,t){let n=wG({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,BG(),FO].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 iOt(e,t){return!!((t==="v4"||!t)&&nOt.test(e)||(t==="v6"||!t)&&rOt.test(e))}function sOt(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 XR(e){if(e instanceof Su){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=wf.create(XR(r))}return new Su({...e._def,shape:()=>t})}else return e instanceof oh?new oh({...e._def,type:XR(e.element)}):e instanceof wf?wf.create(XR(e.unwrap())):e instanceof ih?ih.create(XR(e.unwrap())):e instanceof uA?uA.create(e.items.map(t=>XR(t))):e}function gee(e,t){let n=FE(e),r=FE(t);if(e===t)return{valid:!0,data:e};if(n===at.object&&r===at.object){let o=Tr.objectKeys(t),i=Tr.objectKeys(e).filter(u=>o.indexOf(u)!==-1),s={...e,...t};for(let u of i){let l=gee(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=gee(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 qQe(e,t){return new ST({values:e,typeName:Jt.ZodEnum,...xn(t)})}var Tr,fee,at,FE,Ye,Vwt,el,FO,HQe,wG,Kwt,yu,En,$Qe,ac,mee,Aee,GO,OG,Qt,Ap,GQe,Dn,Jwt,Zwt,Wwt,Xwt,eOt,tOt,nOt,rOt,oOt,GE,dT,pT,fT,mT,ex,AT,gT,jE,rh,Of,tx,oh,Su,hT,NG,kG,_T,uA,PG,nx,rx,MG,ET,yT,ST,TT,zE,rd,wf,ih,bT,ox,ix,aOt,LG,jO,sx,VQe,uOt,Jt,cOt,YQe,KQe,lOt,dOt,JQe,pOt,fOt,mOt,AOt,gOt,hOt,_Ot,EOt,yOt,SOt,TOt,bOt,IOt,COt,vOt,ROt,xOt,DOt,NOt,BOt,wOt,OOt,kOt,POt,jQe,MOt,LOt,UOt,QOt,FOt,GOt,jOt,zOt,HOt,Eu,$Ot,dee,qOt,mp,hee,eUn,tUn,nUn,ZQe,VOt,YOt,KOt,JOt,WQe,XQe,eFe,pee,Tu,ZOt,WOt,XOt,ekt,_ee,Eee,yee,tkt,zQe,nkt,rkt,okt,ikt,See,cA=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})(Tr||(Tr={}));(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(fee||(fee={}));at=Tr.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),FE=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}},Ye=Tr.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"]),Vwt=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),el=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 f=s.path[l];l===s.path.length-1?(u[f]=u[f]||{_errors:[]},u[f]._errors.push(n(s))):u[f]=u[f]||{_errors:[]},u=u[f],l++}}};return o(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,Tr.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()}};el.create=e=>new el(e);FO=(e,t)=>{let n;switch(e.code){case Ye.invalid_type:e.received===at.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Ye.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Tr.jsonStringifyReplacer)}`;break;case Ye.unrecognized_keys:n=`Unrecognized key(s) in object: ${Tr.joinValues(e.keys,", ")}`;break;case Ye.invalid_union:n="Invalid input";break;case Ye.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Tr.joinValues(e.options)}`;break;case Ye.invalid_enum_value:n=`Invalid enum value. Expected ${Tr.joinValues(e.options)}, received '${e.received}'`;break;case Ye.invalid_arguments:n="Invalid function arguments";break;case Ye.invalid_return_type:n="Invalid function return type";break;case Ye.invalid_date:n="Invalid date";break;case Ye.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}"`:Tr.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case Ye.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 Ye.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 Ye.custom:n="Invalid input";break;case Ye.invalid_intersection_types:n="Intersection results could not be merged";break;case Ye.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Ye.not_finite:n="Number must be finite";break;default:n=t.defaultError,Tr.assertNever(e)}return{message:n}},HQe=FO;wG=e=>{let{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],s={...o,path:i},u="",l=r.filter(f=>!!f).slice().reverse();for(let f of l)u=f(s,{data:t,defaultError:u}).message;return{...o,path:i,message:o.message||u}},Kwt=[];yu=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"}),$Qe=e=>({status:"dirty",value:e}),ac=e=>({status:"valid",value:e}),mee=e=>e.status==="aborted",Aee=e=>e.status==="dirty",GO=e=>e.status==="valid",OG=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})(Qt||(Qt={}));Ap=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}},GQe=(e,t)=>{if(GO(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 el(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 FE(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:FE(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new yu,ctx:{common:t.parent.common,data:t.data,parsedType:FE(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let n=this._parse(t);if(OG(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:FE(t)},i=this._parseSync({data:t,path:o.path,parent:o});return GQe(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:FE(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(OG(o)?o:Promise.resolve(o));return GQe(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:Ye.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 rd({schema:this,typeName:Jt.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return wf.create(this,this._def)}nullable(){return ih.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return oh.create(this,this._def)}promise(){return zE.create(this,this._def)}or(t){return hT.create([this,t],this._def)}and(t){return _T.create(this,t,this._def)}transform(t){return new rd({...xn(this._def),schema:this,typeName:Jt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let n=typeof t=="function"?t:()=>t;return new bT({...xn(this._def),innerType:this,defaultValue:n,typeName:Jt.ZodDefault})}brand(){return new LG({typeName:Jt.ZodBranded,type:this,...xn(this._def)})}catch(t){let n=typeof t=="function"?t:()=>t;return new ox({...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 jO.create(this,t)}readonly(){return sx.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Jwt=/^c[^\s-]{8,}$/i,Zwt=/^[a-z][a-z0-9]*$/,Wwt=/[0-9A-HJKMNP-TV-Z]{26}/,Xwt=/^[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,eOt=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,tOt=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u"),nOt=/^(((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}))$/,rOt=/^(([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})))$/,oOt=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$");GE=class e extends Dn{constructor(){super(...arguments),this._regex=(t,n,r)=>this.refinement(o=>t.test(o),{validation:n,code:Ye.invalid_string,...Qt.errToObj(r)}),this.nonempty=t=>this.min(1,Qt.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:Ye.invalid_type,expected:at.string,received:i.parsedType}),En}let r=new yu,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:Ye.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:Ye.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:Ye.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):u&&lt(o,{code:Ye.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")eOt.test(t.data)||(o=this._getOrReturnCtx(t,o),lt(o,{validation:"email",code:Ye.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")tOt.test(t.data)||(o=this._getOrReturnCtx(t,o),lt(o,{validation:"emoji",code:Ye.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")Xwt.test(t.data)||(o=this._getOrReturnCtx(t,o),lt(o,{validation:"uuid",code:Ye.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")Jwt.test(t.data)||(o=this._getOrReturnCtx(t,o),lt(o,{validation:"cuid",code:Ye.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")Zwt.test(t.data)||(o=this._getOrReturnCtx(t,o),lt(o,{validation:"cuid2",code:Ye.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:Ye.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:Ye.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:Ye.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:Ye.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:Ye.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:Ye.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?oOt(i).test(t.data)||(o=this._getOrReturnCtx(t,o),lt(o,{code:Ye.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="ip"?iOt(t.data,i.version)||(o=this._getOrReturnCtx(t,o),lt(o,{validation:"ip",code:Ye.invalid_string,message:i.message}),r.dirty()):Tr.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",...Qt.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Qt.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Qt.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Qt.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Qt.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Qt.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Qt.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Qt.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,...Qt.errToObj(t?.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Qt.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...Qt.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Qt.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Qt.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Qt.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Qt.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Qt.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}};GE.create=e=>{var t;return new GE({checks:[],typeName:Jt.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...xn(e)})};dT=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:Ye.invalid_type,expected:at.number,received:i.parsedType}),En}let r,o=new yu;for(let i of this._def.checks)i.kind==="int"?Tr.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),lt(r,{code:Ye.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:Ye.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:Ye.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?sOt(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),lt(r,{code:Ye.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:Ye.not_finite,message:i.message}),o.dirty()):Tr.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Qt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Qt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Qt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Qt.toString(n))}setLimit(t,n,r,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Qt.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Qt.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Qt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Qt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Qt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Qt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Qt.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Qt.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Qt.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Qt.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"&&Tr.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)}};dT.create=e=>new dT({checks:[],typeName:Jt.ZodNumber,coerce:e?.coerce||!1,...xn(e)});pT=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:Ye.invalid_type,expected:at.bigint,received:i.parsedType}),En}let r,o=new yu;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:Ye.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:Ye.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:Ye.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):Tr.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Qt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Qt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Qt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Qt.toString(n))}setLimit(t,n,r,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Qt.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:Qt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Qt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Qt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Qt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Qt.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}};pT.create=e=>{var t;return new pT({checks:[],typeName:Jt.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...xn(e)})};fT=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:Ye.invalid_type,expected:at.boolean,received:r.parsedType}),En}return ac(t.data)}};fT.create=e=>new fT({typeName:Jt.ZodBoolean,coerce:e?.coerce||!1,...xn(e)});mT=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:Ye.invalid_type,expected:at.date,received:i.parsedType}),En}if(isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return lt(i,{code:Ye.invalid_date}),En}let r=new yu,o;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),lt(o,{code:Ye.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:Ye.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Tr.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:Qt.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Qt.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}};mT.create=e=>new mT({checks:[],coerce:e?.coerce||!1,typeName:Jt.ZodDate,...xn(e)});ex=class extends Dn{_parse(t){if(this._getType(t)!==at.symbol){let r=this._getOrReturnCtx(t);return lt(r,{code:Ye.invalid_type,expected:at.symbol,received:r.parsedType}),En}return ac(t.data)}};ex.create=e=>new ex({typeName:Jt.ZodSymbol,...xn(e)});AT=class extends Dn{_parse(t){if(this._getType(t)!==at.undefined){let r=this._getOrReturnCtx(t);return lt(r,{code:Ye.invalid_type,expected:at.undefined,received:r.parsedType}),En}return ac(t.data)}};AT.create=e=>new AT({typeName:Jt.ZodUndefined,...xn(e)});gT=class extends Dn{_parse(t){if(this._getType(t)!==at.null){let r=this._getOrReturnCtx(t);return lt(r,{code:Ye.invalid_type,expected:at.null,received:r.parsedType}),En}return ac(t.data)}};gT.create=e=>new gT({typeName:Jt.ZodNull,...xn(e)});jE=class extends Dn{constructor(){super(...arguments),this._any=!0}_parse(t){return ac(t.data)}};jE.create=e=>new jE({typeName:Jt.ZodAny,...xn(e)});rh=class extends Dn{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ac(t.data)}};rh.create=e=>new rh({typeName:Jt.ZodUnknown,...xn(e)});Of=class extends Dn{_parse(t){let n=this._getOrReturnCtx(t);return lt(n,{code:Ye.invalid_type,expected:at.never,received:n.parsedType}),En}};Of.create=e=>new Of({typeName:Jt.ZodNever,...xn(e)});tx=class extends Dn{_parse(t){if(this._getType(t)!==at.undefined){let r=this._getOrReturnCtx(t);return lt(r,{code:Ye.invalid_type,expected:at.void,received:r.parsedType}),En}return ac(t.data)}};tx.create=e=>new tx({typeName:Jt.ZodVoid,...xn(e)});oh=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:Ye.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?Ye.too_big:Ye.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:Ye.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:Ye.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 Ap(n,s,n.path,u)))).then(s=>yu.mergeArray(r,s));let i=[...n.data].map((s,u)=>o.type._parseSync(new Ap(n,s,n.path,u)));return yu.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:Qt.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:Qt.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:Qt.toString(n)}})}nonempty(t){return this.min(1,t)}};oh.create=(e,t)=>new oh({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Jt.ZodArray,...xn(t)});Su=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=Tr.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==at.object){let f=this._getOrReturnCtx(t);return lt(f,{code:Ye.invalid_type,expected:at.object,received:f.parsedType}),En}let{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),u=[];if(!(this._def.catchall instanceof Of&&this._def.unknownKeys==="strip"))for(let f in o.data)s.includes(f)||u.push(f);let l=[];for(let f of s){let h=i[f],_=o.data[f];l.push({key:{status:"valid",value:f},value:h._parse(new Ap(o,_,o.path,f)),alwaysSet:f in o.data})}if(this._def.catchall instanceof Of){let f=this._def.unknownKeys;if(f==="passthrough")for(let h of u)l.push({key:{status:"valid",value:h},value:{status:"valid",value:o.data[h]}});else if(f==="strict")u.length>0&&(lt(o,{code:Ye.unrecognized_keys,keys:u}),r.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let f=this._def.catchall;for(let h of u){let _=o.data[h];l.push({key:{status:"valid",value:h},value:f._parse(new Ap(o,_,o.path,h)),alwaysSet:h in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let f=[];for(let h of l){let _=await h.key;f.push({key:_,value:await h.value,alwaysSet:h.alwaysSet})}return f}).then(f=>yu.mergeObjectSync(r,f)):yu.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return Qt.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=Qt.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 Tr.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 Tr.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new e({...this._def,shape:()=>n})}deepPartial(){return XR(this)}partial(t){let n={};return Tr.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 Tr.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof wf;)i=i._def.innerType;n[r]=i}}),new e({...this._def,shape:()=>n})}keyof(){return qQe(Tr.objectKeys(this.shape))}};Su.create=(e,t)=>new Su({shape:()=>e,unknownKeys:"strip",catchall:Of.create(),typeName:Jt.ZodObject,...xn(t)});Su.strictCreate=(e,t)=>new Su({shape:()=>e,unknownKeys:"strict",catchall:Of.create(),typeName:Jt.ZodObject,...xn(t)});Su.lazycreate=(e,t)=>new Su({shape:e,unknownKeys:"strip",catchall:Of.create(),typeName:Jt.ZodObject,...xn(t)});hT=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 el(u.ctx.common.issues));return lt(n,{code:Ye.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 f={...n,common:{...n.common,issues:[]},parent:null},h=l._parseSync({data:n.data,path:n.path,parent:f});if(h.status==="valid")return h;h.status==="dirty"&&!i&&(i={result:h,ctx:f}),f.common.issues.length&&s.push(f.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;let u=s.map(l=>new el(l));return lt(n,{code:Ye.invalid_union,unionErrors:u}),En}}get options(){return this._def.options}};hT.create=(e,t)=>new hT({options:e,typeName:Jt.ZodUnion,...xn(t)});NG=e=>e instanceof ET?NG(e.schema):e instanceof rd?NG(e.innerType()):e instanceof yT?[e.value]:e instanceof ST?e.options:e instanceof TT?Object.keys(e.enum):e instanceof bT?NG(e._def.innerType):e instanceof AT?[void 0]:e instanceof gT?[null]:null,kG=class e extends Dn{_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==at.object)return lt(n,{code:Ye.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:Ye.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=NG(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)})}};_T=class extends Dn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t),o=(i,s)=>{if(mee(i)||mee(s))return En;let u=gee(i.value,s.value);return u.valid?((Aee(i)||Aee(s))&&n.dirty(),{status:n.value,value:u.data}):(lt(r,{code:Ye.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}))}};_T.create=(e,t,n)=>new _T({left:e,right:t,typeName:Jt.ZodIntersection,...xn(n)});uA=class e extends Dn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==at.array)return lt(r,{code:Ye.invalid_type,expected:at.array,received:r.parsedType}),En;if(r.data.length<this._def.items.length)return lt(r,{code:Ye.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:Ye.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 Ap(r,s,r.path,u)):null}).filter(s=>!!s);return r.common.async?Promise.all(i).then(s=>yu.mergeArray(n,s)):yu.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};uA.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new uA({items:e,typeName:Jt.ZodTuple,rest:null,...xn(t)})};PG=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:Ye.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 Ap(r,u,r.path,u)),value:s._parse(new Ap(r,r.data[u],r.path,u))});return r.common.async?yu.mergeObjectAsync(n,o):yu.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:GE.create(),valueType:t,typeName:Jt.ZodRecord,...xn(n)})}},nx=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:Ye.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],f)=>({key:o._parse(new Ap(r,u,r.path,[f,"key"])),value:i._parse(new Ap(r,l,r.path,[f,"value"]))}));if(r.common.async){let u=new Map;return Promise.resolve().then(async()=>{for(let l of s){let f=await l.key,h=await l.value;if(f.status==="aborted"||h.status==="aborted")return En;(f.status==="dirty"||h.status==="dirty")&&n.dirty(),u.set(f.value,h.value)}return{status:n.value,value:u}})}else{let u=new Map;for(let l of s){let f=l.key,h=l.value;if(f.status==="aborted"||h.status==="aborted")return En;(f.status==="dirty"||h.status==="dirty")&&n.dirty(),u.set(f.value,h.value)}return{status:n.value,value:u}}}};nx.create=(e,t,n)=>new nx({valueType:t,keyType:e,typeName:Jt.ZodMap,...xn(n)});rx=class e extends Dn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==at.set)return lt(r,{code:Ye.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:Ye.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:Ye.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 f=new Set;for(let h of l){if(h.status==="aborted")return En;h.status==="dirty"&&n.dirty(),f.add(h.value)}return{status:n.value,value:f}}let u=[...r.data.values()].map((l,f)=>i._parse(new Ap(r,l,r.path,f)));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:Qt.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:Qt.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}};rx.create=(e,t)=>new rx({valueType:e,minSize:null,maxSize:null,typeName:Jt.ZodSet,...xn(t)});MG=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:Ye.invalid_type,expected:at.function,received:n.parsedType}),En;function r(u,l){return wG({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,BG(),FO].filter(f=>!!f),issueData:{code:Ye.invalid_arguments,argumentsError:l}})}function o(u,l){return wG({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,BG(),FO].filter(f=>!!f),issueData:{code:Ye.invalid_return_type,returnTypeError:l}})}let i={errorMap:n.common.contextualErrorMap},s=n.data;if(this._def.returns instanceof zE){let u=this;return ac(async function(...l){let f=new el([]),h=await u._def.args.parseAsync(l,i).catch(T=>{throw f.addIssue(r(l,T)),f}),_=await Reflect.apply(s,this,h);return await u._def.returns._def.type.parseAsync(_,i).catch(T=>{throw f.addIssue(o(_,T)),f})})}else{let u=this;return ac(function(...l){let f=u._def.args.safeParse(l,i);if(!f.success)throw new el([r(l,f.error)]);let h=Reflect.apply(s,this,f.data),_=u._def.returns.safeParse(h,i);if(!_.success)throw new el([o(h,_.error)]);return _.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:uA.create(t).rest(rh.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||uA.create([]).rest(rh.create()),returns:n||rh.create(),typeName:Jt.ZodFunction,...xn(r)})}},ET=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})}};ET.create=(e,t)=>new ET({getter:e,typeName:Jt.ZodLazy,...xn(t)});yT=class extends Dn{_parse(t){if(t.data!==this._def.value){let n=this._getOrReturnCtx(t);return lt(n,{received:n.data,code:Ye.invalid_literal,expected:this._def.value}),En}return{status:"valid",value:t.data}}get value(){return this._def.value}};yT.create=(e,t)=>new yT({value:e,typeName:Jt.ZodLiteral,...xn(t)});ST=class e extends Dn{_parse(t){if(typeof t.data!="string"){let n=this._getOrReturnCtx(t),r=this._def.values;return lt(n,{expected:Tr.joinValues(r),received:n.parsedType,code:Ye.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:Ye.invalid_enum_value,options:r}),En}return ac(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)))}};ST.create=qQe;TT=class extends Dn{_parse(t){let n=Tr.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==at.string&&r.parsedType!==at.number){let o=Tr.objectValues(n);return lt(r,{expected:Tr.joinValues(o),received:r.parsedType,code:Ye.invalid_type}),En}if(n.indexOf(t.data)===-1){let o=Tr.objectValues(n);return lt(r,{received:r.data,code:Ye.invalid_enum_value,options:o}),En}return ac(t.data)}get enum(){return this._def.values}};TT.create=(e,t)=>new TT({values:e,typeName:Jt.ZodNativeEnum,...xn(t)});zE=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:Ye.invalid_type,expected:at.promise,received:n.parsedType}),En;let r=n.parsedType===at.promise?n.data:Promise.resolve(n.data);return ac(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}};zE.create=(e,t)=>new zE({type:e,typeName:Jt.ZodPromise,...xn(t)});rd=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(!GO(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=>GO(s)?Promise.resolve(o.transform(s.value,i)).then(u=>({status:n.value,value:u})):s);Tr.assertNever(o)}};rd.create=(e,t,n)=>new rd({schema:e,typeName:Jt.ZodEffects,effect:t,...xn(n)});rd.createWithPreprocess=(e,t,n)=>new rd({schema:t,effect:{type:"preprocess",transform:e},typeName:Jt.ZodEffects,...xn(n)});wf=class extends Dn{_parse(t){return this._getType(t)===at.undefined?ac(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};wf.create=(e,t)=>new wf({innerType:e,typeName:Jt.ZodOptional,...xn(t)});ih=class extends Dn{_parse(t){return this._getType(t)===at.null?ac(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};ih.create=(e,t)=>new ih({innerType:e,typeName:Jt.ZodNullable,...xn(t)});bT=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}};bT.create=(e,t)=>new bT({innerType:e,typeName:Jt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...xn(t)});ox=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 OG(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new el(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new el(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};ox.create=(e,t)=>new ox({innerType:e,typeName:Jt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...xn(t)});ix=class extends Dn{_parse(t){if(this._getType(t)!==at.nan){let r=this._getOrReturnCtx(t);return lt(r,{code:Ye.invalid_type,expected:at.nan,received:r.parsedType}),En}return{status:"valid",value:t.data}}};ix.create=e=>new ix({typeName:Jt.ZodNaN,...xn(e)});aOt=Symbol("zod_brand"),LG=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}},jO=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(),$Qe(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})}},sx=class extends Dn{_parse(t){let n=this._def.innerType._parse(t);return GO(n)&&(n.value=Object.freeze(n.value)),n}};sx.create=(e,t)=>new sx({innerType:e,typeName:Jt.ZodReadonly,...xn(t)});VQe=(e,t={},n)=>e?jE.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,f=typeof u=="string"?{message:u}:u;o.addIssue({code:"custom",...f,fatal:l})}}):jE.create(),uOt={object:Su.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={}));cOt=(e,t={message:`Input not instance of ${e.name}`})=>VQe(n=>n instanceof e,t),YQe=GE.create,KQe=dT.create,lOt=ix.create,dOt=pT.create,JQe=fT.create,pOt=mT.create,fOt=ex.create,mOt=AT.create,AOt=gT.create,gOt=jE.create,hOt=rh.create,_Ot=Of.create,EOt=tx.create,yOt=oh.create,SOt=Su.create,TOt=Su.strictCreate,bOt=hT.create,IOt=kG.create,COt=_T.create,vOt=uA.create,ROt=PG.create,xOt=nx.create,DOt=rx.create,NOt=MG.create,BOt=ET.create,wOt=yT.create,OOt=ST.create,kOt=TT.create,POt=zE.create,jQe=rd.create,MOt=wf.create,LOt=ih.create,UOt=rd.createWithPreprocess,QOt=jO.create,FOt=()=>YQe().optional(),GOt=()=>KQe().optional(),jOt=()=>JQe().optional(),zOt={string:(e=>GE.create({...e,coerce:!0})),number:(e=>dT.create({...e,coerce:!0})),boolean:(e=>fT.create({...e,coerce:!0})),bigint:(e=>pT.create({...e,coerce:!0})),date:(e=>mT.create({...e,coerce:!0}))},HOt=En,Eu=Object.freeze({__proto__:null,defaultErrorMap:FO,setErrorMap:Ywt,getErrorMap:BG,makeIssue:wG,EMPTY_PATH:Kwt,addIssueToContext:lt,ParseStatus:yu,INVALID:En,DIRTY:$Qe,OK:ac,isAborted:mee,isDirty:Aee,isValid:GO,isAsync:OG,get util(){return Tr},get objectUtil(){return fee},ZodParsedType:at,getParsedType:FE,ZodType:Dn,ZodString:GE,ZodNumber:dT,ZodBigInt:pT,ZodBoolean:fT,ZodDate:mT,ZodSymbol:ex,ZodUndefined:AT,ZodNull:gT,ZodAny:jE,ZodUnknown:rh,ZodNever:Of,ZodVoid:tx,ZodArray:oh,ZodObject:Su,ZodUnion:hT,ZodDiscriminatedUnion:kG,ZodIntersection:_T,ZodTuple:uA,ZodRecord:PG,ZodMap:nx,ZodSet:rx,ZodFunction:MG,ZodLazy:ET,ZodLiteral:yT,ZodEnum:ST,ZodNativeEnum:TT,ZodPromise:zE,ZodEffects:rd,ZodTransformer:rd,ZodOptional:wf,ZodNullable:ih,ZodDefault:bT,ZodCatch:ox,ZodNaN:ix,BRAND:aOt,ZodBranded:LG,ZodPipeline:jO,ZodReadonly:sx,custom:VQe,Schema:Dn,ZodSchema:Dn,late:uOt,get ZodFirstPartyTypeKind(){return Jt},coerce:zOt,any:gOt,array:yOt,bigint:dOt,boolean:JQe,date:pOt,discriminatedUnion:IOt,effect:jQe,enum:OOt,function:NOt,instanceof:cOt,intersection:COt,lazy:BOt,literal:wOt,map:xOt,nan:lOt,nativeEnum:kOt,never:_Ot,null:AOt,nullable:LOt,number:KQe,object:SOt,oboolean:jOt,onumber:GOt,optional:MOt,ostring:FOt,pipeline:QOt,preprocess:UOt,promise:POt,record:ROt,set:DOt,strictObject:TOt,string:YQe,symbol:fOt,transformer:jQe,tuple:vOt,undefined:mOt,union:bOt,unknown:hOt,void:EOt,NEVER:HOt,ZodIssueCode:Ye,quotelessJson:Vwt,ZodError:el}),$Ot=e=>typeof e?.safeParse=="function",dee=e=>typeof e?.passthrough=="function",qOt=(e,t)=>dee(e)?dee(t)?e.merge(t):e:dee(t)?t:Object.assign({},e,t),mp=Eu.object({name:Eu.literal("ZodError"),issues:Eu.array(Eu.object({path:Eu.array(Eu.union([Eu.string(),Eu.number()])),message:Eu.string().optional(),code:Eu.nativeEnum(Eu.ZodIssueCode)}).catchall(Eu.any()))}),hee=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}},eUn=Eu.object({message:Eu.literal("Request validation failed"),pathParameterErrors:mp.nullable(),headerErrors:mp.nullable(),queryParameterErrors:mp.nullable(),bodyErrors:mp.nullable()}),tUn=Eu.object({pathParameterErrors:mp.nullable(),headerErrors:mp.nullable(),queryParameterErrors:mp.nullable(),bodyErrors:mp.nullable()}),nUn=Eu.object({paramsResult:mp.nullable(),headersResult:mp.nullable(),queryResult:mp.nullable(),bodyResult:mp.nullable()}),ZQe="zod-ts-rest-polyfill",VOt=e=>{if(!e)return!1;let t=e?.["~standard"];return t?t.version===1&&typeof t.validate=="function":!1},YOt=e=>VOt(e)?e:$Ot(e)?(Object.assign(e,{"~standard":{vendor:ZQe,version:1,validate:r=>{let o=e.safeParse(r);return o.success?{value:o.data}:{issues:o.error.issues}}}}),e):null,KOt=(e,t)=>e?t?e instanceof Su&&t instanceof Su?qOt(e,t):{...e,...t}:e:t,JOt=(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===ZQe?{error:new el(r.issues)}:{error:new hee(r.issues)}:n&&typeof e=="object"&&r.value?{value:{...e,...r.value}}:{value:r.value}},WQe=Symbol("ContractNoBody"),XQe=e=>"method"in e&&"path"in e,eFe=(e,t)=>Object.fromEntries(Object.entries(e).map(([n,r])=>{var o,i,s;return XQe(r)?[n,{...r,path:t?.pathPrefix?t.pathPrefix+r.path:r.path,headers:KOt(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,eFe(r,t)]})),pee=Symbol("ContractPlainType"),Tu=()=>({router:(e,t)=>eFe(e,t),query:e=>e,mutation:e=>e,responses:e=>e,response:()=>pee,body:()=>pee,type:()=>pee,otherResponse:({contentType:e,body:t})=>({contentType:e,body:t}),noBody:()=>WQe}),ZOt=({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?XOt(e):ekt(e);return n?.length>0?"?"+n:""},XOt=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("&"):"",ekt=e=>e?Object.keys(e).flatMap(t=>_ee(t,e[t])).map(([t,n])=>`${encodeURIComponent(t)}=${encodeURIComponent(n)}`).join("&"):"",_ee=(e,t)=>Array.isArray(t)?t.flatMap((n,r)=>_ee(`${e}[${r}]`,n)):t instanceof Date?[[`${e}`,t.toISOString()]]:t===null?[[`${e}`,""]]:t===void 0?[]:typeof t=="object"?Object.keys(t).flatMap(n=>_ee(`${e}[${n}]`,t[n])):[[`${e}`,`${t}`]],Eee=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}},yee=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 f=e.responses[u.status],h={status:u.status,body:f===WQe?void 0:await u.json(),headers:u.headers},_=YOt(f);if(_&&(i??e.validateResponseOnClient)){let y=JOt(h.body,_);if(y.error)throw y.error;return{...h,body:y.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}},tkt=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},zQe=e=>Object.fromEntries(Object.entries(e).map(([t,n])=>[t.toLowerCase(),n])),nkt=e=>{let{path:t,clientArgs:n,route:r,body:o,query:i,extraInputArgs:s,headers:u,fetchOptions:l}=e,f=n.api||yee,h=n.baseHeaders&&Object.fromEntries(Object.entries(n.baseHeaders).map(([T,v])=>typeof v=="function"?[T,v(e)]:[T,v])),_={...h&&zQe(h),...zQe(u)};Object.keys(_).forEach(T=>{_[T]===void 0&&delete _[T]});let y={route:r,path:t,method:r.method,headers:_,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"?y={...y,contentType:"multipart/form-data",body:o instanceof FormData?o:tkt(o)}:"contentType"in r&&r.contentType==="application/x-www-form-urlencoded"?y={...y,contentType:"application/x-www-form-urlencoded",headers:{"content-type":"application/x-www-form-urlencoded",...y.headers},body:typeof o=="string"?o:new URLSearchParams(o)}:o!=null&&(y={...y,contentType:"application/json",headers:{"content-type":"application/json",...y.headers},body:JSON.stringify(o)})),f({...y,...s})},rkt=(e,t,n)=>{let{query:r,params:o,body:i,headers:s,extraHeaders:u,overrideClientOptions:l,fetchOptions:f,cache:h,next:_,...y}=n||{},T={...t,...l},v=typeof o=="object"?Object.fromEntries(Object.entries(o).map(([x,O])=>[x,String(O)])):{};return{path:okt(r,T.baseUrl,v,e,!!T.jsonQuery),clientArgs:T,route:e,body:i,query:r,extraInputArgs:y,fetchOptions:{...h&&{cache:h},..._&&{next:_},...f},headers:{...u,...s}}},okt=(e,t,n,r,o)=>{let i=ZOt({path:r.path,params:n}),s=WOt(e,o);return t.endsWith("/")&&i.startsWith("/")?`${t}${i.substring(1)}${s}`:`${t}${i}${s}`},ikt=(e,t)=>{let n=Object.keys(e.responses);return async r=>{let o=rkt(e,t,r),i=await nkt(o);if(!t.throwOnUnknownStatus||n.includes(i.status.toString()))return i;throw new Eee(i,n)}},See=(e,t)=>Object.fromEntries(Object.entries(e).map(([n,r])=>XQe(r)?[n,ikt(r,t)]:[n,See(r,t)]))});function ie(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 f=s.prototype,h=Object.keys(f);for(let _=0;_<h.length;_++){let y=h[_];y in u||(u[y]=f[y].bind(u))}}let o=n?.Parent??Object;class i extends o{}Object.defineProperty(i,"name",{value:e});function s(u){var l;let f=n?.Parent?new i:this;r(f,u),(l=f._zod).deferred??(l.deferred=[]);for(let h of f._zod.deferred)h();return f}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(IT,e),IT}var tFe,Tee,bee,kf,HE,IT,CT=w(()=>{m();Tee=Object.freeze({status:"aborted"});bee=Symbol("zod_brand"),kf=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},HE=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(tFe=globalThis).__zod_globalConfig??(tFe.__zod_globalConfig={});IT=globalThis.__zod_globalConfig});var Le={};Zs(Le,{BIGINT_FORMAT_RANGES:()=>Oee,Class:()=>Cee,NUMBER_FORMAT_RANGES:()=>wee,aborted:()=>YE,allowsEval:()=>xee,assert:()=>lkt,assertEqual:()=>skt,assertIs:()=>ukt,assertNever:()=>ckt,assertNotEqual:()=>akt,assignProp:()=>qE,base64ToUint8Array:()=>rFe,base64urlToUint8Array:()=>Rkt,cached:()=>ux,captureStackTrace:()=>QG,cleanEnum:()=>vkt,cleanRegex:()=>$O,clone:()=>uc,cloneDef:()=>pkt,createTransparentProxy:()=>_kt,defineLazy:()=>Hn,esc:()=>UG,escapeRegex:()=>gp,explicitlyAborted:()=>kee,extend:()=>Skt,finalizeIssue:()=>cc,floatSafeRemainder:()=>vee,getElementAtPath:()=>fkt,getEnumValues:()=>HO,getLengthableOrigin:()=>YO,getParsedType:()=>hkt,getSizableOrigin:()=>VO,hexToUint8Array:()=>Dkt,isObject:()=>vT,isPlainObject:()=>VE,issue:()=>cx,joinValues:()=>de,jsonStringifyReplacer:()=>ax,merge:()=>bkt,mergeDefs:()=>sh,normalizeParams:()=>qe,nullish:()=>$E,numKeys:()=>gkt,objectClone:()=>dkt,omit:()=>ykt,optionalKeys:()=>Bee,parsedType:()=>ke,partial:()=>Ikt,pick:()=>Ekt,prefixIssues:()=>tl,primitiveTypes:()=>Nee,promiseAllObject:()=>mkt,propertyKeyTypes:()=>qO,randomString:()=>Akt,required:()=>Ckt,safeExtend:()=>Tkt,shallowClone:()=>Dee,slugify:()=>Ree,stringifyPrimitive:()=>Oe,uint8ArrayToBase64:()=>oFe,uint8ArrayToBase64url:()=>xkt,uint8ArrayToHex:()=>Nkt,unwrapMessage:()=>zO});function skt(e){return e}function akt(e){return e}function ukt(e){}function ckt(e){throw new Error("Unexpected value in exhaustive check")}function lkt(e){}function HO(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=>Oe(n)).join(t)}function ax(e,t){return typeof t=="bigint"?t.toString():t}function ux(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function $E(e){return e==null}function $O(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function vee(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!==nFe)return r===void 0&&(r=nFe,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function dkt(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function qE(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function sh(...e){let t={};for(let n of e){let r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function pkt(e){return sh(e._zod.def)}function fkt(e,t){return t?t.reduce((n,r)=>n?.[r],e):e}function mkt(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 Akt(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let r=0;r<e;r++)n+=t[Math.floor(Math.random()*t.length)];return n}function UG(e){return JSON.stringify(e)}function Ree(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function vT(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function VE(e){if(vT(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(vT(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Dee(e){return VE(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function gkt(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function gp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function uc(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function qe(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 _kt(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 Oe(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Bee(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function Ekt(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=sh(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 qE(this,"shape",s),s},checks:[]});return uc(e,i)}function ykt(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=sh(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 qE(this,"shape",s),s},checks:[]});return uc(e,i)}function Skt(e,t){if(!VE(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=sh(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return qE(this,"shape",i),i}});return uc(e,o)}function Tkt(e,t){if(!VE(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=sh(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t};return qE(this,"shape",r),r}});return uc(e,n)}function bkt(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=sh(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t._zod.def.shape};return qE(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return uc(e,n)}function Ikt(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=sh(t._zod.def,{get shape(){let u=t._zod.def.shape,l={...u};if(n)for(let f in n){if(!(f in u))throw new Error(`Unrecognized key: "${f}"`);n[f]&&(l[f]=e?new e({type:"optional",innerType:u[f]}):u[f])}else for(let f in u)l[f]=e?new e({type:"optional",innerType:u[f]}):u[f];return qE(this,"shape",l),l},checks:[]});return uc(t,s)}function Ckt(e,t,n){let r=sh(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 qE(this,"shape",i),i}});return uc(t,r)}function YE(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 kee(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 tl(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function zO(e){return typeof e=="string"?e:e?.message}function cc(e,t,n){let r=e.message?e.message:zO(e.inst?._zod.def?.error?.(e))??zO(t?.error?.(e))??zO(n.customError?.(e))??zO(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 VO(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function YO(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function ke(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 cx(...e){let[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}function vkt(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function rFe(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 oFe(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function Rkt(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return rFe(t+n)}function xkt(e){return oFe(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Dkt(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 Nkt(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var nFe,QG,xee,hkt,qO,Nee,wee,Oee,Cee,St=w(()=>{m();CT();nFe=Symbol("evaluating");QG="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};xee=ux(()=>{if(IT.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});hkt=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}`)}},qO=new Set(["string","number","symbol"]),Nee=new Set(["string","number","bigint","boolean","symbol","undefined"]);wee={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]},Oee={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};Cee=class{constructor(...t){}}});function JO(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 ZO(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,f=0;for(;f<u.length;){let h=u[f];f===u.length-1?(l[h]=l[h]||{_errors:[]},l[h]._errors.push(t(s))):l[h]=l[h]||{_errors:[]},l=l[h],f++}}}};return r(e),n}function Pee(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(f=>r({issues:f},[...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 f=[...i,...l.path];if(f.length===0){n.errors.push(t(l));continue}let h=n,_=0;for(;_<f.length;){let y=f[_],T=_===f.length-1;typeof y=="string"?(h.properties??(h.properties={}),(s=h.properties)[y]??(s[y]={errors:[]}),h=h.properties[y]):(h.items??(h.items=[]),(u=h.items)[y]??(u[y]={errors:[]}),h=h.items[y]),T&&h.errors.push(t(l)),_++}}};return r(e),n}function sFe(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 Mee(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 ${sFe(r.path)}`);return t.join(`
41
41
  `)}var iFe,KO,nl,Lee=w(()=>{m();CT();St();iFe=(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,ax,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},KO=ie("$ZodError",iFe),nl=ie("$ZodError",iFe,{Parent:Error})});var lx,FG,dx,GG,px,Uee,fx,Qee,jG,wkt,zG,Okt,HG,kkt,$G,Pkt,qG,Mkt,VG,Lkt,YG,Ukt,KG,Qkt,Fee=w(()=>{m();CT();Lee();St();lx=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 kf;if(s.issues.length){let u=new(o?.Err??e)(s.issues.map(l=>cc(l,i,bi())));throw QG(u,o?.callee),u}return s.value},FG=lx(nl),dx=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=>cc(l,i,bi())));throw QG(u,o?.callee),u}return s.value},GG=dx(nl),px=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 kf;return i.issues.length?{success:!1,error:new(e??KO)(i.issues.map(s=>cc(s,o,bi())))}:{success:!0,data:i.value}},Uee=px(nl),fx=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=>cc(s,o,bi())))}:{success:!0,data:i.value}},Qee=fx(nl),jG=e=>(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return lx(e)(t,n,o)},wkt=jG(nl),zG=e=>(t,n,r)=>lx(e)(t,n,r),Okt=zG(nl),HG=e=>async(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return dx(e)(t,n,o)},kkt=HG(nl),$G=e=>async(t,n,r)=>dx(e)(t,n,r),Pkt=$G(nl),qG=e=>(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return px(e)(t,n,o)},Mkt=qG(nl),VG=e=>(t,n,r)=>px(e)(t,n,r),Lkt=VG(nl),YG=e=>async(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return fx(e)(t,n,o)},Ukt=YG(nl),KG=e=>async(t,n,r)=>fx(e)(t,n,r),Qkt=KG(nl)});var od={};Zs(od,{base64:()=>nte,base64url:()=>JG,bigint:()=>cte,boolean:()=>dte,browserEmail:()=>Vkt,cidrv4:()=>ete,cidrv6:()=>tte,cuid:()=>Gee,cuid2:()=>jee,date:()=>ite,datetime:()=>ate,domain:()=>Jkt,duration:()=>Vee,e164:()=>ote,email:()=>Kee,emoji:()=>Jee,extendedDuration:()=>Fkt,guid:()=>Yee,hex:()=>Zkt,hostname:()=>Kkt,html5Email:()=>Hkt,httpProtocol:()=>rte,idnEmail:()=>qkt,integer:()=>lte,ipv4:()=>Zee,ipv6:()=>Wee,ksuid:()=>$ee,lowercase:()=>mte,mac:()=>Xee,md5_base64:()=>Xkt,md5_base64url:()=>ePt,md5_hex:()=>Wkt,nanoid:()=>qee,null:()=>pte,number:()=>ZG,rfc5322Email:()=>$kt,sha1_base64:()=>nPt,sha1_base64url:()=>rPt,sha1_hex:()=>tPt,sha256_base64:()=>iPt,sha256_base64url:()=>sPt,sha256_hex:()=>oPt,sha384_base64:()=>uPt,sha384_base64url:()=>cPt,sha384_hex:()=>aPt,sha512_base64:()=>dPt,sha512_base64url:()=>pPt,sha512_hex:()=>lPt,string:()=>ute,time:()=>ste,ulid:()=>zee,undefined:()=>fte,unicodeEmail:()=>aFe,uppercase:()=>Ate,uuid:()=>RT,uuid4:()=>Gkt,uuid6:()=>jkt,uuid7:()=>zkt,xid:()=>Hee});function Jee(){return new RegExp(Ykt,"u")}function cFe(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 ste(e){return new RegExp(`^${cFe(e)}$`)}function ate(e){let t=cFe({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(`^${uFe}T(?:${r})$`)}function WO(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function XO(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var Gee,jee,zee,Hee,$ee,qee,Vee,Fkt,Yee,RT,Gkt,jkt,zkt,Kee,Hkt,$kt,aFe,qkt,Vkt,Ykt,Zee,Wee,Xee,ete,tte,nte,JG,Kkt,Jkt,rte,ote,uFe,ite,ute,cte,lte,ZG,dte,pte,fte,mte,Ate,Zkt,Wkt,Xkt,ePt,tPt,nPt,rPt,oPt,iPt,sPt,aPt,uPt,cPt,lPt,dPt,pPt,WG=w(()=>{m();St();Gee=/^[cC][0-9a-z]{6,}$/,jee=/^[0-9a-z]+$/,zee=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Hee=/^[0-9a-vA-V]{20}$/,$ee=/^[A-Za-z0-9]{27}$/,qee=/^[a-zA-Z0-9_-]{21}$/,Vee=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Fkt=/^[-+]?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)?)??$/,Yee=/^([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})$/,RT=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)$/,Gkt=RT(4),jkt=RT(6),zkt=RT(7),Kee=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Hkt=/^[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])?)*$/,$kt=/^(([^<>()\[\]\\.,;:\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,}))$/,aFe=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,qkt=aFe,Vkt=/^[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])?)*$/,Ykt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";Zee=/^(?:(?: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])$/,Wee=/^(([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}|:))$/,Xee=e=>{let t=gp(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},ete=/^((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])$/,tte=/^(([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])$/,nte=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,JG=/^[A-Za-z0-9_-]*$/,Kkt=/^(?=.{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])?)*\.?$/,Jkt=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,rte=/^https?$/,ote=/^\+[1-9]\d{6,14}$/,uFe="(?:(?:\\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])))",ite=new RegExp(`^${uFe}$`);ute=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},cte=/^-?\d+n?$/,lte=/^-?\d+$/,ZG=/^-?\d+(?:\.\d+)?$/,dte=/^(?:true|false)$/i,pte=/^null$/i,fte=/^undefined$/i,mte=/^[^A-Z]*$/,Ate=/^[^a-z]*$/,Zkt=/^[0-9a-fA-F]*$/;Wkt=/^[0-9a-fA-F]{32}$/,Xkt=WO(22,"=="),ePt=XO(22),tPt=/^[0-9a-fA-F]{40}$/,nPt=WO(27,"="),rPt=XO(27),oPt=/^[0-9a-fA-F]{64}$/,iPt=WO(43,"="),sPt=XO(43),aPt=/^[0-9a-fA-F]{96}$/,uPt=WO(64,""),cPt=XO(64),lPt=/^[0-9a-fA-F]{128}$/,dPt=WO(86,"=="),pPt=XO(86)});function lFe(e,t,n){e.issues.length&&t.issues.push(...tl(n,e.issues))}var no,dFe,XG,ej,gte,hte,_te,Ete,yte,Ste,Tte,bte,Ite,mx,Cte,vte,Rte,xte,Dte,Nte,Bte,wte,Ote,tj=w(()=>{m();CT();WG();St();no=ie("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),dFe={number:"number",bigint:"bigint",object:"date"},XG=ie("$ZodCheckLessThan",(e,t)=>{no.init(e,t);let n=dFe[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})}}),ej=ie("$ZodCheckGreaterThan",(e,t)=>{no.init(e,t);let n=dFe[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})}}),gte=ie("$ZodCheckMultipleOf",(e,t)=>{no.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):vee(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})}}),hte=ie("$ZodCheckNumberFormat",(e,t)=>{no.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),r=n?"int":"number",[o,i]=wee[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=lte)}),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})}}),_te=ie("$ZodCheckBigIntFormat",(e,t)=>{no.init(e,t);let[n,r]=Oee[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})}}),Ete=ie("$ZodCheckMaxSize",(e,t)=>{var n;no.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!$E(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:VO(o),code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),yte=ie("$ZodCheckMinSize",(e,t)=>{var n;no.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!$E(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:VO(o),code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Ste=ie("$ZodCheckSizeEquals",(e,t)=>{var n;no.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!$E(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:VO(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})}}),Tte=ie("$ZodCheckMaxLength",(e,t)=>{var n;no.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!$E(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=YO(o);r.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),bte=ie("$ZodCheckMinLength",(e,t)=>{var n;no.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!$E(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=YO(o);r.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Ite=ie("$ZodCheckLengthEquals",(e,t)=>{var n;no.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!$E(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=YO(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})}}),mx=ie("$ZodCheckStringFormat",(e,t)=>{var n,r;no.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=()=>{})}),Cte=ie("$ZodCheckRegex",(e,t)=>{mx.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})}}),vte=ie("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=mte),mx.init(e,t)}),Rte=ie("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Ate),mx.init(e,t)}),xte=ie("$ZodCheckIncludes",(e,t)=>{no.init(e,t);let n=gp(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})}}),Dte=ie("$ZodCheckStartsWith",(e,t)=>{no.init(e,t);let n=new RegExp(`^${gp(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})}}),Nte=ie("$ZodCheckEndsWith",(e,t)=>{no.init(e,t);let n=new RegExp(`.*${gp(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})}});Bte=ie("$ZodCheckProperty",(e,t)=>{no.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=>lFe(o,n,t.property));lFe(r,n,t.property)}}),wte=ie("$ZodCheckMimeType",(e,t)=>{no.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})}}),Ote=ie("$ZodCheckOverwrite",(e,t)=>{no.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}})});var ek,kte=w(()=>{m();ek=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(`
@@ -101,7 +101,7 @@ Mongoose Error Code: ${t.code}`:""}`})}function LW(e,t,n,r=void 0){n&&(0,cO.safe
101
101
 
102
102
  `)}T.write("payload.value = newResult;"),T.write("return payload;");let P=T.compile();return(j,G)=>P(y,j,G)},i,s=vT,u=!IT.jitless,f=u&&xee.value,h=t.catchall,_;e._zod.parse=(y,T)=>{_??(_=r.value);let v=y.value;return s(v)?u&&f&&T?.async===!1&&T.jitless!==!0?(i||(i=o(t.shape)),y=i(y,T),h?NFe([],v,y,T,_,e):y):n(y,T):(y.issues.push({expected:"object",code:"invalid_type",input:v,inst:e}),y)}});nk=ie("$ZodUnion",(e,t)=>{cn.init(e,t),Hn(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),Hn(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),Hn(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),Hn(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){let r=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${r.map(o=>$O(o.source)).join("|")})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,o)=>{if(n)return n(r,o);let i=!1,s=[];for(let u of t.options){let l=u._zod.run({value:r.value,issues:[]},o);if(l instanceof Promise)s.push(l),i=!0;else{if(l.issues.length===0)return l;s.push(l)}}return i?Promise.all(s).then(u=>mFe(u,r,e,o)):mFe(s,r,e,o)}});Tne=ie("$ZodXor",(e,t)=>{nk.init(e,t),t.inclusive=!1;let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,o)=>{if(n)return n(r,o);let i=!1,s=[];for(let u of t.options){let l=u._zod.run({value:r.value,issues:[]},o);l instanceof Promise?(s.push(l),i=!0):s.push(l)}return i?Promise.all(s).then(u=>AFe(u,r,e,o)):AFe(s,r,e,o)}}),bne=ie("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,nk.init(e,t);let n=e._zod.parse;Hn(e._zod,"propValues",()=>{let o={};for(let i of t.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[u,l]of Object.entries(s)){o[u]||(o[u]=new Set);for(let f of l)o[u].add(f)}}return o});let r=ux(()=>{let o=t.options,i=new Map;for(let s of o){let u=s._zod.propValues?.[t.discriminator];if(!u||u.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let l of u){if(i.has(l))throw new Error(`Duplicate discriminator value "${String(l)}"`);i.set(l,s)}}return i});e._zod.parse=(o,i)=>{let s=o.value;if(!vT(s))return o.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),o;let u=r.value.get(s?.[t.discriminator]);return u?u._zod.run(o,i):t.unionFallback||i.direction==="backward"?n(o,i):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(r.value.keys()),input:s,path:[t.discriminator],inst:e}),o)}}),Ine=ie("$ZodIntersection",(e,t)=>{cn.init(e,t),e._zod.parse=(n,r)=>{let o=n.value,i=t.left._zod.run({value:o,issues:[]},r),s=t.right._zod.run({value:o,issues:[]},r);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([l,f])=>gFe(n,l,f)):gFe(n,i,s)}});uj=ie("$ZodTuple",(e,t)=>{cn.init(e,t);let n=t.items;e._zod.parse=(r,o)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),r;r.value=[];let s=[],u=hFe(n,"optin"),l=hFe(n,"optout");if(!t.rest){if(i.length<u)return r.issues.push({code:"too_small",minimum:u,inclusive:!0,input:i,inst:e,origin:"array"}),r;i.length>n.length&&r.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:i,inst:e,origin:"array"})}let f=new Array(n.length);for(let h=0;h<n.length;h++){let _=n[h]._zod.run({value:i[h],issues:[]},o);_ instanceof Promise?s.push(_.then(y=>{f[h]=y})):f[h]=_}if(t.rest){let h=n.length-1,_=i.slice(n.length);for(let y of _){h++;let T=t.rest._zod.run({value:y,issues:[]},o);T instanceof Promise?s.push(T.then(v=>_Fe(v,r,h))):_Fe(T,r,h)}}return s.length?Promise.all(s).then(()=>EFe(f,r,n,i,l)):EFe(f,r,n,i,l)}});Cne=ie("$ZodRecord",(e,t)=>{cn.init(e,t),e._zod.parse=(n,r)=>{let o=n.value;if(!VE(o))return n.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),n;let i=[],s=t.keyType._zod.values;if(s){n.value={};let u=new Set;for(let f of s)if(typeof f=="string"||typeof f=="number"||typeof f=="symbol"){u.add(typeof f=="number"?f.toString():f);let h=t.keyType._zod.run({value:f,issues:[]},r);if(h instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(h.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:h.issues.map(T=>cc(T,r,bi())),input:f,path:[f],inst:e});continue}let _=h.value,y=t.valueType._zod.run({value:o[f],issues:[]},r);y instanceof Promise?i.push(y.then(T=>{T.issues.length&&n.issues.push(...tl(f,T.issues)),n.value[_]=T.value})):(y.issues.length&&n.issues.push(...tl(f,y.issues)),n.value[_]=y.value)}let l;for(let f in o)u.has(f)||(l=l??[],l.push(f));l&&l.length>0&&n.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:l})}else{n.value={};for(let u of Reflect.ownKeys(o)){if(u==="__proto__"||!Object.prototype.propertyIsEnumerable.call(o,u))continue;let l=t.keyType._zod.run({value:u,issues:[]},r);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof u=="string"&&ZG.test(u)&&l.issues.length){let _=t.keyType._zod.run({value:Number(u),issues:[]},r);if(_ instanceof Promise)throw new Error("Async schemas not supported in object keys currently");_.issues.length===0&&(l=_)}if(l.issues.length){t.mode==="loose"?n.value[u]=o[u]:n.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(_=>cc(_,r,bi())),input:u,path:[u],inst:e});continue}let h=t.valueType._zod.run({value:o[u],issues:[]},r);h instanceof Promise?i.push(h.then(_=>{_.issues.length&&n.issues.push(...tl(u,_.issues)),n.value[l.value]=_.value})):(h.issues.length&&n.issues.push(...tl(u,h.issues)),n.value[l.value]=h.value)}}return i.length?Promise.all(i).then(()=>n):n}}),vne=ie("$ZodMap",(e,t)=>{cn.init(e,t),e._zod.parse=(n,r)=>{let o=n.value;if(!(o instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:o,inst:e}),n;let i=[];n.value=new Map;for(let[s,u]of o){let l=t.keyType._zod.run({value:s,issues:[]},r),f=t.valueType._zod.run({value:u,issues:[]},r);l instanceof Promise||f instanceof Promise?i.push(Promise.all([l,f]).then(([h,_])=>{yFe(h,_,n,s,o,e,r)})):yFe(l,f,n,s,o,e,r)}return i.length?Promise.all(i).then(()=>n):n}});Rne=ie("$ZodSet",(e,t)=>{cn.init(e,t),e._zod.parse=(n,r)=>{let o=n.value;if(!(o instanceof Set))return n.issues.push({input:o,inst:e,expected:"set",code:"invalid_type"}),n;let i=[];n.value=new Set;for(let s of o){let u=t.valueType._zod.run({value:s,issues:[]},r);u instanceof Promise?i.push(u.then(l=>SFe(l,n))):SFe(u,n)}return i.length?Promise.all(i).then(()=>n):n}});xne=ie("$ZodEnum",(e,t)=>{cn.init(e,t);let n=HO(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(o=>qO.has(typeof o)).map(o=>typeof o=="string"?gp(o):o.toString()).join("|")})$`),e._zod.parse=(o,i)=>{let s=o.value;return r.has(s)||o.issues.push({code:"invalid_value",values:n,input:s,inst:e}),o}}),Dne=ie("$ZodLiteral",(e,t)=>{if(cn.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?gp(r):r?gp(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,o)=>{let i=r.value;return n.has(i)||r.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),r}}),Nne=ie("$ZodFile",(e,t)=>{cn.init(e,t),e._zod.parse=(n,r)=>{let o=n.value;return o instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:o,inst:e}),n}}),Bne=ie("$ZodTransform",(e,t)=>{cn.init(e,t),e._zod.optin="optional",e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new HE(e.constructor.name);let o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(s=>(n.value=s,n.fallback=!0,n));if(o instanceof Promise)throw new kf;return n.value=o,n.fallback=!0,n}});cj=ie("$ZodOptional",(e,t)=>{cn.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Hn(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Hn(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${$O(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){let o=n.value,i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(s=>TFe(s,o)):TFe(i,o)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),wne=ie("$ZodExactOptional",(e,t)=>{cj.init(e,t),Hn(e._zod,"values",()=>t.innerType._zod.values),Hn(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),One=ie("$ZodNullable",(e,t)=>{cn.init(e,t),Hn(e._zod,"optin",()=>t.innerType._zod.optin),Hn(e._zod,"optout",()=>t.innerType._zod.optout),Hn(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${$O(n.source)}|null)$`):void 0}),Hn(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),kne=ie("$ZodDefault",(e,t)=>{cn.init(e,t),e._zod.optin="optional",Hn(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;let o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>bFe(i,t)):bFe(o,t)}});Pne=ie("$ZodPrefault",(e,t)=>{cn.init(e,t),e._zod.optin="optional",Hn(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),Mne=ie("$ZodNonOptional",(e,t)=>{cn.init(e,t),Hn(e._zod,"values",()=>{let n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{let o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>IFe(i,e)):IFe(o,e)}});Lne=ie("$ZodSuccess",(e,t)=>{cn.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new HE("ZodSuccess");let o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>(n.value=i.issues.length===0,n)):(n.value=o.issues.length===0,n)}}),Une=ie("$ZodCatch",(e,t)=>{cn.init(e,t),e._zod.optin="optional",Hn(e._zod,"optout",()=>t.innerType._zod.optout),Hn(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);let o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(s=>cc(s,r,bi()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(i=>cc(i,r,bi()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),Qne=ie("$ZodNaN",(e,t)=>{cn.init(e,t),e._zod.parse=(n,r)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n)}),lj=ie("$ZodPipe",(e,t)=>{cn.init(e,t),Hn(e._zod,"values",()=>t.in._zod.values),Hn(e._zod,"optin",()=>t.in._zod.optin),Hn(e._zod,"optout",()=>t.out._zod.optout),Hn(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){let i=t.out._zod.run(n,r);return i instanceof Promise?i.then(s=>nj(s,t.in,r)):nj(i,t.in,r)}let o=t.in._zod.run(n,r);return o instanceof Promise?o.then(i=>nj(i,t.out,r)):nj(o,t.out,r)}});rk=ie("$ZodCodec",(e,t)=>{cn.init(e,t),Hn(e._zod,"values",()=>t.in._zod.values),Hn(e._zod,"optin",()=>t.in._zod.optin),Hn(e._zod,"optout",()=>t.out._zod.optout),Hn(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if((r.direction||"forward")==="forward"){let i=t.in._zod.run(n,r);return i instanceof Promise?i.then(s=>rj(s,t,r)):rj(i,t,r)}else{let i=t.out._zod.run(n,r);return i instanceof Promise?i.then(s=>rj(s,t,r)):rj(i,t,r)}}});Fne=ie("$ZodPreprocess",(e,t)=>{lj.init(e,t)}),Gne=ie("$ZodReadonly",(e,t)=>{cn.init(e,t),Hn(e._zod,"propValues",()=>t.innerType._zod.propValues),Hn(e._zod,"values",()=>t.innerType._zod.values),Hn(e._zod,"optin",()=>t.innerType?._zod?.optin),Hn(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);let o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(CFe):CFe(o)}});jne=ie("$ZodTemplateLiteral",(e,t)=>{cn.init(e,t);let n=[];for(let r of t.parts)if(typeof r=="object"&&r!==null){if(!r._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...r._zod.traits].shift()}`);let o=r._zod.pattern instanceof RegExp?r._zod.pattern.source:r._zod.pattern;if(!o)throw new Error(`Invalid template literal part: ${r._zod.traits}`);let i=o.startsWith("^")?1:0,s=o.endsWith("$")?o.length-1:o.length;n.push(o.slice(i,s))}else if(r===null||Nee.has(typeof r))n.push(gp(`${r}`));else throw new Error(`Invalid template literal part: ${r}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(r,o)=>typeof r.value!="string"?(r.issues.push({input:r.value,inst:e,expected:"string",code:"invalid_type"}),r):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(r.value)||r.issues.push({input:r.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),r)}),zne=ie("$ZodFunction",(e,t)=>(cn.init(e,t),e._def=t,e._zod.def=t,e.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return function(...r){let o=e._def.input?FG(e._def.input,r):r,i=Reflect.apply(n,this,o);return e._def.output?FG(e._def.output,i):i}},e.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return async function(...r){let o=e._def.input?await GG(e._def.input,r):r,i=await Reflect.apply(n,this,o);return e._def.output?await GG(e._def.output,i):i}},e._zod.parse=(n,r)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n):(e._def.output&&e._def.output._zod.def.type==="promise"?n.value=e.implementAsync(n.value):n.value=e.implement(n.value),n),e.input=(...n)=>{let r=e.constructor;return Array.isArray(n[0])?new r({type:"function",input:new uj({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new r({type:"function",input:n[0],output:e._def.output})},e.output=n=>{let r=e.constructor;return new r({type:"function",input:e._def.input,output:n})},e)),Hne=ie("$ZodPromise",(e,t)=>{cn.init(e,t),e._zod.parse=(n,r)=>Promise.resolve(n.value).then(o=>t.innerType._zod.run({value:o,issues:[]},r))}),$ne=ie("$ZodLazy",(e,t)=>{cn.init(e,t),Hn(e._zod,"innerType",()=>{let n=t;return n._cachedInner||(n._cachedInner=t.getter()),n._cachedInner}),Hn(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),Hn(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),Hn(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),Hn(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,r)=>e._zod.innerType._zod.run(n,r)}),qne=ie("$ZodCustom",(e,t)=>{no.init(e,t),cn.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{let r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(i=>vFe(i,n,r,e));vFe(o,n,r,e)}})});function wFe(){return{localeError:mPt()}}var mPt,OFe=w(()=>{m();St();mPt=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(o){return e[o]??null}let n={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},r={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${o.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${u}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${i}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${u}`}case"invalid_value":return o.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${Oe(o.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${de(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${o.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${o.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${o.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${o.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${o.minimum.toString()} ${s.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${o.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${o.prefix}"`:i.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${i.suffix}"`:i.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${i.includes}"`:i.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${i.pattern}`:`${n[i.format]??o.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${o.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${o.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${o.keys.length>1?"\u0629":""}: ${de(o.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${o.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${o.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}}});function kFe(){return{localeError:APt()}}var APt,PFe=w(()=>{m();St();APt=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(o){return e[o]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${o.expected}, daxil olan ${u}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${i}, daxil olan ${u}`}case"invalid_value":return o.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${Oe(o.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${de(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${o.origin??"d\u0259y\u0259r"} ${i}${o.maximum.toString()} ${s.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${o.origin??"d\u0259y\u0259r"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${o.origin} ${i}${o.minimum.toString()} ${s.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${n[i.format]??o.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${o.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${o.keys.length>1?"lar":""}: ${de(o.keys,", ")}`;case"invalid_key":return`${o.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${o.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}}});function MFe(e,t,n,r){let o=Math.abs(e),i=o%10,s=o%100;return s>=11&&s<=19?r:i===1?t:i>=2&&i<=4?n:r}function LFe(){return{localeError:gPt()}}var gPt,UFe=w(()=>{m();St();gPt=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(o){return e[o]??null}let n={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},r={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${o.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${u}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${i}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${u}`}case"invalid_value":return o.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${Oe(o.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${de(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s){let u=Number(o.maximum),l=MFe(u,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${o.maximum.toString()} ${l}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s){let u=Number(o.minimum),l=MFe(u,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${o.minimum.toString()} ${l}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${n[i.format]??o.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${o.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${de(o.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${o.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${o.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}}});function QFe(){return{localeError:hPt()}}var hPt,FFe=w(()=>{m();St();hPt=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(o){return e[o]??null}let n={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},r={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${o.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${u}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${u}`}case"invalid_value":return o.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${Oe(o.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${de(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${o.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${o.minimum.toString()} ${s.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${i.prefix}"`;if(i.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${i.suffix}"`;if(i.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${i.includes}"`;if(i.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${i.pattern}`;let s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return i.format==="emoji"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="datetime"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="date"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),i.format==="time"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="duration"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${s} ${n[i.format]??o.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${o.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${o.keys.length>1?"\u043E\u0432\u0435":""}: ${de(o.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${o.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${o.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}}});function GFe(){return{localeError:_Pt()}}var _Pt,jFe=w(()=>{m();St();_Pt=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(o){return e[o]??null}let n={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},r={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${o.expected}, s'ha rebut ${u}`:`Tipus inv\xE0lid: s'esperava ${i}, s'ha rebut ${u}`}case"invalid_value":return o.values.length===1?`Valor inv\xE0lid: s'esperava ${Oe(o.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${de(o.values," o ")}`;case"too_big":{let i=o.inclusive?"com a m\xE0xim":"menys de",s=t(o.origin);return s?`Massa gran: s'esperava que ${o.origin??"el valor"} contingu\xE9s ${i} ${o.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${o.origin??"el valor"} fos ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?"com a m\xEDnim":"m\xE9s de",s=t(o.origin);return s?`Massa petit: s'esperava que ${o.origin} contingu\xE9s ${i} ${o.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${o.origin} fos ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${n[i.format]??o.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${o.divisor}`;case"unrecognized_keys":return`Clau${o.keys.length>1?"s":""} no reconeguda${o.keys.length>1?"s":""}: ${de(o.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${o.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${o.origin}`;default:return"Entrada inv\xE0lida"}}}});function zFe(){return{localeError:EPt()}}var EPt,HFe=w(()=>{m();St();EPt=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(o){return e[o]??null}let n={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},r={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${o.expected}, obdr\u017Eeno ${u}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${i}, obdr\u017Eeno ${u}`}case"invalid_value":return o.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${Oe(o.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${de(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${o.origin??"hodnota"} mus\xED m\xEDt ${i}${o.maximum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${o.origin??"hodnota"} mus\xED b\xFDt ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${o.origin??"hodnota"} mus\xED m\xEDt ${i}${o.minimum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${o.origin??"hodnota"} mus\xED b\xFDt ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${n[i.format]??o.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${o.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${de(o.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${o.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${o.origin}`;default:return"Neplatn\xFD vstup"}}}});function $Fe(){return{localeError:yPt()}}var yPt,qFe=w(()=>{m();St();yPt=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(o){return e[o]??null}let n={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},r={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Ugyldigt input: forventede instanceof ${o.expected}, fik ${u}`:`Ugyldigt input: forventede ${i}, fik ${u}`}case"invalid_value":return o.values.length===1?`Ugyldig v\xE6rdi: forventede ${Oe(o.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${de(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin),u=r[o.origin]??o.origin;return s?`For stor: forventede ${u??"value"} ${s.verb} ${i} ${o.maximum.toString()} ${s.unit??"elementer"}`:`For stor: forventede ${u??"value"} havde ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin),u=r[o.origin]??o.origin;return s?`For lille: forventede ${u} ${s.verb} ${i} ${o.minimum.toString()} ${s.unit}`:`For lille: forventede ${u} havde ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ugyldig streng: skal starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: skal ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: skal indeholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${n[i.format]??o.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${de(o.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${o.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${o.origin}`;default:return"Ugyldigt input"}}}});function VFe(){return{localeError:SPt()}}var SPt,YFe=w(()=>{m();St();SPt=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(o){return e[o]??null}let n={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},r={nan:"NaN",number:"Zahl",array:"Array"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${o.expected}, erhalten ${u}`:`Ung\xFCltige Eingabe: erwartet ${i}, erhalten ${u}`}case"invalid_value":return o.values.length===1?`Ung\xFCltige Eingabe: erwartet ${Oe(o.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${de(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Zu gro\xDF: erwartet, dass ${o.origin??"Wert"} ${i}${o.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${o.origin??"Wert"} ${i}${o.maximum.toString()} ist`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Zu klein: erwartet, dass ${o.origin} ${i}${o.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${o.origin} ${i}${o.minimum.toString()} ist`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${n[i.format]??o.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${o.divisor} sein`;case"unrecognized_keys":return`${o.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${de(o.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${o.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${o.origin}`;default:return"Ung\xFCltige Eingabe"}}}});function KFe(){return{localeError:TPt()}}var TPt,JFe=w(()=>{m();St();TPt=()=>{let e={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function t(o){return e[o]??null}let n={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},r={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return typeof o.expected=="string"&&/^[A-Z]/.test(o.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${o.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${u}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${i}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${u}`}case"invalid_value":return o.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${Oe(o.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${de(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${o.maximum.toString()} ${s.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${o.minimum.toString()} ${s.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${i.prefix}"`:i.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${i.suffix}"`:i.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${i.includes}"`:i.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${i.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${n[i.format]??o.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${o.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${o.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${o.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${de(o.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${o.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${o.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}}});function dj(){return{localeError:bPt()}}var bPt,Yne=w(()=>{m();St();bPt=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(o){return e[o]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return`Invalid input: expected ${i}, received ${u}`}case"invalid_value":return o.values.length===1?`Invalid input: expected ${Oe(o.values[0])}`:`Invalid option: expected one of ${de(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Too big: expected ${o.origin??"value"} to have ${i}${o.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${o.origin??"value"} to be ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Too small: expected ${o.origin} to have ${i}${o.minimum.toString()} ${s.unit}`:`Too small: expected ${o.origin} to be ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Invalid string: must start with "${i.prefix}"`:i.format==="ends_with"?`Invalid string: must end with "${i.suffix}"`:i.format==="includes"?`Invalid string: must include "${i.includes}"`:i.format==="regex"?`Invalid string: must match pattern ${i.pattern}`:`Invalid ${n[i.format]??o.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${o.divisor}`;case"unrecognized_keys":return`Unrecognized key${o.keys.length>1?"s":""}: ${de(o.keys,", ")}`;case"invalid_key":return`Invalid key in ${o.origin}`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`Invalid discriminator value. Expected ${o.options.map(s=>`'${s}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${o.origin}`;default:return"Invalid input"}}}});function ZFe(){return{localeError:IPt()}}var IPt,WFe=w(()=>{m();St();IPt=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(o){return e[o]??null}let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},r={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${o.expected}, ricevi\u011Dis ${u}`:`Nevalida enigo: atendi\u011Dis ${i}, ricevi\u011Dis ${u}`}case"invalid_value":return o.values.length===1?`Nevalida enigo: atendi\u011Dis ${Oe(o.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${de(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${i}${o.maximum.toString()} ${s.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Tro malgranda: atendi\u011Dis ke ${o.origin} havu ${i}${o.minimum.toString()} ${s.unit}`:`Tro malgranda: atendi\u011Dis ke ${o.origin} estu ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${i.prefix}"`:i.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${i.suffix}"`:i.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${i.includes}"`:i.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${i.pattern}`:`Nevalida ${n[i.format]??o.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${o.divisor}`;case"unrecognized_keys":return`Nekonata${o.keys.length>1?"j":""} \u015Dlosilo${o.keys.length>1?"j":""}: ${de(o.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${o.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${o.origin}`;default:return"Nevalida enigo"}}}});function XFe(){return{localeError:CPt()}}var CPt,e4e=w(()=>{m();St();CPt=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(o){return e[o]??null}let n={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},r={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${o.expected}, recibido ${u}`:`Entrada inv\xE1lida: se esperaba ${i}, recibido ${u}`}case"invalid_value":return o.values.length===1?`Entrada inv\xE1lida: se esperaba ${Oe(o.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${de(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin),u=r[o.origin]??o.origin;return s?`Demasiado grande: se esperaba que ${u??"valor"} tuviera ${i}${o.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${u??"valor"} fuera ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin),u=r[o.origin]??o.origin;return s?`Demasiado peque\xF1o: se esperaba que ${u} tuviera ${i}${o.minimum.toString()} ${s.unit}`:`Demasiado peque\xF1o: se esperaba que ${u} fuera ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${i.prefix}"`:i.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${i.suffix}"`:i.format==="includes"?`Cadena inv\xE1lida: debe incluir "${i.includes}"`:i.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${i.pattern}`:`Inv\xE1lido ${n[i.format]??o.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${o.divisor}`;case"unrecognized_keys":return`Llave${o.keys.length>1?"s":""} desconocida${o.keys.length>1?"s":""}: ${de(o.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${r[o.origin]??o.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${r[o.origin]??o.origin}`;default:return"Entrada inv\xE1lida"}}}});function t4e(){return{localeError:vPt()}}var vPt,n4e=w(()=>{m();St();vPt=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(o){return e[o]??null}let n={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},r={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${o.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${u} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${i} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${u} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return o.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${Oe(o.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${de(o.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${o.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${o.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${o.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${o.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${o.origin} \u0628\u0627\u06CC\u062F ${i}${o.minimum.toString()} ${s.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${o.origin} \u0628\u0627\u06CC\u062F ${i}${o.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${n[i.format]??o.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${o.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${o.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${de(o.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${o.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${o.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}}});function r4e(){return{localeError:RPt()}}var RPt,o4e=w(()=>{m();St();RPt=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(o){return e[o]??null}let n={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},r={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Virheellinen tyyppi: odotettiin instanceof ${o.expected}, oli ${u}`:`Virheellinen tyyppi: odotettiin ${i}, oli ${u}`}case"invalid_value":return o.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${Oe(o.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${de(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${i}${o.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${i}${o.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${n[i.format]??o.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${o.divisor} monikerta`;case"unrecognized_keys":return`${o.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${de(o.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}}});function i4e(){return{localeError:xPt()}}var xPt,s4e=w(()=>{m();St();xPt=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(o){return e[o]??null}let n={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},r={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Entr\xE9e invalide : instanceof ${o.expected} attendu, ${u} re\xE7u`:`Entr\xE9e invalide : ${i} attendu, ${u} re\xE7u`}case"invalid_value":return o.values.length===1?`Entr\xE9e invalide : ${Oe(o.values[0])} attendu`:`Option invalide : une valeur parmi ${de(o.values,"|")} attendue`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Trop grand : ${r[o.origin]??"valeur"} doit ${s.verb} ${i}${o.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${r[o.origin]??"valeur"} doit \xEAtre ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Trop petit : ${r[o.origin]??"valeur"} doit ${s.verb} ${i}${o.minimum.toString()} ${s.unit}`:`Trop petit : ${r[o.origin]??"valeur"} doit \xEAtre ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${i.pattern}`:`${n[i.format]??o.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${o.divisor}`;case"unrecognized_keys":return`Cl\xE9${o.keys.length>1?"s":""} non reconnue${o.keys.length>1?"s":""} : ${de(o.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${o.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${o.origin}`;default:return"Entr\xE9e invalide"}}}});function a4e(){return{localeError:DPt()}}var DPt,u4e=w(()=>{m();St();DPt=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(o){return e[o]??null}let n={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},r={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Entr\xE9e invalide : attendu instanceof ${o.expected}, re\xE7u ${u}`:`Entr\xE9e invalide : attendu ${i}, re\xE7u ${u}`}case"invalid_value":return o.values.length===1?`Entr\xE9e invalide : attendu ${Oe(o.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${de(o.values,"|")}`;case"too_big":{let i=o.inclusive?"\u2264":"<",s=t(o.origin);return s?`Trop grand : attendu que ${o.origin??"la valeur"} ait ${i}${o.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${o.origin??"la valeur"} soit ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?"\u2265":">",s=t(o.origin);return s?`Trop petit : attendu que ${o.origin} ait ${i}${o.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${o.origin} soit ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${n[i.format]??o.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${o.divisor}`;case"unrecognized_keys":return`Cl\xE9${o.keys.length>1?"s":""} non reconnue${o.keys.length>1?"s":""} : ${de(o.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${o.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${o.origin}`;default:return"Entr\xE9e invalide"}}}});function c4e(){return{localeError:NPt()}}var NPt,l4e=w(()=>{m();St();NPt=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},n=f=>f?e[f]:void 0,r=f=>{let h=n(f);return h?h.label:f??e.unknown.label},o=f=>`\u05D4${r(f)}`,i=f=>(n(f)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",s=f=>f?t[f]??null:null,u={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},l={nan:"NaN"};return f=>{switch(f.code){case"invalid_type":{let h=f.expected,_=l[h??""]??r(h),y=ke(f.input),T=l[y]??e[y]?.label??y;return/^[A-Z]/.test(f.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${f.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${T}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${_}, \u05D4\u05EA\u05E7\u05D1\u05DC ${T}`}case"invalid_value":{if(f.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${Oe(f.values[0])}`;let h=f.values.map(T=>Oe(T));if(f.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${h[0]} \u05D0\u05D5 ${h[1]}`;let _=h[h.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${h.slice(0,-1).join(", ")} \u05D0\u05D5 ${_}`}case"too_big":{let h=s(f.origin),_=o(f.origin??"value");if(f.origin==="string")return`${h?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${_} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${f.maximum.toString()} ${h?.unit??""} ${f.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(f.origin==="number"){let v=f.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${f.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${f.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${_} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${v}`}if(f.origin==="array"||f.origin==="set"){let v=f.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",R=f.inclusive?`${f.maximum} ${h?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${f.maximum} ${h?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${_} ${v} \u05DC\u05D4\u05DB\u05D9\u05DC ${R}`.trim()}let y=f.inclusive?"<=":"<",T=i(f.origin??"value");return h?.unit?`${h.longLabel} \u05DE\u05D3\u05D9: ${_} ${T} ${y}${f.maximum.toString()} ${h.unit}`:`${h?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${_} ${T} ${y}${f.maximum.toString()}`}case"too_small":{let h=s(f.origin),_=o(f.origin??"value");if(f.origin==="string")return`${h?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${_} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${f.minimum.toString()} ${h?.unit??""} ${f.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(f.origin==="number"){let v=f.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${f.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${f.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${_} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${v}`}if(f.origin==="array"||f.origin==="set"){let v=f.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(f.minimum===1&&f.inclusive){let x=(f.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${_} ${v} \u05DC\u05D4\u05DB\u05D9\u05DC ${x}`}let R=f.inclusive?`${f.minimum} ${h?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${f.minimum} ${h?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${_} ${v} \u05DC\u05D4\u05DB\u05D9\u05DC ${R}`.trim()}let y=f.inclusive?">=":">",T=i(f.origin??"value");return h?.unit?`${h.shortLabel} \u05DE\u05D3\u05D9: ${_} ${T} ${y}${f.minimum.toString()} ${h.unit}`:`${h?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${_} ${T} ${y}${f.minimum.toString()}`}case"invalid_format":{let h=f;if(h.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${h.prefix}"`;if(h.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${h.suffix}"`;if(h.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${h.includes}"`;if(h.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${h.pattern}`;let _=u[h.format],y=_?.label??h.format,v=(_?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${y} \u05DC\u05D0 ${v}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${f.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${f.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${f.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${de(f.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${o(f.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}}});function d4e(){return{localeError:BPt()}}var BPt,p4e=w(()=>{m();St();BPt=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(o){return e[o]??null}let n={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},r={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${o.expected}, a primljeno je ${u}`:`Neispravan unos: o\u010Dekuje se ${i}, a primljeno je ${u}`}case"invalid_value":return o.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${Oe(o.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${de(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin),u=r[o.origin]??o.origin;return s?`Preveliko: o\u010Dekivano da ${u??"vrijednost"} ima ${i}${o.maximum.toString()} ${s.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${u??"vrijednost"} bude ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin),u=r[o.origin]??o.origin;return s?`Premalo: o\u010Dekivano da ${u} ima ${i}${o.minimum.toString()} ${s.unit}`:`Premalo: o\u010Dekivano da ${u} bude ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${i.prefix}"`:i.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${i.suffix}"`:i.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${i.includes}"`:i.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${i.pattern}`:`Neispravna ${n[i.format]??o.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${o.divisor}`;case"unrecognized_keys":return`Neprepoznat${o.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${de(o.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${r[o.origin]??o.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${r[o.origin]??o.origin}`;default:return"Neispravan unos"}}}});function f4e(){return{localeError:wPt()}}var wPt,m4e=w(()=>{m();St();wPt=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(o){return e[o]??null}let n={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},r={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${o.expected}, a kapott \xE9rt\xE9k ${u}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${i}, a kapott \xE9rt\xE9k ${u}`}case"invalid_value":return o.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${Oe(o.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${de(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`T\xFAl nagy: ${o.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${o.maximum.toString()} ${s.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${o.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${o.origin} m\xE9rete t\xFAl kicsi ${i}${o.minimum.toString()} ${s.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${o.origin} t\xFAl kicsi ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${n[i.format]??o.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${o.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${o.keys.length>1?"s":""}: ${de(o.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${o.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${o.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}}});function A4e(e,t,n){return Math.abs(e)===1?t:n}function Ax(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],n=e[e.length-1];return e+(t.includes(n)?"\u0576":"\u0568")}function g4e(){return{localeError:OPt()}}var OPt,h4e=w(()=>{m();St();OPt=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(o){return e[o]??null}let n={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},r={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${o.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${u}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${i}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${u}`}case"invalid_value":return o.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${Oe(o.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${de(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s){let u=Number(o.maximum),l=A4e(u,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Ax(o.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${o.maximum.toString()} ${l}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Ax(o.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s){let u=Number(o.minimum),l=A4e(u,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Ax(o.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${o.minimum.toString()} ${l}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Ax(o.origin)} \u056C\u056B\u0576\u056B ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${i.prefix}"-\u0578\u057E`:i.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${i.suffix}"-\u0578\u057E`:i.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${i.includes}"`:i.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${i.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${n[i.format]??o.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${o.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${o.keys.length>1?"\u0576\u0565\u0580":""}. ${de(o.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${Ax(o.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${Ax(o.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}}});function _4e(){return{localeError:kPt()}}var kPt,E4e=w(()=>{m();St();kPt=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(o){return e[o]??null}let n={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Input tidak valid: diharapkan instanceof ${o.expected}, diterima ${u}`:`Input tidak valid: diharapkan ${i}, diterima ${u}`}case"invalid_value":return o.values.length===1?`Input tidak valid: diharapkan ${Oe(o.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${de(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Terlalu besar: diharapkan ${o.origin??"value"} memiliki ${i}${o.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${o.origin??"value"} menjadi ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Terlalu kecil: diharapkan ${o.origin} memiliki ${i}${o.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${o.origin} menjadi ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${n[i.format]??o.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${o.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${o.keys.length>1?"s":""}: ${de(o.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${o.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${o.origin}`;default:return"Input tidak valid"}}}});function y4e(){return{localeError:PPt()}}var PPt,S4e=w(()=>{m();St();PPt=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(o){return e[o]??null}let n={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},r={nan:"NaN",number:"n\xFAmer",array:"fylki"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${u} \xFEar sem \xE1 a\xF0 vera instanceof ${o.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${u} \xFEar sem \xE1 a\xF0 vera ${i}`}case"invalid_value":return o.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${Oe(o.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${de(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin??"gildi"} hafi ${i}${o.maximum.toString()} ${s.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin??"gildi"} s\xE9 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin} hafi ${i}${o.minimum.toString()} ${s.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin} s\xE9 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${i.prefix}"`:i.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${i.suffix}"`:i.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${i.includes}"`:i.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${i.pattern}`:`Rangt ${n[i.format]??o.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${o.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${o.keys.length>1?"ir lyklar":"ur lykill"}: ${de(o.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${o.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${o.origin}`;default:return"Rangt gildi"}}}});function T4e(){return{localeError:MPt()}}var MPt,b4e=w(()=>{m();St();MPt=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(o){return e[o]??null}let n={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},r={nan:"NaN",number:"numero",array:"vettore"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Input non valido: atteso instanceof ${o.expected}, ricevuto ${u}`:`Input non valido: atteso ${i}, ricevuto ${u}`}case"invalid_value":return o.values.length===1?`Input non valido: atteso ${Oe(o.values[0])}`:`Opzione non valida: atteso uno tra ${de(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Troppo grande: ${o.origin??"valore"} deve avere ${i}${o.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${o.origin??"valore"} deve essere ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Troppo piccolo: ${o.origin} deve avere ${i}${o.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${o.origin} deve essere ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Input non valido: ${n[i.format]??o.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${o.divisor}`;case"unrecognized_keys":return`Chiav${o.keys.length>1?"i":"e"} non riconosciut${o.keys.length>1?"e":"a"}: ${de(o.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${o.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${o.origin}`;default:return"Input non valido"}}}});function I4e(){return{localeError:LPt()}}var LPt,C4e=w(()=>{m();St();LPt=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(o){return e[o]??null}let n={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},r={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${o.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${u}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${i}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${u}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return o.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${Oe(o.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${de(o.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let i=o.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",s=t(o.origin);return s?`\u5927\u304D\u3059\u304E\u308B\u5024: ${o.origin??"\u5024"}\u306F${o.maximum.toString()}${s.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${o.origin??"\u5024"}\u306F${o.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let i=o.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",s=t(o.origin);return s?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${o.origin}\u306F${o.minimum.toString()}${s.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${o.origin}\u306F${o.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${n[i.format]??o.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${o.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${o.keys.length>1?"\u7FA4":""}: ${de(o.keys,"\u3001")}`;case"invalid_key":return`${o.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${o.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}}});function v4e(){return{localeError:UPt()}}var UPt,R4e=w(()=>{m();St();UPt=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(o){return e[o]??null}let n={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},r={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${o.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${u}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${u}`}case"invalid_value":return o.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${Oe(o.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${de(o.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${s.verb} ${i}${o.maximum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin} ${s.verb} ${i}${o.minimum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin} \u10D8\u10E7\u10DD\u10E1 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.prefix}"-\u10D8\u10D7`:i.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.suffix}"-\u10D8\u10D7`:i.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${i.includes}"-\u10E1`:i.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${i.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${n[i.format]??o.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${o.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${o.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${de(o.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${o.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${o.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}}});function pj(){return{localeError:QPt()}}var QPt,Kne=w(()=>{m();St();QPt=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(o){return e[o]??null}let n={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},r={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${o.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${u}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${u}`}case"invalid_value":return o.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${Oe(o.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${de(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${o.maximum.toString()} ${s.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin} ${i} ${o.minimum.toString()} ${s.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin} ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${i.prefix}"`:i.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${i.suffix}"`:i.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${i.includes}"`:i.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${n[i.format]??o.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${o.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${de(o.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${o.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${o.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}}});function x4e(){return pj()}var D4e=w(()=>{m();Kne()});function N4e(){return{localeError:FPt()}}var FPt,B4e=w(()=>{m();St();FPt=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(o){return e[o]??null}let n={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},r={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${o.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${u}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${i}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${u}\uC785\uB2C8\uB2E4`}case"invalid_value":return o.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${Oe(o.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${de(o.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let i=o.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",u=t(o.origin),l=u?.unit??"\uC694\uC18C";return u?`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${o.maximum.toString()}${l} ${i}${s}`:`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${o.maximum.toString()} ${i}${s}`}case"too_small":{let i=o.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",u=t(o.origin),l=u?.unit??"\uC694\uC18C";return u?`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${o.minimum.toString()}${l} ${i}${s}`:`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${o.minimum.toString()} ${i}${s}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${n[i.format]??o.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${o.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${de(o.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${o.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${o.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}}});function w4e(e){let t=Math.abs(e),n=t%10,r=t%100;return r>=11&&r<=19||n===0?"many":n===1?"one":"few"}function O4e(){return{localeError:GPt()}}var ok,GPt,k4e=w(()=>{m();St();ok=e=>e.charAt(0).toUpperCase()+e.slice(1);GPt=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(o,i,s,u){let l=e[o]??null;return l===null?l:{unit:l.unit[i],verb:l.verb[u][s?"inclusive":"notInclusive"]}}let n={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},r={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Gautas tipas ${u}, o tik\u0117tasi - instanceof ${o.expected}`:`Gautas tipas ${u}, o tik\u0117tasi - ${i}`}case"invalid_value":return o.values.length===1?`Privalo b\u016Bti ${Oe(o.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${de(o.values,"|")} pasirinkim\u0173`;case"too_big":{let i=r[o.origin]??o.origin,s=t(o.origin,w4e(Number(o.maximum)),o.inclusive??!1,"smaller");if(s?.verb)return`${ok(i??o.origin??"reik\u0161m\u0117")} ${s.verb} ${o.maximum.toString()} ${s.unit??"element\u0173"}`;let u=o.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${ok(i??o.origin??"reik\u0161m\u0117")} turi b\u016Bti ${u} ${o.maximum.toString()} ${s?.unit}`}case"too_small":{let i=r[o.origin]??o.origin,s=t(o.origin,w4e(Number(o.minimum)),o.inclusive??!1,"bigger");if(s?.verb)return`${ok(i??o.origin??"reik\u0161m\u0117")} ${s.verb} ${o.minimum.toString()} ${s.unit??"element\u0173"}`;let u=o.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${ok(i??o.origin??"reik\u0161m\u0117")} turi b\u016Bti ${u} ${o.minimum.toString()} ${s?.unit}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${i.prefix}"`:i.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${i.suffix}"`:i.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${i.includes}"`:i.format==="regex"?`Eilut\u0117 privalo atitikti ${i.pattern}`:`Neteisingas ${n[i.format]??o.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${o.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${o.keys.length>1?"i":"as"} rakt${o.keys.length>1?"ai":"as"}: ${de(o.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let i=r[o.origin]??o.origin;return`${ok(i??o.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}}});function P4e(){return{localeError:jPt()}}var jPt,M4e=w(()=>{m();St();jPt=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(o){return e[o]??null}let n={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},r={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${o.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${u}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${u}`}case"invalid_value":return o.values.length===1?`Invalid input: expected ${Oe(o.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${de(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${i}${o.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin} \u0434\u0430 \u0438\u043C\u0430 ${i}${o.minimum.toString()} ${s.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${i.pattern}`:`Invalid ${n[i.format]??o.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${de(o.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${o.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${o.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}}});function L4e(){return{localeError:zPt()}}var zPt,U4e=w(()=>{m();St();zPt=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(o){return e[o]??null}let n={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},r={nan:"NaN",number:"nombor"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Input tidak sah: dijangka instanceof ${o.expected}, diterima ${u}`:`Input tidak sah: dijangka ${i}, diterima ${u}`}case"invalid_value":return o.values.length===1?`Input tidak sah: dijangka ${Oe(o.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${de(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Terlalu besar: dijangka ${o.origin??"nilai"} ${s.verb} ${i}${o.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${o.origin??"nilai"} adalah ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Terlalu kecil: dijangka ${o.origin} ${s.verb} ${i}${o.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${o.origin} adalah ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${n[i.format]??o.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${o.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${de(o.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${o.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${o.origin}`;default:return"Input tidak sah"}}}});function Q4e(){return{localeError:HPt()}}var HPt,F4e=w(()=>{m();St();HPt=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(o){return e[o]??null}let n={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},r={nan:"NaN",number:"getal"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Ongeldige invoer: verwacht instanceof ${o.expected}, ontving ${u}`:`Ongeldige invoer: verwacht ${i}, ontving ${u}`}case"invalid_value":return o.values.length===1?`Ongeldige invoer: verwacht ${Oe(o.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${de(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin),u=o.origin==="date"?"laat":o.origin==="string"?"lang":"groot";return s?`Te ${u}: verwacht dat ${o.origin??"waarde"} ${i}${o.maximum.toString()} ${s.unit??"elementen"} ${s.verb}`:`Te ${u}: verwacht dat ${o.origin??"waarde"} ${i}${o.maximum.toString()} is`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin),u=o.origin==="date"?"vroeg":o.origin==="string"?"kort":"klein";return s?`Te ${u}: verwacht dat ${o.origin} ${i}${o.minimum.toString()} ${s.unit} ${s.verb}`:`Te ${u}: verwacht dat ${o.origin} ${i}${o.minimum.toString()} is`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${n[i.format]??o.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${o.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${o.keys.length>1?"s":""}: ${de(o.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${o.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${o.origin}`;default:return"Ongeldige invoer"}}}});function G4e(){return{localeError:$Pt()}}var $Pt,j4e=w(()=>{m();St();$Pt=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(o){return e[o]??null}let n={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},r={nan:"NaN",number:"tall",array:"liste"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Ugyldig input: forventet instanceof ${o.expected}, fikk ${u}`:`Ugyldig input: forventet ${i}, fikk ${u}`}case"invalid_value":return o.values.length===1?`Ugyldig verdi: forventet ${Oe(o.values[0])}`:`Ugyldig valg: forventet en av ${de(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`For stor(t): forventet ${o.origin??"value"} til \xE5 ha ${i}${o.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${o.origin??"value"} til \xE5 ha ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`For lite(n): forventet ${o.origin} til \xE5 ha ${i}${o.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${o.origin} til \xE5 ha ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${n[i.format]??o.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${de(o.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${o.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${o.origin}`;default:return"Ugyldig input"}}}});function z4e(){return{localeError:qPt()}}var qPt,H4e=w(()=>{m();St();qPt=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(o){return e[o]??null}let n={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},r={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`F\xE2sit giren: umulan instanceof ${o.expected}, al\u0131nan ${u}`:`F\xE2sit giren: umulan ${i}, al\u0131nan ${u}`}case"invalid_value":return o.values.length===1?`F\xE2sit giren: umulan ${Oe(o.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${de(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Fazla b\xFCy\xFCk: ${o.origin??"value"}, ${i}${o.maximum.toString()} ${s.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${o.origin??"value"}, ${i}${o.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Fazla k\xFC\xE7\xFCk: ${o.origin}, ${i}${o.minimum.toString()} ${s.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${o.origin}, ${i}${o.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let i=o;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${n[i.format]??o.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${o.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${o.keys.length>1?"s":""}: ${de(o.keys,", ")}`;case"invalid_key":return`${o.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${o.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}}});function $4e(){return{localeError:VPt()}}var VPt,q4e=w(()=>{m();St();VPt=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(o){return e[o]??null}let n={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},r={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${o.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${u} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${i} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${u} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return o.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${Oe(o.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${de(o.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${o.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${o.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${o.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${o.maximum.toString()} \u0648\u064A`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${o.origin} \u0628\u0627\u06CC\u062F ${i}${o.minimum.toString()} ${s.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${o.origin} \u0628\u0627\u06CC\u062F ${i}${o.minimum.toString()} \u0648\u064A`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${n[i.format]??o.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${o.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${o.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${de(o.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${o.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${o.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}}});function V4e(){return{localeError:YPt()}}var YPt,Y4e=w(()=>{m();St();YPt=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(o){return e[o]??null}let n={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},r={nan:"NaN",number:"liczba",array:"tablica"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${o.expected}, otrzymano ${u}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${i}, otrzymano ${u}`}case"invalid_value":return o.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${Oe(o.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${de(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${o.maximum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${o.minimum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${n[i.format]??o.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${o.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${o.keys.length>1?"s":""}: ${de(o.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${o.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${o.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}}});function K4e(){return{localeError:KPt()}}var KPt,J4e=w(()=>{m();St();KPt=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(o){return e[o]??null}let n={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},r={nan:"NaN",number:"n\xFAmero",null:"nulo"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Tipo inv\xE1lido: esperado instanceof ${o.expected}, recebido ${u}`:`Tipo inv\xE1lido: esperado ${i}, recebido ${u}`}case"invalid_value":return o.values.length===1?`Entrada inv\xE1lida: esperado ${Oe(o.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${de(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Muito grande: esperado que ${o.origin??"valor"} tivesse ${i}${o.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${o.origin??"valor"} fosse ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Muito pequeno: esperado que ${o.origin} tivesse ${i}${o.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${o.origin} fosse ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${i.prefix}"`:i.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${i.suffix}"`:i.format==="includes"?`Texto inv\xE1lido: deve incluir "${i.includes}"`:i.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${i.pattern}`:`${n[i.format]??o.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${o.divisor}`;case"unrecognized_keys":return`Chave${o.keys.length>1?"s":""} desconhecida${o.keys.length>1?"s":""}: ${de(o.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${o.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${o.origin}`;default:return"Campo inv\xE1lido"}}}});function Z4e(){return{localeError:JPt()}}var JPt,W4e=w(()=>{m();St();JPt=()=>{let e={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function t(o){return e[o]??null}let n={regex:"intrare",email:"adres\u0103 de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},r={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return`Intrare invalid\u0103: a\u0219teptat ${i}, primit ${u}`}case"invalid_value":return o.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${Oe(o.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${de(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Prea mare: a\u0219teptat ca ${o.origin??"valoarea"} ${s.verb} ${i}${o.maximum.toString()} ${s.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${o.origin??"valoarea"} s\u0103 fie ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Prea mic: a\u0219teptat ca ${o.origin} ${s.verb} ${i}${o.minimum.toString()} ${s.unit}`:`Prea mic: a\u0219teptat ca ${o.origin} s\u0103 fie ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${i.prefix}"`:i.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${i.suffix}"`:i.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${i.includes}"`:i.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${i.pattern}`:`Format invalid: ${n[i.format]??o.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${o.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${de(o.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${o.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${o.origin}`;default:return"Intrare invalid\u0103"}}}});function X4e(e,t,n,r){let o=Math.abs(e),i=o%10,s=o%100;return s>=11&&s<=19?r:i===1?t:i>=2&&i<=4?n:r}function e3e(){return{localeError:ZPt()}}var ZPt,t3e=w(()=>{m();St();ZPt=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(o){return e[o]??null}let n={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},r={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${o.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${u}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${u}`}case"invalid_value":return o.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${Oe(o.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${de(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s){let u=Number(o.maximum),l=X4e(u,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${o.maximum.toString()} ${l}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s){let u=Number(o.minimum),l=X4e(u,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${o.minimum.toString()} ${l}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${n[i.format]??o.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${o.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${o.keys.length>1?"\u0438":""}: ${de(o.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${o.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${o.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}}});function n3e(){return{localeError:WPt()}}var WPt,r3e=w(()=>{m();St();WPt=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(o){return e[o]??null}let n={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},r={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${o.expected}, prejeto ${u}`:`Neveljaven vnos: pri\u010Dakovano ${i}, prejeto ${u}`}case"invalid_value":return o.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${Oe(o.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${de(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${o.origin??"vrednost"} imelo ${i}${o.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${o.origin??"vrednost"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${o.origin} imelo ${i}${o.minimum.toString()} ${s.unit}`:`Premajhno: pri\u010Dakovano, da bo ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${n[i.format]??o.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${o.divisor}`;case"unrecognized_keys":return`Neprepoznan${o.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${de(o.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${o.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${o.origin}`;default:return"Neveljaven vnos"}}}});function o3e(){return{localeError:XPt()}}var XPt,i3e=w(()=>{m();St();XPt=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(o){return e[o]??null}let n={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},r={nan:"NaN",number:"antal",array:"lista"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${o.expected}, fick ${u}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${i}, fick ${u}`}case"invalid_value":return o.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${Oe(o.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${de(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${o.origin??"v\xE4rdet"} att ha ${i}${o.maximum.toString()} ${s.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${o.origin??"v\xE4rdet"} att ha ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${o.origin??"v\xE4rdet"} att ha ${i}${o.minimum.toString()} ${s.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${o.origin??"v\xE4rdet"} att ha ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${n[i.format]??o.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${de(o.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${o.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${o.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}}});function s3e(){return{localeError:eMt()}}var eMt,a3e=w(()=>{m();St();eMt=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(o){return e[o]??null}let n={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},r={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${o.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${u}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${u}`}case"invalid_value":return o.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${Oe(o.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${de(o.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${o.maximum.toString()} ${s.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${o.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin} ${i}${o.minimum.toString()} ${s.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin} ${i}${o.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${n[i.format]??o.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${o.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${o.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${de(o.keys,", ")}`;case"invalid_key":return`${o.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${o.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}}});function u3e(){return{localeError:tMt()}}var tMt,c3e=w(()=>{m();St();tMt=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(o){return e[o]??null}let n={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},r={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${o.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${u}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${i} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${u}`}case"invalid_value":return o.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${Oe(o.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${de(o.values,"|")}`;case"too_big":{let i=o.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",s=t(o.origin);return s?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${o.maximum.toString()} ${s.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",s=t(o.origin);return s?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${o.minimum.toString()} ${s.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${i.prefix}"`:i.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${i.suffix}"`:i.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${n[i.format]??o.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${o.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${de(o.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${o.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${o.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}}});function l3e(){return{localeError:nMt()}}var nMt,d3e=w(()=>{m();St();nMt=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(o){return e[o]??null}let n={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},r={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${o.expected}, al\u0131nan ${u}`:`Ge\xE7ersiz de\u011Fer: beklenen ${i}, al\u0131nan ${u}`}case"invalid_value":return o.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${Oe(o.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${de(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${i}${o.maximum.toString()} ${s.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${i}${o.minimum.toString()} ${s.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ge\xE7ersiz metin: "${i.prefix}" ile ba\u015Flamal\u0131`:i.format==="ends_with"?`Ge\xE7ersiz metin: "${i.suffix}" ile bitmeli`:i.format==="includes"?`Ge\xE7ersiz metin: "${i.includes}" i\xE7ermeli`:i.format==="regex"?`Ge\xE7ersiz metin: ${i.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${n[i.format]??o.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${o.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${o.keys.length>1?"lar":""}: ${de(o.keys,", ")}`;case"invalid_key":return`${o.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${o.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}}});function fj(){return{localeError:rMt()}}var rMt,Jne=w(()=>{m();St();rMt=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(o){return e[o]??null}let n={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},r={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${o.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${u}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${i}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${u}`}case"invalid_value":return o.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${Oe(o.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${de(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${s.verb} ${i}${o.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin} ${s.verb} ${i}${o.minimum.toString()} ${s.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin} \u0431\u0443\u0434\u0435 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${n[i.format]??o.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${o.keys.length>1?"\u0456":""}: ${de(o.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${o.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${o.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}}});function p3e(){return fj()}var f3e=w(()=>{m();Jne()});function m3e(){return{localeError:oMt()}}var oMt,A3e=w(()=>{m();St();oMt=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(o){return e[o]??null}let n={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},r={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${o.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${u} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${i} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${u} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return o.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${Oe(o.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${de(o.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${o.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${o.maximum.toString()} ${s.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${o.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${i}${o.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${o.origin} \u06A9\u06D2 ${i}${o.minimum.toString()} ${s.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${o.origin} \u06A9\u0627 ${i}${o.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${n[i.format]??o.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${o.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${o.keys.length>1?"\u0632":""}: ${de(o.keys,"\u060C ")}`;case"invalid_key":return`${o.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${o.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}}});function g3e(){return{localeError:iMt()}}var iMt,h3e=w(()=>{m();St();iMt=()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function t(o){return e[o]??null}let n={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},r={nan:"NaN",number:"raqam",array:"massiv"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${o.expected}, qabul qilingan ${u}`:`Noto\u2018g\u2018ri kirish: kutilgan ${i}, qabul qilingan ${u}`}case"invalid_value":return o.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${Oe(o.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${de(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Juda katta: kutilgan ${o.origin??"qiymat"} ${i}${o.maximum.toString()} ${s.unit} ${s.verb}`:`Juda katta: kutilgan ${o.origin??"qiymat"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Juda kichik: kutilgan ${o.origin} ${i}${o.minimum.toString()} ${s.unit} ${s.verb}`:`Juda kichik: kutilgan ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${i.prefix}" bilan boshlanishi kerak`:i.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${i.suffix}" bilan tugashi kerak`:i.format==="includes"?`Noto\u2018g\u2018ri satr: "${i.includes}" ni o\u2018z ichiga olishi kerak`:i.format==="regex"?`Noto\u2018g\u2018ri satr: ${i.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${n[i.format]??o.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${o.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${o.keys.length>1?"lar":""}: ${de(o.keys,", ")}`;case"invalid_key":return`${o.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${o.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}}});function _3e(){return{localeError:sMt()}}var sMt,E3e=w(()=>{m();St();sMt=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(o){return e[o]??null}let n={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},r={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${o.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${u}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${i}, nh\u1EADn \u0111\u01B0\u1EE3c ${u}`}case"invalid_value":return o.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${Oe(o.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${de(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${o.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${i}${o.maximum.toString()} ${s.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${o.origin??"gi\xE1 tr\u1ECB"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${o.origin} ${s.verb} ${i}${o.minimum.toString()} ${s.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${n[i.format]??o.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${o.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${de(o.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${o.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${o.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}}});function y3e(){return{localeError:aMt()}}var aMt,S3e=w(()=>{m();St();aMt=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(o){return e[o]??null}let n={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},r={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${o.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${u}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${i}\uFF0C\u5B9E\u9645\u63A5\u6536 ${u}`}case"invalid_value":return o.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${Oe(o.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${de(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${o.origin??"\u503C"} ${i}${o.maximum.toString()} ${s.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${o.origin??"\u503C"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${o.origin} ${i}${o.minimum.toString()} ${s.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${n[i.format]??o.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${o.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${de(o.keys,", ")}`;case"invalid_key":return`${o.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${o.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}}});function T3e(){return{localeError:uMt()}}var uMt,b3e=w(()=>{m();St();uMt=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(o){return e[o]??null}let n={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},r={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${o.expected}\uFF0C\u4F46\u6536\u5230 ${u}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${i}\uFF0C\u4F46\u6536\u5230 ${u}`}case"invalid_value":return o.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${Oe(o.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${de(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${o.origin??"\u503C"} \u61C9\u70BA ${i}${o.maximum.toString()} ${s.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${o.origin??"\u503C"} \u61C9\u70BA ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${o.origin} \u61C9\u70BA ${i}${o.minimum.toString()} ${s.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${o.origin} \u61C9\u70BA ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${n[i.format]??o.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${o.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${o.keys.length>1?"\u5011":""}\uFF1A${de(o.keys,"\u3001")}`;case"invalid_key":return`${o.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${o.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}}});function I3e(){return{localeError:cMt()}}var cMt,C3e=w(()=>{m();St();cMt=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(o){return e[o]??null}let n={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},r={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),u=r[s]??s;return/^[A-Z]/.test(o.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${o.expected}, \xE0m\u1ECD\u0300 a r\xED ${u}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${i}, \xE0m\u1ECD\u0300 a r\xED ${u}`}case"invalid_value":return o.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${Oe(o.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${de(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${o.origin??"iye"} ${s.verb} ${i}${o.maximum} ${s.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${o.maximum}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${o.origin} ${s.verb} ${i}${o.minimum} ${s.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${o.minimum}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${i.prefix}"`:i.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${i.suffix}"`:i.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${i.includes}"`:i.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${i.pattern}`:`A\u1E63\xEC\u1E63e: ${n[i.format]??o.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${o.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${de(o.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${o.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${o.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}}});var ik={};Zs(ik,{ar:()=>wFe,az:()=>kFe,be:()=>LFe,bg:()=>QFe,ca:()=>GFe,cs:()=>zFe,da:()=>$Fe,de:()=>VFe,el:()=>KFe,en:()=>dj,eo:()=>ZFe,es:()=>XFe,fa:()=>t4e,fi:()=>r4e,fr:()=>i4e,frCA:()=>a4e,he:()=>c4e,hr:()=>d4e,hu:()=>f4e,hy:()=>g4e,id:()=>_4e,is:()=>y4e,it:()=>T4e,ja:()=>I4e,ka:()=>v4e,kh:()=>x4e,km:()=>pj,ko:()=>N4e,lt:()=>O4e,mk:()=>P4e,ms:()=>L4e,nl:()=>Q4e,no:()=>G4e,ota:()=>z4e,pl:()=>V4e,ps:()=>$4e,pt:()=>K4e,ro:()=>Z4e,ru:()=>e3e,sl:()=>n3e,sv:()=>o3e,ta:()=>s3e,th:()=>u3e,tr:()=>l3e,ua:()=>p3e,uk:()=>fj,ur:()=>m3e,uz:()=>g3e,vi:()=>_3e,yo:()=>I3e,zhCN:()=>y3e,zhTW:()=>T3e});var Zne=w(()=>{m();OFe();PFe();UFe();FFe();jFe();HFe();qFe();YFe();JFe();Yne();WFe();e4e();n4e();o4e();s4e();u4e();l4e();p4e();m4e();h4e();E4e();S4e();b4e();C4e();R4e();D4e();Kne();B4e();k4e();M4e();U4e();F4e();j4e();H4e();q4e();Y4e();J4e();W4e();t3e();r3e();i3e();a3e();c3e();d3e();f3e();Jne();A3e();h3e();E3e();S3e();b3e();C3e()});function Aj(){return new mj}var v3e,Wne,Xne,mj,Qa,sk=w(()=>{m();Wne=Symbol("ZodOutput"),Xne=Symbol("ZodInput"),mj=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){let r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){let n=t._zod.parent;if(n){let r={...this.get(n)??{}};delete r.id;let o={...r,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};(v3e=globalThis).__zod_globalRegistry??(v3e.__zod_globalRegistry=Aj());Qa=globalThis.__zod_globalRegistry});function ere(e,t){return new e({type:"string",...qe(t)})}function tre(e,t){return new e({type:"string",coerce:!0,...qe(t)})}function gj(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...qe(t)})}function ak(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...qe(t)})}function hj(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...qe(t)})}function _j(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...qe(t)})}function Ej(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...qe(t)})}function yj(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...qe(t)})}function uk(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...qe(t)})}function Sj(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...qe(t)})}function Tj(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...qe(t)})}function bj(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...qe(t)})}function Ij(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...qe(t)})}function Cj(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...qe(t)})}function vj(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...qe(t)})}function Rj(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...qe(t)})}function xj(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...qe(t)})}function Dj(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...qe(t)})}function nre(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...qe(t)})}function Nj(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...qe(t)})}function Bj(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...qe(t)})}function wj(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...qe(t)})}function Oj(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...qe(t)})}function kj(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...qe(t)})}function Pj(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...qe(t)})}function ore(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...qe(t)})}function ire(e,t){return new e({type:"string",format:"date",check:"string_format",...qe(t)})}function sre(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...qe(t)})}function are(e,t){return new e({type:"string",format:"duration",check:"string_format",...qe(t)})}function ure(e,t){return new e({type:"number",checks:[],...qe(t)})}function cre(e,t){return new e({type:"number",coerce:!0,checks:[],...qe(t)})}function lre(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...qe(t)})}function dre(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...qe(t)})}function pre(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...qe(t)})}function fre(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...qe(t)})}function mre(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...qe(t)})}function Are(e,t){return new e({type:"boolean",...qe(t)})}function gre(e,t){return new e({type:"boolean",coerce:!0,...qe(t)})}function hre(e,t){return new e({type:"bigint",...qe(t)})}function _re(e,t){return new e({type:"bigint",coerce:!0,...qe(t)})}function Ere(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...qe(t)})}function yre(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...qe(t)})}function Sre(e,t){return new e({type:"symbol",...qe(t)})}function Tre(e,t){return new e({type:"undefined",...qe(t)})}function bre(e,t){return new e({type:"null",...qe(t)})}function Ire(e){return new e({type:"any"})}function Cre(e){return new e({type:"unknown"})}function vre(e,t){return new e({type:"never",...qe(t)})}function Rre(e,t){return new e({type:"void",...qe(t)})}function xre(e,t){return new e({type:"date",...qe(t)})}function Dre(e,t){return new e({type:"date",coerce:!0,...qe(t)})}function Nre(e,t){return new e({type:"nan",...qe(t)})}function lA(e,t){return new XG({check:"less_than",...qe(t),value:e,inclusive:!1})}function id(e,t){return new XG({check:"less_than",...qe(t),value:e,inclusive:!0})}function dA(e,t){return new ej({check:"greater_than",...qe(t),value:e,inclusive:!1})}function lc(e,t){return new ej({check:"greater_than",...qe(t),value:e,inclusive:!0})}function Mj(e){return dA(0,e)}function Lj(e){return lA(0,e)}function Uj(e){return id(0,e)}function Qj(e){return lc(0,e)}function KE(e,t){return new gte({check:"multiple_of",...qe(t),value:e})}function JE(e,t){return new Ete({check:"max_size",...qe(t),maximum:e})}function pA(e,t){return new yte({check:"min_size",...qe(t),minimum:e})}function DT(e,t){return new Ste({check:"size_equals",...qe(t),size:e})}function NT(e,t){return new Tte({check:"max_length",...qe(t),maximum:e})}function ah(e,t){return new bte({check:"min_length",...qe(t),minimum:e})}function BT(e,t){return new Ite({check:"length_equals",...qe(t),length:e})}function gx(e,t){return new Cte({check:"string_format",format:"regex",...qe(t),pattern:e})}function hx(e){return new vte({check:"string_format",format:"lowercase",...qe(e)})}function _x(e){return new Rte({check:"string_format",format:"uppercase",...qe(e)})}function Ex(e,t){return new xte({check:"string_format",format:"includes",...qe(t),includes:e})}function yx(e,t){return new Dte({check:"string_format",format:"starts_with",...qe(t),prefix:e})}function Sx(e,t){return new Nte({check:"string_format",format:"ends_with",...qe(t),suffix:e})}function Fj(e,t,n){return new Bte({check:"property",property:e,schema:t,...qe(n)})}function Tx(e,t){return new wte({check:"mime_type",mime:e,...qe(t)})}function Pf(e){return new Ote({check:"overwrite",tx:e})}function bx(e){return Pf(t=>t.normalize(e))}function Ix(){return Pf(e=>e.trim())}function Cx(){return Pf(e=>e.toLowerCase())}function vx(){return Pf(e=>e.toUpperCase())}function Rx(){return Pf(e=>Ree(e))}function Bre(e,t,n){return new e({type:"array",element:t,...qe(n)})}function dMt(e,t,n){return new e({type:"union",options:t,...qe(n)})}function pMt(e,t,n){return new e({type:"union",options:t,inclusive:!1,...qe(n)})}function fMt(e,t,n,r){return new e({type:"union",options:n,discriminator:t,...qe(r)})}function mMt(e,t,n){return new e({type:"intersection",left:t,right:n})}function AMt(e,t,n,r){let o=n instanceof cn,i=o?r:n,s=o?n:null;return new e({type:"tuple",items:t,rest:s,...qe(i)})}function gMt(e,t,n,r){return new e({type:"record",keyType:t,valueType:n,...qe(r)})}function hMt(e,t,n,r){return new e({type:"map",keyType:t,valueType:n,...qe(r)})}function _Mt(e,t,n){return new e({type:"set",valueType:t,...qe(n)})}function EMt(e,t,n){let r=Array.isArray(t)?Object.fromEntries(t.map(o=>[o,o])):t;return new e({type:"enum",entries:r,...qe(n)})}function yMt(e,t,n){return new e({type:"enum",entries:t,...qe(n)})}function SMt(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...qe(n)})}function wre(e,t){return new e({type:"file",...qe(t)})}function TMt(e,t){return new e({type:"transform",transform:t})}function bMt(e,t){return new e({type:"optional",innerType:t})}function IMt(e,t){return new e({type:"nullable",innerType:t})}function CMt(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():Dee(n)}})}function vMt(e,t,n){return new e({type:"nonoptional",innerType:t,...qe(n)})}function RMt(e,t){return new e({type:"success",innerType:t})}function xMt(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}function DMt(e,t,n){return new e({type:"pipe",in:t,out:n})}function NMt(e,t){return new e({type:"readonly",innerType:t})}function BMt(e,t,n){return new e({type:"template_literal",parts:t,...qe(n)})}function wMt(e,t){return new e({type:"lazy",getter:t})}function OMt(e,t){return new e({type:"promise",innerType:t})}function Ore(e,t,n){let r=qe(n);return r.abort??(r.abort=!0),new e({type:"custom",check:"custom",fn:t,...r})}function kre(e,t,n){return new e({type:"custom",check:"custom",fn:t,...qe(n)})}function Pre(e,t){let n=R3e(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(cx(o,r.value,n._zod.def));else{let i=o;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=n),i.continue??(i.continue=!n._zod.def.abort),r.issues.push(cx(i))}},e(r.value,r)),t);return n}function R3e(e,t){let n=new no({check:"custom",...qe(t)});return n._zod.check=e,n}function Mre(e){let t=new no({check:"describe"});return t._zod.onattach=[n=>{let r=Qa.get(n)??{};Qa.add(n,{...r,description:e})}],t._zod.check=()=>{},t}function Lre(e){let t=new no({check:"meta"});return t._zod.onattach=[n=>{let r=Qa.get(n)??{};Qa.add(n,{...r,...e})}],t._zod.check=()=>{},t}function Ure(e,t){let n=qe(t),r=n.truthy??["true","1","yes","on","y","enabled"],o=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(r=r.map(T=>typeof T=="string"?T.toLowerCase():T),o=o.map(T=>typeof T=="string"?T.toLowerCase():T));let i=new Set(r),s=new Set(o),u=e.Codec??rk,l=e.Boolean??tk,f=e.String??xT,h=new f({type:"string",error:n.error}),_=new l({type:"boolean",error:n.error}),y=new u({type:"pipe",in:h,out:_,transform:((T,v)=>{let R=T;return n.case!=="sensitive"&&(R=R.toLowerCase()),i.has(R)?!0:s.has(R)?!1:(v.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...s],input:v.value,inst:y,continue:!1}),{})}),reverseTransform:((T,v)=>T===!0?r[0]||"true":o[0]||"false"),error:n.error});return y}function xx(e,t,n,r={}){let o=qe(r),i={...qe(r),check:"string_format",type:"string",format:t,fn:typeof n=="function"?n:u=>n.test(u),...o};return n instanceof RegExp&&(i.pattern=n),new e(i)}var rre,x3e=w(()=>{m();tj();sk();Vne();St();rre={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}});function ZE(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Qa,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Or(e,t,n={path:[],schemaPath:[]}){var r;let o=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;let s={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,s);let u=e._zod.toJSONSchema?.();if(u)s.schema=u;else{let h={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,h);else{let y=s.schema,T=t.processors[o.type];if(!T)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);T(e,t,y,h)}let _=e._zod.parent;_&&(s.ref||(s.ref=_),Or(_,t,h),t.seen.get(_).isParent=!0)}let l=t.metadataRegistry.get(e);return l&&Object.assign(s.schema,l),t.io==="input"&&dc(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&"_prefault"in s.schema&&((r=s.schema).default??(r.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function WE(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let r=new Map;for(let s of e.seen.entries()){let u=e.metadataRegistry.get(s[0])?.id;if(u){let l=r.get(u);if(l&&l!==s[0])throw new Error(`Duplicate schema id "${u}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(u,s[0])}}let o=s=>{let u=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let _=e.external.registry.get(s[0])?.id,y=e.external.uri??(v=>v);if(_)return{ref:y(_)};let T=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=T,{defId:T,ref:`${y("__shared")}#/${u}/${T}`}}if(s[1]===n)return{ref:"#"};let f=`#/${u}/`,h=s[1].schema.id??`__schema${e.counter++}`;return{defId:h,ref:f+h}},i=s=>{if(s[1].schema.$ref)return;let u=s[1],{ref:l,defId:f}=o(s);u.def={...u.schema},f&&(u.defId=f);let h=u.schema;for(let _ in h)delete h[_];h.$ref=l};if(e.cycles==="throw")for(let s of e.seen.entries()){let u=s[1];if(u.cycle)throw new Error(`Cycle detected: #/${u.cycle?.join("/")}/<root>
103
103
 
104
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of e.seen.entries()){let u=s[1];if(t===s[0]){i(s);continue}if(e.external){let f=e.external.registry.get(s[0])?.id;if(t!==s[0]&&f){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(u.cycle){i(s);continue}if(u.count>1&&e.reused==="ref"){i(s);continue}}}function XE(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let r=u=>{let l=e.seen.get(u);if(l.ref===null)return;let f=l.def??l.schema,h={...f},_=l.ref;if(l.ref=null,_){r(_);let T=e.seen.get(_),v=T.schema;if(v.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(f.allOf=f.allOf??[],f.allOf.push(v)):Object.assign(f,v),Object.assign(f,h),u._zod.parent===_)for(let x in f)x==="$ref"||x==="allOf"||x in h||delete f[x];if(v.$ref&&T.def)for(let x in f)x==="$ref"||x==="allOf"||x in T.def&&JSON.stringify(f[x])===JSON.stringify(T.def[x])&&delete f[x]}let y=u._zod.parent;if(y&&y!==_){r(y);let T=e.seen.get(y);if(T?.schema.$ref&&(f.$ref=T.schema.$ref,T.def))for(let v in f)v==="$ref"||v==="allOf"||v in T.def&&JSON.stringify(f[v])===JSON.stringify(T.def[v])&&delete f[v]}e.override({zodSchema:u,jsonSchema:f,path:l.path??[]})};for(let u of[...e.seen.entries()].reverse())r(u[0]);let o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let u=e.external.registry.get(t)?.id;if(!u)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(u)}Object.assign(o,n.def??n.schema);let i=e.metadataRegistry.get(t)?.id;i!==void 0&&o.id===i&&delete o.id;let s=e.external?.defs??{};for(let u of e.seen.entries()){let l=u[1];l.def&&l.defId&&(l.def.id===l.defId&&delete l.def.id,s[l.defId]=l.def)}e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?o.$defs=s:o.definitions=s);try{let u=JSON.parse(JSON.stringify(o));return Object.defineProperty(u,"~standard",{value:{...t["~standard"],jsonSchema:{input:Dx(t,"input",e.processors),output:Dx(t,"output",e.processors)}},enumerable:!1,writable:!1}),u}catch{throw new Error("Error converting schema to JSON.")}}function dc(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return dc(r.element,n);if(r.type==="set")return dc(r.valueType,n);if(r.type==="lazy")return dc(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return dc(r.innerType,n);if(r.type==="intersection")return dc(r.left,n)||dc(r.right,n);if(r.type==="record"||r.type==="map")return dc(r.keyType,n)||dc(r.valueType,n);if(r.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:dc(r.in,n)||dc(r.out,n);if(r.type==="object"){for(let o in r.shape)if(dc(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(let o of r.options)if(dc(o,n))return!0;return!1}if(r.type==="tuple"){for(let o of r.items)if(dc(o,n))return!0;return!!(r.rest&&dc(r.rest,n))}return!1}var Qre,Dx,ck=w(()=>{m();sk();Qre=(e,t={})=>n=>{let r=ZE({...n,processors:t});return Or(e,r),WE(r,e),XE(r,e)},Dx=(e,t,n={})=>r=>{let{libraryOptions:o,target:i}=r??{},s=ZE({...o??{},target:i,io:t,processors:n});return Or(e,s),WE(s,e),XE(s,e)}});function Hj(e,t){if("_idmap"in e){let r=e,o=ZE({...t,processors:Gj}),i={};for(let l of r._idmap.entries()){let[f,h]=l;Or(h,o)}let s={},u={registry:r,uri:t?.uri,defs:i};o.external=u;for(let l of r._idmap.entries()){let[f,h]=l;WE(o,h),s[f]=XE(o,h)}if(Object.keys(i).length>0){let l=o.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[l]:i}}return{schemas:s}}let n=ZE({...t,processors:Gj});return Or(e,n),WE(n,e),XE(n,e)}var kMt,Fre,Gre,jre,zre,Hre,$re,qre,Vre,Yre,Kre,Jre,Zre,Wre,Xre,eoe,toe,noe,roe,ooe,ioe,soe,aoe,uoe,coe,loe,jj,doe,poe,foe,moe,Aoe,goe,hoe,_oe,Eoe,yoe,Soe,zj,Toe,Gj,lk=w(()=>{m();ck();St();kMt={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Fre=(e,t,n,r)=>{let o=n;o.type="string";let{minimum:i,maximum:s,format:u,patterns:l,contentEncoding:f}=e._zod.bag;if(typeof i=="number"&&(o.minLength=i),typeof s=="number"&&(o.maxLength=s),u&&(o.format=kMt[u]??u,o.format===""&&delete o.format,u==="time"&&delete o.format),f&&(o.contentEncoding=f),l&&l.size>0){let h=[...l];h.length===1?o.pattern=h[0].source:h.length>1&&(o.allOf=[...h.map(_=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:_.source}))])}},Gre=(e,t,n,r)=>{let o=n,{minimum:i,maximum:s,format:u,multipleOf:l,exclusiveMaximum:f,exclusiveMinimum:h}=e._zod.bag;typeof u=="string"&&u.includes("int")?o.type="integer":o.type="number";let _=typeof h=="number"&&h>=(i??Number.NEGATIVE_INFINITY),y=typeof f=="number"&&f<=(s??Number.POSITIVE_INFINITY),T=t.target==="draft-04"||t.target==="openapi-3.0";_?T?(o.minimum=h,o.exclusiveMinimum=!0):o.exclusiveMinimum=h:typeof i=="number"&&(o.minimum=i),y?T?(o.maximum=f,o.exclusiveMaximum=!0):o.exclusiveMaximum=f:typeof s=="number"&&(o.maximum=s),typeof l=="number"&&(o.multipleOf=l)},jre=(e,t,n,r)=>{n.type="boolean"},zre=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},Hre=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},$re=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},qre=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},Vre=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Yre=(e,t,n,r)=>{n.not={}},Kre=(e,t,n,r)=>{},Jre=(e,t,n,r)=>{},Zre=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Wre=(e,t,n,r)=>{let o=e._zod.def,i=HO(o.entries);i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),n.enum=i},Xre=(e,t,n,r)=>{let o=e._zod.def,i=[];for(let s of o.values)if(s===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(s))}else i.push(s);if(i.length!==0)if(i.length===1){let s=i[0];n.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[s]:n.const=s}else i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),i.every(s=>typeof s=="boolean")&&(n.type="boolean"),i.every(s=>s===null)&&(n.type="null"),n.enum=i},eoe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},toe=(e,t,n,r)=>{let o=n,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");o.type="string",o.pattern=i.source},noe=(e,t,n,r)=>{let o=n,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:u,mime:l}=e._zod.bag;s!==void 0&&(i.minLength=s),u!==void 0&&(i.maxLength=u),l?l.length===1?(i.contentMediaType=l[0],Object.assign(o,i)):(Object.assign(o,i),o.anyOf=l.map(f=>({contentMediaType:f}))):Object.assign(o,i)},roe=(e,t,n,r)=>{n.type="boolean"},ooe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},ioe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},soe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},aoe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},uoe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},coe=(e,t,n,r)=>{let o=n,i=e._zod.def,{minimum:s,maximum:u}=e._zod.bag;typeof s=="number"&&(o.minItems=s),typeof u=="number"&&(o.maxItems=u),o.type="array",o.items=Or(i.element,t,{...r,path:[...r.path,"items"]})},loe=(e,t,n,r)=>{let o=n,i=e._zod.def;o.type="object",o.properties={};let s=i.shape;for(let f in s)o.properties[f]=Or(s[f],t,{...r,path:[...r.path,"properties",f]});let u=new Set(Object.keys(s)),l=new Set([...u].filter(f=>{let h=i.shape[f]._zod;return t.io==="input"?h.optin===void 0:h.optout===void 0}));l.size>0&&(o.required=Array.from(l)),i.catchall?._zod.def.type==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=Or(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},jj=(e,t,n,r)=>{let o=e._zod.def,i=o.inclusive===!1,s=o.options.map((u,l)=>Or(u,t,{...r,path:[...r.path,i?"oneOf":"anyOf",l]}));i?n.oneOf=s:n.anyOf=s},doe=(e,t,n,r)=>{let o=e._zod.def,i=Or(o.left,t,{...r,path:[...r.path,"allOf",0]}),s=Or(o.right,t,{...r,path:[...r.path,"allOf",1]}),u=f=>"allOf"in f&&Object.keys(f).length===1,l=[...u(i)?i.allOf:[i],...u(s)?s.allOf:[s]];n.allOf=l},poe=(e,t,n,r)=>{let o=n,i=e._zod.def;o.type="array";let s=t.target==="draft-2020-12"?"prefixItems":"items",u=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",l=i.items.map((y,T)=>Or(y,t,{...r,path:[...r.path,s,T]})),f=i.rest?Or(i.rest,t,{...r,path:[...r.path,u,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(o.prefixItems=l,f&&(o.items=f)):t.target==="openapi-3.0"?(o.items={anyOf:l},f&&o.items.anyOf.push(f),o.minItems=l.length,f||(o.maxItems=l.length)):(o.items=l,f&&(o.additionalItems=f));let{minimum:h,maximum:_}=e._zod.bag;typeof h=="number"&&(o.minItems=h),typeof _=="number"&&(o.maxItems=_)},foe=(e,t,n,r)=>{let o=n,i=e._zod.def;o.type="object";let s=i.keyType,l=s._zod.bag?.patterns;if(i.mode==="loose"&&l&&l.size>0){let h=Or(i.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});o.patternProperties={};for(let _ of l)o.patternProperties[_.source]=h}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(o.propertyNames=Or(i.keyType,t,{...r,path:[...r.path,"propertyNames"]})),o.additionalProperties=Or(i.valueType,t,{...r,path:[...r.path,"additionalProperties"]});let f=s._zod.values;if(f){let h=[...f].filter(_=>typeof _=="string"||typeof _=="number");h.length>0&&(o.required=h)}},moe=(e,t,n,r)=>{let o=e._zod.def,i=Or(o.innerType,t,r),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=o.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},Aoe=(e,t,n,r)=>{let o=e._zod.def;Or(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType},goe=(e,t,n,r)=>{let o=e._zod.def;Or(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},hoe=(e,t,n,r)=>{let o=e._zod.def;Or(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},_oe=(e,t,n,r)=>{let o=e._zod.def;Or(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType;let s;try{s=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=s},Eoe=(e,t,n,r)=>{let o=e._zod.def,i=o.in._zod.traits.has("$ZodTransform"),s=t.io==="input"?i?o.out:o.in:o.out;Or(s,t,r);let u=t.seen.get(e);u.ref=s},yoe=(e,t,n,r)=>{let o=e._zod.def;Or(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType,n.readOnly=!0},Soe=(e,t,n,r)=>{let o=e._zod.def;Or(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType},zj=(e,t,n,r)=>{let o=e._zod.def;Or(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType},Toe=(e,t,n,r)=>{let o=e._zod.innerType;Or(o,t,r);let i=t.seen.get(e);i.ref=o},Gj={string:Fre,number:Gre,boolean:jre,bigint:zre,symbol:Hre,null:$re,undefined:qre,void:Vre,never:Yre,any:Kre,unknown:Jre,date:Zre,enum:Wre,literal:Xre,nan:eoe,template_literal:toe,file:noe,success:roe,custom:ooe,function:ioe,transform:soe,map:aoe,set:uoe,array:coe,object:loe,union:jj,intersection:doe,tuple:poe,record:foe,nullable:moe,nonoptional:Aoe,default:goe,prefault:hoe,catch:_oe,pipe:Eoe,readonly:yoe,promise:Soe,optional:zj,lazy:Toe}});var $j,D3e=w(()=>{m();lk();ck();$j=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let n=t?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=ZE({processors:Gj,target:n,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,n={path:[],schemaPath:[]}){return Or(t,this.ctx,n)}emit(t,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),WE(this.ctx,t);let r=XE(this.ctx,t),{"~standard":o,...i}=r;return i}}});var N3e={};var B3e=w(()=>{m()});var uh={};Zs(uh,{$ZodAny:()=>Ane,$ZodArray:()=>yne,$ZodAsyncError:()=>kf,$ZodBase64:()=>ine,$ZodBase64URL:()=>sne,$ZodBigInt:()=>aj,$ZodBigIntFormat:()=>dne,$ZodBoolean:()=>tk,$ZodCIDRv4:()=>nne,$ZodCIDRv6:()=>rne,$ZodCUID:()=>Hte,$ZodCUID2:()=>$te,$ZodCatch:()=>Une,$ZodCheck:()=>no,$ZodCheckBigIntFormat:()=>_te,$ZodCheckEndsWith:()=>Nte,$ZodCheckGreaterThan:()=>ej,$ZodCheckIncludes:()=>xte,$ZodCheckLengthEquals:()=>Ite,$ZodCheckLessThan:()=>XG,$ZodCheckLowerCase:()=>vte,$ZodCheckMaxLength:()=>Tte,$ZodCheckMaxSize:()=>Ete,$ZodCheckMimeType:()=>wte,$ZodCheckMinLength:()=>bte,$ZodCheckMinSize:()=>yte,$ZodCheckMultipleOf:()=>gte,$ZodCheckNumberFormat:()=>hte,$ZodCheckOverwrite:()=>Ote,$ZodCheckProperty:()=>Bte,$ZodCheckRegex:()=>Cte,$ZodCheckSizeEquals:()=>Ste,$ZodCheckStartsWith:()=>Dte,$ZodCheckStringFormat:()=>mx,$ZodCheckUpperCase:()=>Rte,$ZodCodec:()=>rk,$ZodCustom:()=>qne,$ZodCustomStringFormat:()=>cne,$ZodDate:()=>Ene,$ZodDefault:()=>kne,$ZodDiscriminatedUnion:()=>bne,$ZodE164:()=>ane,$ZodEmail:()=>Fte,$ZodEmoji:()=>jte,$ZodEncodeError:()=>HE,$ZodEnum:()=>xne,$ZodError:()=>KO,$ZodExactOptional:()=>wne,$ZodFile:()=>Nne,$ZodFunction:()=>zne,$ZodGUID:()=>Ute,$ZodIPv4:()=>Xte,$ZodIPv6:()=>ene,$ZodISODate:()=>Jte,$ZodISODateTime:()=>Kte,$ZodISODuration:()=>Wte,$ZodISOTime:()=>Zte,$ZodIntersection:()=>Ine,$ZodJWT:()=>une,$ZodKSUID:()=>Yte,$ZodLazy:()=>$ne,$ZodLiteral:()=>Dne,$ZodMAC:()=>tne,$ZodMap:()=>vne,$ZodNaN:()=>Qne,$ZodNanoID:()=>zte,$ZodNever:()=>hne,$ZodNonOptional:()=>Mne,$ZodNull:()=>mne,$ZodNullable:()=>One,$ZodNumber:()=>sj,$ZodNumberFormat:()=>lne,$ZodObject:()=>BFe,$ZodObjectJIT:()=>Sne,$ZodOptional:()=>cj,$ZodPipe:()=>lj,$ZodPrefault:()=>Pne,$ZodPreprocess:()=>Fne,$ZodPromise:()=>Hne,$ZodReadonly:()=>Gne,$ZodRealError:()=>nl,$ZodRecord:()=>Cne,$ZodRegistry:()=>mj,$ZodSet:()=>Rne,$ZodString:()=>xT,$ZodStringFormat:()=>Kr,$ZodSuccess:()=>Lne,$ZodSymbol:()=>pne,$ZodTemplateLiteral:()=>jne,$ZodTransform:()=>Bne,$ZodTuple:()=>uj,$ZodType:()=>cn,$ZodULID:()=>qte,$ZodURL:()=>Gte,$ZodUUID:()=>Qte,$ZodUndefined:()=>fne,$ZodUnion:()=>nk,$ZodUnknown:()=>gne,$ZodVoid:()=>_ne,$ZodXID:()=>Vte,$ZodXor:()=>Tne,$brand:()=>bee,$constructor:()=>ie,$input:()=>Xne,$output:()=>Wne,Doc:()=>ek,JSONSchema:()=>N3e,JSONSchemaGenerator:()=>$j,NEVER:()=>Tee,TimePrecision:()=>rre,_any:()=>Ire,_array:()=>Bre,_base64:()=>wj,_base64url:()=>Oj,_bigint:()=>hre,_boolean:()=>Are,_catch:()=>xMt,_check:()=>R3e,_cidrv4:()=>Nj,_cidrv6:()=>Bj,_coercedBigint:()=>_re,_coercedBoolean:()=>gre,_coercedDate:()=>Dre,_coercedNumber:()=>cre,_coercedString:()=>tre,_cuid:()=>bj,_cuid2:()=>Ij,_custom:()=>Ore,_date:()=>xre,_decode:()=>zG,_decodeAsync:()=>$G,_default:()=>CMt,_discriminatedUnion:()=>fMt,_e164:()=>kj,_email:()=>gj,_emoji:()=>Sj,_encode:()=>jG,_encodeAsync:()=>HG,_endsWith:()=>Sx,_enum:()=>EMt,_file:()=>wre,_float32:()=>dre,_float64:()=>pre,_gt:()=>dA,_gte:()=>lc,_guid:()=>ak,_includes:()=>Ex,_int:()=>lre,_int32:()=>fre,_int64:()=>Ere,_intersection:()=>mMt,_ipv4:()=>xj,_ipv6:()=>Dj,_isoDate:()=>ire,_isoDateTime:()=>ore,_isoDuration:()=>are,_isoTime:()=>sre,_jwt:()=>Pj,_ksuid:()=>Rj,_lazy:()=>wMt,_length:()=>BT,_literal:()=>SMt,_lowercase:()=>hx,_lt:()=>lA,_lte:()=>id,_mac:()=>nre,_map:()=>hMt,_max:()=>id,_maxLength:()=>NT,_maxSize:()=>JE,_mime:()=>Tx,_min:()=>lc,_minLength:()=>ah,_minSize:()=>pA,_multipleOf:()=>KE,_nan:()=>Nre,_nanoid:()=>Tj,_nativeEnum:()=>yMt,_negative:()=>Lj,_never:()=>vre,_nonnegative:()=>Qj,_nonoptional:()=>vMt,_nonpositive:()=>Uj,_normalize:()=>bx,_null:()=>bre,_nullable:()=>IMt,_number:()=>ure,_optional:()=>bMt,_overwrite:()=>Pf,_parse:()=>lx,_parseAsync:()=>dx,_pipe:()=>DMt,_positive:()=>Mj,_promise:()=>OMt,_property:()=>Fj,_readonly:()=>NMt,_record:()=>gMt,_refine:()=>kre,_regex:()=>gx,_safeDecode:()=>VG,_safeDecodeAsync:()=>KG,_safeEncode:()=>qG,_safeEncodeAsync:()=>YG,_safeParse:()=>px,_safeParseAsync:()=>fx,_set:()=>_Mt,_size:()=>DT,_slugify:()=>Rx,_startsWith:()=>yx,_string:()=>ere,_stringFormat:()=>xx,_stringbool:()=>Ure,_success:()=>RMt,_superRefine:()=>Pre,_symbol:()=>Sre,_templateLiteral:()=>BMt,_toLowerCase:()=>Cx,_toUpperCase:()=>vx,_transform:()=>TMt,_trim:()=>Ix,_tuple:()=>AMt,_uint32:()=>mre,_uint64:()=>yre,_ulid:()=>Cj,_undefined:()=>Tre,_union:()=>dMt,_unknown:()=>Cre,_uppercase:()=>_x,_url:()=>uk,_uuid:()=>hj,_uuidv4:()=>_j,_uuidv6:()=>Ej,_uuidv7:()=>yj,_void:()=>Rre,_xid:()=>vj,_xor:()=>pMt,clone:()=>uc,config:()=>bi,createStandardJSONSchemaMethod:()=>Dx,createToJSONSchemaMethod:()=>Qre,decode:()=>Okt,decodeAsync:()=>Pkt,describe:()=>Mre,encode:()=>wkt,encodeAsync:()=>kkt,extractDefs:()=>WE,finalize:()=>XE,flattenError:()=>JO,formatError:()=>ZO,globalConfig:()=>IT,globalRegistry:()=>Qa,initializeContext:()=>ZE,isValidBase64:()=>one,isValidBase64URL:()=>RFe,isValidJWT:()=>xFe,locales:()=>ik,meta:()=>Lre,parse:()=>FG,parseAsync:()=>GG,prettifyError:()=>Mee,process:()=>Or,regexes:()=>od,registry:()=>Aj,safeDecode:()=>Lkt,safeDecodeAsync:()=>Qkt,safeEncode:()=>Mkt,safeEncodeAsync:()=>Ukt,safeParse:()=>Uee,safeParseAsync:()=>Qee,toDotPath:()=>sFe,toJSONSchema:()=>Hj,treeifyError:()=>Pee,util:()=>Le,version:()=>Pte});var sd=w(()=>{m();CT();Fee();Lee();Vne();tj();Mte();St();WG();Zne();sk();kte();x3e();ck();lk();D3e();B3e()});var qj={};Zs(qj,{endsWith:()=>Sx,gt:()=>dA,gte:()=>lc,includes:()=>Ex,length:()=>BT,lowercase:()=>hx,lt:()=>lA,lte:()=>id,maxLength:()=>NT,maxSize:()=>JE,mime:()=>Tx,minLength:()=>ah,minSize:()=>pA,multipleOf:()=>KE,negative:()=>Lj,nonnegative:()=>Qj,nonpositive:()=>Uj,normalize:()=>bx,overwrite:()=>Pf,positive:()=>Mj,property:()=>Fj,regex:()=>gx,size:()=>DT,slugify:()=>Rx,startsWith:()=>yx,toLowerCase:()=>Cx,toUpperCase:()=>vx,trim:()=>Ix,uppercase:()=>_x});var Vj=w(()=>{m();sd()});var Nx={};Zs(Nx,{ZodISODate:()=>Kj,ZodISODateTime:()=>Yj,ZodISODuration:()=>Zj,ZodISOTime:()=>Jj,date:()=>Ioe,datetime:()=>boe,duration:()=>voe,time:()=>Coe});function boe(e){return ore(Yj,e)}function Ioe(e){return ire(Kj,e)}function Coe(e){return sre(Jj,e)}function voe(e){return are(Zj,e)}var Yj,Kj,Jj,Zj,dk=w(()=>{m();sd();fk();Yj=ie("ZodISODateTime",(e,t)=>{Kte.init(e,t),Jr.init(e,t)});Kj=ie("ZodISODate",(e,t)=>{Jte.init(e,t),Jr.init(e,t)});Jj=ie("ZodISOTime",(e,t)=>{Zte.init(e,t),Jr.init(e,t)});Zj=ie("ZodISODuration",(e,t)=>{Wte.init(e,t),Jr.init(e,t)})});var w3e,MMt,rl,Roe=w(()=>{m();sd();sd();St();w3e=(e,t)=>{KO.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>ZO(e,n)},flatten:{value:n=>JO(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,ax,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,ax,2)}},isEmpty:{get(){return e.issues.length===0}}})},MMt=ie("ZodError",w3e),rl=ie("ZodError",w3e,{Parent:Error})});var xoe,Doe,Noe,Boe,woe,Ooe,koe,Poe,Moe,Loe,Uoe,Qoe,Foe=w(()=>{m();sd();Roe();xoe=lx(rl),Doe=dx(rl),Noe=px(rl),Boe=fx(rl),woe=jG(rl),Ooe=zG(rl),koe=HG(rl),Poe=$G(rl),Moe=qG(rl),Loe=VG(rl),Uoe=YG(rl),Qoe=KG(rl)});var pk={};Zs(pk,{ZodAny:()=>Yoe,ZodArray:()=>Woe,ZodBase64:()=>fz,ZodBase64URL:()=>mz,ZodBigInt:()=>Lx,ZodBigIntFormat:()=>hz,ZodBoolean:()=>Mx,ZodCIDRv4:()=>dz,ZodCIDRv6:()=>pz,ZodCUID:()=>oz,ZodCUID2:()=>iz,ZodCatch:()=>yie,ZodCodec:()=>Ck,ZodCustom:()=>vk,ZodCustomStringFormat:()=>kx,ZodDate:()=>yk,ZodDefault:()=>mie,ZodDiscriminatedUnion:()=>eie,ZodE164:()=>Az,ZodEmail:()=>tz,ZodEmoji:()=>nz,ZodEnum:()=>wx,ZodExactOptional:()=>die,ZodFile:()=>cie,ZodFunction:()=>Nie,ZodGUID:()=>Ak,ZodIPv4:()=>cz,ZodIPv6:()=>lz,ZodIntersection:()=>tie,ZodJWT:()=>gz,ZodKSUID:()=>uz,ZodLazy:()=>Rie,ZodLiteral:()=>uie,ZodMAC:()=>Goe,ZodMap:()=>sie,ZodNaN:()=>Tie,ZodNanoID:()=>rz,ZodNever:()=>Joe,ZodNonOptional:()=>bz,ZodNull:()=>qoe,ZodNullable:()=>fie,ZodNumber:()=>Px,ZodNumberFormat:()=>OT,ZodObject:()=>Tk,ZodOptional:()=>Tz,ZodPipe:()=>Ik,ZodPrefault:()=>gie,ZodPreprocess:()=>bie,ZodPromise:()=>Die,ZodReadonly:()=>Iie,ZodRecord:()=>Bx,ZodSet:()=>aie,ZodString:()=>Ox,ZodStringFormat:()=>Jr,ZodSuccess:()=>Eie,ZodSymbol:()=>Hoe,ZodTemplateLiteral:()=>vie,ZodTransform:()=>lie,ZodTuple:()=>rie,ZodType:()=>Nn,ZodULID:()=>sz,ZodURL:()=>Ek,ZodUUID:()=>fA,ZodUndefined:()=>$oe,ZodUnion:()=>bk,ZodUnknown:()=>Koe,ZodVoid:()=>Zoe,ZodXID:()=>az,ZodXor:()=>Xoe,_ZodString:()=>ez,_default:()=>Aie,_function:()=>F6e,any:()=>h6e,array:()=>Sk,base64:()=>e6e,base64url:()=>t6e,bigint:()=>p6e,boolean:()=>zoe,catch:()=>Sie,check:()=>G6e,cidrv4:()=>W3e,cidrv6:()=>X3e,codec:()=>M6e,cuid:()=>H3e,cuid2:()=>$3e,custom:()=>j6e,date:()=>E6e,describe:()=>z6e,discriminatedUnion:()=>C6e,e164:()=>n6e,email:()=>k3e,emoji:()=>j3e,enum:()=>yz,exactOptional:()=>pie,file:()=>w6e,float32:()=>u6e,float64:()=>c6e,function:()=>F6e,guid:()=>P3e,hash:()=>a6e,hex:()=>s6e,hostname:()=>i6e,httpUrl:()=>G3e,instanceof:()=>$6e,int:()=>Wj,int32:()=>l6e,int64:()=>f6e,intersection:()=>nie,invertCodec:()=>L6e,ipv4:()=>K3e,ipv6:()=>Z3e,json:()=>V6e,jwt:()=>r6e,keyof:()=>y6e,ksuid:()=>Y3e,lazy:()=>xie,literal:()=>B6e,looseObject:()=>b6e,looseRecord:()=>R6e,mac:()=>J3e,map:()=>x6e,meta:()=>H6e,nan:()=>P6e,nanoid:()=>z3e,nativeEnum:()=>N6e,never:()=>_z,nonoptional:()=>_ie,null:()=>Voe,nullable:()=>hk,nullish:()=>O6e,number:()=>joe,object:()=>S6e,optional:()=>gk,partialRecord:()=>v6e,pipe:()=>Xj,prefault:()=>hie,preprocess:()=>Y6e,promise:()=>Q6e,readonly:()=>Cie,record:()=>iie,refine:()=>Bie,set:()=>D6e,strictObject:()=>T6e,string:()=>mk,stringFormat:()=>o6e,stringbool:()=>q6e,success:()=>k6e,superRefine:()=>wie,symbol:()=>A6e,templateLiteral:()=>U6e,transform:()=>Sz,tuple:()=>oie,uint32:()=>d6e,uint64:()=>m6e,ulid:()=>q3e,undefined:()=>g6e,union:()=>Ez,unknown:()=>wT,url:()=>F3e,uuid:()=>M3e,uuidv4:()=>L3e,uuidv6:()=>U3e,uuidv7:()=>Q3e,void:()=>_6e,xid:()=>V3e,xor:()=>I6e});function _k(e,t,n){let r=Object.getPrototypeOf(e),o=O3e.get(r);if(o||(o=new Set,O3e.set(r,o)),!o.has(t)){o.add(t);for(let i in n){let s=n[i];Object.defineProperty(r,i,{configurable:!0,enumerable:!1,get(){let u=s.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:u}),u},set(u){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:u})}})}}}function mk(e){return ere(Ox,e)}function k3e(e){return gj(tz,e)}function P3e(e){return ak(Ak,e)}function M3e(e){return hj(fA,e)}function L3e(e){return _j(fA,e)}function U3e(e){return Ej(fA,e)}function Q3e(e){return yj(fA,e)}function F3e(e){return uk(Ek,e)}function G3e(e){return uk(Ek,{protocol:od.httpProtocol,hostname:od.domain,...Le.normalizeParams(e)})}function j3e(e){return Sj(nz,e)}function z3e(e){return Tj(rz,e)}function H3e(e){return bj(oz,e)}function $3e(e){return Ij(iz,e)}function q3e(e){return Cj(sz,e)}function V3e(e){return vj(az,e)}function Y3e(e){return Rj(uz,e)}function K3e(e){return xj(cz,e)}function J3e(e){return nre(Goe,e)}function Z3e(e){return Dj(lz,e)}function W3e(e){return Nj(dz,e)}function X3e(e){return Bj(pz,e)}function e6e(e){return wj(fz,e)}function t6e(e){return Oj(mz,e)}function n6e(e){return kj(Az,e)}function r6e(e){return Pj(gz,e)}function o6e(e,t,n={}){return xx(kx,e,t,n)}function i6e(e){return xx(kx,"hostname",od.hostname,e)}function s6e(e){return xx(kx,"hex",od.hex,e)}function a6e(e,t){let n=t?.enc??"hex",r=`${e}_${n}`,o=od[r];if(!o)throw new Error(`Unrecognized hash format: ${r}`);return xx(kx,r,o,t)}function joe(e){return ure(Px,e)}function Wj(e){return lre(OT,e)}function u6e(e){return dre(OT,e)}function c6e(e){return pre(OT,e)}function l6e(e){return fre(OT,e)}function d6e(e){return mre(OT,e)}function zoe(e){return Are(Mx,e)}function p6e(e){return hre(Lx,e)}function f6e(e){return Ere(hz,e)}function m6e(e){return yre(hz,e)}function A6e(e){return Sre(Hoe,e)}function g6e(e){return Tre($oe,e)}function Voe(e){return bre(qoe,e)}function h6e(){return Ire(Yoe)}function wT(){return Cre(Koe)}function _z(e){return vre(Joe,e)}function _6e(e){return Rre(Zoe,e)}function E6e(e){return xre(yk,e)}function Sk(e,t){return Bre(Woe,e,t)}function y6e(e){let t=e._zod.def.shape;return yz(Object.keys(t))}function S6e(e,t){let n={type:"object",shape:e??{},...Le.normalizeParams(t)};return new Tk(n)}function T6e(e,t){return new Tk({type:"object",shape:e,catchall:_z(),...Le.normalizeParams(t)})}function b6e(e,t){return new Tk({type:"object",shape:e,catchall:wT(),...Le.normalizeParams(t)})}function Ez(e,t){return new bk({type:"union",options:e,...Le.normalizeParams(t)})}function I6e(e,t){return new Xoe({type:"union",options:e,inclusive:!1,...Le.normalizeParams(t)})}function C6e(e,t,n){return new eie({type:"union",options:t,discriminator:e,...Le.normalizeParams(n)})}function nie(e,t){return new tie({type:"intersection",left:e,right:t})}function oie(e,t,n){let r=t instanceof cn,o=r?n:t,i=r?t:null;return new rie({type:"tuple",items:e,rest:i,...Le.normalizeParams(o)})}function iie(e,t,n){return!t||!t._zod?new Bx({type:"record",keyType:mk(),valueType:e,...Le.normalizeParams(t)}):new Bx({type:"record",keyType:e,valueType:t,...Le.normalizeParams(n)})}function v6e(e,t,n){let r=uc(e);return r._zod.values=void 0,new Bx({type:"record",keyType:r,valueType:t,...Le.normalizeParams(n)})}function R6e(e,t,n){return new Bx({type:"record",keyType:e,valueType:t,mode:"loose",...Le.normalizeParams(n)})}function x6e(e,t,n){return new sie({type:"map",keyType:e,valueType:t,...Le.normalizeParams(n)})}function D6e(e,t){return new aie({type:"set",valueType:e,...Le.normalizeParams(t)})}function yz(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new wx({type:"enum",entries:n,...Le.normalizeParams(t)})}function N6e(e,t){return new wx({type:"enum",entries:e,...Le.normalizeParams(t)})}function B6e(e,t){return new uie({type:"literal",values:Array.isArray(e)?e:[e],...Le.normalizeParams(t)})}function w6e(e){return wre(cie,e)}function Sz(e){return new lie({type:"transform",transform:e})}function gk(e){return new Tz({type:"optional",innerType:e})}function pie(e){return new die({type:"optional",innerType:e})}function hk(e){return new fie({type:"nullable",innerType:e})}function O6e(e){return gk(hk(e))}function Aie(e,t){return new mie({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Le.shallowClone(t)}})}function hie(e,t){return new gie({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Le.shallowClone(t)}})}function _ie(e,t){return new bz({type:"nonoptional",innerType:e,...Le.normalizeParams(t)})}function k6e(e){return new Eie({type:"success",innerType:e})}function Sie(e,t){return new yie({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}function P6e(e){return Nre(Tie,e)}function Xj(e,t){return new Ik({type:"pipe",in:e,out:t})}function M6e(e,t,n){return new Ck({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function L6e(e){let t=e._zod.def;return new Ck({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}function Cie(e){return new Iie({type:"readonly",innerType:e})}function U6e(e,t){return new vie({type:"template_literal",parts:e,...Le.normalizeParams(t)})}function xie(e){return new Rie({type:"lazy",getter:e})}function Q6e(e){return new Die({type:"promise",innerType:e})}function F6e(e){return new Nie({type:"function",input:Array.isArray(e?.input)?oie(e?.input):e?.input??Sk(wT()),output:e?.output??wT()})}function G6e(e){let t=new no({check:"custom"});return t._zod.check=e,t}function j6e(e,t){return Ore(vk,e??(()=>!0),t)}function Bie(e,t={}){return kre(vk,e,t)}function wie(e,t){return Pre(e,t)}function $6e(e,t={}){let n=new vk({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...Le.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=r=>{r.value instanceof e||r.issues.push({code:"invalid_type",expected:e.name,input:r.value,inst:n,path:[...n._zod.def.path??[]]})},n}function V6e(e){let t=xie(()=>Ez([mk(e),joe(),zoe(),Voe(),Sk(t),iie(mk(),t)]));return t}function Y6e(e,t){return new bie({type:"pipe",in:Sz(e),out:t})}var O3e,Nn,ez,Ox,Jr,tz,Ak,fA,Ek,nz,rz,oz,iz,sz,az,uz,cz,Goe,lz,dz,pz,fz,mz,Az,gz,kx,Px,OT,Mx,Lx,hz,Hoe,$oe,qoe,Yoe,Koe,Joe,Zoe,yk,Woe,Tk,bk,Xoe,eie,tie,rie,Bx,sie,aie,wx,uie,cie,lie,Tz,die,fie,mie,gie,bz,Eie,yie,Tie,Ik,Ck,bie,Iie,vie,Rie,Die,Nie,vk,z6e,H6e,q6e,fk=w(()=>{m();sd();sd();lk();ck();Vj();dk();Foe();O3e=new WeakMap;Nn=ie("ZodType",(e,t)=>(cn.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Dx(e,"input"),output:Dx(e,"output")}}),e.toJSONSchema=Qre(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,r)=>xoe(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>Noe(e,n,r),e.parseAsync=async(n,r)=>Doe(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>Boe(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>woe(e,n,r),e.decode=(n,r)=>Ooe(e,n,r),e.encodeAsync=async(n,r)=>koe(e,n,r),e.decodeAsync=async(n,r)=>Poe(e,n,r),e.safeEncode=(n,r)=>Moe(e,n,r),e.safeDecode=(n,r)=>Loe(e,n,r),e.safeEncodeAsync=async(n,r)=>Uoe(e,n,r),e.safeDecodeAsync=async(n,r)=>Qoe(e,n,r),_k(e,"ZodType",{check(...n){let r=this.def;return this.clone(Le.mergeDefs(r,{checks:[...r.checks??[],...n.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,r){return uc(this,n,r)},brand(){return this},register(n,r){return n.add(this,r),this},refine(n,r){return this.check(Bie(n,r))},superRefine(n,r){return this.check(wie(n,r))},overwrite(n){return this.check(Pf(n))},optional(){return gk(this)},exactOptional(){return pie(this)},nullable(){return hk(this)},nullish(){return gk(hk(this))},nonoptional(n){return _ie(this,n)},array(){return Sk(this)},or(n){return Ez([this,n])},and(n){return nie(this,n)},transform(n){return Xj(this,Sz(n))},default(n){return Aie(this,n)},prefault(n){return hie(this,n)},catch(n){return Sie(this,n)},pipe(n){return Xj(this,n)},readonly(){return Cie(this)},describe(n){let r=this.clone();return Qa.add(r,{description:n}),r},meta(...n){if(n.length===0)return Qa.get(this);let r=this.clone();return Qa.add(r,n[0]),r},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return Qa.get(e)?.description},configurable:!0}),e)),ez=ie("_ZodString",(e,t)=>{xT.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Fre(e,r,o,i);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,_k(e,"_ZodString",{regex(...r){return this.check(gx(...r))},includes(...r){return this.check(Ex(...r))},startsWith(...r){return this.check(yx(...r))},endsWith(...r){return this.check(Sx(...r))},min(...r){return this.check(ah(...r))},max(...r){return this.check(NT(...r))},length(...r){return this.check(BT(...r))},nonempty(...r){return this.check(ah(1,...r))},lowercase(r){return this.check(hx(r))},uppercase(r){return this.check(_x(r))},trim(){return this.check(Ix())},normalize(...r){return this.check(bx(...r))},toLowerCase(){return this.check(Cx())},toUpperCase(){return this.check(vx())},slugify(){return this.check(Rx())}})}),Ox=ie("ZodString",(e,t)=>{xT.init(e,t),ez.init(e,t),e.email=n=>e.check(gj(tz,n)),e.url=n=>e.check(uk(Ek,n)),e.jwt=n=>e.check(Pj(gz,n)),e.emoji=n=>e.check(Sj(nz,n)),e.guid=n=>e.check(ak(Ak,n)),e.uuid=n=>e.check(hj(fA,n)),e.uuidv4=n=>e.check(_j(fA,n)),e.uuidv6=n=>e.check(Ej(fA,n)),e.uuidv7=n=>e.check(yj(fA,n)),e.nanoid=n=>e.check(Tj(rz,n)),e.guid=n=>e.check(ak(Ak,n)),e.cuid=n=>e.check(bj(oz,n)),e.cuid2=n=>e.check(Ij(iz,n)),e.ulid=n=>e.check(Cj(sz,n)),e.base64=n=>e.check(wj(fz,n)),e.base64url=n=>e.check(Oj(mz,n)),e.xid=n=>e.check(vj(az,n)),e.ksuid=n=>e.check(Rj(uz,n)),e.ipv4=n=>e.check(xj(cz,n)),e.ipv6=n=>e.check(Dj(lz,n)),e.cidrv4=n=>e.check(Nj(dz,n)),e.cidrv6=n=>e.check(Bj(pz,n)),e.e164=n=>e.check(kj(Az,n)),e.datetime=n=>e.check(boe(n)),e.date=n=>e.check(Ioe(n)),e.time=n=>e.check(Coe(n)),e.duration=n=>e.check(voe(n))});Jr=ie("ZodStringFormat",(e,t)=>{Kr.init(e,t),ez.init(e,t)}),tz=ie("ZodEmail",(e,t)=>{Fte.init(e,t),Jr.init(e,t)});Ak=ie("ZodGUID",(e,t)=>{Ute.init(e,t),Jr.init(e,t)});fA=ie("ZodUUID",(e,t)=>{Qte.init(e,t),Jr.init(e,t)});Ek=ie("ZodURL",(e,t)=>{Gte.init(e,t),Jr.init(e,t)});nz=ie("ZodEmoji",(e,t)=>{jte.init(e,t),Jr.init(e,t)});rz=ie("ZodNanoID",(e,t)=>{zte.init(e,t),Jr.init(e,t)});oz=ie("ZodCUID",(e,t)=>{Hte.init(e,t),Jr.init(e,t)});iz=ie("ZodCUID2",(e,t)=>{$te.init(e,t),Jr.init(e,t)});sz=ie("ZodULID",(e,t)=>{qte.init(e,t),Jr.init(e,t)});az=ie("ZodXID",(e,t)=>{Vte.init(e,t),Jr.init(e,t)});uz=ie("ZodKSUID",(e,t)=>{Yte.init(e,t),Jr.init(e,t)});cz=ie("ZodIPv4",(e,t)=>{Xte.init(e,t),Jr.init(e,t)});Goe=ie("ZodMAC",(e,t)=>{tne.init(e,t),Jr.init(e,t)});lz=ie("ZodIPv6",(e,t)=>{ene.init(e,t),Jr.init(e,t)});dz=ie("ZodCIDRv4",(e,t)=>{nne.init(e,t),Jr.init(e,t)});pz=ie("ZodCIDRv6",(e,t)=>{rne.init(e,t),Jr.init(e,t)});fz=ie("ZodBase64",(e,t)=>{ine.init(e,t),Jr.init(e,t)});mz=ie("ZodBase64URL",(e,t)=>{sne.init(e,t),Jr.init(e,t)});Az=ie("ZodE164",(e,t)=>{ane.init(e,t),Jr.init(e,t)});gz=ie("ZodJWT",(e,t)=>{une.init(e,t),Jr.init(e,t)});kx=ie("ZodCustomStringFormat",(e,t)=>{cne.init(e,t),Jr.init(e,t)});Px=ie("ZodNumber",(e,t)=>{sj.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Gre(e,r,o,i),_k(e,"ZodNumber",{gt(r,o){return this.check(dA(r,o))},gte(r,o){return this.check(lc(r,o))},min(r,o){return this.check(lc(r,o))},lt(r,o){return this.check(lA(r,o))},lte(r,o){return this.check(id(r,o))},max(r,o){return this.check(id(r,o))},int(r){return this.check(Wj(r))},safe(r){return this.check(Wj(r))},positive(r){return this.check(dA(0,r))},nonnegative(r){return this.check(lc(0,r))},negative(r){return this.check(lA(0,r))},nonpositive(r){return this.check(id(0,r))},multipleOf(r,o){return this.check(KE(r,o))},step(r,o){return this.check(KE(r,o))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});OT=ie("ZodNumberFormat",(e,t)=>{lne.init(e,t),Px.init(e,t)});Mx=ie("ZodBoolean",(e,t)=>{tk.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>jre(e,n,r,o)});Lx=ie("ZodBigInt",(e,t)=>{aj.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>zre(e,r,o,i),e.gte=(r,o)=>e.check(lc(r,o)),e.min=(r,o)=>e.check(lc(r,o)),e.gt=(r,o)=>e.check(dA(r,o)),e.gte=(r,o)=>e.check(lc(r,o)),e.min=(r,o)=>e.check(lc(r,o)),e.lt=(r,o)=>e.check(lA(r,o)),e.lte=(r,o)=>e.check(id(r,o)),e.max=(r,o)=>e.check(id(r,o)),e.positive=r=>e.check(dA(BigInt(0),r)),e.negative=r=>e.check(lA(BigInt(0),r)),e.nonpositive=r=>e.check(id(BigInt(0),r)),e.nonnegative=r=>e.check(lc(BigInt(0),r)),e.multipleOf=(r,o)=>e.check(KE(r,o));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});hz=ie("ZodBigIntFormat",(e,t)=>{dne.init(e,t),Lx.init(e,t)});Hoe=ie("ZodSymbol",(e,t)=>{pne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Hre(e,n,r,o)});$oe=ie("ZodUndefined",(e,t)=>{fne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>qre(e,n,r,o)});qoe=ie("ZodNull",(e,t)=>{mne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>$re(e,n,r,o)});Yoe=ie("ZodAny",(e,t)=>{Ane.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Kre(e,n,r,o)});Koe=ie("ZodUnknown",(e,t)=>{gne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Jre(e,n,r,o)});Joe=ie("ZodNever",(e,t)=>{hne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Yre(e,n,r,o)});Zoe=ie("ZodVoid",(e,t)=>{_ne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Vre(e,n,r,o)});yk=ie("ZodDate",(e,t)=>{Ene.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Zre(e,r,o,i),e.min=(r,o)=>e.check(lc(r,o)),e.max=(r,o)=>e.check(id(r,o));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});Woe=ie("ZodArray",(e,t)=>{yne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>coe(e,n,r,o),e.element=t.element,_k(e,"ZodArray",{min(n,r){return this.check(ah(n,r))},nonempty(n){return this.check(ah(1,n))},max(n,r){return this.check(NT(n,r))},length(n,r){return this.check(BT(n,r))},unwrap(){return this.element}})});Tk=ie("ZodObject",(e,t)=>{Sne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>loe(e,n,r,o),Le.defineLazy(e,"shape",()=>t.shape),_k(e,"ZodObject",{keyof(){return yz(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:wT()})},loose(){return this.clone({...this._zod.def,catchall:wT()})},strict(){return this.clone({...this._zod.def,catchall:_z()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return Le.extend(this,n)},safeExtend(n){return Le.safeExtend(this,n)},merge(n){return Le.merge(this,n)},pick(n){return Le.pick(this,n)},omit(n){return Le.omit(this,n)},partial(...n){return Le.partial(Tz,this,n[0])},required(...n){return Le.required(bz,this,n[0])}})});bk=ie("ZodUnion",(e,t)=>{nk.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>jj(e,n,r,o),e.options=t.options});Xoe=ie("ZodXor",(e,t)=>{bk.init(e,t),Tne.init(e,t),e._zod.processJSONSchema=(n,r,o)=>jj(e,n,r,o),e.options=t.options});eie=ie("ZodDiscriminatedUnion",(e,t)=>{bk.init(e,t),bne.init(e,t)});tie=ie("ZodIntersection",(e,t)=>{Ine.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>doe(e,n,r,o)});rie=ie("ZodTuple",(e,t)=>{uj.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>poe(e,n,r,o),e.rest=n=>e.clone({...e._zod.def,rest:n})});Bx=ie("ZodRecord",(e,t)=>{Cne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>foe(e,n,r,o),e.keyType=t.keyType,e.valueType=t.valueType});sie=ie("ZodMap",(e,t)=>{vne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>aoe(e,n,r,o),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(pA(...n)),e.nonempty=n=>e.check(pA(1,n)),e.max=(...n)=>e.check(JE(...n)),e.size=(...n)=>e.check(DT(...n))});aie=ie("ZodSet",(e,t)=>{Rne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>uoe(e,n,r,o),e.min=(...n)=>e.check(pA(...n)),e.nonempty=n=>e.check(pA(1,n)),e.max=(...n)=>e.check(JE(...n)),e.size=(...n)=>e.check(DT(...n))});wx=ie("ZodEnum",(e,t)=>{xne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Wre(e,r,o,i),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{let i={};for(let s of r)if(n.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new wx({...t,checks:[],...Le.normalizeParams(o),entries:i})},e.exclude=(r,o)=>{let i={...t.entries};for(let s of r)if(n.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new wx({...t,checks:[],...Le.normalizeParams(o),entries:i})}});uie=ie("ZodLiteral",(e,t)=>{Dne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Xre(e,n,r,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});cie=ie("ZodFile",(e,t)=>{Nne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>noe(e,n,r,o),e.min=(n,r)=>e.check(pA(n,r)),e.max=(n,r)=>e.check(JE(n,r)),e.mime=(n,r)=>e.check(Tx(Array.isArray(n)?n:[n],r))});lie=ie("ZodTransform",(e,t)=>{Bne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>soe(e,n,r,o),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new HE(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(Le.issue(i,n.value,t));else{let s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=e),n.issues.push(Le.issue(s))}};let o=t.transform(n.value,n);return o instanceof Promise?o.then(i=>(n.value=i,n.fallback=!0,n)):(n.value=o,n.fallback=!0,n)}});Tz=ie("ZodOptional",(e,t)=>{cj.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>zj(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});die=ie("ZodExactOptional",(e,t)=>{wne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>zj(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});fie=ie("ZodNullable",(e,t)=>{One.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>moe(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});mie=ie("ZodDefault",(e,t)=>{kne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>goe(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});gie=ie("ZodPrefault",(e,t)=>{Pne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>hoe(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});bz=ie("ZodNonOptional",(e,t)=>{Mne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Aoe(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});Eie=ie("ZodSuccess",(e,t)=>{Lne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>roe(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});yie=ie("ZodCatch",(e,t)=>{Une.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>_oe(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});Tie=ie("ZodNaN",(e,t)=>{Qne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>eoe(e,n,r,o)});Ik=ie("ZodPipe",(e,t)=>{lj.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Eoe(e,n,r,o),e.in=t.in,e.out=t.out});Ck=ie("ZodCodec",(e,t)=>{Ik.init(e,t),rk.init(e,t)});bie=ie("ZodPreprocess",(e,t)=>{Ik.init(e,t),Fne.init(e,t)}),Iie=ie("ZodReadonly",(e,t)=>{Gne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>yoe(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});vie=ie("ZodTemplateLiteral",(e,t)=>{jne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>toe(e,n,r,o)});Rie=ie("ZodLazy",(e,t)=>{$ne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Toe(e,n,r,o),e.unwrap=()=>e._zod.def.getter()});Die=ie("ZodPromise",(e,t)=>{Hne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Soe(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});Nie=ie("ZodFunction",(e,t)=>{zne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ioe(e,n,r,o)});vk=ie("ZodCustom",(e,t)=>{qne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ooe(e,n,r,o)});z6e=Mre,H6e=Lre;q6e=(...e)=>Ure({Codec:Ck,Boolean:Mx,String:Ox},...e)});function QMt(e){bi({customError:e})}function FMt(){return bi().customError}var UMt,Oie,K6e=w(()=>{m();sd();UMt={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};Oie||(Oie={})});function jMt(e,t){let n=e.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function zMt(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return t.rootSchema;let r=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===r){let o=n[1];if(!o||!t.defs[o])throw new Error(`Reference not found: ${e}`);return t.defs[o]}throw new Error(`Reference not found: ${e}`)}function J6e(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return Xe.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let o=e.$ref;if(t.refs.has(o))return t.refs.get(o);if(t.processing.has(o))return Xe.lazy(()=>{if(!t.refs.has(o))throw new Error(`Circular reference not resolved: ${o}`);return t.refs.get(o)});t.processing.add(o);let i=zMt(o,t),s=bu(i,t);return t.refs.set(o,s),t.processing.delete(o),s}if(e.enum!==void 0){let o=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&o.length===1&&o[0]===null)return Xe.null();if(o.length===0)return Xe.never();if(o.length===1)return Xe.literal(o[0]);if(o.every(s=>typeof s=="string"))return Xe.enum(o);let i=o.map(s=>Xe.literal(s));return i.length<2?i[0]:Xe.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return Xe.literal(e.const);let n=e.type;if(Array.isArray(n)){let o=n.map(i=>{let s={...e,type:i};return J6e(s,t)});return o.length===0?Xe.never():o.length===1?o[0]:Xe.union(o)}if(!n)return Xe.any();let r;switch(n){case"string":{let o=Xe.string();if(e.format){let i=e.format;i==="email"?o=o.check(Xe.email()):i==="uri"||i==="uri-reference"?o=o.check(Xe.url()):i==="uuid"||i==="guid"?o=o.check(Xe.uuid()):i==="date-time"?o=o.check(Xe.iso.datetime()):i==="date"?o=o.check(Xe.iso.date()):i==="time"?o=o.check(Xe.iso.time()):i==="duration"?o=o.check(Xe.iso.duration()):i==="ipv4"?o=o.check(Xe.ipv4()):i==="ipv6"?o=o.check(Xe.ipv6()):i==="mac"?o=o.check(Xe.mac()):i==="cidr"?o=o.check(Xe.cidrv4()):i==="cidr-v6"?o=o.check(Xe.cidrv6()):i==="base64"?o=o.check(Xe.base64()):i==="base64url"?o=o.check(Xe.base64url()):i==="e164"?o=o.check(Xe.e164()):i==="jwt"?o=o.check(Xe.jwt()):i==="emoji"?o=o.check(Xe.emoji()):i==="nanoid"?o=o.check(Xe.nanoid()):i==="cuid"?o=o.check(Xe.cuid()):i==="cuid2"?o=o.check(Xe.cuid2()):i==="ulid"?o=o.check(Xe.ulid()):i==="xid"?o=o.check(Xe.xid()):i==="ksuid"&&(o=o.check(Xe.ksuid()))}typeof e.minLength=="number"&&(o=o.min(e.minLength)),typeof e.maxLength=="number"&&(o=o.max(e.maxLength)),e.pattern&&(o=o.regex(new RegExp(e.pattern))),r=o;break}case"number":case"integer":{let o=n==="integer"?Xe.number().int():Xe.number();typeof e.minimum=="number"&&(o=o.min(e.minimum)),typeof e.maximum=="number"&&(o=o.max(e.maximum)),typeof e.exclusiveMinimum=="number"?o=o.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(o=o.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?o=o.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(o=o.lt(e.maximum)),typeof e.multipleOf=="number"&&(o=o.multipleOf(e.multipleOf)),r=o;break}case"boolean":{r=Xe.boolean();break}case"null":{r=Xe.null();break}case"object":{let o={},i=e.properties||{},s=new Set(e.required||[]);for(let[l,f]of Object.entries(i)){let h=bu(f,t);o[l]=s.has(l)?h:h.optional()}if(e.propertyNames){let l=bu(e.propertyNames,t),f=e.additionalProperties&&typeof e.additionalProperties=="object"?bu(e.additionalProperties,t):Xe.any();if(Object.keys(o).length===0){r=Xe.record(l,f);break}let h=Xe.object(o).passthrough(),_=Xe.looseRecord(l,f);r=Xe.intersection(h,_);break}if(e.patternProperties){let l=e.patternProperties,f=Object.keys(l),h=[];for(let y of f){let T=bu(l[y],t),v=Xe.string().regex(new RegExp(y));h.push(Xe.looseRecord(v,T))}let _=[];if(Object.keys(o).length>0&&_.push(Xe.object(o).passthrough()),_.push(...h),_.length===0)r=Xe.object({}).passthrough();else if(_.length===1)r=_[0];else{let y=Xe.intersection(_[0],_[1]);for(let T=2;T<_.length;T++)y=Xe.intersection(y,_[T]);r=y}break}let u=Xe.object(o);e.additionalProperties===!1?r=u.strict():typeof e.additionalProperties=="object"?r=u.catchall(bu(e.additionalProperties,t)):r=u.passthrough();break}case"array":{let o=e.prefixItems,i=e.items;if(o&&Array.isArray(o)){let s=o.map(l=>bu(l,t)),u=i&&typeof i=="object"&&!Array.isArray(i)?bu(i,t):void 0;u?r=Xe.tuple(s).rest(u):r=Xe.tuple(s),typeof e.minItems=="number"&&(r=r.check(Xe.minLength(e.minItems))),typeof e.maxItems=="number"&&(r=r.check(Xe.maxLength(e.maxItems)))}else if(Array.isArray(i)){let s=i.map(l=>bu(l,t)),u=e.additionalItems&&typeof e.additionalItems=="object"?bu(e.additionalItems,t):void 0;u?r=Xe.tuple(s).rest(u):r=Xe.tuple(s),typeof e.minItems=="number"&&(r=r.check(Xe.minLength(e.minItems))),typeof e.maxItems=="number"&&(r=r.check(Xe.maxLength(e.maxItems)))}else if(i!==void 0){let s=bu(i,t),u=Xe.array(s);typeof e.minItems=="number"&&(u=u.min(e.minItems)),typeof e.maxItems=="number"&&(u=u.max(e.maxItems)),r=u}else r=Xe.array(Xe.any());break}default:throw new Error(`Unsupported type: ${n}`)}return r}function bu(e,t){if(typeof e=="boolean")return e?Xe.any():Xe.never();let n=J6e(e,t),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let u=e.anyOf.map(f=>bu(f,t)),l=Xe.union(u);n=r?Xe.intersection(n,l):l}if(e.oneOf&&Array.isArray(e.oneOf)){let u=e.oneOf.map(f=>bu(f,t)),l=Xe.xor(u);n=r?Xe.intersection(n,l):l}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=r?n:Xe.any();else{let u=r?n:bu(e.allOf[0],t),l=r?0:1;for(let f=l;f<e.allOf.length;f++)u=Xe.intersection(u,bu(e.allOf[f],t));n=u}e.nullable===!0&&t.version==="openapi-3.0"&&(n=Xe.nullable(n)),e.readOnly===!0&&(n=Xe.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let o={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let u of i)u in e&&(o[u]=e[u]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let u of s)u in e&&(o[u]=e[u]);for(let u of Object.keys(e))GMt.has(u)||(o[u]=e[u]);return Object.keys(o).length>0&&t.registry.add(n,o),e.description&&(n=n.describe(e.description)),n}function Z6e(e,t){if(typeof e=="boolean")return e?Xe.any():Xe.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let r=jMt(n,t?.defaultTarget),o=n.$defs||n.definitions||{},i={version:r,defs:o,refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??Qa};return bu(n,i)}var Xe,GMt,W6e=w(()=>{m();sk();Vj();dk();fk();Xe={...pk,...qj,iso:Nx},GMt=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"])});var kie={};Zs(kie,{bigint:()=>VMt,boolean:()=>qMt,date:()=>YMt,number:()=>$Mt,string:()=>HMt});function HMt(e){return tre(Ox,e)}function $Mt(e){return cre(Px,e)}function qMt(e){return gre(Mx,e)}function VMt(e){return _re(Lx,e)}function YMt(e){return Dre(yk,e)}var X6e=w(()=>{m();sd();fk()});var A={};Zs(A,{$brand:()=>bee,$input:()=>Xne,$output:()=>Wne,NEVER:()=>Tee,TimePrecision:()=>rre,ZodAny:()=>Yoe,ZodArray:()=>Woe,ZodBase64:()=>fz,ZodBase64URL:()=>mz,ZodBigInt:()=>Lx,ZodBigIntFormat:()=>hz,ZodBoolean:()=>Mx,ZodCIDRv4:()=>dz,ZodCIDRv6:()=>pz,ZodCUID:()=>oz,ZodCUID2:()=>iz,ZodCatch:()=>yie,ZodCodec:()=>Ck,ZodCustom:()=>vk,ZodCustomStringFormat:()=>kx,ZodDate:()=>yk,ZodDefault:()=>mie,ZodDiscriminatedUnion:()=>eie,ZodE164:()=>Az,ZodEmail:()=>tz,ZodEmoji:()=>nz,ZodEnum:()=>wx,ZodError:()=>MMt,ZodExactOptional:()=>die,ZodFile:()=>cie,ZodFirstPartyTypeKind:()=>Oie,ZodFunction:()=>Nie,ZodGUID:()=>Ak,ZodIPv4:()=>cz,ZodIPv6:()=>lz,ZodISODate:()=>Kj,ZodISODateTime:()=>Yj,ZodISODuration:()=>Zj,ZodISOTime:()=>Jj,ZodIntersection:()=>tie,ZodIssueCode:()=>UMt,ZodJWT:()=>gz,ZodKSUID:()=>uz,ZodLazy:()=>Rie,ZodLiteral:()=>uie,ZodMAC:()=>Goe,ZodMap:()=>sie,ZodNaN:()=>Tie,ZodNanoID:()=>rz,ZodNever:()=>Joe,ZodNonOptional:()=>bz,ZodNull:()=>qoe,ZodNullable:()=>fie,ZodNumber:()=>Px,ZodNumberFormat:()=>OT,ZodObject:()=>Tk,ZodOptional:()=>Tz,ZodPipe:()=>Ik,ZodPrefault:()=>gie,ZodPreprocess:()=>bie,ZodPromise:()=>Die,ZodReadonly:()=>Iie,ZodRealError:()=>rl,ZodRecord:()=>Bx,ZodSet:()=>aie,ZodString:()=>Ox,ZodStringFormat:()=>Jr,ZodSuccess:()=>Eie,ZodSymbol:()=>Hoe,ZodTemplateLiteral:()=>vie,ZodTransform:()=>lie,ZodTuple:()=>rie,ZodType:()=>Nn,ZodULID:()=>sz,ZodURL:()=>Ek,ZodUUID:()=>fA,ZodUndefined:()=>$oe,ZodUnion:()=>bk,ZodUnknown:()=>Koe,ZodVoid:()=>Zoe,ZodXID:()=>az,ZodXor:()=>Xoe,_ZodString:()=>ez,_default:()=>Aie,_function:()=>F6e,any:()=>h6e,array:()=>Sk,base64:()=>e6e,base64url:()=>t6e,bigint:()=>p6e,boolean:()=>zoe,catch:()=>Sie,check:()=>G6e,cidrv4:()=>W3e,cidrv6:()=>X3e,clone:()=>uc,codec:()=>M6e,coerce:()=>kie,config:()=>bi,core:()=>uh,cuid:()=>H3e,cuid2:()=>$3e,custom:()=>j6e,date:()=>E6e,decode:()=>Ooe,decodeAsync:()=>Poe,describe:()=>z6e,discriminatedUnion:()=>C6e,e164:()=>n6e,email:()=>k3e,emoji:()=>j3e,encode:()=>woe,encodeAsync:()=>koe,endsWith:()=>Sx,enum:()=>yz,exactOptional:()=>pie,file:()=>w6e,flattenError:()=>JO,float32:()=>u6e,float64:()=>c6e,formatError:()=>ZO,fromJSONSchema:()=>Z6e,function:()=>F6e,getErrorMap:()=>FMt,globalRegistry:()=>Qa,gt:()=>dA,gte:()=>lc,guid:()=>P3e,hash:()=>a6e,hex:()=>s6e,hostname:()=>i6e,httpUrl:()=>G3e,includes:()=>Ex,instanceof:()=>$6e,int:()=>Wj,int32:()=>l6e,int64:()=>f6e,intersection:()=>nie,invertCodec:()=>L6e,ipv4:()=>K3e,ipv6:()=>Z3e,iso:()=>Nx,json:()=>V6e,jwt:()=>r6e,keyof:()=>y6e,ksuid:()=>Y3e,lazy:()=>xie,length:()=>BT,literal:()=>B6e,locales:()=>ik,looseObject:()=>b6e,looseRecord:()=>R6e,lowercase:()=>hx,lt:()=>lA,lte:()=>id,mac:()=>J3e,map:()=>x6e,maxLength:()=>NT,maxSize:()=>JE,meta:()=>H6e,mime:()=>Tx,minLength:()=>ah,minSize:()=>pA,multipleOf:()=>KE,nan:()=>P6e,nanoid:()=>z3e,nativeEnum:()=>N6e,negative:()=>Lj,never:()=>_z,nonnegative:()=>Qj,nonoptional:()=>_ie,nonpositive:()=>Uj,normalize:()=>bx,null:()=>Voe,nullable:()=>hk,nullish:()=>O6e,number:()=>joe,object:()=>S6e,optional:()=>gk,overwrite:()=>Pf,parse:()=>xoe,parseAsync:()=>Doe,partialRecord:()=>v6e,pipe:()=>Xj,positive:()=>Mj,prefault:()=>hie,preprocess:()=>Y6e,prettifyError:()=>Mee,promise:()=>Q6e,property:()=>Fj,readonly:()=>Cie,record:()=>iie,refine:()=>Bie,regex:()=>gx,regexes:()=>od,registry:()=>Aj,safeDecode:()=>Loe,safeDecodeAsync:()=>Qoe,safeEncode:()=>Moe,safeEncodeAsync:()=>Uoe,safeParse:()=>Noe,safeParseAsync:()=>Boe,set:()=>D6e,setErrorMap:()=>QMt,size:()=>DT,slugify:()=>Rx,startsWith:()=>yx,strictObject:()=>T6e,string:()=>mk,stringFormat:()=>o6e,stringbool:()=>q6e,success:()=>k6e,superRefine:()=>wie,symbol:()=>A6e,templateLiteral:()=>U6e,toJSONSchema:()=>Hj,toLowerCase:()=>Cx,toUpperCase:()=>vx,transform:()=>Sz,treeifyError:()=>Pee,trim:()=>Ix,tuple:()=>oie,uint32:()=>d6e,uint64:()=>m6e,ulid:()=>q3e,undefined:()=>g6e,union:()=>Ez,unknown:()=>wT,uppercase:()=>_x,url:()=>F3e,util:()=>Le,uuid:()=>M3e,uuidv4:()=>L3e,uuidv6:()=>U3e,uuidv7:()=>Q3e,void:()=>_6e,xid:()=>V3e,xor:()=>I6e});var Pie=w(()=>{m();sd();fk();Vj();Roe();Foe();K6e();sd();Yne();sd();lk();W6e();Zne();dk();dk();X6e();bi(dj())});var pc=w(()=>{m();Pie();Pie()});var KMt,Iu,Mie,kT,Iz,JMt,Cz,eGe,tGe,Lie,ZMt,WMt,XMt,e2t,t2t,n2t,r2t,nGe,vz=w(()=>{"use strict";m();cA();pc();KMt=Tu(),Iu=A.object({message:A.string()}),Mie=A.record(A.string(),A.unknown()),kT=A.string().regex(/^doc_[0-9A-Za-z]{22}$/),Iz=A.string().regex(/^proj_[0-9A-Za-z]{22}$/),JMt=["active","archived"],Cz=A.enum(JMt),eGe=A.object({id:A.string().min(1),display_name:A.string().min(1)}),tGe=A.object({id:Iz,name:A.string().min(1)}),Lie=A.object({id:kT,title:A.string().min(1),status:Cz,author:eGe,project:tGe.nullable(),created_at:A.string().datetime(),updated_at:A.string().datetime(),archived_at:A.string().datetime().nullable()}),ZMt=A.object({type:A.literal("list"),list_type:A.literal("doc"),objects:A.array(Lie)}),WMt=A.object({project_id:Iz.optional(),status:Cz.optional()}),XMt=A.object({title:A.string().trim().min(1).max(300).optional(),prosemirror_json:Mie.optional(),project_id:Iz.nullable().optional()}),e2t=A.object({id:kT,created_at:A.string().datetime()}),t2t=A.object({title:A.string().trim().min(1).max(300).optional(),prosemirror_json:Mie.optional(),project_id:Iz.nullable().optional(),status:Cz.optional()}).refine(e=>Object.keys(e).length>0,{message:"At least one field must be provided"}),n2t=A.object({id:kT,updated_at:A.string().datetime()}),r2t=A.object({id:kT,title:A.string().min(1),prosemirror_json:Mie,status:Cz,author:eGe,project:tGe.nullable(),created_at:A.string().datetime(),updated_at:A.string().datetime(),archived_at:A.string().datetime().nullable()}),nGe=KMt.router({listDocs:{method:"GET",path:"/docs",headers:A.object({authorization:A.string().min(1).optional()}),query:WMt,responses:{200:ZMt,401:Iu,403:Iu},summary:"List docs in the authenticated user\u2019s organization. Optional project_id filter scopes to a single project."},createDoc:{method:"POST",path:"/docs",headers:A.object({authorization:A.string().min(1).optional()}),body:XMt,responses:{201:e2t,401:Iu,403:Iu,404:Iu,422:Iu},summary:"Create a doc. If project_id is provided, the doc is scoped to that project; otherwise it lives at the workspace level."},getDoc:{method:"GET",path:"/docs/:docId",pathParams:A.object({docId:kT}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:r2t,401:Iu,403:Iu,404:Iu},summary:"Get a doc by id with its rich-text body and parent project (if any)"},updateDoc:{method:"PATCH",path:"/docs/:docId",pathParams:A.object({docId:kT}),headers:A.object({authorization:A.string().min(1).optional()}),body:t2t,responses:{200:n2t,401:Iu,403:Iu,404:Iu,422:Iu},summary:"Update a doc. If prosemirror_json changes, the server re-syncs lore.mention_references from mention nodes."},deleteDoc:{method:"DELETE",path:"/docs/:docId",pathParams:A.object({docId:kT}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{204:A.object({}),401:Iu,403:Iu,404:Iu},summary:"Hard-delete a doc and any mention references it owns"}})});var o2t,Mf,N3n,B3n,i2t,w3n,s2t,Ux,Rz=w(()=>{"use strict";m();pc();o2t=["person","foot_gun"],Mf=A.enum(o2t),N3n=A.enum(["authored","commented","edited","mentioned"]),B3n=A.enum(["observed_in","reaffirmed_in"]),i2t=["primary"],w3n=A.enum(i2t),s2t=["supports","supersedes"],Ux=A.enum(s2t)});var a2t,Uie=w(()=>{"use strict";m();pc();a2t=A.object({user_id:A.string().nullable()})});var u2t,Qie=w(()=>{"use strict";m();pc();u2t=A.object({typical_phrasings:A.array(A.string()).default([])})});var Fie=w(()=>{"use strict";m();Rz();Uie();Qie();Rz();Uie();Qie()});var c2t,Qi,ad,l2t,oGe,iGe,d2t,rGe,PT,p2t,f2t,m2t,A2t,g2t,sGe,Gie=w(()=>{"use strict";m();cA();pc();Fie();c2t=Tu(),Qi=A.object({message:A.string()}),ad=A.string().regex(/^ent_[0-9A-Za-z]{22}$/),l2t=["active","archived"],oGe=A.enum(l2t),iGe=A.object({id:ad,kind:Mf,slug:A.string(),name:A.string(),blurb:A.string().nullable(),status:oGe,lifecycle:A.string().nullable(),human_edited_at:A.string().datetime().nullable(),last_active_at:A.string().datetime(),created_at:A.string().datetime(),updated_at:A.string().datetime()}),d2t=A.object({thread_id:A.string(),thread_title:A.string(),role:A.string(),score:A.number().nullable(),added_at:A.string().datetime(),added_by:A.object({id:A.string(),display_name:A.string()})}),rGe=A.object({entity_id:ad,name:A.string(),slug:A.string(),kind:Mf,edge_kind:Ux}),PT=iGe.extend({payload:A.record(A.string(),A.unknown()),attachments:A.array(d2t),edges:A.object({outgoing:A.array(rGe),incoming:A.array(rGe)})}),p2t=A.object({type:A.literal("list"),list_type:A.literal("entities"),has_more:A.boolean(),objects:A.array(iGe)}),f2t=A.object({kind:Mf.optional().describe("Filter to a single entity kind"),status:oGe.optional().describe("Filter by entity status"),after:ad.optional().describe("Cursor: return entities after this id"),before:ad.optional().describe("Cursor: return entities before this id")}),m2t=A.object({name:A.string().min(1).optional().describe("New display name for the entity"),blurb:A.string().nullable().optional().describe("New blurb; null clears it"),payload:A.record(A.string(),A.unknown()).optional().describe("Replacement payload for the entity")}),A2t=A.object({thread_id:A.string().min(1).describe("Id of the thread to attach"),role:A.string().min(1).describe("Role of the thread relative to the entity"),score:A.number().min(0).max(1).nullable().optional().describe("Optional relevance score in [0, 1]")}),g2t=A.object({to_id:ad.describe("Id of the target entity for the edge"),kind:Ux.describe("Kind of edge to create")}),sGe=c2t.router({listEntities:{method:"GET",path:"/entities",headers:A.object({authorization:A.string().min(1).optional()}),query:f2t,responses:{200:p2t,401:Qi},summary:"List entities in the authenticated user\u2019s organization"},getEntity:{method:"GET",path:"/entities/:entityId",pathParams:A.object({entityId:ad.describe("Id of the entity to fetch")}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:PT,401:Qi,404:Qi},summary:"Get an entity with its payload, attachments, and edges"},patchEntity:{method:"PATCH",path:"/entities/:entityId",pathParams:A.object({entityId:ad.describe("Id of the entity to update")}),headers:A.object({authorization:A.string().min(1).optional()}),body:m2t,responses:{200:PT,401:Qi,403:Qi,404:Qi},summary:"Update an entity\u2019s name, blurb, or payload"},archiveEntity:{method:"POST",path:"/entities/:entityId/archive",pathParams:A.object({entityId:ad.describe("Id of the entity to archive")}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}),responses:{200:PT,401:Qi,403:Qi,404:Qi},summary:"Archive an entity"},attachEntityThread:{method:"POST",path:"/entities/:entityId/threads",pathParams:A.object({entityId:ad.describe("Id of the entity to attach a thread to")}),headers:A.object({authorization:A.string().min(1).optional()}),body:A2t,responses:{200:PT,401:Qi,403:Qi,404:Qi},summary:"Attach a thread to an entity"},detachEntityThread:{method:"DELETE",path:"/entities/:entityId/threads/:threadId",pathParams:A.object({entityId:ad.describe("Id of the entity to detach a thread from"),threadId:A.string().min(1).describe("Id of the thread to detach")}),headers:A.object({authorization:A.string().min(1).optional()}),query:A.object({role:A.string().min(1).describe("Role of the thread membership to remove")}),responses:{200:PT,401:Qi,403:Qi,404:Qi},summary:"Detach a thread from an entity"},addEntityEdge:{method:"POST",path:"/entities/:entityId/edges",pathParams:A.object({entityId:ad.describe("Id of the source entity for the edge")}),headers:A.object({authorization:A.string().min(1).optional()}),body:g2t,responses:{200:PT,401:Qi,403:Qi,404:Qi},summary:"Add an edge from this entity to another entity"},removeEntityEdge:{method:"DELETE",path:"/entities/:entityId/edges/:toId/:kind",pathParams:A.object({entityId:ad.describe("Id of the source entity for the edge"),toId:ad.describe("Id of the target entity for the edge"),kind:Ux.describe("Kind of edge to remove")}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:PT,401:Qi,403:Qi,404:Qi},summary:"Remove an edge from this entity to another entity"}})});var h2t,_2t,da,aGe,E2t,y2t,S2t,T2t,uGe,b2t,I2t,cGe,jie=w(()=>{"use strict";m();cA();pc();h2t=Tu(),_2t=A.object({type:A.literal("list"),list_type:A.literal("thread"),has_more:A.boolean(),objects:A.array(A.unknown())}),da=A.object({message:A.string()}),aGe=A.object({thread_id:A.string().min(1),is_favorited:A.boolean(),favorited_at:A.string().datetime().nullable()}),E2t=A.object({before:A.string().min(1).max(64).optional()}),y2t=A.object({id:A.string().min(1),display_name:A.string().min(1)}),S2t=A.object({block_id:A.string().min(1),thread_id:A.string().min(1),thread_title:A.string(),thread_visibility:A.enum(["private","workspace","public"]),author:y2t,preview:A.string(),prompted_at:A.string().datetime().nullable(),favorited_at:A.string().datetime()}),T2t=A.object({type:A.literal("list"),list_type:A.literal("favorite_prompt"),has_more:A.boolean(),objects:A.array(S2t)}),uGe=A.object({block_id:A.string().min(1),thread_id:A.string().min(1).nullable(),is_favorited:A.boolean(),favorited_at:A.string().datetime().nullable()}),b2t=A.object({before:A.string().min(1).max(64).optional()}),I2t=A.object({block_ids:A.array(A.string().min(1))}),cGe=h2t.router({addThreadFavorite:{method:"POST",path:"/threads/:id/favorite",pathParams:A.object({id:A.string().min(1).max(64)}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{201:aGe,401:da,403:da,404:da},summary:"Bookmark a thread for the authenticated user. Idempotent \u2014 re-favoriting returns the existing membership."},removeThreadFavorite:{method:"DELETE",path:"/threads/:id/favorite",pathParams:A.object({id:A.string().min(1).max(64)}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{200:aGe,401:da,403:da,404:da},summary:"Remove a thread bookmark for the authenticated user (no-op if absent)."},listFavoriteThreads:{method:"GET",path:"/favorites/threads",headers:A.object({authorization:A.string().min(1).optional()}),query:E2t,responses:{200:_2t,401:da,403:da},summary:"List threads the authenticated user has favorited, newest favorited first. Visibility filtering still applies \u2014 a thread the viewer can no longer see (e.g. visibility downgraded) is omitted from the list."},addPromptFavorite:{method:"POST",path:"/thread-blocks/:id/favorite",pathParams:A.object({id:A.string().min(1).max(64)}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{201:uGe,401:da,403:da,404:da,409:da},summary:'Bookmark a single user prompt (a thread_blocks row with type="user") for the authenticated user. Idempotent.'},removePromptFavorite:{method:"DELETE",path:"/thread-blocks/:id/favorite",pathParams:A.object({id:A.string().min(1).max(64)}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{200:uGe,401:da,404:da},summary:"Remove a prompt bookmark for the authenticated user (no-op if absent)."},listFavoritePrompts:{method:"GET",path:"/favorites/prompts",headers:A.object({authorization:A.string().min(1).optional()}),query:b2t,responses:{200:T2t,401:da},summary:"List the user's favorited prompts, newest first. Prompts whose parent thread the viewer can no longer see (visibility downgraded) are filtered out at read time."},listFavoritedBlockIdsInThread:{method:"GET",path:"/threads/:id/favorited-blocks",pathParams:A.object({id:A.string().min(1).max(64)}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:I2t,401:da,403:da,404:da},summary:"Returns the set of thread_block ids the authenticated viewer has favorited within a single thread, used to bootstrap per-prompt star state on the SessionView."}})});var C2t,xz,v2t,Dz,R2t,x2t,D2t,N2t,B2t,w2t,O2t,k2t,lGe,zie=w(()=>{"use strict";m();cA();pc();C2t=Tu(),xz=A.object({message:A.string()}),v2t=["thread","plan","doc","user"],Dz=A.enum(v2t),R2t=["doc","project"],x2t=A.enum(R2t),D2t=A.object({kind:Dz,id:A.string().min(1),title:A.string().min(1),href:A.string().min(1)}),N2t=A.object({type:A.literal("list"),list_type:A.literal("mention"),objects:A.array(D2t)}),B2t=A.object({q:A.string().trim().min(1).max(50),kinds:A.string().optional().transform(e=>{if(!e)return;let t=e.split(",").map(n=>n.trim()).filter(n=>n.length>0);return t.length>0?t:void 0}).pipe(A.array(Dz).optional())}),w2t=A.object({source_kind:x2t,source_id:A.string().min(1),source_title:A.string().min(1),source_href:A.string().min(1),target_kind:Dz,target_id:A.string().min(1),created_at:A.string().datetime()}),O2t=A.object({type:A.literal("list"),list_type:A.literal("backlink"),objects:A.array(w2t)}),k2t=A.object({target_kind:Dz,target_id:A.string().min(1).max(64)}),lGe=C2t.router({searchMentions:{method:"GET",path:"/mentions/search",headers:A.object({authorization:A.string().min(1).optional()}),query:B2t,responses:{200:N2t,401:xz,422:xz},summary:"Search threads, plans, files, and users by title/name for @-mention typeahead. Org-scoped, max 10 results across all kinds."},listBacklinks:{method:"GET",path:"/mentions/backlinks",headers:A.object({authorization:A.string().min(1).optional()}),query:k2t,responses:{200:O2t,401:xz,403:xz},summary:"List every doc/project body in the caller\u2019s organization that mentions the given target. Newest-first."}})});var P2t,Fi,Hie,mA,M2t,Nz,$ie,dGe,L2t,U2t,Q2t,F2t,G2t,j2t,z2t,H2t,$2t,q2t,V2t,Y2t,pGe,qie=w(()=>{"use strict";m();cA();pc();vz();P2t=Tu(),Fi=A.object({message:A.string()}),Hie=A.record(A.string(),A.unknown()),mA=A.string().regex(/^proj_[0-9A-Za-z]{22}$/),M2t=["active","archived"],Nz=A.enum(M2t),$ie=A.object({id:A.string().min(1),display_name:A.string().min(1)}),dGe=A.object({thread_id:A.string().min(1),title:A.string().min(1),added_at:A.string().datetime(),added_by:$ie}),L2t=A.object({id:mA,name:A.string().min(1),status:Nz,author:$ie,thread_count:A.number().int().nonnegative(),doc_count:A.number().int().nonnegative(),created_at:A.string().datetime(),updated_at:A.string().datetime(),archived_at:A.string().datetime().nullable()}),U2t=A.object({type:A.literal("list"),list_type:A.literal("project"),objects:A.array(L2t)}),Q2t=A.object({status:Nz.optional()}),F2t=A.object({name:A.string().trim().min(1).max(200),prosemirror_json:Hie.optional()}),G2t=A.object({id:mA,created_at:A.string().datetime()}),j2t=A.object({name:A.string().trim().min(1).max(200).optional(),prosemirror_json:Hie.optional()}).refine(e=>Object.keys(e).length>0,{message:"At least one field must be provided"}),z2t=A.object({id:mA,updated_at:A.string().datetime()}),H2t=A.object({archived:A.boolean()}),$2t=A.object({id:mA,status:Nz,archived_at:A.string().datetime().nullable()}),q2t=A.object({id:mA,name:A.string().min(1),prosemirror_json:Hie,status:Nz,author:$ie,created_at:A.string().datetime(),updated_at:A.string().datetime(),archived_at:A.string().datetime().nullable(),threads:A.array(dGe),docs:A.array(Lie)}),V2t=A.object({thread_id:A.string().min(1).max(64)}),Y2t=dGe,pGe=P2t.router({listProjects:{method:"GET",path:"/projects",headers:A.object({authorization:A.string().min(1).optional()}),query:Q2t,responses:{200:U2t,401:Fi},summary:"List projects in the authenticated user\u2019s organization"},createProject:{method:"POST",path:"/projects",headers:A.object({authorization:A.string().min(1).optional()}),body:F2t,responses:{201:G2t,401:Fi,422:Fi},summary:"Create a new project in the authenticated user\u2019s organization"},getProject:{method:"GET",path:"/projects/:projectId",pathParams:A.object({projectId:mA}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:q2t,401:Fi,403:Fi,404:Fi},summary:"Get a project with its attached threads and child docs. The project description is the canonical mention source for project-scoped @-mentions."},updateProject:{method:"PATCH",path:"/projects/:projectId",pathParams:A.object({projectId:mA}),headers:A.object({authorization:A.string().min(1).optional()}),body:j2t,responses:{200:z2t,401:Fi,403:Fi,404:Fi,422:Fi},summary:"Update a project\u2019s name or rich-text body. Body changes re-sync mention_references for source_kind=project."},archiveProject:{method:"POST",path:"/projects/:projectId/archive",pathParams:A.object({projectId:mA}),headers:A.object({authorization:A.string().min(1).optional()}),body:H2t,responses:{200:$2t,401:Fi,403:Fi,404:Fi},summary:"Archive (soft-delete) or unarchive a project"},addProjectThread:{method:"POST",path:"/projects/:projectId/threads",pathParams:A.object({projectId:mA}),headers:A.object({authorization:A.string().min(1).optional()}),body:V2t,responses:{201:Y2t,401:Fi,403:Fi,404:Fi,409:Fi,422:Fi},summary:"Pin an existing visible thread to this project. Idempotent \u2014 re-adding returns the existing membership."},removeProjectThread:{method:"DELETE",path:"/projects/:projectId/threads/:threadId",pathParams:A.object({projectId:mA,threadId:A.string().min(1).max(64)}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{204:A.object({}),401:Fi,403:Fi,404:Fi},summary:"Remove a thread membership from a project"}})});var K2t,$n,ol,mGe,J2t,Bz,wz,Z2t,W2t,X2t,fGe,eLt,tLt,AGe,nLt,rLt,oLt,iLt,sLt,aLt,uLt,cLt,lLt,dLt,pLt,fLt,mLt,ALt,gLt,hLt,_Lt,ELt,yLt,SLt,gGe,Vie=w(()=>{"use strict";m();cA();pc();K2t=Tu(),$n=A.object({message:A.string()}),ol=A.string().regex(/^reg_[0-9A-Za-z]{22}$/),mGe=A.string().min(1).max(64),J2t=["active","quiet","dormant","archived"],Bz=A.enum(J2t),wz=A.object({id:A.string().min(1),display_name:A.string().min(1),avatar_url:A.string().nullable().optional()}),Z2t=A.object({id:A.string().min(1),display_name:A.string().min(1),thread_count:A.number().int().positive()}),W2t=["asked","requested","decided","corrected","shared","requirement"],X2t=A.enum(W2t),fGe=A.object({id:A.string().min(1),kind:X2t,summary:A.string(),thread_id:A.string().min(1),thread_title:A.string(),created_at:A.string().datetime()}),eLt=A.object({decided_14d:A.number().int().nonnegative(),asked_14d:A.number().int().nonnegative()}),tLt=A.object({id:ol,name:A.string().min(1),overlap_score:A.number().min(0).max(1)}),AGe=A.object({thread_id:A.string().min(1),title:A.string().min(1),is_primary:A.boolean(),added_at:A.string().datetime(),added_by:wz}),nLt=A.object({id:ol,name:A.string().min(1),blurb:A.string().nullable(),status:Bz,thread_count:A.number().int().nonnegative(),contributor_count:A.number().int().nonnegative(),comment_count:A.number().int().nonnegative(),contributors_preview:A.array(wz).max(3),top_filepath:A.string().nullable(),last_active_at:A.string().datetime(),created_at:A.string().datetime(),updated_at:A.string().datetime(),archived_at:A.string().datetime().nullable()}),rLt=A.object({type:A.literal("list"),list_type:A.literal("region"),objects:A.array(nLt)}),oLt=A.object({status:Bz.optional()}),iLt=A.object({name:A.string().trim().min(1).max(200),blurb:A.string().trim().max(2e3).optional()}),sLt=A.object({id:ol,created_at:A.string().datetime()}),aLt=A.object({name:A.string().trim().min(1).max(200).optional(),blurb:A.string().trim().max(2e3).nullable().optional()}).refine(e=>Object.keys(e).length>0,{message:"At least one field must be provided"}),uLt=A.object({id:ol,updated_at:A.string().datetime()}),cLt=A.object({archived:A.boolean()}),lLt=A.object({id:ol,status:Bz,archived_at:A.string().datetime().nullable()}),dLt=A.object({id:ol,name:A.string().min(1),blurb:A.string().nullable(),status:Bz,created_by:wz,thread_count:A.number().int().nonnegative(),last_active_at:A.string().datetime(),created_at:A.string().datetime(),updated_at:A.string().datetime(),archived_at:A.string().datetime().nullable(),synthesized_status:A.string().nullable(),synthesized_status_at:A.string().datetime().nullable(),threads:A.array(AGe),contributors:A.array(Z2t),decisions:A.object({decided:A.array(fGe),open:A.array(fGe)}),velocity:eLt,cited_by_active_regions:A.array(tLt)}),pLt=A.object({id:ol,synthesized_status:A.string(),synthesized_status_at:A.string().datetime()}),fLt=A.object({regions_created:A.number().int().nonnegative(),llm_dispatched:A.boolean()}),mLt=A.object({promoted_to_active:A.number().int().nonnegative(),demoted_to_quiet:A.number().int().nonnegative(),demoted_to_dormant:A.number().int().nonnegative()}),ALt=A.object({thread_id:A.string().min(1),region_id:ol,region_name:A.string().min(1),score:A.number().min(0).max(1),signal:A.enum(["file","embedding","combined"])}),gLt=A.object({thread_ids:A.array(A.string().min(1)).min(1).max(50)}),hLt=A.object({type:A.literal("list"),list_type:A.literal("region_suggestion"),objects:A.array(ALt)}),_Lt=A.object({thread_id:A.string().min(1),title:A.string(),created_at:A.string().datetime(),author:wz,user_message_count:A.number().int().nonnegative(),comment_count:A.number().int().nonnegative()}),ELt=A.object({type:A.literal("list"),list_type:A.literal("unfiled_thread"),objects:A.array(_Lt)}),yLt=A.object({thread_id:mGe}),SLt=AGe,gGe=K2t.router({listRegions:{method:"GET",path:"/regions",headers:A.object({authorization:A.string().min(1).optional()}),query:oLt,responses:{200:rLt,401:$n,403:$n},summary:"List regions in the authenticated user\u2019s organization"},createRegion:{method:"POST",path:"/regions",headers:A.object({authorization:A.string().min(1).optional()}),body:iLt,responses:{201:sLt,401:$n,403:$n,409:$n,422:$n},summary:"Create a new region in the authenticated user\u2019s organization"},getRegion:{method:"GET",path:"/regions/:regionId",pathParams:A.object({regionId:ol}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:dLt,401:$n,403:$n,404:$n},summary:"Get a region with its attached threads and rolled-up contributors"},updateRegion:{method:"PATCH",path:"/regions/:regionId",pathParams:A.object({regionId:ol}),headers:A.object({authorization:A.string().min(1).optional()}),body:aLt,responses:{200:uLt,401:$n,403:$n,404:$n,409:$n,422:$n},summary:"Rename a region or update its blurb"},archiveRegion:{method:"POST",path:"/regions/:regionId/archive",pathParams:A.object({regionId:ol}),headers:A.object({authorization:A.string().min(1).optional()}),body:cLt,responses:{200:lLt,401:$n,403:$n,404:$n},summary:"Archive or unarchive a region"},addRegionThread:{method:"POST",path:"/regions/:regionId/threads",pathParams:A.object({regionId:ol}),headers:A.object({authorization:A.string().min(1).optional()}),body:yLt,responses:{201:SLt,401:$n,403:$n,404:$n,409:$n,422:$n},summary:"Attach an existing visible thread to this region. Primary if the thread has no other primary, otherwise secondary (up to 2). Idempotent."},suggestRegionsForThreads:{method:"POST",path:"/regions/suggest-for-threads",headers:A.object({authorization:A.string().min(1).optional()}),body:gLt,responses:{200:hLt,401:$n,403:$n,422:$n},summary:'Batch lookup: for each thread id, return the highest-scoring active region in the viewer\u2019s workspace (or omit when no region clears the threshold). Used by the per-thread inline "Add to <region>" suggestion chip.'},listUnfiledThreads:{method:"GET",path:"/regions/unfiled",headers:A.object({authorization:A.string().min(1).optional()}),query:A.object({days:A.coerce.number().int().positive().max(180).optional()}),responses:{200:ELt,401:$n,403:$n},summary:"List threads in the authenticated user\u2019s scope that are not yet attached to any region (default last 30 days)."},transitionRegionLifecycle:{method:"POST",path:"/regions/lifecycle/transition",headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{200:mLt,401:$n,403:$n},summary:"Sweep regions and demote/promote between active/quiet/dormant based on last_active_at. Idempotent \u2014 safe to run on a cron or on-demand."},refreshRegions:{method:"POST",path:"/regions/refresh",headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{200:fLt,401:$n,403:$n},summary:"Run the clustering pipeline against unfiled threads and create regions from the resulting clusters. Deterministic pass is synchronous; LLM pass is dispatched as an async Inngest event and lands more regions ~30s later."},synthesizeRegion:{method:"POST",path:"/regions/:regionId/synthesize",pathParams:A.object({regionId:ol}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{200:pLt,401:$n,403:$n,404:$n,409:$n,503:$n},summary:"Generate (or refresh) the region\u2019s synthesized status using recent decisions and threads. Persists to regions.synthesized_status."},removeRegionThread:{method:"DELETE",path:"/regions/:regionId/threads/:threadId",pathParams:A.object({regionId:ol,threadId:mGe}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{204:A.object({}),401:$n,403:$n,404:$n},summary:"Remove a thread membership from a region"}})});var TLt,hGe,bLt,ILt,CLt,vLt,RLt,_Ge,Yie=w(()=>{"use strict";m();cA();pc();TLt=Tu(),hGe=A.object({message:A.string()}),bLt=A.object({id:A.string().min(1),title:A.string(),href:A.string().min(1),author_display_name:A.string().nullable(),author_handle:A.string().nullable()}),ILt=A.object({name:A.string().min(1),usage_count:A.number().int().nonnegative(),href:A.string().min(1)}),CLt=A.object({id:A.string().min(1),display_name:A.string(),handle:A.string().nullable(),avatar_url:A.string().nullable(),href:A.string().min(1)}),vLt=A.object({type:A.literal("global_search"),threads:A.array(bLt),skills:A.array(ILt),people:A.array(CLt)}),RLt=A.object({q:A.string().trim().min(1).max(80)}),_Ge=TLt.router({globalSearch:{method:"GET",path:"/search",headers:A.object({authorization:A.string().min(1).optional()}),query:RLt,responses:{200:vLt,401:hGe,422:hGe},summary:"Global navbar search. Threads and people are searched globally (subject to thread visibility); skills are scoped to the viewer workspace. Max 5 results per kind."}})});var I6n,C6n,v6n,oi,xLt,DLt,NLt,BLt,Kie,R6n,EGe=w(()=>{"use strict";m();pc();Rz();Rk();I6n=A.enum(["thread","org","user","public"]),C6n=A.discriminatedUnion("kind",[A.object({kind:A.literal("thread"),id:A.string().min(1)}),A.object({kind:A.literal("org"),id:A.string().min(1)}),A.object({kind:A.literal("user"),id:A.string().min(1)}),A.object({kind:A.literal("public"),id:A.string().min(1)})]),v6n=A.enum(["thread.created","thread.completed","thread.block.appended","thread.comment.created","thread.comment.updated","thread.comment.deleted","thread.vote.cast","thread.vote.cleared","user.followed","user.joined","user.presence","entity.created","entity.updated","entity.archived","entity.thread_attached","entity.thread_detached","entity.linked","entity.superseded","skill.published","skill.version.accepted","skill.version.proposed","skill.version.rejected","skill.installation.deleted"]),oi=A.object({id:A.string().min(1),subjects:A.array(A.string().min(1)).min(1),actor_user_id:A.string().min(1).nullable(),created_at:A.string().datetime()}),xLt=A.object({thread_id:A.string().min(1),title:A.string(),author_id:A.string().min(1),created_at:A.string().datetime()}),DLt=A.enum(["user","assistant","tool","progress","system"]),NLt=A.enum(["claude_global","agents_global","claude_project","agents_project"]),BLt=A.enum(["private","workspace"]),Kie=A.object({skill_id:A.string().min(1),name:A.string().min(1),root_kind:NLt,version:A.number().int().positive(),content_hash:A.string().startsWith("md5:")}),R6n=A.discriminatedUnion("type",[oi.extend({type:A.literal("thread.created"),payload:xLt}),oi.extend({type:A.literal("thread.completed"),payload:A.object({thread_id:A.string().min(1),completed_at:A.string().datetime()})}),oi.extend({type:A.literal("thread.block.appended"),payload:A.object({thread_id:A.string().min(1),block_id:A.string().min(1),block_type:DLt,excerpt:A.string().nullable()})}),oi.extend({type:A.literal("thread.comment.created"),payload:A.object({comment:A.lazy(()=>AA)})}),oi.extend({type:A.literal("thread.comment.updated"),payload:A.object({comment:A.lazy(()=>AA)})}),oi.extend({type:A.literal("thread.comment.deleted"),payload:A.object({thread_id:A.string().min(1),comment_id:A.string().min(1)})}),oi.extend({type:A.literal("thread.vote.cast"),payload:A.object({thread_id:A.string().min(1),vote_count:A.number().int().nonnegative()})}),oi.extend({type:A.literal("thread.vote.cleared"),payload:A.object({thread_id:A.string().min(1),vote_count:A.number().int().nonnegative()})}),oi.extend({type:A.literal("user.followed"),payload:A.object({followee_id:A.string().min(1),followee_handle:A.string().nullable(),followee_display_name:A.string().nullable()})}),oi.extend({type:A.literal("user.joined"),payload:A.object({organization_id:A.string().min(1).nullable(),organization_name:A.string().nullable()})}),oi.extend({type:A.literal("user.presence"),payload:A.object({status:A.literal("online")})}),oi.extend({type:A.literal("entity.created"),payload:A.object({entity_id:A.string().min(1),kind:Mf,slug:A.string().min(1),name:A.string().min(1)})}),oi.extend({type:A.literal("entity.updated"),payload:A.object({entity_id:A.string().min(1),kind:Mf,changed_fields:A.array(A.string()).min(1),actor:A.enum(["agent","human"])})}),oi.extend({type:A.literal("entity.archived"),payload:A.object({entity_id:A.string().min(1),kind:Mf})}),oi.extend({type:A.literal("entity.thread_attached"),payload:A.object({entity_id:A.string().min(1),kind:Mf,thread_id:A.string().min(1),role:A.string().min(1),score:A.number().nullable()})}),oi.extend({type:A.literal("entity.thread_detached"),payload:A.object({entity_id:A.string().min(1),kind:Mf,thread_id:A.string().min(1),role:A.string().min(1)})}),oi.extend({type:A.literal("entity.linked"),payload:A.object({from_id:A.string().min(1),to_id:A.string().min(1),edge_kind:Ux})}),oi.extend({type:A.literal("entity.superseded"),payload:A.object({superseding_id:A.string().min(1),supersedes_id:A.string().min(1)})}),oi.extend({type:A.literal("skill.published"),payload:Kie.extend({visibility:BLt})}),oi.extend({type:A.literal("skill.version.accepted"),payload:Kie}),oi.extend({type:A.literal("skill.version.proposed"),payload:Kie.extend({owner_user_id:A.string().min(1),proposer_user_id:A.string().min(1)})}),oi.extend({type:A.literal("skill.version.rejected"),payload:A.object({skill_id:A.string().min(1),version:A.number().int().positive(),reviewer_user_id:A.string().min(1),proposer_user_id:A.string().min(1)})}),oi.extend({type:A.literal("skill.installation.deleted"),payload:A.object({skill_id:A.string().min(1),installation_id:A.string().min(1),user_id:A.string().min(1)})})])});var wLt,OLt,F6n,kLt,PLt,G6n,q,MLt,BGe,wGe,OGe,LLt,ULt,QLt,yGe,FLt,GLt,kGe,jLt,zLt,HLt,$Lt,qLt,VLt,YLt,KLt,PGe,JLt,ZLt,WLt,XLt,MGe,Lz,eUt,tUt,nUt,rUt,oUt,iUt,sUt,aUt,uUt,cUt,lUt,dUt,pUt,fUt,mUt,AUt,Wie,LGe,gUt,hUt,_Ut,EUt,UGe,yUt,SUt,TUt,bUt,IUt,CUt,Lf,vUt,RUt,xUt,DUt,NUt,Nk,t0,BUt,QGe,Xie,j6n,Oz,wUt,OUt,Uz,kUt,FGe,GGe,PUt,xk,ese,SGe,MUt,jGe,TGe,LUt,UUt,AA,QUt,FUt,GUt,jUt,zUt,HUt,z6n,$Ut,qUt,VUt,YUt,tse,zGe,KUt,JUt,ZUt,WUt,XUt,eQt,HGe,tQt,nQt,rQt,oQt,iQt,sQt,aQt,Jie,uQt,cQt,lQt,Dk,dQt,pQt,fQt,mQt,AQt,gQt,hQt,_Qt,EQt,yQt,SQt,TQt,bQt,IQt,bGe,CQt,vQt,RQt,xQt,DQt,NQt,BQt,wQt,OQt,kQt,PQt,Pz,MQt,LQt,UQt,QQt,FQt,IGe,GQt,jQt,CGe,zQt,vGe,HQt,$Qt,qQt,VQt,YQt,KQt,JQt,ZQt,WQt,XQt,$Ge,eFt,tFt,nFt,rFt,oFt,qGe,iFt,sFt,aFt,uFt,cFt,lFt,RGe,dFt,pFt,fFt,mFt,kz,AFt,gFt,hFt,_Ft,EFt,yFt,SFt,TFt,bFt,IFt,CFt,vFt,RFt,Qx,VGe,Zie,xFt,DFt,NFt,BFt,wFt,xGe,Mz,OFt,kFt,PFt,MFt,LFt,UFt,QFt,FFt,GFt,jFt,zFt,e0,DGe,HFt,$Ft,qFt,VFt,YFt,KFt,JFt,ZFt,WFt,XFt,e4t,t4t,n4t,r4t,o4t,i4t,s4t,a4t,u4t,c4t,l4t,NGe,d4t,YGe,p4t,f4t,m4t,A4t,g4t,Qz,Rk=w(()=>{"use strict";m();FQe();cA();pc();vz();Gie();jie();zie();qie();Vie();Yie();EGe();Fie();qie();Vie();Gie();vz();zie();jie();Yie();wLt=Tu(),OLt=["gmail.com","googlemail.com","hotmail.com","outlook.com","live.com","msn.com","yahoo.com","ymail.com","rocketmail.com","icloud.com","me.com","mac.com","aol.com","proton.me","protonmail.com","pm.me","tutanota.com","tuta.io","fastmail.com","hey.com","mail.com","gmx.com","gmx.net","zoho.com","zohomail.com","hushmail.com","lycos.com","inbox.com","yandex.com","yandex.ru","mail.ru","inbox.ru","bk.ru","list.ru","rambler.ru","qq.com","163.com","126.com","yeah.net","sina.com","naver.com","daum.net","hanmail.net","kakao.com","rediffmail.com","comcast.net","verizon.net","att.net","sbcglobal.net","bellsouth.net","earthlink.net","charter.net","cox.net","roadrunner.com","spectrum.net","btinternet.com","virginmedia.com","sky.com","orange.fr","wanadoo.fr","free.fr","laposte.net","web.de","t-online.de","gmx.de","libero.it","virgilio.it","alice.it","seznam.cz","centrum.cz","wp.pl","interia.pl","o2.pl","onet.pl"],F6n=new Set(OLt),kLt=A.object({id:A.string().uuid(),role:A.enum(["user","assistant"]),content:A.string().min(1),timestamp:A.string().datetime()}),PLt=A.object({id:A.string().uuid(),title:A.string().min(1),author:A.string().min(1),authorAvatar:A.string().min(1).max(4),model:A.string().min(1),turnCount:A.number().int().nonnegative(),createdAt:A.string().datetime(),preview:A.string()}),G6n=PLt.extend({messages:A.array(kLt)}),q=A.object({message:A.string()}),MLt=/^[a-zA-Z0-9_-]{2,32}$/,BGe=A.string().regex(MLt,"Handle must be 2\u201332 characters: letters, numbers, dashes, or underscores."),wGe=A.enum(["friend","events","twitter","linkedin","hacker_news","reddit","discord","youtube","google","ai_search","other"]),OGe=A.object({id:A.string(),first_name:A.string().min(1),last_name:A.string().min(1),display_name:A.string().min(1),handle:A.string().nullable(),bio:A.string().max(280).nullable(),avatar_url:A.string().nullable(),banner_url:A.string().nullable(),share_new_threads_to_workspace:A.boolean(),experimental_features_enabled:A.boolean(),onboarded_at:A.string().nullable(),attribution_source:wGe.nullable(),attribution_source_detail:A.string().nullable()}),LLt=A.object({email:A.string().nullable(),name:A.string().nullable(),handle:A.string().nullable(),created_at:A.string(),onboarded_at:A.string().nullable(),is_admin:A.boolean(),referred_by_user_id:A.string().nullable(),plan_tier:A.enum(["free","creator","team"]),organization_id:A.string().nullable(),signup_source:A.enum(["referral","organic"]),first_upload_at:A.string().nullable(),first_share_at:A.string().nullable(),first_cli_auth_at:A.string().nullable(),first_plugin_activated_at:A.string().nullable(),first_plugin_agent:A.string().nullable()}),ULt=A.object({group_key:A.string().min(1),properties:A.object({name:A.string(),plan_tier:A.enum(["free","creator","team"]),seat_count:A.number().int().nonnegative(),created_at:A.string(),email_domains:A.array(A.string()),default_thread_visibility:A.string(),member_count:A.number().int().nonnegative().nullable()})}),QLt=A.object({authProviderUserId:A.string().min(1).optional(),organizationId:A.string().min(1).optional(),org_name:A.string().min(1).optional(),organizations:A.array(A.object({id:A.string().min(1),name:A.string().min(1)})),emailAddress:A.string().email(),name:A.string().nullable(),user:OGe,is_admin:A.boolean(),is_new_signup:A.boolean(),posthog:A.object({user_properties:LLt,organization:ULt.nullable()})}),yGe=A.object({workos_client_id:A.string().min(1),workos_api_origin:A.string().url()}),FLt=A.object({share_new_threads_to_workspace:A.boolean().optional(),experimental_features_enabled:A.boolean().optional(),onboarded_at:A.union([A.literal("now"),A.null()]).optional(),attribution_source:wGe.nullable().optional(),attribution_source_detail:A.string().max(280).nullable().optional(),display_name:A.string().min(1).max(120).optional(),handle:BGe.optional(),bio:A.string().max(280).nullable().optional(),avatar_storage_url:A.string().min(1).nullable().optional(),banner_storage_url:A.string().min(1).nullable().optional()}).refine(e=>Object.keys(e).length>0,{message:"At least one field must be provided"}),GLt=A.object({id:A.string(),display_name:A.string(),handle:A.string().nullable(),avatar_url:A.string().nullable(),visible_thread_count:A.number().int().nonnegative(),last_active_at:A.string().datetime().nullable(),product_last_seen_at:A.string().datetime().nullable()}),kGe=A.object({id:A.string().min(1),display_name:A.string().min(1),handle:A.string().nullable(),bio:A.string().max(280).nullable(),avatar_url:A.string().nullable(),banner_url:A.string().nullable(),organization_name:A.string().min(1).nullable(),created_at:A.string().min(1),visible_thread_count:A.number().int().nonnegative(),follower_count:A.number().int().nonnegative(),following_count:A.number().int().nonnegative(),published_project_count:A.number().int().nonnegative(),is_following:A.boolean(),is_self:A.boolean()}),jLt=A.object({type:A.literal("list"),list_type:A.literal("organization_member"),objects:A.array(GLt)}),zLt=A.object({email_address:A.string().email()}),HLt=A.object({email_address:A.string().email(),invitation_id:A.string().min(1)}),$Lt=A.object({organization_id:A.string().min(1),organization_name:A.string().min(1),domain:A.string().min(1),created:A.boolean()}),qLt=A.object({location:A.string().trim().min(1),contact:A.string().trim().email()}),VLt=A.object({name:A.string().trim().min(1).max(100).describe("Sender's name"),email:A.string().trim().email().max(200).describe("Reply-to email"),message:A.string().trim().min(1).max(5e3).describe("Message body"),company:A.string().max(200).optional()}),YLt=A.object({ok:A.boolean()}),KLt=A.object({location:A.string().min(1),contact:A.string().email(),created_at:A.string().datetime()}),PGe=A.enum(["general","bug","feature_request","question"]),JLt=A.object({type:PGe,message:A.string().trim().min(1).max(5e3)}),ZLt=A.object({id:A.string().min(1),type:PGe,message:A.string().min(1),created_at:A.string().datetime()}),WLt=A.object({path_glob:A.string().min(1),name:A.string().min(1),description:A.string().min(1)}),XLt=A.object({repo_origin_path:A.string().min(1),building_blocks:A.array(WLt)}),MGe=A.string().regex(/^th_[0-9A-Za-z]{22}$/),Lz=A.string().regex(/^tb_[0-9A-Za-z]{22}$/),eUt=A.object({id:MGe,author:A.object({id:A.string().min(1),display_name:A.string().min(1)}),title:A.string().min(1),excerpt:A.string(),created_at:A.string().datetime(),repo_origin_path:A.string().min(1),latest_revision_id:Lz,revision_count:A.number().int().positive()}),tUt=A.object({id:A.string().min(1),display_name:A.string().min(1)}),nUt=A.object({id:A.string().min(1),author_id:A.string().min(1).nullable(),author:tUt.nullable(),created_at:A.string().datetime(),deleted_at:A.string().datetime().nullable(),content:A.string().min(1)}),rUt=A.object({id:A.string().min(1),thread_block_id:A.string().min(1),created_at:A.string().datetime(),resolved_at:A.string().datetime().nullable(),comments:A.array(nUt)}),oUt=A.object({thread_block_id:Lz,from_position:A.number().int().positive(),to_position:A.number().int().positive(),selected_text:A.string().min(1),content:A.string().trim().min(1)}),iUt=A.object({id:A.string().min(1)}),sUt=A.object({content:A.string().trim().min(1)}),aUt=A.object({id:A.string().min(1)}),uUt=A.object({content:A.string().trim().min(1)}),cUt=A.object({id:A.string().min(1)}),lUt=A.object({content:A.string().trim().min(1)}),dUt=A.object({id:A.string().min(1)}),pUt=A.object({resolved:A.boolean()}),fUt=A.object({id:A.string().min(1),resolved_at:A.string().datetime().nullable()}),mUt=A.object({resolved:A.boolean()}),AUt=A.object({id:A.string().min(1),resolved_at:A.string().datetime().nullable()}),Wie=A.record(A.string(),A.unknown()),LGe=A.object({id:Lz,body:A.string().nullable(),created_at:A.string().datetime(),prosemirror_json:Wie.nullable(),comment_threads:A.array(rUt)}),gUt=LGe.extend({body:A.string(),prosemirror_json:Wie}),hUt=A.object({id:MGe,created_at:A.string().datetime(),repo_origin_path:A.string().min(1),author:A.object({id:A.string().min(1),display_name:A.string().min(1)}),latest_revision_id:Lz,revision_count:A.number().int().positive(),revisions:A.array(LGe)}),_Ut=A.object({type:A.literal("list"),list_type:A.literal("plan"),has_more:A.boolean(),objects:A.array(eUt)}),EUt=A.object({before:A.string().min(1).optional(),after:A.string().min(1).optional(),author_id:A.string().min(1).optional(),repo_origin_path:A.string().min(1).optional()}),UGe=A.object({id:A.string().min(1),organization_id:A.string().min(1).nullable(),created_at:A.string().min(1),repo_origin_path:A.string().min(1),path_glob:A.string().min(1),name:A.string().min(1),description:A.string().min(1)}),yUt=A.array(UGe),SUt=A.object({type:A.literal("list"),list_type:A.literal("building_block"),has_more:A.boolean(),objects:A.array(UGe)}),TUt=A.object({repo_origin_path:A.string().min(1),before:A.string().min(1).optional(),after:A.string().min(1).optional()}),bUt=A.enum(["thread","building_block"]),IUt=A.object({repo_origin_path:A.string().min(1),sources:A.array(bUt).nonempty()}),CUt=A.object({type:A.literal("list"),list_type:A.literal("repository"),has_more:A.boolean(),objects:A.array(IUt)}),Lf=A.enum(["claudeCode","codex","amp","lore","cursor","cowork","unspecified"]),vUt=A.enum(["claudeCode","codex","amp","cursor","cowork","unspecified"]),RUt=A.object({uploads:A.array(A.string()),outputs:A.array(A.string())}),xUt=A.object({connected:A.boolean(),last_upload_at:A.string().nullable(),harnesses:A.array(Lf)}),DUt=["transcript","plan"],NUt=A.enum(DUt),Nk=A.enum(["private","workspace"]),t0=A.enum(["claude_global","agents_global","claude_project","agents_project"]),BUt=A.object({name:A.string().min(1),description:A.string().nullable(),root_kind:t0,file_path:A.string().min(1),also_seen_at:A.array(A.string().min(1))}),QGe=A.object({type:A.literal("local_skill_scanner_output"),skills:A.record(A.string(),A.array(BUt))}),Xie=A.enum(["accepted","proposed","rejected","superseded"]),j6n=A.enum(["capture","capture_update","owner_update","subscriber_update"]),Oz=A.object({md5:A.string().min(1).describe("Raw hex MD5 used to verify uploaded SKILL.md bytes"),name:A.string().min(1).describe("Skill directory/name, e.g. code-review"),filename:A.string().min(1).describe("Upload object filename, usually <name>/SKILL.md").optional(),description:A.string().nullable().describe("Optional skill description extracted from frontmatter").optional(),root_kind:t0.describe("Local root kind where this skill file came from"),base_version:A.number().int().positive().describe("Installed base version for local edits").optional()}),wUt=A.discriminatedUnion("sync_action",[Oz.extend({sync_action:A.literal("capture").describe("Capture a local skill without an existing server skill ID"),skill_id:A.never().optional()}),Oz.extend({sync_action:A.literal("owner_update").describe("Publish an accepted update to an owned skill"),skill_id:A.string().min(1).describe("Existing skill ID for owner updates")}),Oz.extend({sync_action:A.literal("capture_update").describe("Update an existing private captured skill"),skill_id:A.string().min(1).describe("Existing skill ID for private capture updates")}),Oz.extend({sync_action:A.literal("subscriber_update").describe("Propose an update to an installed workspace skill"),skill_id:A.string().min(1).describe("Existing skill ID for subscriber update proposals")})]),OUt=A.object({md5:A.string().min(1),harness:vUt,filename:A.string().min(1).optional(),repo_origin_path:A.string().min(1).optional(),harness_internal_id:A.string().min(1).optional(),file_type:NUt.optional(),artifact_metadata:RUt.optional()}).refine(e=>(e.filename?.trim().length??0)>0||(e.harness_internal_id?.trim().length??0)>0,{path:["harness_internal_id"],message:"filename or harness_internal_id is required"}),Uz=A.object({id:A.string().min(1),display_name:A.string().min(1),avatar_url:A.string().nullable()}),kUt=A.object({id:A.string().min(1),display_name:A.string().min(1)}),FGe=A.object({id:A.string().min(1),author_id:A.string().min(1).nullable(),author:kUt.nullable(),created_at:A.string().datetime(),deleted_at:A.string().datetime().nullable(),content:A.string().min(1)}),GGe=A.object({id:A.string().min(1),thread_block_id:A.string().min(1),created_at:A.string().datetime(),resolved_at:A.string().datetime().nullable()}),PUt=GGe.extend({comments:A.array(FGe)}),xk=A.object({id:A.string().min(1),type:A.string().min(1),index_in_thread:A.number().int().nonnegative(),isCritiqued:A.boolean(),comment_threads:A.array(PUt).optional()}).passthrough(),ese=A.object({type:A.literal("list"),list_type:A.literal("thread_block"),has_more:A.boolean(),objects:A.array(xk)}),SGe=xk.extend({type:A.literal("plan"),prosemirror_json:Wie,thread_file_id:A.string().min(1)}),MUt=A.union([A.literal(-1),A.literal(1)]),jGe=A.union([A.literal(-1),A.literal(0),A.literal(1)]),TGe=A.object({score:A.number().int(),up_count:A.number().int().nonnegative(),down_count:A.number().int().nonnegative(),viewer_vote:jGe}),LUt=A.object({value:MUt}),UUt=A.object({id:A.string().min(1),display_name:A.string().min(1),avatar_url:A.string().nullable()}),AA=A.object({id:A.string().min(1),thread_id:A.string().min(1),author_id:A.string().min(1).nullable(),author:UUt.nullable(),parent_comment_id:A.string().min(1).nullable(),content:A.string(),created_at:A.string().datetime(),updated_at:A.string().datetime(),deleted_at:A.string().datetime().nullable()}),QUt=A.object({type:A.literal("list"),list_type:A.literal("thread_comment"),objects:A.array(AA)}),FUt=A.object({content:A.string().trim().min(1).max(4e3),parent_comment_id:A.string().min(1).optional()}),GUt=AA,jUt=A.object({content:A.string().trim().min(1).max(4e3)}),zUt=AA,HUt=AA,z6n=A.discriminatedUnion("kind",[A.object({kind:A.literal("created"),thread_id:A.string().min(1),actor_user_id:A.string().min(1),version:A.number(),comment:AA}),A.object({kind:A.literal("updated"),thread_id:A.string().min(1),actor_user_id:A.string().min(1),version:A.number(),comment:AA}),A.object({kind:A.literal("deleted"),thread_id:A.string().min(1),actor_user_id:A.string().min(1),version:A.number(),comment:AA})]),$Ut=A.enum(["pending","generating","ready","failed"]),qUt=A.enum(["pending","generating","ready","failed"]),VUt=A.enum(["pending","placeholder","ai","user","command"]),YUt=A.enum(["pending","generating","ready","failed"]),tse=A.enum(["pending","generating","ready","failed","disabled"]),zGe=A.enum(["pending","generating","ready","failed"]),KUt=A.object({title:A.string().min(1),body:A.string().min(1),files:A.array(A.string()).optional()}),JUt=A.object({status:tse,url:A.string().nullable(),url_expires_at:A.string().nullable(),generated_at:A.string().nullable(),model:A.string().nullable()}),ZUt=A.object({status:zGe,steps:A.array(KUt),generated_at:A.string().nullable()}),WUt=A.object({cover:JUt,how_to:ZUt}),XUt=A.object({id:A.string().min(1),title:A.string().min(1),author:A.object({id:A.string().min(1),display_name:A.string(),handle:A.string().nullable(),avatar_url:A.string().nullable()}),cover:A.object({url:A.string(),url_expires_at:A.string()}),started_at:A.string(),cover_generated_at:A.string()}),eQt=A.object({type:A.literal("list"),list_type:A.literal("card_feed_item"),has_more:A.boolean(),objects:A.array(XUt)}),HGe=A.enum(["asked","requested","decided","corrected","shared","requirement"]),tQt=A.object({id:A.string().min(1),kind:HGe,summary:A.string().min(1),block_id:A.string().min(1)}),nQt=A.object({block_id:A.string().min(1),status:YUt,generated_at:A.string().nullable()}),rQt=A.object({type:A.literal("list"),list_type:A.literal("thread_decision"),objects:A.array(tQt),block_statuses:A.array(nQt)}),oQt=A.object({forker_intent:A.string().min(1).max(2e3).describe("What the forking user wants to do next with this session")}),iQt=A.object({source_thread_id:A.string().min(1),forker_intent:A.string(),source_distilled:A.string().min(1).describe("Intent-conditioned handoff summary of the source thread for a new agent")}),sQt=A.object({question:A.string().trim().min(1).max(2e3).describe("Question to answer from visible Lore thread decisions and titles")}),aQt=A.object({id:A.string().min(1),kind:HGe,summary:A.string().min(1),block_id:A.string().min(1)}),Jie=A.object({thread_id:A.string().min(1),title:A.string().min(1),summary:A.string().nullable(),started_at:A.string().datetime(),score:A.number(),matched_by:A.enum(["summary","decision"]),decisions:A.array(aQt)}),uQt=A.object({id:A.string().min(1),kind:A.enum(["agent","tool","retrieval","answer","sources"]),title:A.string().min(1),status:A.enum(["completed"]),summary:A.string().min(1),duration_ms:A.number().nonnegative().optional(),metadata:A.object({retrieved_decisions:A.number().int().nonnegative().optional(),returned_sources:A.number().int().nonnegative().optional(),cited_sources:A.number().int().nonnegative().optional(),matched_sources:A.array(Jie).optional(),searched_query:A.string().min(1).optional(),since:A.string().min(1).optional(),until:A.string().min(1).optional(),thread_id:A.string().min(1).optional(),thread_ids:A.array(A.string().min(1)).optional(),question:A.string().min(1).optional()}).optional()}),cQt=A.object({steps:A.array(uQt)}),lQt=A.object({answer:A.string(),sources:A.array(Jie),matched_sources:A.array(Jie).describe("Threads matched by the vector decision search before citation filtering"),searched_query:A.string().describe("String embedded for the vector decision search"),trace:cQt.optional()}),Dk=A.object({id:A.string().min(1),thread_file_id:A.string().min(1),organization_id:A.string().min(1).nullable(),deleted_at:A.string().datetime().nullable(),author:Uz,repo:A.string().min(1),title:A.string().min(1),started_at:A.string().min(1),last_activity_at:A.string().datetime().nullable(),blocks:ese,user_message_count:A.number().int().nonnegative(),files_touched:A.array(A.string()),skills_invoked:A.array(A.string()),slash_commands_invoked:A.array(A.string()),harness:Lf,transcript_parsing_state:A.enum(["pending","parsed","too_large_to_parse","failed"]),visibility:A.enum(["private","workspace","public"]),has_plan:A.boolean().optional(),summary:A.string().nullable(),summary_status:$Ut,summary_generated_at:A.string().nullable(),title_status:qUt,title_generated_at:A.string().nullable(),title_source:VUt,score:A.number().int(),up_count:A.number().int().nonnegative(),down_count:A.number().int().nonnegative(),viewer_vote:jGe,comment_count:A.number().int().nonnegative(),is_favorited:A.boolean(),card:WUt}),dQt=A.object({storage_url:A.string().min(1)}),pQt=A.object({storage_url:A.string().min(1)}),fQt=A.object({storage_url:A.string(),harness:Lf,thread:Dk.nullable()}),mQt=A.object({status:A.literal("complete"),thread_files:A.array(fQt),skill_files:A.array(A.object({storage_url:A.string(),skill:A.object({id:A.string(),name:A.string(),version:A.number().int().positive(),latest_version:A.number().int().positive(),visibility:Nk,root_kind:t0,version_status:Xie.optional(),content_hash:A.string()}).nullable()})).optional()}),AQt=A.object({id:A.string(),presigned_url:A.string().nullable(),presigned_url_expires_at:A.string().nullable(),storage_url:A.string(),harness:Lf,expected_md5:A.string(),error:A.string().nullable(),thread:Dk.nullable()}),gQt=A.object({id:A.string(),presigned_url:A.string().nullable(),presigned_url_expires_at:A.string().nullable(),storage_url:A.string(),expected_md5:A.string(),name:A.string(),error:A.string().nullable()}),hQt=A.object({id:A.string(),substrate:A.enum(["s3","filesystem"]),status:A.enum(["incomplete","locked_for_parsing","complete","error"]),thread_files:A.array(AQt),skill_files:A.array(gQt).optional()}),_Qt=A.object({query:A.string().min(1).describe("Natural-language description of the block or block range to highlight")}),EQt=A.object({thread_id:A.string(),url:A.string().url(),start_block_id:A.string().nullable(),end_block_id:A.string().nullable(),matched:A.boolean()}),yQt=A.object({}),SQt=A.object({thread_id:A.string().min(1)}),TQt=A.object({visibility:A.enum(["private","workspace","public"]).optional(),title:A.string().trim().min(1).max(200).optional()}).refine(e=>e.visibility!==void 0||e.title!==void 0,{message:"At least one of visibility or title must be provided"}),bQt=A.discriminatedUnion("visibility",[A.object({visibility:A.literal("private")}),A.object({visibility:A.literal("workspace")}),A.object({visibility:A.literal("public"),title:A.string().min(1),author_display_name:A.string().min(1),author_avatar_url:A.string().nullable(),first_user_message:A.string().nullable(),summary:A.string().nullable(),started_at:A.string().min(1),harness:Lf,cover_url:A.string().nullable()})]),IQt=A.object({id:A.string().min(1),author:Uz,repo:A.string().min(1),title:A.string().min(1),started_at:A.string().min(1),last_activity_at:A.string().datetime().nullable(),blocks:ese,user_message_count:A.number().int().nonnegative(),comment_count:A.number().int().nonnegative(),files_touched:A.array(A.string()),skills_invoked:A.array(A.string()),harness:Lf,visibility:A.enum(["private","workspace","public"]),has_plan:A.boolean().optional(),is_favorited:A.boolean()}),bGe=A.object({type:A.literal("list"),list_type:A.literal("thread"),has_more:A.boolean(),objects:A.array(IQt)}),CQt=A.enum(["recent","popular"]),vQt=A.enum(["everyone","following"]),RQt=Dk,xQt=A.object({type:A.literal("list"),list_type:A.literal("discover_thread"),has_more:A.boolean(),objects:A.array(RQt)}),DQt=A.object({before:A.string().min(1).optional(),after:A.string().min(1).optional(),sort:CQt.optional(),scope:vQt.optional(),harness:Lf.optional(),search:A.string().max(200).optional()}),NQt=A.object({thread_count:A.number().int().nonnegative(),author_count:A.number().int().nonnegative(),organization_count:A.number().int().nonnegative(),harness_breakdown:A.record(A.string(),A.number().int().nonnegative()).refine(e=>Object.keys(e).every(t=>Lf.safeParse(t).success),"Harness breakdown keys must be known harness values")}),BQt=A.object({id:A.string(),status:A.enum(["incomplete","locked_for_parsing","complete","error"]),created_at:A.string(),thread_count:A.number().int().nonnegative(),skill_count:A.number().int().nonnegative().default(0),thread_ids:A.array(A.string()).default([])}),wQt=A.object({type:A.literal("list"),list_type:A.literal("upload_session"),objects:A.array(BQt)}),OQt=A.object({before:A.string().min(1).optional(),after:A.string().min(1).optional()}),kQt=A.object({before:A.string().min(1).optional(),after:A.string().min(1).optional(),author_ids:A.string().min(1).optional(),created_at:A.string().min(1).optional(),filepath_prefixes:A.string().min(1).optional(),q:A.string().trim().min(1).max(200).optional()}),PQt=A.object({path:A.string().min(1),start_offset:A.number().int().nonnegative(),end_offset:A.number().int().positive()}),Pz=A.object({id:A.string(),display_name:A.string(),avatar_url:A.string().nullable()}),MQt=A.object({before:A.string().min(1).optional().describe("Skill ID cursor. Returns skills newer than this cursor in descending created_at order."),after:A.string().min(1).optional().describe("Skill ID cursor. Returns skills older than this cursor in descending created_at order.")}),LQt=A.object({id:A.string(),name:A.string(),description:A.string().nullable(),visibility:Nk,root_kind:t0,latest_version:A.number().int().nonnegative().nullable(),content_hash:A.string().nullable(),has_content:A.boolean(),owner:Pz.nullable(),usage_count:A.number().int().nonnegative(),author_count:A.number().int().nonnegative(),first_used_at:A.string().nullable(),last_used_at:A.string().nullable()}),UQt=A.object({type:A.literal("list"),list_type:A.literal("skill"),has_more:A.boolean(),objects:A.array(LQt)}),QQt=A.object({id:A.string(),title:A.string(),visibility:A.enum(["private","workspace","public"]),started_at:A.string(),author:Uz,skills_invoked:A.array(A.string())}),FQt=A.object({version:A.number().int().positive().describe("Version timestamp for this SKILL.md body"),content_hash:A.string().describe("Content-addressed skill body hash, prefixed by hash type"),status:Xie.describe("Review status for this skill version"),created_at:A.string().describe("ISO-8601 timestamp when this version was uploaded"),created_by:Pz.nullable().describe("User who uploaded/proposed this version, when known"),reviewed_at:A.string().nullable().describe("ISO-8601 timestamp when the owner reviewed this version"),reviewed_by:Pz.nullable().describe("Owner who approved or rejected this version"),rejection_reason:A.string().nullable().describe("Owner-provided rejection reason for rejected versions")}),IGe=A.object({id:A.string(),name:A.string(),description:A.string().nullable(),visibility:Nk,root_kind:t0,latest_version:A.number().int().nonnegative().nullable(),content_hash:A.string().nullable(),owner:Pz.nullable(),usage_count:A.number().int().nonnegative(),author_count:A.number().int().nonnegative(),first_used_at:A.string().nullable(),last_used_at:A.string().nullable(),versions:A.array(FQt),threads:A.array(QQt)}),GQt=A.object({id:A.string(),name:A.string(),visibility:Nk,root_kind:t0,latest_version:A.number().int().nonnegative(),content_hash:A.string()}),jQt=A.object({installation_id:A.string(),already_registered:A.boolean(),body_md_url:A.string(),skill:GQt}),CGe=A.object({id:A.string(),skill_id:A.string(),installed_version:A.number().int().nonnegative().nullable(),already_registered:A.boolean().optional()}),zQt=A.object({installed_version:A.number().int().nonnegative().describe("Accepted skill version that was successfully written locally")}),vGe=A.object({id:A.string(),name:A.string(),version:A.number().int().positive(),latest_version:A.number().int().positive(),visibility:Nk,root_kind:t0,version_status:Xie,content_hash:A.string()}),HQt=A.object({reason:A.string().optional().describe("Optional owner-provided reason for rejecting the proposed version")}),$Qt=A.object({id:A.string(),skill_id:A.string(),name:A.string(),description:A.string().nullable(),root_kind:t0,latest_version:A.number().int().nonnegative(),latest_content_hash:A.string(),installed_version:A.number().int().nonnegative().nullable()}),qQt=A.object({type:A.literal("list"),list_type:A.literal("skill_installation_sync"),has_more:A.boolean(),objects:A.array($Qt)}),VQt=A.object({path:A.string().min(1),text:A.string().max(64e3)}),YQt=A.enum(["text_edit","redact","delete_block"]),KQt=A.object({id:A.string(),thread_block_id:A.string(),editor:A.object({id:A.string(),display_name:A.string()}),kind:YQt,path:A.string().nullable(),previous_text:A.string().nullable(),new_text:A.string().nullable(),created_at:A.string()}),JQt=A.object({type:A.literal("list"),list_type:A.literal("thread_block_edit"),objects:A.array(KQt)}),ZQt=A.object({organization_count:A.number().int().nonnegative(),user_count:A.number().int().nonnegative(),thread_count:A.number().int().nonnegative(),thread_count_last_24h:A.number().int().nonnegative(),user_count_last_24h:A.number().int().nonnegative()}),WQt=A.object({id:A.string(),name:A.string(),email_domains:A.array(A.string()),member_count:A.number().int().nonnegative(),thread_count:A.number().int().nonnegative(),default_thread_visibility:A.enum(["private","workspace","public"]),created_at:A.string()}),XQt=A.object({type:A.literal("list"),list_type:A.literal("admin_organization"),objects:A.array(WQt)}),$Ge=A.object({id:A.string(),name:A.string()}),eFt=A.object({id:A.string(),display_name:A.string(),workos_id:A.string(),thread_count:A.number().int().nonnegative(),onboarded_at:A.string().nullable(),created_at:A.string(),organizations:A.array($Ge)}),tFt=A.object({q:A.string().trim().min(1).max(120).optional()}),nFt=A.object({follower_id:A.string().min(1),followee_id:A.string().min(1)}),rFt=A.object({follower_id:A.string().min(1),followee_id:A.string().min(1),is_following:A.literal(!0)}),oFt=A.object({type:A.literal("list"),list_type:A.literal("admin_user"),objects:A.array(eFt)}),qGe=A.object({id:A.string(),title:A.string(),started_at:A.string(),created_at:A.string(),deleted_at:A.string().nullable(),visibility:A.enum(["private","workspace","public"]),harness:Lf,harness_internal_id:A.string(),thread_file_id:A.string(),transcript_parsing_state:A.enum(["pending","parsed","too_large_to_parse","failed"]),author:Uz,organization:$Ge.nullable()}),iFt=A.object({id:A.string(),content_type:A.enum(["transcript","plan"]),harness:Lf,harness_internal_id:A.string(),expected_md5:A.string(),size_in_bytes:A.number().int().nonnegative().nullable(),created_at:A.string()}),sFt=A.object({thread:qGe,latest_transcript_file:iFt.nullable()}),aFt=A.object({type:A.literal("list"),list_type:A.literal("admin_thread"),has_more:A.boolean(),objects:A.array(qGe)}),uFt=A.object({before:A.string().min(1).optional(),after:A.string().min(1).optional()}),cFt=A.object({thread_id:A.string().min(1).optional().describe("Lore thread id, e.g. th_xxx."),thread_file_id:A.string().min(1).optional().describe("Thread file id, e.g. tf_xxx."),harness:Lf.optional().describe("Harness name, e.g. claudeCode."),harness_internal_id:A.string().min(1).optional().describe("Harness-native session id.")}),lFt=A.object({thread_id:A.string().min(1),thread_file_id:A.string().min(1),event_name:A.literal("lore/thread-files.parse.requested")}),RGe=A.object({token:A.string().min(1),thread_id:A.string().min(1)}),dFt=A.object({visitor:A.string().min(1).max(64).optional()}),pFt=A.object({user_id:A.string(),display_name:A.string(),shares_sent:A.number().int().nonnegative(),unique_viewers:A.number().int().nonnegative(),attributed_signups:A.number().int().nonnegative()}),fFt=A.object({window_days:A.number().int().positive(),shares_sent:A.number().int().nonnegative(),unique_viewers:A.number().int().nonnegative(),attributed_signups:A.number().int().nonnegative(),active_sharers:A.number().int().nonnegative(),k_factor:A.number().nullable(),shares_sent_sparkline:A.array(A.number().int().nonnegative()),top_sharers:A.array(pFt)}),mFt=A.object({windows:A.array(fFt)}),kz=A.object({period:A.string(),active:A.number().int().nonnegative()}),AFt=A.object({daily:A.array(kz),weekly:A.array(kz),monthly:A.array(kz),allTime:A.array(kz)}),gFt=A.object({quoted_text:A.string().min(1),comment:A.string().nullable(),type:A.enum(["comment","highlight:trapdoor"])}),hFt=GGe,_Ft=FGe.extend({comment_thread_id:A.string().min(1)}),EFt=A.object({markdown:A.string().min(1)}),yFt=A.object({storage_url:A.string().min(1),thread_file_id:A.string().min(1),parsed_plan_block:SGe,critiqued_plan_block:SGe,annotations:A.array(gFt),comment_threads:A.array(hFt),comments:A.array(_Ft)}),SFt=A.object({key:A.string().min(1),label:A.string().min(1),description:A.string().optional(),type:A.enum(["text","textarea","url","email"]),required:A.boolean(),defaultValue:A.string()}),TFt=A.object({id:A.string().min(1),name:A.string().min(1),description:A.string().min(1),deliveryTrigger:A.string().min(1),fields:A.array(SFt),availableFormats:A.array(A.enum(["html","text"]))}),bFt=A.object({templates:A.array(TFt)}),IFt=A.object({values:A.record(A.string(),A.string())}),CFt=A.object({subject:A.string().min(1),html:A.string().optional(),text:A.string().optional()}),vFt=A.object({to:A.string().email().describe("Recipient email address."),values:A.record(A.string(),A.string())}),RFt=A.object({id:A.string().min(1)}),Qx=A.enum(cee),VGe=A.object({workspace_scope:A.boolean(),review:A.boolean(),shared_thread_ttl_days:A.number().int().positive().nullable()}),Zie=A.object({subject_type:A.enum(["user","organization"]),subject_id:A.string().min(1),effective_plan:Qx,admin_override:Qx.nullable(),stripe_subscription_status:A.string().nullable(),cancel_at_period_end:A.boolean(),current_period_end:A.string().nullable(),seat_quantity:A.number().int().positive(),member_count:A.number().int().nonnegative().nullable(),features:VGe}),xFt=A.object({effective_plan:Qx,features:VGe,user:Zie,organization:Zie.nullable()}),DFt=A.object({plan:A.enum(["creator","team"]),seat_quantity:A.number().int().positive().optional()}),NFt=A.object({checkout_url:A.string().min(1)}),BFt=A.object({portal_url:A.string().min(1)}),wFt=A.object({seat_quantity:A.number().int().positive()}),xGe=A.object({plan:Qx.nullable()}),Mz=A.object({subject_type:A.enum(["user","organization"]),subject_id:A.string().min(1),label:A.string().min(1),effective_plan:Qx,admin_override:Qx.nullable(),stripe_subscription_status:A.string().nullable(),seat_quantity:A.number().int().positive()}),OFt=A.object({users:A.array(Mz),organizations:A.array(Mz)}),kFt=A.object({id:A.string().min(1),display_name:A.string().min(1),handle:A.string().nullable(),avatar_url:A.string().nullable()}),PFt=A.object({thread_id:A.string().min(1),title:A.string().min(1),author:kFt,last_active_at:A.string().datetime(),last_block_excerpt:A.string().nullable(),last_block_kind:A.string().min(1).nullable(),is_streaming:A.boolean()}),MFt=A.object({type:A.literal("list"),list_type:A.literal("live_thread"),objects:A.array(PFt)}),LFt=A.object({thread_id:A.string().min(1)}),UFt=A.object({thread_id:A.string().min(1),last_seen_at:A.string().datetime(),started_at:A.string().datetime()}),QFt=A.object({user_id:A.string().min(1),organization_id:A.string().min(1).nullable(),last_seen_at:A.string().datetime(),started_at:A.string().datetime()}),FFt=A.object({upload_completed:A.boolean().optional().describe("When true, also bump last_upload_at \u2014 the daemon completed an upload pass.")}),GFt=A.object({last_seen_at:A.string().datetime(),last_upload_at:A.string().datetime().nullable(),started_at:A.string().datetime()}),jFt=A.object({follower_id:A.string().min(1),followee_id:A.string().min(1),is_following:A.literal(!0),follower_count:A.number().int().nonnegative()}),zFt=A.object({follower_id:A.string().min(1),followee_id:A.string().min(1),is_following:A.literal(!1),follower_count:A.number().int().nonnegative()}),e0=A.object({id:A.string().min(1),display_name:A.string().min(1),handle:A.string().nullable(),avatar_url:A.string().nullable(),bio:A.string().max(280).nullable(),is_following:A.boolean(),is_self:A.boolean()}),DGe=A.object({type:A.literal("list"),list_type:A.literal("user_follow"),objects:A.array(e0)}),HFt=e0.extend({mutuals:A.array(e0),mutual_count:A.number().int().nonnegative()}),$Ft=A.object({type:A.literal("list"),list_type:A.literal("follow_suggestion"),objects:A.array(HFt)}),qFt=e0.extend({referred_at:A.string().min(1)}),VFt=A.object({type:A.literal("list"),list_type:A.literal("referral"),count:A.number().int().nonnegative(),recent:A.array(qFt)}),YFt=A.object({date:A.string().regex(/^\d{4}-\d{2}-\d{2}$/),referred:A.number().int().nonnegative(),total:A.number().int().nonnegative()}),KFt=A.object({inviter:e0,organization_name:A.string().nullable(),referred_count:A.number().int().positive(),latest_referred_at:A.string().min(1)}),JFt=A.object({inviter:e0,referee:e0,attributed_at:A.string().min(1)}),ZFt=A.object({total_referred_signups:A.number().int().nonnegative(),active_inviters:A.number().int().nonnegative(),referred_signups_last_30d:A.number().int().nonnegative(),total_signups_last_30d:A.number().int().nonnegative(),daily_counts:A.array(YFt),top_inviters:A.array(KFt),recent_attributions:A.array(JFt)}),WFt=A.object({source:A.string().min(1),signups:A.number().int().nonnegative()}),XFt=A.object({sources:A.array(WFt),total_with_source:A.number().int().nonnegative(),total_without_source:A.number().int().nonnegative()}),e4t=A.object({date:A.string().regex(/^\d{4}-\d{2}-\d{2}$/),count:A.number().int().nonnegative()}),t4t=A.object({window_start:A.string().datetime(),window_end:A.string().datetime(),total_contributions:A.number().int().nonnegative(),days_active:A.number().int().nonnegative(),daily_average:A.number().nonnegative(),current_streak_days:A.number().int().nonnegative(),days:A.array(e4t)}),n4t=A.object({type:A.literal("thread_created"),occurred_at:A.string().datetime(),id:A.string().min(1),thread:A.object({id:A.string().min(1),title:A.string(),visibility:A.enum(["private","workspace","public"])})}),r4t=A.object({type:A.literal("thread_updated"),occurred_at:A.string().datetime(),id:A.string().min(1),thread:A.object({id:A.string().min(1),title:A.string(),visibility:A.enum(["private","workspace","public"])})}),o4t=A.object({type:A.literal("comment_posted"),occurred_at:A.string().datetime(),id:A.string().min(1),comment_excerpt:A.string(),thread:A.object({id:A.string().min(1),title:A.string(),visibility:A.enum(["private","workspace","public"])})}),i4t=A.object({type:A.literal("project_published"),occurred_at:A.string().datetime(),id:A.string().min(1),project:A.object({id:A.string().min(1),name:A.string().min(1)})}),s4t=A.object({type:A.literal("user_followed"),occurred_at:A.string().datetime(),id:A.string().min(1),followee:e0}),a4t=A.discriminatedUnion("type",[n4t,r4t,o4t,i4t,s4t]),u4t=A.object({type:A.literal("list"),list_type:A.literal("user_activity"),objects:A.array(a4t)}),c4t=A.object({id:A.string().min(1),name:A.string().min(1),excerpt:A.string(),published_at:A.string().datetime(),updated_at:A.string().datetime()}),l4t=A.object({type:A.literal("list"),list_type:A.literal("profile_published_project"),objects:A.array(c4t)}),NGe=A.object({id:A.string().min(1),published_at:A.string().datetime().nullable()}),d4t=A.enum(["avatar","banner"]),YGe=A.enum(["image/png","image/jpeg","image/webp","image/gif"]),p4t=A.object({kind:d4t,content_type:YGe,base64_data:A.string().min(1)}),f4t=A.object({substrate:A.enum(["s3","filesystem"]),storage_url:A.string().min(1)}),m4t=A.object({content_type:YGe,base64_data:A.string().min(1)}),A4t=A.object({cover_status:tse,cover_url:A.string().min(1),cover_url_expires_at:A.string().min(1),cover_generated_at:A.string().min(1)}),g4t=kGe,Qz=wLt.router({health:{method:"GET",path:"/health",responses:{200:A.object({status:A.literal("ok")})},summary:"Health check"},getDeepHealth:{method:"GET",path:"/health/deep",responses:{200:A.object({status:A.enum(["ok","degraded"]),environment:A.string(),checks:A.object({database:A.object({ok:A.boolean(),latencyMs:A.number().int().nonnegative().optional(),error:A.string().optional()}),migrations:A.object({ok:A.boolean(),appliedCount:A.number().int().nonnegative(),pendingCount:A.number().int().nonnegative(),latestApplied:A.string().optional(),pending:A.array(A.string())}),storage:A.object({ok:A.boolean(),bucket:A.string().optional(),error:A.string().optional()})})}),503:A.object({status:A.literal("down"),environment:A.string(),error:A.string()})},summary:"Diagnostic health check covering database connectivity, migration drift, and storage reachability. Used by smoke tests and operators; NOT wired into Railway healthcheckPath."},whoAmI:{method:"GET",path:"/whoami",headers:A.object({authorization:A.string().min(1).optional(),"x-lore-referral-token":A.string().min(1).max(16).optional(),"x-lore-invited-by-user-id":A.string().min(1).max(40).optional(),"user-agent":A.string().min(1).max(1024).optional()}),responses:{200:QLt,401:q,500:q,502:q},summary:"Validate a WorkOS Bearer token and return member plus user fields"},getCliAuthConfig:{method:"GET",path:"/cli-auth/config",responses:{200:yGe,503:q},summary:"Return public WorkOS CLI Auth configuration for the Lore CLI"},getDesktopAuthConfig:{method:"GET",path:"/desktop-auth/config",responses:{200:yGe,503:q},summary:"Return public WorkOS configuration for the Lore desktop app (dedicated native client, separate from the web/CLI client)"},getCliStatus:{method:"GET",path:"/users/me/cli-status",headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:xUt,401:q},summary:"Return whether the viewer has connected the Lore CLI (i.e., uploaded any thread under a non-unspecified harness), plus the latest upload timestamp."},recordHeartbeat:{method:"POST",path:"/heartbeat",headers:A.object({authorization:A.string().min(1).optional()}),body:LFt,responses:{200:UFt,401:q,403:q,404:q,422:q},summary:"Record (or refresh) a presence heartbeat for the authenticated user against one of their own threads. Idempotent; the daemon should call this every ~30s while a session is open."},recordProductPresence:{method:"POST",path:"/users/me/presence",headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{200:QFt,401:q},summary:"Record (or refresh) an authenticated Lore web-app presence heartbeat for the current user. Browser clients call this while the product is open."},recordCliHeartbeat:{method:"POST",path:"/users/me/cli-heartbeat",headers:A.object({authorization:A.string().min(1).optional()}),body:FFt,responses:{200:GFt,401:q},summary:"Record a liveness heartbeat for the authenticated user's CLI watch daemon. Idempotent; the daemon calls this ~every 60s and on each completed upload (upload_completed:true). Daemon-internal \u2014 not a `lore` subcommand."},listLiveThreads:{method:"GET",path:"/threads/live",headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:MFt,401:q,403:q},summary:"List people with user-block activity in the last 10 minutes. Includes the viewer\u2019s workspace and followed authors, deduped per author, max 10."},listThreads:{method:"GET",path:"/threads",headers:A.object({authorization:A.string().min(1).optional()}),query:kQt,responses:{200:bGe,401:q},summary:"List threads visible to the authenticated user"},createThread:{method:"POST",path:"/threads",headers:A.object({authorization:A.string().min(1).optional()}),body:yQt,responses:{201:SQt,401:q},summary:"Create an empty Lore-native thread for the authenticated user"},getThread:{method:"GET",path:"/threads/:id",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:Dk,404:q},summary:"Load a visible thread by id"},getSimilarThreads:{method:"GET",path:"/threads/:id/similar",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:bGe,404:q,409:q},summary:"List the top 20 visible threads with the closest summary embedding"},resolveThreadShareHighlight:{method:"POST",path:"/threads/:id/share-highlight",pathParams:A.object({id:A.string().min(1).describe("Thread id to share")}),headers:A.object({authorization:A.string().min(1).optional()}),body:_Qt,responses:{200:EQt,401:q,404:q,409:q},summary:"Resolve a natural-language share highlight to a canonical /thread URL with block anchors"},askThreads:{method:"POST",path:"/threads/ask",headers:A.object({authorization:A.string().min(1).optional()}),body:sQt,responses:{200:lQt,401:q},summary:"Answer a question from the top 20 visible decision matches, grouped back into threads"},forkThread:{method:"POST",path:"/threads/:id/fork",pathParams:A.object({id:A.string().min(1).describe("Thread id or stable harness lookup id to fork")}),headers:A.object({authorization:A.string().min(1).optional()}),body:oQt,responses:{200:iQt,403:q,404:q},summary:"Generate a distilled source handoff for continuing a visible coding-assistant session"},listThreadBlocks:{method:"GET",path:"/threads/:id/blocks",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),query:OQt,responses:{200:ese,401:q},summary:"List blocks for a visible thread"},createThreadBlockCommentThread:{method:"POST",path:"/threads/:threadId/blocks/:blockId/comment-threads",pathParams:A.object({threadId:A.string().min(1),blockId:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:sUt,responses:{201:aUt,401:q,404:q},summary:"Create a new block-level comment thread on a visible thread block"},createThreadBlockComment:{method:"POST",path:"/threads/:threadId/blocks/:blockId/comment-threads/:commentThreadId/comments",pathParams:A.object({threadId:A.string().min(1),blockId:A.string().min(1),commentThreadId:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:lUt,responses:{201:dUt,401:q,404:q,409:q},summary:"Reply to a block-level comment thread on a visible thread block"},updateThreadBlockCommentThread:{method:"PATCH",path:"/threads/:threadId/blocks/:blockId/comment-threads/:commentThreadId",pathParams:A.object({threadId:A.string().min(1),blockId:A.string().min(1),commentThreadId:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:mUt,responses:{200:AUt,401:q,404:q},summary:"Resolve or reopen a block-level comment thread on a visible thread block"},listSkills:{method:"GET",path:"/skills",headers:A.object({authorization:A.string().min(1).optional()}),query:MQt,responses:{200:UQt,401:q},summary:"List visible workspace skills and the viewer's private captured skills"},getSkillDetail:{method:"GET",path:"/skills/:id",pathParams:A.object({id:A.string().min(1).describe("Stable skill ID, e.g. sk_...")}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:IGe,401:q,404:q},summary:"Get visible skill details by stable skill ID"},getSkillRaw:{method:"GET",path:"/skills/:id/raw",pathParams:A.object({id:A.string().min(1).describe("Stable skill ID, e.g. sk_...")}),query:A.object({version:A.coerce.number().int().positive().optional().describe("Version timestamp to download. Defaults to latest accepted version.")}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:A.string(),401:q,403:q,404:q},summary:"Raw SKILL.md body for a skill (download / install path)"},installSkill:{method:"POST",path:"/skills/:id/installations",pathParams:A.object({id:A.string().min(1).describe("Workspace skill ID to install")}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{200:jQt,401:q,403:q,404:q},summary:"Register the current user as an installer of a visible skill"},uninstallSkill:{method:"DELETE",path:"/skills/:id/installation",pathParams:A.object({id:A.string().min(1).describe("Workspace skill ID to uninstall")}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{200:CGe,401:q},summary:"Unregister the current user installation for a skill (idempotent)"},updateSkillInstallation:{method:"PATCH",path:"/skills/installations/:id",pathParams:A.object({id:A.string().min(1).describe("Stable skill installation ID, e.g. ski_...")}),headers:A.object({authorization:A.string().min(1).optional()}),body:zQt,responses:{200:CGe,401:q,404:q,422:q},summary:"Record the accepted skill version installed by the current user"},listSkillInstallationSync:{method:"GET",path:"/skills/installations/sync",headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:qQt,401:q},summary:"List installed skills with latest accepted version metadata"},publishSkill:{method:"POST",path:"/skills/:id/publish",pathParams:A.object({id:A.string().min(1).describe("Private captured skill ID to publish")}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{200:IGe,401:q,403:q,404:q},summary:"Promote a private captured skill to the caller workspace"},approveSkillVersion:{method:"POST",path:"/skills/:id/versions/:version/approve",pathParams:A.object({id:A.string().min(1).describe("Workspace skill ID"),version:A.coerce.number().int().positive().describe("Proposed version timestamp to approve")}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{200:vGe,400:q,401:q,403:q,404:q},summary:"Approve a proposed skill version and make it latest accepted"},rejectSkillVersion:{method:"POST",path:"/skills/:id/versions/:version/reject",pathParams:A.object({id:A.string().min(1).describe("Workspace skill ID"),version:A.coerce.number().int().positive().describe("Proposed version timestamp to reject")}),headers:A.object({authorization:A.string().min(1).optional()}),body:HQt.optional(),responses:{200:vGe,400:q,401:q,403:q,404:q},summary:"Reject a proposed skill version with an optional owner reason"},redactThreadBlock:{method:"POST",path:"/threads/:threadId/blocks/:blockId/redactions",pathParams:A.object({threadId:A.string().min(1),blockId:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:PQt,responses:{200:xk,401:q,403:q,404:q,422:q},summary:"Permanently redact a character range within a text field of a thread block (author only)"},updateThreadBlockText:{method:"PATCH",path:"/threads/:threadId/blocks/:blockId/text",pathParams:A.object({threadId:A.string().min(1),blockId:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:VQt,responses:{200:xk,401:q,403:q,404:q,422:q},summary:"Replace a single text leaf in a thread block with new content (author only)"},critiqueThreadBlock:{method:"POST",path:"/threads/:threadId/blocks/:blockId/critique",pathParams:A.object({threadId:A.string().min(1),blockId:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{200:xk,401:q,403:q,404:q,409:q,422:q},summary:"Critique a plan block once and persist its annotations as nested comment threads (author only)"},listThreadBlockEdits:{method:"GET",path:"/threads/:threadId/blocks/:blockId/edits",pathParams:A.object({threadId:A.string().min(1),blockId:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:JQt,401:q,404:q},summary:"List edits made to a thread block (visible to anyone who can see the thread)"},listThreadDecisions:{method:"GET",path:"/threads/:id/decisions",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:rQt,401:q,404:q},summary:"List AI-extracted user decisions for a thread, in chronological order"},updateThread:{method:"PATCH",path:"/threads/:id",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:TQt,responses:{200:Dk,401:q,403:q,404:q},summary:"Update thread visibility (author only)"},deleteThread:{method:"DELETE",path:"/threads/:id",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{204:A.null(),401:q,403:q,404:q},summary:"Soft-delete a thread (author only)"},generateThreadCard:{method:"POST",path:"/threads/:id/card/generate",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{200:A.object({cover_status:tse,how_to_status:zGe}),401:q,403:q,404:q,429:q.extend({retry_after_seconds:A.number().int().nonnegative()})},summary:"Enqueue cover image + how-to recipe generation for the thread. Author-only. Idempotent \u2014 recently-fired statuses are not double-enqueued. Rate-limited: at most one cover generation per minute per thread (cooldown begins when the previous cover finishes). Used to populate cards on legacy threads (created before Lore Cards) and to retry after a 'failed' status or opt back in from 'disabled'."},uploadThreadCover:{method:"POST",path:"/threads/:id/card/cover/upload",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:m4t,responses:{200:A4t,401:q,403:q,404:q,413:q,422:q},summary:"Upload a custom cover image for a thread. Author or Tanagram admin only. Bytes go to the same storage substrate the AI cover uses (S3 in prod, filesystem in dev), and the threads row is updated atomically with the new cover_storage_url, cover_status='ready', cover_generated_at=now, cover_model='user-uploaded' so subsequent re-rolls / how-to fan-outs treat the upload like any other ready cover."},castThreadVote:{method:"PUT",path:"/threads/:id/vote",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:LUt,responses:{200:TGe,401:q,403:q,404:q,422:q},summary:"Cast or change the caller's up/down vote on a public thread. Idempotent \u2014 re-casting the same value is a no-op."},clearThreadVote:{method:"DELETE",path:"/threads/:id/vote",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{200:TGe,401:q,404:q},summary:"Clear the caller's vote on a thread. No-op when the caller hasn't voted."},listThreadComments:{method:"GET",path:"/threads/:threadId/comments",pathParams:A.object({threadId:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:QUt,403:q,404:q},summary:"List all (live + soft-deleted as tombstones) comments on a public thread, flat with parent_comment_id pointers."},createThreadComment:{method:"POST",path:"/threads/:threadId/comments",pathParams:A.object({threadId:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:FUt,responses:{201:GUt,401:q,403:q,404:q,422:q},summary:"Post a top-level or reply comment on a public thread."},updateThreadComment:{method:"PATCH",path:"/threads/:threadId/comments/:commentId",pathParams:A.object({threadId:A.string().min(1),commentId:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:jUt,responses:{200:zUt,401:q,403:q,404:q,422:q},summary:"Edit your own thread comment (author only; rejects edits to soft-deleted rows)."},deleteThreadComment:{method:"DELETE",path:"/threads/:threadId/comments/:commentId",pathParams:A.object({threadId:A.string().min(1),commentId:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{200:HUt,401:q,403:q,404:q},summary:"Soft-delete your own thread comment (author only). Idempotent."},getThreadPreview:{method:"GET",path:"/threads/:id/preview",pathParams:A.object({id:A.string().min(1)}),responses:{200:bQt,404:q},summary:"Unauthenticated, visibility-redacted metadata for OG / social preview consumers"},getUser:{method:"GET",path:"/users/:id",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:kGe,404:q},summary:"Public profile for a user. Optional auth \u2014 unauthenticated viewers see only public thread metadata; signed-in viewers see counts scoped to the threads they'd normally be able to access."},updateCurrentUser:{method:"PATCH",path:"/users/me",headers:A.object({authorization:A.string().min(1).optional()}),body:FLt,responses:{200:OGe,401:q,409:q,422:q},summary:"Update the authenticated user profile"},getUserByHandle:{method:"GET",path:"/users/by-handle/:handle",pathParams:A.object({handle:BGe}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:g4t,404:q},summary:"Resolve a public profile by handle \u2014 same shape as GET /users/:id but keyed on the user's chosen handle."},listMyReferrals:{method:"GET",path:"/users/me/referrals",headers:A.object({authorization:A.string().min(1)}),responses:{200:VFt,401:q},summary:"Total count plus the most-recent referees the authenticated user has attributed via `/?invited_by=\u2026` invite links. Mirrors the inviter side of users.referred_by_user_id."},listUserActivity:{method:"GET",path:"/users/:id/activity",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),query:A.object({limit:A.coerce.number().int().positive().max(100).optional()}),responses:{200:u4t,404:q},summary:"Reverse-chronological activity feed for a user, scoped to what the viewer can see (same visibility rules as listThreads)."},getUserContributions:{method:"GET",path:"/users/:id/contributions",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:t4t,404:q},summary:"Daily contribution counts for the trailing 365 days \u2014 counts thread blocks the user authored on threads visible to the viewer."},listUserFollowers:{method:"GET",path:"/users/:id/followers",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:DGe,404:q},summary:"List the users following a given user."},listUserFollowing:{method:"GET",path:"/users/:id/following",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:DGe,404:q},summary:"List the users a given user is following."},listFollowSuggestions:{method:"GET",path:"/users/:id/follow-suggestions",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:$Ft,404:q},summary:"Mutual-follow suggestions for a viewer: walks the viewer's followees one hop further and ranks candidates by mutual count. Replaces a 1 \u2192 24 client-side fan-out across `/users/:seed/following`."},followUser:{method:"POST",path:"/users/:id/follow",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{200:jFt,401:q,404:q,409:q,422:q},summary:"Follow another user. Idempotent \u2014 repeating the call is a no-op."},unfollowUser:{method:"DELETE",path:"/users/:id/follow",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{200:zFt,401:q,404:q},summary:"Unfollow a user. Idempotent \u2014 repeating the call is a no-op."},listProfilePublishedProjects:{method:"GET",path:"/users/:id/projects",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:l4t,404:q},summary:"Projects the user has published to their public profile."},publishProject:{method:"POST",path:"/projects/:id/publish",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{200:NGe,401:q,403:q,404:q},summary:"Publish a project to the author's public profile. Stamps published_at with `now()`. Author-only."},unpublishProject:{method:"DELETE",path:"/projects/:id/publish",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{200:NGe,401:q,403:q,404:q},summary:"Remove a project from the author's public profile."},uploadProfileImage:{method:"POST",path:"/users/me/profile-image",headers:A.object({authorization:A.string().min(1).optional()}),body:p4t,responses:{200:f4t,401:q,413:q,422:q},summary:"Upload an avatar or banner image (base64-encoded JSON body). The API streams the bytes to its configured storage substrate using its own credentials and returns the canonical storage URL the client passes to PATCH /users/me."},listOrganizationMembers:{method:"GET",path:"/organization/members",headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:jLt,401:q},summary:"List members of the authenticated user\u2019s organization"},createOrganizationInvite:{method:"POST",path:"/organization/invites",headers:A.object({authorization:A.string().min(1).optional()}),body:zLt,responses:{201:HLt,401:q,403:q,409:q,422:q},summary:"Invite a teammate to the authenticated user\u2019s workspace via WorkOS AuthKit"},ensureWorkOSOrganization:{method:"POST",path:"/organization/workos/ensure",headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{200:$Lt,401:q,422:q,503:q},summary:"Create or reuse a WorkOS organization for the authenticated user\u2019s non-public email domain and add the user as a member."},listRepositories:{method:"GET",path:"/repositories",headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:CUt,401:q,403:q},summary:"List repositories known to the authenticated user\u2019s organization across threads and building blocks"},createBuildingBlockSnapshots:{method:"POST",path:"/building_blocks",headers:A.object({authorization:A.string().min(1).optional()}),body:XLt,responses:{201:yUt,401:q,403:q},summary:"Create building block snapshots for the authenticated user\u2019s organization"},getPlan:{method:"GET",path:"/plans/:id",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:hUt,401:q,403:q,404:q},summary:"Load a thread-backed plan container visible to the authenticated user, including all visible plan revisions in that thread (only the latest revision carries body + prosemirror_json; older revisions are metadata-only and load on demand via getPlanRevision)"},getPlanRevision:{method:"GET",path:"/plans/:id/revisions/:revisionId",pathParams:A.object({id:A.string().min(1),revisionId:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:gUt,401:q,403:q,404:q},summary:"Load a single revision body + prosemirror_json + comment threads for a thread-backed plan container. Used to fetch non-latest revisions on demand without paying for every revision when the plan is first opened"},createPlanCommentThread:{method:"POST",path:"/plans/:id/comment-threads",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:oUt,responses:{201:iUt,401:q,403:q,404:q,422:q},summary:"Create a new inline comment thread on a specific revision inside a thread-backed plan container"},createPlanComment:{method:"POST",path:"/plans/:id/comment-threads/:threadId/comments",pathParams:A.object({id:A.string().min(1),threadId:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:uUt,responses:{201:cUt,401:q,403:q,404:q,409:q},summary:"Reply to an inline comment thread on a thread-backed plan container"},updatePlanCommentThread:{method:"PATCH",path:"/plans/:id/comment-threads/:threadId",pathParams:A.object({id:A.string().min(1),threadId:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:pUt,responses:{200:fUt,401:q,403:q,404:q},summary:"Resolve or reopen an inline comment thread on a thread-backed plan container"},listPlans:{method:"GET",path:"/plans",headers:A.object({authorization:A.string().min(1).optional()}),query:EUt,responses:{200:_Ut,401:q,403:q},summary:"List thread-backed plan containers visible to the authenticated user in their organization, ordered by latest visible revision and optionally filtered by author or repository"},listBuildingBlockSnapshots:{method:"GET",path:"/building_blocks",headers:A.object({authorization:A.string().min(1).optional()}),query:TUt,responses:{200:SUt,401:q,403:q},summary:"List building block snapshots for the authenticated user\u2019s organization and repo origin path"},listUploadSessions:{method:"GET",path:"/upload_sessions",headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:wQt,401:q},summary:"List recent upload sessions for the authenticated user"},createUploadSession:{method:"POST",path:"/upload_sessions",headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({thread_files:A.array(OUt).optional(),skill_files:A.array(wUt).optional()}),responses:{201:hQt,400:q,401:q},summary:"Create an upload session with presigned URLs for file uploads"},completeUploadSession:{method:"POST",path:"/upload_sessions/:id/complete",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({thread_files:A.array(dQt).optional(),skill_files:A.array(pQt).optional()}),responses:{200:mQt,400:q,401:q,404:q,409:q,422:q},summary:"Complete an upload session after files have been uploaded to storage"},adminStats:{method:"GET",path:"/admin/stats",headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:ZQt,401:q,403:q},summary:"Cross-org operational counts. Tanagram admins only."},adminListOrganizations:{method:"GET",path:"/admin/organizations",headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:XQt,401:q,403:q},summary:"List every organization with member and thread counts. Tanagram admins only."},adminListUsers:{method:"GET",path:"/admin/users",query:tFt,headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:oFt,401:q,403:q},summary:"List every user with their org memberships and thread count. Tanagram admins only."},adminListThreads:{method:"GET",path:"/admin/threads",headers:A.object({authorization:A.string().min(1).optional()}),query:uFt,responses:{200:aFt,401:q,403:q},summary:"List live threads across every organization. Tanagram admins only."},adminLookupThread:{method:"GET",path:"/admin/threads/lookup",headers:A.object({authorization:A.string().min(1).optional()}),query:cFt,responses:{200:sFt,400:q,401:q,403:q,404:q},summary:"Look up a thread by thread id, thread file id, or harness session id. Tanagram admins only."},adminForceFollow:{method:"POST",path:"/admin/connections/follow",headers:A.object({authorization:A.string().min(1).optional()}),body:nFt,responses:{200:rFt,401:q,403:q,404:q,422:q},summary:"Force follower->followee edge. Admin-only and non-destructive."},adminHardDeleteThread:{method:"DELETE",path:"/admin/threads/:id",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{204:A.null(),401:q,403:q,404:q},summary:"Permanently remove a thread. Tanagram admins only."},adminReparseThreadFile:{method:"POST",path:"/admin/thread-files/:id/reparse",pathParams:A.object({id:A.string().min(1).describe("Thread file id, e.g. tf_xxx.")}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{200:lFt,401:q,403:q,404:q},summary:"Re-enqueue parsing for a thread file. Tanagram admins only."},listCardFeed:{method:"GET",path:"/cards/feed",query:A.object({limit:A.coerce.number().int().min(1).max(48).optional()}),responses:{200:eQt},summary:"Slim feed of public threads with a ready cover image, ordered by cover_generated_at descending. Powers the landing-page UGC card scroll. Returns presigned cover URLs inline so the grid renders without a follow-up round trip per card."},listDiscoverThreads:{method:"GET",path:"/discover/threads",headers:A.object({authorization:A.string().min(1).optional()}),query:DQt,responses:{200:xQt},summary:"Feed of public threads with sort, harness filter, search, and cursor pagination. Auth is optional and populates viewer_vote."},discoverStats:{method:"GET",path:"/discover/stats",responses:{200:NQt},summary:"Unauthenticated rollup of public-thread counts for the Discover header."},createWaitlistEntry:{method:"POST",path:"/waitlist_entries",body:qLt,responses:{201:KLt,409:q},summary:"Create an unauthenticated waitlist entry keyed by (location, contact)."},submitContactMessage:{method:"POST",path:"/contact",body:VLt,responses:{200:YLt,429:q,503:q},summary:"Submit a contact-form message from the marketing site; emails the Lore team."},createFeedback:{method:"POST",path:"/feedback",headers:A.object({authorization:A.string().min(1).optional()}),body:JLt,responses:{201:ZLt,401:q,422:q,429:q},summary:"Submit in-app feedback. Persists to lore.feedback_entries and best-effort posts to the #lore-feedback Slack channel. Rate-limited to 30 submissions/hour per user."},createShareToken:{method:"POST",path:"/threads/:id/share-token",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{201:RGe,401:q,403:q,404:q,409:q},summary:"Mint a short share-link token for a public thread. Author only. The token powers `/s/:token` short URLs and enables k-factor attribution."},resolveShareToken:{method:"GET",path:"/referrals/resolve/:token",pathParams:A.object({token:A.string().min(1).max(16)}),headers:A.object({authorization:A.string().min(1).optional()}),query:dFt,responses:{200:RGe,404:q},summary:"Resolve a share-link token to its thread and record the view. Works for signed-out viewers; if a bearer token is present we attribute the view to that Lore user for analytics."},adminGrowth:{method:"GET",path:"/admin/growth",headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:mFt,401:q,403:q},summary:"Share-link k-factor, funnel, sparkline, and top sharers by window. Tanagram admins only."},adminActiveUsers:{method:"GET",path:"/admin/active-users",headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:AFt,401:q,403:q},summary:"DAU/WAU/MAU/all-time active-user buckets \u2014 union of oauth token issuance and thread-event spine. Tanagram admins only."},adminReferrals:{method:"GET",path:"/admin/referrals",headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:ZFt,401:q,403:q},summary:"Cross-organization invite-link funnel: lifetime + 30-day counts, 60-day daily timeseries, top inviters, recent attributions. Tanagram admins only."},adminOnboardingSources:{method:"GET",path:"/admin/onboarding/sources",headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:XFt,401:q,403:q},summary:"Signed-up persons grouped by PostHog `initial_source` first-touch attribution. Powers bucket 1 of /admin's Onboarding flow tab; sourced via HogQL."},adminRunCritiquePlayground:{method:"POST",path:"/admin/critique-playground/run",headers:A.object({authorization:A.string().min(1).optional()}),body:EFt,responses:{200:yFt,401:q,403:q,409:q},summary:"Admin-only critique playground that saves markdown to a file:// plan artifact and returns parsed + critiqued plan blocks."},adminListEmailTemplates:{method:"GET",path:"/admin/email-templates",headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:bFt,401:q,403:q},summary:"List transactional email templates and their editable preview fields. Tanagram admins only."},adminPreviewEmailTemplate:{method:"POST",path:"/admin/email-templates/:id/preview",pathParams:A.object({id:A.string().min(1).describe("Email template id.")}),headers:A.object({authorization:A.string().min(1).optional()}),body:IFt,responses:{200:CFt,400:q,401:q,403:q,404:q},summary:"Render a transactional email template with supplied values. Tanagram admins only."},adminSendEmailTemplate:{method:"POST",path:"/admin/email-templates/:id/send",pathParams:A.object({id:A.string().min(1).describe("Email template id.")}),headers:A.object({authorization:A.string().min(1).optional()}),body:vFt,responses:{200:RFt,400:q,401:q,403:q,404:q,503:q},summary:"Send a transactional email template through Resend. Tanagram admins only."},getBillingState:{method:"GET",path:"/billing/state",headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:xFt,401:q},summary:"Resolve the caller's plan, features, seat count, and any admin override."},createBillingCheckout:{method:"POST",path:"/billing/checkout",headers:A.object({authorization:A.string().min(1).optional()}),body:DFt,responses:{200:NFt,400:q,401:q,403:q,503:q},summary:"Start a Stripe Checkout session for Creator ($29/mo) or Team ($19/seat/mo, min 2)."},createBillingPortal:{method:"POST",path:"/billing/portal",headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({subject_type:A.enum(["user","organization"]).default("user")}).optional(),responses:{200:BFt,401:q,404:q,503:q},summary:"Open the Stripe customer portal so the subject can manage their subscription."},updateTeamSeats:{method:"PATCH",path:"/billing/team-seats",headers:A.object({authorization:A.string().min(1).optional()}),body:wFt,responses:{200:Zie,400:q,401:q,403:q,404:q,503:q},summary:"Adjust the caller-organization's Team seat quantity (admin of that org only)."},adminListBilling:{method:"GET",path:"/admin/billing",headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:OFt,401:q,403:q},summary:"List every user and org with current plan + override for the admin panel."},adminSetUserPlanOverride:{method:"PUT",path:"/admin/billing/users/:id/override",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:xGe,responses:{200:Mz,401:q,403:q,404:q},summary:"Admin override for a user's plan tier. Null clears the override."},adminSetOrganizationPlanOverride:{method:"PUT",path:"/admin/billing/organizations/:id/override",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:xGe,responses:{200:Mz,401:q,403:q,404:q},summary:"Admin override for an organization's plan tier. Null clears the override."},projects:pGe,regions:gGe,entities:sGe,docs:nGe,mentions:lGe,favorites:cGe,search:_Ge},{pathPrefix:"/api"})});import{AsyncLocalStorage as h4t}from"node:async_hooks";import ch from"node:fs/promises";import JGe from"node:path";function S4t(e){return JGe.join(e,"tokens-refresh.lock")}async function Bk(e,t,n={}){let r=KGe.getStore();if(r?.has(e))return t();let o=n.waitMs??_4t,i=n.staleMs??E4t,s=n.now??Date.now,u=n.sleep??(v=>new Promise(R=>setTimeout(R,v))),l=S4t(e),f=JGe.join(l,"owner"),h=`${process.pid}:${Date.now()}:${Math.random().toString(36).slice(2)}`,_=s(),y=!1;for(;!y;)try{await ch.mkdir(e,{recursive:!0,mode:448}),await ch.chmod(e,448).catch(()=>{}),await ch.mkdir(l,{mode:448});try{await ch.writeFile(f,h,{mode:384})}catch(v){throw await ch.rm(l,{recursive:!0,force:!0}),v}y=!0}catch(v){if(!T4t(v))throw v;if(await b4t(l,i,s)){await ch.rm(l,{recursive:!0,force:!0});continue}if(s()-_>=o)throw new Error(`Timed out waiting for OAuth token refresh lock at ${l}`);await u(Math.min(y4t,o))}let T=new Set(r??[]);T.add(e);try{return await KGe.run(T,t)}finally{await I4t(l,f,h)}}function ZGe(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="ENOENT"}function T4t(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="EEXIST"}async function b4t(e,t,n){try{let r=await ch.stat(e);return n()-r.mtimeMs>=t}catch(r){if(ZGe(r))return!1;throw r}}async function I4t(e,t,n){try{if(await ch.readFile(t,"utf8")!==n)return}catch(r){if(!ZGe(r))throw r}await ch.rm(e,{recursive:!0,force:!0})}var KGe,_4t,E4t,y4t,iGn,sGn,aGn,uGn,cGn,lGn,Fz,nse=w(()=>{"use strict";m();pc();KGe=new h4t,_4t=3e4,E4t=6e4,y4t=100,iGn=process.env.LORE_PLUGIN_AUTHKIT_CLIENT_ID?.trim()||process.env.PLUGIN_AUTHKIT_CLIENT_ID?.trim()||"client_01KRSDB9SR20N7MB0D9MPS05Q6",sGn=process.env.LORE_CLI_AUTHKIT_CLIENT_ID?.trim()||process.env.CLI_AUTHKIT_CLIENT_ID?.trim()||"client_01KV6K8BBANC2J3998K4DG9840",aGn=A.object({resource:A.string(),endpoints:A.object({audience:A.string(),deviceAuthorizationEndpoint:A.string(),tokenEndpoint:A.string(),authorizationEndpoint:A.string()}),fetchedAt:A.number(),prmEtag:A.string().optional()}),uGn=A.object({resource:A.string().min(1,"`resource` must be a non-empty string"),authorization_servers:A.array(A.string())}),cGn=A.object({issuer:A.string().min(1,"`issuer` must be a non-empty string"),token_endpoint:A.string().min(1,"`token_endpoint` must be a non-empty string"),authorization_endpoint:A.string().optional()}),lGn=A.object({access_token:A.string().min(1),refresh_token:A.string().min(1),expires_in:A.number().int().positive(),token_type:A.string().min(1),scope:A.string().optional()}),Fz=class extends Error{constructor(){super("OAuth refresh token is invalid or expired"),this.name="OAuthInvalidGrantError"}}});import hp from"node:fs";import C4t from"node:path";function rse(e){return C4t.join(e,"tokens.json")}function v4t(e){return`${e}.tmp.${process.pid}.${Date.now()}.${Math.random().toString(36).slice(2)}`}function eje(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="ENOENT"}function R4t(e,t){let n;try{n=JSON.parse(e)}catch(o){throw new Error(`tokens file at ${t} is not valid JSON: ${o.message}`)}if(typeof n=="object"&&n!==null&&"version"in n){let o=XGe.safeParse(n);if(!o.success)throw new Error(`tokens file at ${t} failed schema validation: ${o.error.message}`);return o.data}let r=Gz.safeParse(n);if(!r.success)throw new Error(`tokens file at ${t} failed schema validation: ${r.error.message}`);return N4t(r.data)}function x4t(e){let t=e.split(".");if(t.length<2||!t[1])return null;try{let n=JSON.parse(Buffer.from(t[1],"base64url").toString("utf8"));if(typeof n!="object"||n===null)return null;let r=n.iss;return typeof r=="string"&&r.length>0?r:null}catch{return null}}function D4t(e){let t=x4t(e.access_token);if(!t)return!1;let n;try{n=new URL(t).host.toLowerCase()}catch{return!1}return n!=="workos.com"&&!n.endsWith(".workos.com")}function N4t(e){let t={};return D4t(e)&&(t.plugin=e),{version:2,clients:t}}function B4t(e){return JSON.stringify(XGe.parse(e))}function ose(e){let t=rse(e),n;try{n=hp.readFileSync(t,"utf8")}catch(r){if(eje(r))return null;throw r}return R4t(n,t)}function tje(e,t){let n=rse(e);hp.mkdirSync(e,{recursive:!0,mode:448}),hp.chmodSync(e,448);let r=v4t(n),o=B4t(t),i;try{i=hp.openSync(r,"w",384),hp.writeSync(i,o),hp.fchmodSync(i,384),hp.fsyncSync(i),hp.closeSync(i),i=void 0,hp.renameSync(r,n)}catch(s){if(i!==void 0)try{hp.closeSync(i)}catch{}try{hp.unlinkSync(r)}catch{}throw s}}function ise(e,t){return ose(e)?.clients[t]??null}function w4t(e){try{return ose(e)??{version:2,clients:{}}}catch{return{version:2,clients:{}}}}function WGe(e){try{hp.rmSync(rse(e))}catch(t){if(!eje(t))throw t}}function nje(e,t,n){let r=w4t(e);r.clients[t]=Gz.parse(n),tje(e,r)}function sse(e,t){let n;try{n=ose(e)}catch{WGe(e);return}if(!(!n||!(t in n.clients))){if(delete n.clients[t],Object.keys(n.clients).length===0){WGe(e);return}tje(e,n)}}var Gz,XGe,ase=w(()=>{"use strict";m();pc();nse();Gz=A.object({access_token:A.string(),refresh_token:A.string(),expires_at:A.number().int(),scope:A.string().default("")}),XGe=A.object({version:A.literal(2),clients:A.record(A.string(),Gz).default({})})});import O4t from"node:fs";import oje from"node:os";import ije from"node:path";function k4t(e=oje.homedir()){return ije.join(e,"Library","Application Support","tanagram","lore","tokens.json")}function use(e){let t=e.split(".");if(t.length<2||!t[1])return null;let n;try{n=JSON.parse(Buffer.from(t[1],"base64url").toString("utf8"))}catch{return null}if(typeof n!="object"||n===null)return null;let r=n.exp;return typeof r=="number"?r*1e3:null}function rje(e){try{O4t.rmSync(e)}catch(t){if(!(typeof t=="object"&&t!==null&&"code"in t&&t.code==="ENOENT"))throw t}}function jz(e,t=oje.homedir()){for(let n of P4t)rje(ije.join(e,n));rje(k4t(t))}var P4t,sje=w(()=>{"use strict";m();ase();P4t=["token","refresh_token"]});var zz=w(()=>{"use strict";m();ase();sje();nse()});import{execFileSync as M4t}from"node:child_process";import{createHash as L4t}from"node:crypto";import wk from"node:os";import pa from"node:path";function Er(){if(to()==="dev"){let t=process.env.LORE_DEV_STATE_DIR?.trim();if(t)return pa.resolve(t.replace(/^~(?=$|\/)/,wk.homedir()));let n=U4t();if(n)return pa.join(wk.homedir(),`.lore-dev-${n}`)}let e=to()==="dev"?".lore-dev":".lore";return pa.join(wk.homedir(),e)}function U4t(){let e=aje(process.env.LORE_DEV_STACK_NAME??"");if(e)return e;let t=Q4t();return[aje(t.split(/[\\/]/).pop()||"lore"),F4t(t)].filter(Boolean).join("-").slice(0,63)}function Q4t(){try{return M4t("git",["rev-parse","--show-toplevel"],{encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim()}catch{return pa.resolve(process.cwd(),"../..")}}function F4t(e){return L4t("sha1").update(e).digest("hex").slice(0,8)}function aje(e){return e.toLowerCase().replace(/[^a-z0-9-]+/g,"-").replace(/^-+|-+$/g,"").slice(0,63)}function _p(){return pa.join(Er(),"log.txt")}function cse(){return pa.join(Er(),"upload.log.txt")}function uje(){return pa.join(Er(),"upload-daemon.lock")}function lse(){return pa.join(Er(),"skill-sync.log.txt")}function dse(){return pa.join(Er(),"sync_state.json")}function MT(){return pa.join(Er(),"upload_filters.json")}function Hz(){return pa.join(Er(),"upload_dirs.json")}function Ok(){return pa.join(Er(),"status.json")}function Fx(){return pa.join(Er(),"quarantine")}function LT(){return pa.join(Er(),"install_source.json")}function UT(){return pa.join(Er(),"skill_sync_state.json")}function n0(){return pa.join(Er(),"bin","lore")}function r0(){let e=to();return e==="prod"?"ai.tanagram.lore":`ai.tanagram.lore.${e}`}function Gx(){return`${r0()}.skill-sync`}function jx(){return pa.join(wk.homedir(),"Library","LaunchAgents",`${r0()}.plist`)}function $z(){return pa.join(wk.homedir(),"Library","LaunchAgents",`${Gx()}.plist`)}var Mo=w(()=>{"use strict";m();sc()});import lje from"node:fs";function G4t(){let e=Er();cje!==e&&(lje.mkdirSync(e,{recursive:!0}),cje=e)}function j4t(e){let t=typeof e=="string"?e:JSON.stringify(e);return/[\s"=]/.test(t)?JSON.stringify(t):t}function z4t(e,t,n){let r=`${new Date().toISOString()} ${e} ${t}`;if(!n)return`${r}
104
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of e.seen.entries()){let u=s[1];if(t===s[0]){i(s);continue}if(e.external){let f=e.external.registry.get(s[0])?.id;if(t!==s[0]&&f){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(u.cycle){i(s);continue}if(u.count>1&&e.reused==="ref"){i(s);continue}}}function XE(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let r=u=>{let l=e.seen.get(u);if(l.ref===null)return;let f=l.def??l.schema,h={...f},_=l.ref;if(l.ref=null,_){r(_);let T=e.seen.get(_),v=T.schema;if(v.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(f.allOf=f.allOf??[],f.allOf.push(v)):Object.assign(f,v),Object.assign(f,h),u._zod.parent===_)for(let x in f)x==="$ref"||x==="allOf"||x in h||delete f[x];if(v.$ref&&T.def)for(let x in f)x==="$ref"||x==="allOf"||x in T.def&&JSON.stringify(f[x])===JSON.stringify(T.def[x])&&delete f[x]}let y=u._zod.parent;if(y&&y!==_){r(y);let T=e.seen.get(y);if(T?.schema.$ref&&(f.$ref=T.schema.$ref,T.def))for(let v in f)v==="$ref"||v==="allOf"||v in T.def&&JSON.stringify(f[v])===JSON.stringify(T.def[v])&&delete f[v]}e.override({zodSchema:u,jsonSchema:f,path:l.path??[]})};for(let u of[...e.seen.entries()].reverse())r(u[0]);let o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let u=e.external.registry.get(t)?.id;if(!u)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(u)}Object.assign(o,n.def??n.schema);let i=e.metadataRegistry.get(t)?.id;i!==void 0&&o.id===i&&delete o.id;let s=e.external?.defs??{};for(let u of e.seen.entries()){let l=u[1];l.def&&l.defId&&(l.def.id===l.defId&&delete l.def.id,s[l.defId]=l.def)}e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?o.$defs=s:o.definitions=s);try{let u=JSON.parse(JSON.stringify(o));return Object.defineProperty(u,"~standard",{value:{...t["~standard"],jsonSchema:{input:Dx(t,"input",e.processors),output:Dx(t,"output",e.processors)}},enumerable:!1,writable:!1}),u}catch{throw new Error("Error converting schema to JSON.")}}function dc(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return dc(r.element,n);if(r.type==="set")return dc(r.valueType,n);if(r.type==="lazy")return dc(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return dc(r.innerType,n);if(r.type==="intersection")return dc(r.left,n)||dc(r.right,n);if(r.type==="record"||r.type==="map")return dc(r.keyType,n)||dc(r.valueType,n);if(r.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:dc(r.in,n)||dc(r.out,n);if(r.type==="object"){for(let o in r.shape)if(dc(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(let o of r.options)if(dc(o,n))return!0;return!1}if(r.type==="tuple"){for(let o of r.items)if(dc(o,n))return!0;return!!(r.rest&&dc(r.rest,n))}return!1}var Qre,Dx,ck=w(()=>{m();sk();Qre=(e,t={})=>n=>{let r=ZE({...n,processors:t});return Or(e,r),WE(r,e),XE(r,e)},Dx=(e,t,n={})=>r=>{let{libraryOptions:o,target:i}=r??{},s=ZE({...o??{},target:i,io:t,processors:n});return Or(e,s),WE(s,e),XE(s,e)}});function Hj(e,t){if("_idmap"in e){let r=e,o=ZE({...t,processors:Gj}),i={};for(let l of r._idmap.entries()){let[f,h]=l;Or(h,o)}let s={},u={registry:r,uri:t?.uri,defs:i};o.external=u;for(let l of r._idmap.entries()){let[f,h]=l;WE(o,h),s[f]=XE(o,h)}if(Object.keys(i).length>0){let l=o.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[l]:i}}return{schemas:s}}let n=ZE({...t,processors:Gj});return Or(e,n),WE(n,e),XE(n,e)}var kMt,Fre,Gre,jre,zre,Hre,$re,qre,Vre,Yre,Kre,Jre,Zre,Wre,Xre,eoe,toe,noe,roe,ooe,ioe,soe,aoe,uoe,coe,loe,jj,doe,poe,foe,moe,Aoe,goe,hoe,_oe,Eoe,yoe,Soe,zj,Toe,Gj,lk=w(()=>{m();ck();St();kMt={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Fre=(e,t,n,r)=>{let o=n;o.type="string";let{minimum:i,maximum:s,format:u,patterns:l,contentEncoding:f}=e._zod.bag;if(typeof i=="number"&&(o.minLength=i),typeof s=="number"&&(o.maxLength=s),u&&(o.format=kMt[u]??u,o.format===""&&delete o.format,u==="time"&&delete o.format),f&&(o.contentEncoding=f),l&&l.size>0){let h=[...l];h.length===1?o.pattern=h[0].source:h.length>1&&(o.allOf=[...h.map(_=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:_.source}))])}},Gre=(e,t,n,r)=>{let o=n,{minimum:i,maximum:s,format:u,multipleOf:l,exclusiveMaximum:f,exclusiveMinimum:h}=e._zod.bag;typeof u=="string"&&u.includes("int")?o.type="integer":o.type="number";let _=typeof h=="number"&&h>=(i??Number.NEGATIVE_INFINITY),y=typeof f=="number"&&f<=(s??Number.POSITIVE_INFINITY),T=t.target==="draft-04"||t.target==="openapi-3.0";_?T?(o.minimum=h,o.exclusiveMinimum=!0):o.exclusiveMinimum=h:typeof i=="number"&&(o.minimum=i),y?T?(o.maximum=f,o.exclusiveMaximum=!0):o.exclusiveMaximum=f:typeof s=="number"&&(o.maximum=s),typeof l=="number"&&(o.multipleOf=l)},jre=(e,t,n,r)=>{n.type="boolean"},zre=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},Hre=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},$re=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},qre=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},Vre=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Yre=(e,t,n,r)=>{n.not={}},Kre=(e,t,n,r)=>{},Jre=(e,t,n,r)=>{},Zre=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Wre=(e,t,n,r)=>{let o=e._zod.def,i=HO(o.entries);i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),n.enum=i},Xre=(e,t,n,r)=>{let o=e._zod.def,i=[];for(let s of o.values)if(s===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(s))}else i.push(s);if(i.length!==0)if(i.length===1){let s=i[0];n.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[s]:n.const=s}else i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),i.every(s=>typeof s=="boolean")&&(n.type="boolean"),i.every(s=>s===null)&&(n.type="null"),n.enum=i},eoe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},toe=(e,t,n,r)=>{let o=n,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");o.type="string",o.pattern=i.source},noe=(e,t,n,r)=>{let o=n,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:u,mime:l}=e._zod.bag;s!==void 0&&(i.minLength=s),u!==void 0&&(i.maxLength=u),l?l.length===1?(i.contentMediaType=l[0],Object.assign(o,i)):(Object.assign(o,i),o.anyOf=l.map(f=>({contentMediaType:f}))):Object.assign(o,i)},roe=(e,t,n,r)=>{n.type="boolean"},ooe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},ioe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},soe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},aoe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},uoe=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},coe=(e,t,n,r)=>{let o=n,i=e._zod.def,{minimum:s,maximum:u}=e._zod.bag;typeof s=="number"&&(o.minItems=s),typeof u=="number"&&(o.maxItems=u),o.type="array",o.items=Or(i.element,t,{...r,path:[...r.path,"items"]})},loe=(e,t,n,r)=>{let o=n,i=e._zod.def;o.type="object",o.properties={};let s=i.shape;for(let f in s)o.properties[f]=Or(s[f],t,{...r,path:[...r.path,"properties",f]});let u=new Set(Object.keys(s)),l=new Set([...u].filter(f=>{let h=i.shape[f]._zod;return t.io==="input"?h.optin===void 0:h.optout===void 0}));l.size>0&&(o.required=Array.from(l)),i.catchall?._zod.def.type==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=Or(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},jj=(e,t,n,r)=>{let o=e._zod.def,i=o.inclusive===!1,s=o.options.map((u,l)=>Or(u,t,{...r,path:[...r.path,i?"oneOf":"anyOf",l]}));i?n.oneOf=s:n.anyOf=s},doe=(e,t,n,r)=>{let o=e._zod.def,i=Or(o.left,t,{...r,path:[...r.path,"allOf",0]}),s=Or(o.right,t,{...r,path:[...r.path,"allOf",1]}),u=f=>"allOf"in f&&Object.keys(f).length===1,l=[...u(i)?i.allOf:[i],...u(s)?s.allOf:[s]];n.allOf=l},poe=(e,t,n,r)=>{let o=n,i=e._zod.def;o.type="array";let s=t.target==="draft-2020-12"?"prefixItems":"items",u=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",l=i.items.map((y,T)=>Or(y,t,{...r,path:[...r.path,s,T]})),f=i.rest?Or(i.rest,t,{...r,path:[...r.path,u,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(o.prefixItems=l,f&&(o.items=f)):t.target==="openapi-3.0"?(o.items={anyOf:l},f&&o.items.anyOf.push(f),o.minItems=l.length,f||(o.maxItems=l.length)):(o.items=l,f&&(o.additionalItems=f));let{minimum:h,maximum:_}=e._zod.bag;typeof h=="number"&&(o.minItems=h),typeof _=="number"&&(o.maxItems=_)},foe=(e,t,n,r)=>{let o=n,i=e._zod.def;o.type="object";let s=i.keyType,l=s._zod.bag?.patterns;if(i.mode==="loose"&&l&&l.size>0){let h=Or(i.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});o.patternProperties={};for(let _ of l)o.patternProperties[_.source]=h}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(o.propertyNames=Or(i.keyType,t,{...r,path:[...r.path,"propertyNames"]})),o.additionalProperties=Or(i.valueType,t,{...r,path:[...r.path,"additionalProperties"]});let f=s._zod.values;if(f){let h=[...f].filter(_=>typeof _=="string"||typeof _=="number");h.length>0&&(o.required=h)}},moe=(e,t,n,r)=>{let o=e._zod.def,i=Or(o.innerType,t,r),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=o.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},Aoe=(e,t,n,r)=>{let o=e._zod.def;Or(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType},goe=(e,t,n,r)=>{let o=e._zod.def;Or(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},hoe=(e,t,n,r)=>{let o=e._zod.def;Or(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},_oe=(e,t,n,r)=>{let o=e._zod.def;Or(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType;let s;try{s=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=s},Eoe=(e,t,n,r)=>{let o=e._zod.def,i=o.in._zod.traits.has("$ZodTransform"),s=t.io==="input"?i?o.out:o.in:o.out;Or(s,t,r);let u=t.seen.get(e);u.ref=s},yoe=(e,t,n,r)=>{let o=e._zod.def;Or(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType,n.readOnly=!0},Soe=(e,t,n,r)=>{let o=e._zod.def;Or(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType},zj=(e,t,n,r)=>{let o=e._zod.def;Or(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType},Toe=(e,t,n,r)=>{let o=e._zod.innerType;Or(o,t,r);let i=t.seen.get(e);i.ref=o},Gj={string:Fre,number:Gre,boolean:jre,bigint:zre,symbol:Hre,null:$re,undefined:qre,void:Vre,never:Yre,any:Kre,unknown:Jre,date:Zre,enum:Wre,literal:Xre,nan:eoe,template_literal:toe,file:noe,success:roe,custom:ooe,function:ioe,transform:soe,map:aoe,set:uoe,array:coe,object:loe,union:jj,intersection:doe,tuple:poe,record:foe,nullable:moe,nonoptional:Aoe,default:goe,prefault:hoe,catch:_oe,pipe:Eoe,readonly:yoe,promise:Soe,optional:zj,lazy:Toe}});var $j,D3e=w(()=>{m();lk();ck();$j=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let n=t?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=ZE({processors:Gj,target:n,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,n={path:[],schemaPath:[]}){return Or(t,this.ctx,n)}emit(t,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),WE(this.ctx,t);let r=XE(this.ctx,t),{"~standard":o,...i}=r;return i}}});var N3e={};var B3e=w(()=>{m()});var uh={};Zs(uh,{$ZodAny:()=>Ane,$ZodArray:()=>yne,$ZodAsyncError:()=>kf,$ZodBase64:()=>ine,$ZodBase64URL:()=>sne,$ZodBigInt:()=>aj,$ZodBigIntFormat:()=>dne,$ZodBoolean:()=>tk,$ZodCIDRv4:()=>nne,$ZodCIDRv6:()=>rne,$ZodCUID:()=>Hte,$ZodCUID2:()=>$te,$ZodCatch:()=>Une,$ZodCheck:()=>no,$ZodCheckBigIntFormat:()=>_te,$ZodCheckEndsWith:()=>Nte,$ZodCheckGreaterThan:()=>ej,$ZodCheckIncludes:()=>xte,$ZodCheckLengthEquals:()=>Ite,$ZodCheckLessThan:()=>XG,$ZodCheckLowerCase:()=>vte,$ZodCheckMaxLength:()=>Tte,$ZodCheckMaxSize:()=>Ete,$ZodCheckMimeType:()=>wte,$ZodCheckMinLength:()=>bte,$ZodCheckMinSize:()=>yte,$ZodCheckMultipleOf:()=>gte,$ZodCheckNumberFormat:()=>hte,$ZodCheckOverwrite:()=>Ote,$ZodCheckProperty:()=>Bte,$ZodCheckRegex:()=>Cte,$ZodCheckSizeEquals:()=>Ste,$ZodCheckStartsWith:()=>Dte,$ZodCheckStringFormat:()=>mx,$ZodCheckUpperCase:()=>Rte,$ZodCodec:()=>rk,$ZodCustom:()=>qne,$ZodCustomStringFormat:()=>cne,$ZodDate:()=>Ene,$ZodDefault:()=>kne,$ZodDiscriminatedUnion:()=>bne,$ZodE164:()=>ane,$ZodEmail:()=>Fte,$ZodEmoji:()=>jte,$ZodEncodeError:()=>HE,$ZodEnum:()=>xne,$ZodError:()=>KO,$ZodExactOptional:()=>wne,$ZodFile:()=>Nne,$ZodFunction:()=>zne,$ZodGUID:()=>Ute,$ZodIPv4:()=>Xte,$ZodIPv6:()=>ene,$ZodISODate:()=>Jte,$ZodISODateTime:()=>Kte,$ZodISODuration:()=>Wte,$ZodISOTime:()=>Zte,$ZodIntersection:()=>Ine,$ZodJWT:()=>une,$ZodKSUID:()=>Yte,$ZodLazy:()=>$ne,$ZodLiteral:()=>Dne,$ZodMAC:()=>tne,$ZodMap:()=>vne,$ZodNaN:()=>Qne,$ZodNanoID:()=>zte,$ZodNever:()=>hne,$ZodNonOptional:()=>Mne,$ZodNull:()=>mne,$ZodNullable:()=>One,$ZodNumber:()=>sj,$ZodNumberFormat:()=>lne,$ZodObject:()=>BFe,$ZodObjectJIT:()=>Sne,$ZodOptional:()=>cj,$ZodPipe:()=>lj,$ZodPrefault:()=>Pne,$ZodPreprocess:()=>Fne,$ZodPromise:()=>Hne,$ZodReadonly:()=>Gne,$ZodRealError:()=>nl,$ZodRecord:()=>Cne,$ZodRegistry:()=>mj,$ZodSet:()=>Rne,$ZodString:()=>xT,$ZodStringFormat:()=>Kr,$ZodSuccess:()=>Lne,$ZodSymbol:()=>pne,$ZodTemplateLiteral:()=>jne,$ZodTransform:()=>Bne,$ZodTuple:()=>uj,$ZodType:()=>cn,$ZodULID:()=>qte,$ZodURL:()=>Gte,$ZodUUID:()=>Qte,$ZodUndefined:()=>fne,$ZodUnion:()=>nk,$ZodUnknown:()=>gne,$ZodVoid:()=>_ne,$ZodXID:()=>Vte,$ZodXor:()=>Tne,$brand:()=>bee,$constructor:()=>ie,$input:()=>Xne,$output:()=>Wne,Doc:()=>ek,JSONSchema:()=>N3e,JSONSchemaGenerator:()=>$j,NEVER:()=>Tee,TimePrecision:()=>rre,_any:()=>Ire,_array:()=>Bre,_base64:()=>wj,_base64url:()=>Oj,_bigint:()=>hre,_boolean:()=>Are,_catch:()=>xMt,_check:()=>R3e,_cidrv4:()=>Nj,_cidrv6:()=>Bj,_coercedBigint:()=>_re,_coercedBoolean:()=>gre,_coercedDate:()=>Dre,_coercedNumber:()=>cre,_coercedString:()=>tre,_cuid:()=>bj,_cuid2:()=>Ij,_custom:()=>Ore,_date:()=>xre,_decode:()=>zG,_decodeAsync:()=>$G,_default:()=>CMt,_discriminatedUnion:()=>fMt,_e164:()=>kj,_email:()=>gj,_emoji:()=>Sj,_encode:()=>jG,_encodeAsync:()=>HG,_endsWith:()=>Sx,_enum:()=>EMt,_file:()=>wre,_float32:()=>dre,_float64:()=>pre,_gt:()=>dA,_gte:()=>lc,_guid:()=>ak,_includes:()=>Ex,_int:()=>lre,_int32:()=>fre,_int64:()=>Ere,_intersection:()=>mMt,_ipv4:()=>xj,_ipv6:()=>Dj,_isoDate:()=>ire,_isoDateTime:()=>ore,_isoDuration:()=>are,_isoTime:()=>sre,_jwt:()=>Pj,_ksuid:()=>Rj,_lazy:()=>wMt,_length:()=>BT,_literal:()=>SMt,_lowercase:()=>hx,_lt:()=>lA,_lte:()=>id,_mac:()=>nre,_map:()=>hMt,_max:()=>id,_maxLength:()=>NT,_maxSize:()=>JE,_mime:()=>Tx,_min:()=>lc,_minLength:()=>ah,_minSize:()=>pA,_multipleOf:()=>KE,_nan:()=>Nre,_nanoid:()=>Tj,_nativeEnum:()=>yMt,_negative:()=>Lj,_never:()=>vre,_nonnegative:()=>Qj,_nonoptional:()=>vMt,_nonpositive:()=>Uj,_normalize:()=>bx,_null:()=>bre,_nullable:()=>IMt,_number:()=>ure,_optional:()=>bMt,_overwrite:()=>Pf,_parse:()=>lx,_parseAsync:()=>dx,_pipe:()=>DMt,_positive:()=>Mj,_promise:()=>OMt,_property:()=>Fj,_readonly:()=>NMt,_record:()=>gMt,_refine:()=>kre,_regex:()=>gx,_safeDecode:()=>VG,_safeDecodeAsync:()=>KG,_safeEncode:()=>qG,_safeEncodeAsync:()=>YG,_safeParse:()=>px,_safeParseAsync:()=>fx,_set:()=>_Mt,_size:()=>DT,_slugify:()=>Rx,_startsWith:()=>yx,_string:()=>ere,_stringFormat:()=>xx,_stringbool:()=>Ure,_success:()=>RMt,_superRefine:()=>Pre,_symbol:()=>Sre,_templateLiteral:()=>BMt,_toLowerCase:()=>Cx,_toUpperCase:()=>vx,_transform:()=>TMt,_trim:()=>Ix,_tuple:()=>AMt,_uint32:()=>mre,_uint64:()=>yre,_ulid:()=>Cj,_undefined:()=>Tre,_union:()=>dMt,_unknown:()=>Cre,_uppercase:()=>_x,_url:()=>uk,_uuid:()=>hj,_uuidv4:()=>_j,_uuidv6:()=>Ej,_uuidv7:()=>yj,_void:()=>Rre,_xid:()=>vj,_xor:()=>pMt,clone:()=>uc,config:()=>bi,createStandardJSONSchemaMethod:()=>Dx,createToJSONSchemaMethod:()=>Qre,decode:()=>Okt,decodeAsync:()=>Pkt,describe:()=>Mre,encode:()=>wkt,encodeAsync:()=>kkt,extractDefs:()=>WE,finalize:()=>XE,flattenError:()=>JO,formatError:()=>ZO,globalConfig:()=>IT,globalRegistry:()=>Qa,initializeContext:()=>ZE,isValidBase64:()=>one,isValidBase64URL:()=>RFe,isValidJWT:()=>xFe,locales:()=>ik,meta:()=>Lre,parse:()=>FG,parseAsync:()=>GG,prettifyError:()=>Mee,process:()=>Or,regexes:()=>od,registry:()=>Aj,safeDecode:()=>Lkt,safeDecodeAsync:()=>Qkt,safeEncode:()=>Mkt,safeEncodeAsync:()=>Ukt,safeParse:()=>Uee,safeParseAsync:()=>Qee,toDotPath:()=>sFe,toJSONSchema:()=>Hj,treeifyError:()=>Pee,util:()=>Le,version:()=>Pte});var sd=w(()=>{m();CT();Fee();Lee();Vne();tj();Mte();St();WG();Zne();sk();kte();x3e();ck();lk();D3e();B3e()});var qj={};Zs(qj,{endsWith:()=>Sx,gt:()=>dA,gte:()=>lc,includes:()=>Ex,length:()=>BT,lowercase:()=>hx,lt:()=>lA,lte:()=>id,maxLength:()=>NT,maxSize:()=>JE,mime:()=>Tx,minLength:()=>ah,minSize:()=>pA,multipleOf:()=>KE,negative:()=>Lj,nonnegative:()=>Qj,nonpositive:()=>Uj,normalize:()=>bx,overwrite:()=>Pf,positive:()=>Mj,property:()=>Fj,regex:()=>gx,size:()=>DT,slugify:()=>Rx,startsWith:()=>yx,toLowerCase:()=>Cx,toUpperCase:()=>vx,trim:()=>Ix,uppercase:()=>_x});var Vj=w(()=>{m();sd()});var Nx={};Zs(Nx,{ZodISODate:()=>Kj,ZodISODateTime:()=>Yj,ZodISODuration:()=>Zj,ZodISOTime:()=>Jj,date:()=>Ioe,datetime:()=>boe,duration:()=>voe,time:()=>Coe});function boe(e){return ore(Yj,e)}function Ioe(e){return ire(Kj,e)}function Coe(e){return sre(Jj,e)}function voe(e){return are(Zj,e)}var Yj,Kj,Jj,Zj,dk=w(()=>{m();sd();fk();Yj=ie("ZodISODateTime",(e,t)=>{Kte.init(e,t),Jr.init(e,t)});Kj=ie("ZodISODate",(e,t)=>{Jte.init(e,t),Jr.init(e,t)});Jj=ie("ZodISOTime",(e,t)=>{Zte.init(e,t),Jr.init(e,t)});Zj=ie("ZodISODuration",(e,t)=>{Wte.init(e,t),Jr.init(e,t)})});var w3e,MMt,rl,Roe=w(()=>{m();sd();sd();St();w3e=(e,t)=>{KO.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>ZO(e,n)},flatten:{value:n=>JO(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,ax,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,ax,2)}},isEmpty:{get(){return e.issues.length===0}}})},MMt=ie("ZodError",w3e),rl=ie("ZodError",w3e,{Parent:Error})});var xoe,Doe,Noe,Boe,woe,Ooe,koe,Poe,Moe,Loe,Uoe,Qoe,Foe=w(()=>{m();sd();Roe();xoe=lx(rl),Doe=dx(rl),Noe=px(rl),Boe=fx(rl),woe=jG(rl),Ooe=zG(rl),koe=HG(rl),Poe=$G(rl),Moe=qG(rl),Loe=VG(rl),Uoe=YG(rl),Qoe=KG(rl)});var pk={};Zs(pk,{ZodAny:()=>Yoe,ZodArray:()=>Woe,ZodBase64:()=>fz,ZodBase64URL:()=>mz,ZodBigInt:()=>Lx,ZodBigIntFormat:()=>hz,ZodBoolean:()=>Mx,ZodCIDRv4:()=>dz,ZodCIDRv6:()=>pz,ZodCUID:()=>oz,ZodCUID2:()=>iz,ZodCatch:()=>yie,ZodCodec:()=>Ck,ZodCustom:()=>vk,ZodCustomStringFormat:()=>kx,ZodDate:()=>yk,ZodDefault:()=>mie,ZodDiscriminatedUnion:()=>eie,ZodE164:()=>Az,ZodEmail:()=>tz,ZodEmoji:()=>nz,ZodEnum:()=>wx,ZodExactOptional:()=>die,ZodFile:()=>cie,ZodFunction:()=>Nie,ZodGUID:()=>Ak,ZodIPv4:()=>cz,ZodIPv6:()=>lz,ZodIntersection:()=>tie,ZodJWT:()=>gz,ZodKSUID:()=>uz,ZodLazy:()=>Rie,ZodLiteral:()=>uie,ZodMAC:()=>Goe,ZodMap:()=>sie,ZodNaN:()=>Tie,ZodNanoID:()=>rz,ZodNever:()=>Joe,ZodNonOptional:()=>bz,ZodNull:()=>qoe,ZodNullable:()=>fie,ZodNumber:()=>Px,ZodNumberFormat:()=>OT,ZodObject:()=>Tk,ZodOptional:()=>Tz,ZodPipe:()=>Ik,ZodPrefault:()=>gie,ZodPreprocess:()=>bie,ZodPromise:()=>Die,ZodReadonly:()=>Iie,ZodRecord:()=>Bx,ZodSet:()=>aie,ZodString:()=>Ox,ZodStringFormat:()=>Jr,ZodSuccess:()=>Eie,ZodSymbol:()=>Hoe,ZodTemplateLiteral:()=>vie,ZodTransform:()=>lie,ZodTuple:()=>rie,ZodType:()=>Nn,ZodULID:()=>sz,ZodURL:()=>Ek,ZodUUID:()=>fA,ZodUndefined:()=>$oe,ZodUnion:()=>bk,ZodUnknown:()=>Koe,ZodVoid:()=>Zoe,ZodXID:()=>az,ZodXor:()=>Xoe,_ZodString:()=>ez,_default:()=>Aie,_function:()=>F6e,any:()=>h6e,array:()=>Sk,base64:()=>e6e,base64url:()=>t6e,bigint:()=>p6e,boolean:()=>zoe,catch:()=>Sie,check:()=>G6e,cidrv4:()=>W3e,cidrv6:()=>X3e,codec:()=>M6e,cuid:()=>H3e,cuid2:()=>$3e,custom:()=>j6e,date:()=>E6e,describe:()=>z6e,discriminatedUnion:()=>C6e,e164:()=>n6e,email:()=>k3e,emoji:()=>j3e,enum:()=>yz,exactOptional:()=>pie,file:()=>w6e,float32:()=>u6e,float64:()=>c6e,function:()=>F6e,guid:()=>P3e,hash:()=>a6e,hex:()=>s6e,hostname:()=>i6e,httpUrl:()=>G3e,instanceof:()=>$6e,int:()=>Wj,int32:()=>l6e,int64:()=>f6e,intersection:()=>nie,invertCodec:()=>L6e,ipv4:()=>K3e,ipv6:()=>Z3e,json:()=>V6e,jwt:()=>r6e,keyof:()=>y6e,ksuid:()=>Y3e,lazy:()=>xie,literal:()=>B6e,looseObject:()=>b6e,looseRecord:()=>R6e,mac:()=>J3e,map:()=>x6e,meta:()=>H6e,nan:()=>P6e,nanoid:()=>z3e,nativeEnum:()=>N6e,never:()=>_z,nonoptional:()=>_ie,null:()=>Voe,nullable:()=>hk,nullish:()=>O6e,number:()=>joe,object:()=>S6e,optional:()=>gk,partialRecord:()=>v6e,pipe:()=>Xj,prefault:()=>hie,preprocess:()=>Y6e,promise:()=>Q6e,readonly:()=>Cie,record:()=>iie,refine:()=>Bie,set:()=>D6e,strictObject:()=>T6e,string:()=>mk,stringFormat:()=>o6e,stringbool:()=>q6e,success:()=>k6e,superRefine:()=>wie,symbol:()=>A6e,templateLiteral:()=>U6e,transform:()=>Sz,tuple:()=>oie,uint32:()=>d6e,uint64:()=>m6e,ulid:()=>q3e,undefined:()=>g6e,union:()=>Ez,unknown:()=>wT,url:()=>F3e,uuid:()=>M3e,uuidv4:()=>L3e,uuidv6:()=>U3e,uuidv7:()=>Q3e,void:()=>_6e,xid:()=>V3e,xor:()=>I6e});function _k(e,t,n){let r=Object.getPrototypeOf(e),o=O3e.get(r);if(o||(o=new Set,O3e.set(r,o)),!o.has(t)){o.add(t);for(let i in n){let s=n[i];Object.defineProperty(r,i,{configurable:!0,enumerable:!1,get(){let u=s.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:u}),u},set(u){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:u})}})}}}function mk(e){return ere(Ox,e)}function k3e(e){return gj(tz,e)}function P3e(e){return ak(Ak,e)}function M3e(e){return hj(fA,e)}function L3e(e){return _j(fA,e)}function U3e(e){return Ej(fA,e)}function Q3e(e){return yj(fA,e)}function F3e(e){return uk(Ek,e)}function G3e(e){return uk(Ek,{protocol:od.httpProtocol,hostname:od.domain,...Le.normalizeParams(e)})}function j3e(e){return Sj(nz,e)}function z3e(e){return Tj(rz,e)}function H3e(e){return bj(oz,e)}function $3e(e){return Ij(iz,e)}function q3e(e){return Cj(sz,e)}function V3e(e){return vj(az,e)}function Y3e(e){return Rj(uz,e)}function K3e(e){return xj(cz,e)}function J3e(e){return nre(Goe,e)}function Z3e(e){return Dj(lz,e)}function W3e(e){return Nj(dz,e)}function X3e(e){return Bj(pz,e)}function e6e(e){return wj(fz,e)}function t6e(e){return Oj(mz,e)}function n6e(e){return kj(Az,e)}function r6e(e){return Pj(gz,e)}function o6e(e,t,n={}){return xx(kx,e,t,n)}function i6e(e){return xx(kx,"hostname",od.hostname,e)}function s6e(e){return xx(kx,"hex",od.hex,e)}function a6e(e,t){let n=t?.enc??"hex",r=`${e}_${n}`,o=od[r];if(!o)throw new Error(`Unrecognized hash format: ${r}`);return xx(kx,r,o,t)}function joe(e){return ure(Px,e)}function Wj(e){return lre(OT,e)}function u6e(e){return dre(OT,e)}function c6e(e){return pre(OT,e)}function l6e(e){return fre(OT,e)}function d6e(e){return mre(OT,e)}function zoe(e){return Are(Mx,e)}function p6e(e){return hre(Lx,e)}function f6e(e){return Ere(hz,e)}function m6e(e){return yre(hz,e)}function A6e(e){return Sre(Hoe,e)}function g6e(e){return Tre($oe,e)}function Voe(e){return bre(qoe,e)}function h6e(){return Ire(Yoe)}function wT(){return Cre(Koe)}function _z(e){return vre(Joe,e)}function _6e(e){return Rre(Zoe,e)}function E6e(e){return xre(yk,e)}function Sk(e,t){return Bre(Woe,e,t)}function y6e(e){let t=e._zod.def.shape;return yz(Object.keys(t))}function S6e(e,t){let n={type:"object",shape:e??{},...Le.normalizeParams(t)};return new Tk(n)}function T6e(e,t){return new Tk({type:"object",shape:e,catchall:_z(),...Le.normalizeParams(t)})}function b6e(e,t){return new Tk({type:"object",shape:e,catchall:wT(),...Le.normalizeParams(t)})}function Ez(e,t){return new bk({type:"union",options:e,...Le.normalizeParams(t)})}function I6e(e,t){return new Xoe({type:"union",options:e,inclusive:!1,...Le.normalizeParams(t)})}function C6e(e,t,n){return new eie({type:"union",options:t,discriminator:e,...Le.normalizeParams(n)})}function nie(e,t){return new tie({type:"intersection",left:e,right:t})}function oie(e,t,n){let r=t instanceof cn,o=r?n:t,i=r?t:null;return new rie({type:"tuple",items:e,rest:i,...Le.normalizeParams(o)})}function iie(e,t,n){return!t||!t._zod?new Bx({type:"record",keyType:mk(),valueType:e,...Le.normalizeParams(t)}):new Bx({type:"record",keyType:e,valueType:t,...Le.normalizeParams(n)})}function v6e(e,t,n){let r=uc(e);return r._zod.values=void 0,new Bx({type:"record",keyType:r,valueType:t,...Le.normalizeParams(n)})}function R6e(e,t,n){return new Bx({type:"record",keyType:e,valueType:t,mode:"loose",...Le.normalizeParams(n)})}function x6e(e,t,n){return new sie({type:"map",keyType:e,valueType:t,...Le.normalizeParams(n)})}function D6e(e,t){return new aie({type:"set",valueType:e,...Le.normalizeParams(t)})}function yz(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new wx({type:"enum",entries:n,...Le.normalizeParams(t)})}function N6e(e,t){return new wx({type:"enum",entries:e,...Le.normalizeParams(t)})}function B6e(e,t){return new uie({type:"literal",values:Array.isArray(e)?e:[e],...Le.normalizeParams(t)})}function w6e(e){return wre(cie,e)}function Sz(e){return new lie({type:"transform",transform:e})}function gk(e){return new Tz({type:"optional",innerType:e})}function pie(e){return new die({type:"optional",innerType:e})}function hk(e){return new fie({type:"nullable",innerType:e})}function O6e(e){return gk(hk(e))}function Aie(e,t){return new mie({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Le.shallowClone(t)}})}function hie(e,t){return new gie({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Le.shallowClone(t)}})}function _ie(e,t){return new bz({type:"nonoptional",innerType:e,...Le.normalizeParams(t)})}function k6e(e){return new Eie({type:"success",innerType:e})}function Sie(e,t){return new yie({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}function P6e(e){return Nre(Tie,e)}function Xj(e,t){return new Ik({type:"pipe",in:e,out:t})}function M6e(e,t,n){return new Ck({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function L6e(e){let t=e._zod.def;return new Ck({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}function Cie(e){return new Iie({type:"readonly",innerType:e})}function U6e(e,t){return new vie({type:"template_literal",parts:e,...Le.normalizeParams(t)})}function xie(e){return new Rie({type:"lazy",getter:e})}function Q6e(e){return new Die({type:"promise",innerType:e})}function F6e(e){return new Nie({type:"function",input:Array.isArray(e?.input)?oie(e?.input):e?.input??Sk(wT()),output:e?.output??wT()})}function G6e(e){let t=new no({check:"custom"});return t._zod.check=e,t}function j6e(e,t){return Ore(vk,e??(()=>!0),t)}function Bie(e,t={}){return kre(vk,e,t)}function wie(e,t){return Pre(e,t)}function $6e(e,t={}){let n=new vk({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...Le.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=r=>{r.value instanceof e||r.issues.push({code:"invalid_type",expected:e.name,input:r.value,inst:n,path:[...n._zod.def.path??[]]})},n}function V6e(e){let t=xie(()=>Ez([mk(e),joe(),zoe(),Voe(),Sk(t),iie(mk(),t)]));return t}function Y6e(e,t){return new bie({type:"pipe",in:Sz(e),out:t})}var O3e,Nn,ez,Ox,Jr,tz,Ak,fA,Ek,nz,rz,oz,iz,sz,az,uz,cz,Goe,lz,dz,pz,fz,mz,Az,gz,kx,Px,OT,Mx,Lx,hz,Hoe,$oe,qoe,Yoe,Koe,Joe,Zoe,yk,Woe,Tk,bk,Xoe,eie,tie,rie,Bx,sie,aie,wx,uie,cie,lie,Tz,die,fie,mie,gie,bz,Eie,yie,Tie,Ik,Ck,bie,Iie,vie,Rie,Die,Nie,vk,z6e,H6e,q6e,fk=w(()=>{m();sd();sd();lk();ck();Vj();dk();Foe();O3e=new WeakMap;Nn=ie("ZodType",(e,t)=>(cn.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Dx(e,"input"),output:Dx(e,"output")}}),e.toJSONSchema=Qre(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,r)=>xoe(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>Noe(e,n,r),e.parseAsync=async(n,r)=>Doe(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>Boe(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>woe(e,n,r),e.decode=(n,r)=>Ooe(e,n,r),e.encodeAsync=async(n,r)=>koe(e,n,r),e.decodeAsync=async(n,r)=>Poe(e,n,r),e.safeEncode=(n,r)=>Moe(e,n,r),e.safeDecode=(n,r)=>Loe(e,n,r),e.safeEncodeAsync=async(n,r)=>Uoe(e,n,r),e.safeDecodeAsync=async(n,r)=>Qoe(e,n,r),_k(e,"ZodType",{check(...n){let r=this.def;return this.clone(Le.mergeDefs(r,{checks:[...r.checks??[],...n.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,r){return uc(this,n,r)},brand(){return this},register(n,r){return n.add(this,r),this},refine(n,r){return this.check(Bie(n,r))},superRefine(n,r){return this.check(wie(n,r))},overwrite(n){return this.check(Pf(n))},optional(){return gk(this)},exactOptional(){return pie(this)},nullable(){return hk(this)},nullish(){return gk(hk(this))},nonoptional(n){return _ie(this,n)},array(){return Sk(this)},or(n){return Ez([this,n])},and(n){return nie(this,n)},transform(n){return Xj(this,Sz(n))},default(n){return Aie(this,n)},prefault(n){return hie(this,n)},catch(n){return Sie(this,n)},pipe(n){return Xj(this,n)},readonly(){return Cie(this)},describe(n){let r=this.clone();return Qa.add(r,{description:n}),r},meta(...n){if(n.length===0)return Qa.get(this);let r=this.clone();return Qa.add(r,n[0]),r},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return Qa.get(e)?.description},configurable:!0}),e)),ez=ie("_ZodString",(e,t)=>{xT.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Fre(e,r,o,i);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,_k(e,"_ZodString",{regex(...r){return this.check(gx(...r))},includes(...r){return this.check(Ex(...r))},startsWith(...r){return this.check(yx(...r))},endsWith(...r){return this.check(Sx(...r))},min(...r){return this.check(ah(...r))},max(...r){return this.check(NT(...r))},length(...r){return this.check(BT(...r))},nonempty(...r){return this.check(ah(1,...r))},lowercase(r){return this.check(hx(r))},uppercase(r){return this.check(_x(r))},trim(){return this.check(Ix())},normalize(...r){return this.check(bx(...r))},toLowerCase(){return this.check(Cx())},toUpperCase(){return this.check(vx())},slugify(){return this.check(Rx())}})}),Ox=ie("ZodString",(e,t)=>{xT.init(e,t),ez.init(e,t),e.email=n=>e.check(gj(tz,n)),e.url=n=>e.check(uk(Ek,n)),e.jwt=n=>e.check(Pj(gz,n)),e.emoji=n=>e.check(Sj(nz,n)),e.guid=n=>e.check(ak(Ak,n)),e.uuid=n=>e.check(hj(fA,n)),e.uuidv4=n=>e.check(_j(fA,n)),e.uuidv6=n=>e.check(Ej(fA,n)),e.uuidv7=n=>e.check(yj(fA,n)),e.nanoid=n=>e.check(Tj(rz,n)),e.guid=n=>e.check(ak(Ak,n)),e.cuid=n=>e.check(bj(oz,n)),e.cuid2=n=>e.check(Ij(iz,n)),e.ulid=n=>e.check(Cj(sz,n)),e.base64=n=>e.check(wj(fz,n)),e.base64url=n=>e.check(Oj(mz,n)),e.xid=n=>e.check(vj(az,n)),e.ksuid=n=>e.check(Rj(uz,n)),e.ipv4=n=>e.check(xj(cz,n)),e.ipv6=n=>e.check(Dj(lz,n)),e.cidrv4=n=>e.check(Nj(dz,n)),e.cidrv6=n=>e.check(Bj(pz,n)),e.e164=n=>e.check(kj(Az,n)),e.datetime=n=>e.check(boe(n)),e.date=n=>e.check(Ioe(n)),e.time=n=>e.check(Coe(n)),e.duration=n=>e.check(voe(n))});Jr=ie("ZodStringFormat",(e,t)=>{Kr.init(e,t),ez.init(e,t)}),tz=ie("ZodEmail",(e,t)=>{Fte.init(e,t),Jr.init(e,t)});Ak=ie("ZodGUID",(e,t)=>{Ute.init(e,t),Jr.init(e,t)});fA=ie("ZodUUID",(e,t)=>{Qte.init(e,t),Jr.init(e,t)});Ek=ie("ZodURL",(e,t)=>{Gte.init(e,t),Jr.init(e,t)});nz=ie("ZodEmoji",(e,t)=>{jte.init(e,t),Jr.init(e,t)});rz=ie("ZodNanoID",(e,t)=>{zte.init(e,t),Jr.init(e,t)});oz=ie("ZodCUID",(e,t)=>{Hte.init(e,t),Jr.init(e,t)});iz=ie("ZodCUID2",(e,t)=>{$te.init(e,t),Jr.init(e,t)});sz=ie("ZodULID",(e,t)=>{qte.init(e,t),Jr.init(e,t)});az=ie("ZodXID",(e,t)=>{Vte.init(e,t),Jr.init(e,t)});uz=ie("ZodKSUID",(e,t)=>{Yte.init(e,t),Jr.init(e,t)});cz=ie("ZodIPv4",(e,t)=>{Xte.init(e,t),Jr.init(e,t)});Goe=ie("ZodMAC",(e,t)=>{tne.init(e,t),Jr.init(e,t)});lz=ie("ZodIPv6",(e,t)=>{ene.init(e,t),Jr.init(e,t)});dz=ie("ZodCIDRv4",(e,t)=>{nne.init(e,t),Jr.init(e,t)});pz=ie("ZodCIDRv6",(e,t)=>{rne.init(e,t),Jr.init(e,t)});fz=ie("ZodBase64",(e,t)=>{ine.init(e,t),Jr.init(e,t)});mz=ie("ZodBase64URL",(e,t)=>{sne.init(e,t),Jr.init(e,t)});Az=ie("ZodE164",(e,t)=>{ane.init(e,t),Jr.init(e,t)});gz=ie("ZodJWT",(e,t)=>{une.init(e,t),Jr.init(e,t)});kx=ie("ZodCustomStringFormat",(e,t)=>{cne.init(e,t),Jr.init(e,t)});Px=ie("ZodNumber",(e,t)=>{sj.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Gre(e,r,o,i),_k(e,"ZodNumber",{gt(r,o){return this.check(dA(r,o))},gte(r,o){return this.check(lc(r,o))},min(r,o){return this.check(lc(r,o))},lt(r,o){return this.check(lA(r,o))},lte(r,o){return this.check(id(r,o))},max(r,o){return this.check(id(r,o))},int(r){return this.check(Wj(r))},safe(r){return this.check(Wj(r))},positive(r){return this.check(dA(0,r))},nonnegative(r){return this.check(lc(0,r))},negative(r){return this.check(lA(0,r))},nonpositive(r){return this.check(id(0,r))},multipleOf(r,o){return this.check(KE(r,o))},step(r,o){return this.check(KE(r,o))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});OT=ie("ZodNumberFormat",(e,t)=>{lne.init(e,t),Px.init(e,t)});Mx=ie("ZodBoolean",(e,t)=>{tk.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>jre(e,n,r,o)});Lx=ie("ZodBigInt",(e,t)=>{aj.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>zre(e,r,o,i),e.gte=(r,o)=>e.check(lc(r,o)),e.min=(r,o)=>e.check(lc(r,o)),e.gt=(r,o)=>e.check(dA(r,o)),e.gte=(r,o)=>e.check(lc(r,o)),e.min=(r,o)=>e.check(lc(r,o)),e.lt=(r,o)=>e.check(lA(r,o)),e.lte=(r,o)=>e.check(id(r,o)),e.max=(r,o)=>e.check(id(r,o)),e.positive=r=>e.check(dA(BigInt(0),r)),e.negative=r=>e.check(lA(BigInt(0),r)),e.nonpositive=r=>e.check(id(BigInt(0),r)),e.nonnegative=r=>e.check(lc(BigInt(0),r)),e.multipleOf=(r,o)=>e.check(KE(r,o));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});hz=ie("ZodBigIntFormat",(e,t)=>{dne.init(e,t),Lx.init(e,t)});Hoe=ie("ZodSymbol",(e,t)=>{pne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Hre(e,n,r,o)});$oe=ie("ZodUndefined",(e,t)=>{fne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>qre(e,n,r,o)});qoe=ie("ZodNull",(e,t)=>{mne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>$re(e,n,r,o)});Yoe=ie("ZodAny",(e,t)=>{Ane.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Kre(e,n,r,o)});Koe=ie("ZodUnknown",(e,t)=>{gne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Jre(e,n,r,o)});Joe=ie("ZodNever",(e,t)=>{hne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Yre(e,n,r,o)});Zoe=ie("ZodVoid",(e,t)=>{_ne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Vre(e,n,r,o)});yk=ie("ZodDate",(e,t)=>{Ene.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Zre(e,r,o,i),e.min=(r,o)=>e.check(lc(r,o)),e.max=(r,o)=>e.check(id(r,o));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});Woe=ie("ZodArray",(e,t)=>{yne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>coe(e,n,r,o),e.element=t.element,_k(e,"ZodArray",{min(n,r){return this.check(ah(n,r))},nonempty(n){return this.check(ah(1,n))},max(n,r){return this.check(NT(n,r))},length(n,r){return this.check(BT(n,r))},unwrap(){return this.element}})});Tk=ie("ZodObject",(e,t)=>{Sne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>loe(e,n,r,o),Le.defineLazy(e,"shape",()=>t.shape),_k(e,"ZodObject",{keyof(){return yz(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:wT()})},loose(){return this.clone({...this._zod.def,catchall:wT()})},strict(){return this.clone({...this._zod.def,catchall:_z()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return Le.extend(this,n)},safeExtend(n){return Le.safeExtend(this,n)},merge(n){return Le.merge(this,n)},pick(n){return Le.pick(this,n)},omit(n){return Le.omit(this,n)},partial(...n){return Le.partial(Tz,this,n[0])},required(...n){return Le.required(bz,this,n[0])}})});bk=ie("ZodUnion",(e,t)=>{nk.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>jj(e,n,r,o),e.options=t.options});Xoe=ie("ZodXor",(e,t)=>{bk.init(e,t),Tne.init(e,t),e._zod.processJSONSchema=(n,r,o)=>jj(e,n,r,o),e.options=t.options});eie=ie("ZodDiscriminatedUnion",(e,t)=>{bk.init(e,t),bne.init(e,t)});tie=ie("ZodIntersection",(e,t)=>{Ine.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>doe(e,n,r,o)});rie=ie("ZodTuple",(e,t)=>{uj.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>poe(e,n,r,o),e.rest=n=>e.clone({...e._zod.def,rest:n})});Bx=ie("ZodRecord",(e,t)=>{Cne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>foe(e,n,r,o),e.keyType=t.keyType,e.valueType=t.valueType});sie=ie("ZodMap",(e,t)=>{vne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>aoe(e,n,r,o),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(pA(...n)),e.nonempty=n=>e.check(pA(1,n)),e.max=(...n)=>e.check(JE(...n)),e.size=(...n)=>e.check(DT(...n))});aie=ie("ZodSet",(e,t)=>{Rne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>uoe(e,n,r,o),e.min=(...n)=>e.check(pA(...n)),e.nonempty=n=>e.check(pA(1,n)),e.max=(...n)=>e.check(JE(...n)),e.size=(...n)=>e.check(DT(...n))});wx=ie("ZodEnum",(e,t)=>{xne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Wre(e,r,o,i),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{let i={};for(let s of r)if(n.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new wx({...t,checks:[],...Le.normalizeParams(o),entries:i})},e.exclude=(r,o)=>{let i={...t.entries};for(let s of r)if(n.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new wx({...t,checks:[],...Le.normalizeParams(o),entries:i})}});uie=ie("ZodLiteral",(e,t)=>{Dne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Xre(e,n,r,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});cie=ie("ZodFile",(e,t)=>{Nne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>noe(e,n,r,o),e.min=(n,r)=>e.check(pA(n,r)),e.max=(n,r)=>e.check(JE(n,r)),e.mime=(n,r)=>e.check(Tx(Array.isArray(n)?n:[n],r))});lie=ie("ZodTransform",(e,t)=>{Bne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>soe(e,n,r,o),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new HE(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(Le.issue(i,n.value,t));else{let s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=e),n.issues.push(Le.issue(s))}};let o=t.transform(n.value,n);return o instanceof Promise?o.then(i=>(n.value=i,n.fallback=!0,n)):(n.value=o,n.fallback=!0,n)}});Tz=ie("ZodOptional",(e,t)=>{cj.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>zj(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});die=ie("ZodExactOptional",(e,t)=>{wne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>zj(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});fie=ie("ZodNullable",(e,t)=>{One.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>moe(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});mie=ie("ZodDefault",(e,t)=>{kne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>goe(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});gie=ie("ZodPrefault",(e,t)=>{Pne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>hoe(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});bz=ie("ZodNonOptional",(e,t)=>{Mne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Aoe(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});Eie=ie("ZodSuccess",(e,t)=>{Lne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>roe(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});yie=ie("ZodCatch",(e,t)=>{Une.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>_oe(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});Tie=ie("ZodNaN",(e,t)=>{Qne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>eoe(e,n,r,o)});Ik=ie("ZodPipe",(e,t)=>{lj.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Eoe(e,n,r,o),e.in=t.in,e.out=t.out});Ck=ie("ZodCodec",(e,t)=>{Ik.init(e,t),rk.init(e,t)});bie=ie("ZodPreprocess",(e,t)=>{Ik.init(e,t),Fne.init(e,t)}),Iie=ie("ZodReadonly",(e,t)=>{Gne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>yoe(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});vie=ie("ZodTemplateLiteral",(e,t)=>{jne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>toe(e,n,r,o)});Rie=ie("ZodLazy",(e,t)=>{$ne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Toe(e,n,r,o),e.unwrap=()=>e._zod.def.getter()});Die=ie("ZodPromise",(e,t)=>{Hne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Soe(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});Nie=ie("ZodFunction",(e,t)=>{zne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ioe(e,n,r,o)});vk=ie("ZodCustom",(e,t)=>{qne.init(e,t),Nn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ooe(e,n,r,o)});z6e=Mre,H6e=Lre;q6e=(...e)=>Ure({Codec:Ck,Boolean:Mx,String:Ox},...e)});function QMt(e){bi({customError:e})}function FMt(){return bi().customError}var UMt,Oie,K6e=w(()=>{m();sd();UMt={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};Oie||(Oie={})});function jMt(e,t){let n=e.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function zMt(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return t.rootSchema;let r=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===r){let o=n[1];if(!o||!t.defs[o])throw new Error(`Reference not found: ${e}`);return t.defs[o]}throw new Error(`Reference not found: ${e}`)}function J6e(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return Xe.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let o=e.$ref;if(t.refs.has(o))return t.refs.get(o);if(t.processing.has(o))return Xe.lazy(()=>{if(!t.refs.has(o))throw new Error(`Circular reference not resolved: ${o}`);return t.refs.get(o)});t.processing.add(o);let i=zMt(o,t),s=bu(i,t);return t.refs.set(o,s),t.processing.delete(o),s}if(e.enum!==void 0){let o=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&o.length===1&&o[0]===null)return Xe.null();if(o.length===0)return Xe.never();if(o.length===1)return Xe.literal(o[0]);if(o.every(s=>typeof s=="string"))return Xe.enum(o);let i=o.map(s=>Xe.literal(s));return i.length<2?i[0]:Xe.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return Xe.literal(e.const);let n=e.type;if(Array.isArray(n)){let o=n.map(i=>{let s={...e,type:i};return J6e(s,t)});return o.length===0?Xe.never():o.length===1?o[0]:Xe.union(o)}if(!n)return Xe.any();let r;switch(n){case"string":{let o=Xe.string();if(e.format){let i=e.format;i==="email"?o=o.check(Xe.email()):i==="uri"||i==="uri-reference"?o=o.check(Xe.url()):i==="uuid"||i==="guid"?o=o.check(Xe.uuid()):i==="date-time"?o=o.check(Xe.iso.datetime()):i==="date"?o=o.check(Xe.iso.date()):i==="time"?o=o.check(Xe.iso.time()):i==="duration"?o=o.check(Xe.iso.duration()):i==="ipv4"?o=o.check(Xe.ipv4()):i==="ipv6"?o=o.check(Xe.ipv6()):i==="mac"?o=o.check(Xe.mac()):i==="cidr"?o=o.check(Xe.cidrv4()):i==="cidr-v6"?o=o.check(Xe.cidrv6()):i==="base64"?o=o.check(Xe.base64()):i==="base64url"?o=o.check(Xe.base64url()):i==="e164"?o=o.check(Xe.e164()):i==="jwt"?o=o.check(Xe.jwt()):i==="emoji"?o=o.check(Xe.emoji()):i==="nanoid"?o=o.check(Xe.nanoid()):i==="cuid"?o=o.check(Xe.cuid()):i==="cuid2"?o=o.check(Xe.cuid2()):i==="ulid"?o=o.check(Xe.ulid()):i==="xid"?o=o.check(Xe.xid()):i==="ksuid"&&(o=o.check(Xe.ksuid()))}typeof e.minLength=="number"&&(o=o.min(e.minLength)),typeof e.maxLength=="number"&&(o=o.max(e.maxLength)),e.pattern&&(o=o.regex(new RegExp(e.pattern))),r=o;break}case"number":case"integer":{let o=n==="integer"?Xe.number().int():Xe.number();typeof e.minimum=="number"&&(o=o.min(e.minimum)),typeof e.maximum=="number"&&(o=o.max(e.maximum)),typeof e.exclusiveMinimum=="number"?o=o.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(o=o.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?o=o.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(o=o.lt(e.maximum)),typeof e.multipleOf=="number"&&(o=o.multipleOf(e.multipleOf)),r=o;break}case"boolean":{r=Xe.boolean();break}case"null":{r=Xe.null();break}case"object":{let o={},i=e.properties||{},s=new Set(e.required||[]);for(let[l,f]of Object.entries(i)){let h=bu(f,t);o[l]=s.has(l)?h:h.optional()}if(e.propertyNames){let l=bu(e.propertyNames,t),f=e.additionalProperties&&typeof e.additionalProperties=="object"?bu(e.additionalProperties,t):Xe.any();if(Object.keys(o).length===0){r=Xe.record(l,f);break}let h=Xe.object(o).passthrough(),_=Xe.looseRecord(l,f);r=Xe.intersection(h,_);break}if(e.patternProperties){let l=e.patternProperties,f=Object.keys(l),h=[];for(let y of f){let T=bu(l[y],t),v=Xe.string().regex(new RegExp(y));h.push(Xe.looseRecord(v,T))}let _=[];if(Object.keys(o).length>0&&_.push(Xe.object(o).passthrough()),_.push(...h),_.length===0)r=Xe.object({}).passthrough();else if(_.length===1)r=_[0];else{let y=Xe.intersection(_[0],_[1]);for(let T=2;T<_.length;T++)y=Xe.intersection(y,_[T]);r=y}break}let u=Xe.object(o);e.additionalProperties===!1?r=u.strict():typeof e.additionalProperties=="object"?r=u.catchall(bu(e.additionalProperties,t)):r=u.passthrough();break}case"array":{let o=e.prefixItems,i=e.items;if(o&&Array.isArray(o)){let s=o.map(l=>bu(l,t)),u=i&&typeof i=="object"&&!Array.isArray(i)?bu(i,t):void 0;u?r=Xe.tuple(s).rest(u):r=Xe.tuple(s),typeof e.minItems=="number"&&(r=r.check(Xe.minLength(e.minItems))),typeof e.maxItems=="number"&&(r=r.check(Xe.maxLength(e.maxItems)))}else if(Array.isArray(i)){let s=i.map(l=>bu(l,t)),u=e.additionalItems&&typeof e.additionalItems=="object"?bu(e.additionalItems,t):void 0;u?r=Xe.tuple(s).rest(u):r=Xe.tuple(s),typeof e.minItems=="number"&&(r=r.check(Xe.minLength(e.minItems))),typeof e.maxItems=="number"&&(r=r.check(Xe.maxLength(e.maxItems)))}else if(i!==void 0){let s=bu(i,t),u=Xe.array(s);typeof e.minItems=="number"&&(u=u.min(e.minItems)),typeof e.maxItems=="number"&&(u=u.max(e.maxItems)),r=u}else r=Xe.array(Xe.any());break}default:throw new Error(`Unsupported type: ${n}`)}return r}function bu(e,t){if(typeof e=="boolean")return e?Xe.any():Xe.never();let n=J6e(e,t),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let u=e.anyOf.map(f=>bu(f,t)),l=Xe.union(u);n=r?Xe.intersection(n,l):l}if(e.oneOf&&Array.isArray(e.oneOf)){let u=e.oneOf.map(f=>bu(f,t)),l=Xe.xor(u);n=r?Xe.intersection(n,l):l}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=r?n:Xe.any();else{let u=r?n:bu(e.allOf[0],t),l=r?0:1;for(let f=l;f<e.allOf.length;f++)u=Xe.intersection(u,bu(e.allOf[f],t));n=u}e.nullable===!0&&t.version==="openapi-3.0"&&(n=Xe.nullable(n)),e.readOnly===!0&&(n=Xe.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let o={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let u of i)u in e&&(o[u]=e[u]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let u of s)u in e&&(o[u]=e[u]);for(let u of Object.keys(e))GMt.has(u)||(o[u]=e[u]);return Object.keys(o).length>0&&t.registry.add(n,o),e.description&&(n=n.describe(e.description)),n}function Z6e(e,t){if(typeof e=="boolean")return e?Xe.any():Xe.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let r=jMt(n,t?.defaultTarget),o=n.$defs||n.definitions||{},i={version:r,defs:o,refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??Qa};return bu(n,i)}var Xe,GMt,W6e=w(()=>{m();sk();Vj();dk();fk();Xe={...pk,...qj,iso:Nx},GMt=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"])});var kie={};Zs(kie,{bigint:()=>VMt,boolean:()=>qMt,date:()=>YMt,number:()=>$Mt,string:()=>HMt});function HMt(e){return tre(Ox,e)}function $Mt(e){return cre(Px,e)}function qMt(e){return gre(Mx,e)}function VMt(e){return _re(Lx,e)}function YMt(e){return Dre(yk,e)}var X6e=w(()=>{m();sd();fk()});var A={};Zs(A,{$brand:()=>bee,$input:()=>Xne,$output:()=>Wne,NEVER:()=>Tee,TimePrecision:()=>rre,ZodAny:()=>Yoe,ZodArray:()=>Woe,ZodBase64:()=>fz,ZodBase64URL:()=>mz,ZodBigInt:()=>Lx,ZodBigIntFormat:()=>hz,ZodBoolean:()=>Mx,ZodCIDRv4:()=>dz,ZodCIDRv6:()=>pz,ZodCUID:()=>oz,ZodCUID2:()=>iz,ZodCatch:()=>yie,ZodCodec:()=>Ck,ZodCustom:()=>vk,ZodCustomStringFormat:()=>kx,ZodDate:()=>yk,ZodDefault:()=>mie,ZodDiscriminatedUnion:()=>eie,ZodE164:()=>Az,ZodEmail:()=>tz,ZodEmoji:()=>nz,ZodEnum:()=>wx,ZodError:()=>MMt,ZodExactOptional:()=>die,ZodFile:()=>cie,ZodFirstPartyTypeKind:()=>Oie,ZodFunction:()=>Nie,ZodGUID:()=>Ak,ZodIPv4:()=>cz,ZodIPv6:()=>lz,ZodISODate:()=>Kj,ZodISODateTime:()=>Yj,ZodISODuration:()=>Zj,ZodISOTime:()=>Jj,ZodIntersection:()=>tie,ZodIssueCode:()=>UMt,ZodJWT:()=>gz,ZodKSUID:()=>uz,ZodLazy:()=>Rie,ZodLiteral:()=>uie,ZodMAC:()=>Goe,ZodMap:()=>sie,ZodNaN:()=>Tie,ZodNanoID:()=>rz,ZodNever:()=>Joe,ZodNonOptional:()=>bz,ZodNull:()=>qoe,ZodNullable:()=>fie,ZodNumber:()=>Px,ZodNumberFormat:()=>OT,ZodObject:()=>Tk,ZodOptional:()=>Tz,ZodPipe:()=>Ik,ZodPrefault:()=>gie,ZodPreprocess:()=>bie,ZodPromise:()=>Die,ZodReadonly:()=>Iie,ZodRealError:()=>rl,ZodRecord:()=>Bx,ZodSet:()=>aie,ZodString:()=>Ox,ZodStringFormat:()=>Jr,ZodSuccess:()=>Eie,ZodSymbol:()=>Hoe,ZodTemplateLiteral:()=>vie,ZodTransform:()=>lie,ZodTuple:()=>rie,ZodType:()=>Nn,ZodULID:()=>sz,ZodURL:()=>Ek,ZodUUID:()=>fA,ZodUndefined:()=>$oe,ZodUnion:()=>bk,ZodUnknown:()=>Koe,ZodVoid:()=>Zoe,ZodXID:()=>az,ZodXor:()=>Xoe,_ZodString:()=>ez,_default:()=>Aie,_function:()=>F6e,any:()=>h6e,array:()=>Sk,base64:()=>e6e,base64url:()=>t6e,bigint:()=>p6e,boolean:()=>zoe,catch:()=>Sie,check:()=>G6e,cidrv4:()=>W3e,cidrv6:()=>X3e,clone:()=>uc,codec:()=>M6e,coerce:()=>kie,config:()=>bi,core:()=>uh,cuid:()=>H3e,cuid2:()=>$3e,custom:()=>j6e,date:()=>E6e,decode:()=>Ooe,decodeAsync:()=>Poe,describe:()=>z6e,discriminatedUnion:()=>C6e,e164:()=>n6e,email:()=>k3e,emoji:()=>j3e,encode:()=>woe,encodeAsync:()=>koe,endsWith:()=>Sx,enum:()=>yz,exactOptional:()=>pie,file:()=>w6e,flattenError:()=>JO,float32:()=>u6e,float64:()=>c6e,formatError:()=>ZO,fromJSONSchema:()=>Z6e,function:()=>F6e,getErrorMap:()=>FMt,globalRegistry:()=>Qa,gt:()=>dA,gte:()=>lc,guid:()=>P3e,hash:()=>a6e,hex:()=>s6e,hostname:()=>i6e,httpUrl:()=>G3e,includes:()=>Ex,instanceof:()=>$6e,int:()=>Wj,int32:()=>l6e,int64:()=>f6e,intersection:()=>nie,invertCodec:()=>L6e,ipv4:()=>K3e,ipv6:()=>Z3e,iso:()=>Nx,json:()=>V6e,jwt:()=>r6e,keyof:()=>y6e,ksuid:()=>Y3e,lazy:()=>xie,length:()=>BT,literal:()=>B6e,locales:()=>ik,looseObject:()=>b6e,looseRecord:()=>R6e,lowercase:()=>hx,lt:()=>lA,lte:()=>id,mac:()=>J3e,map:()=>x6e,maxLength:()=>NT,maxSize:()=>JE,meta:()=>H6e,mime:()=>Tx,minLength:()=>ah,minSize:()=>pA,multipleOf:()=>KE,nan:()=>P6e,nanoid:()=>z3e,nativeEnum:()=>N6e,negative:()=>Lj,never:()=>_z,nonnegative:()=>Qj,nonoptional:()=>_ie,nonpositive:()=>Uj,normalize:()=>bx,null:()=>Voe,nullable:()=>hk,nullish:()=>O6e,number:()=>joe,object:()=>S6e,optional:()=>gk,overwrite:()=>Pf,parse:()=>xoe,parseAsync:()=>Doe,partialRecord:()=>v6e,pipe:()=>Xj,positive:()=>Mj,prefault:()=>hie,preprocess:()=>Y6e,prettifyError:()=>Mee,promise:()=>Q6e,property:()=>Fj,readonly:()=>Cie,record:()=>iie,refine:()=>Bie,regex:()=>gx,regexes:()=>od,registry:()=>Aj,safeDecode:()=>Loe,safeDecodeAsync:()=>Qoe,safeEncode:()=>Moe,safeEncodeAsync:()=>Uoe,safeParse:()=>Noe,safeParseAsync:()=>Boe,set:()=>D6e,setErrorMap:()=>QMt,size:()=>DT,slugify:()=>Rx,startsWith:()=>yx,strictObject:()=>T6e,string:()=>mk,stringFormat:()=>o6e,stringbool:()=>q6e,success:()=>k6e,superRefine:()=>wie,symbol:()=>A6e,templateLiteral:()=>U6e,toJSONSchema:()=>Hj,toLowerCase:()=>Cx,toUpperCase:()=>vx,transform:()=>Sz,treeifyError:()=>Pee,trim:()=>Ix,tuple:()=>oie,uint32:()=>d6e,uint64:()=>m6e,ulid:()=>q3e,undefined:()=>g6e,union:()=>Ez,unknown:()=>wT,uppercase:()=>_x,url:()=>F3e,util:()=>Le,uuid:()=>M3e,uuidv4:()=>L3e,uuidv6:()=>U3e,uuidv7:()=>Q3e,void:()=>_6e,xid:()=>V3e,xor:()=>I6e});var Pie=w(()=>{m();sd();fk();Vj();Roe();Foe();K6e();sd();Yne();sd();lk();W6e();Zne();dk();dk();X6e();bi(dj())});var pc=w(()=>{m();Pie();Pie()});var KMt,Iu,Mie,kT,Iz,JMt,Cz,eGe,tGe,Lie,ZMt,WMt,XMt,e2t,t2t,n2t,r2t,nGe,vz=w(()=>{"use strict";m();cA();pc();KMt=Tu(),Iu=A.object({message:A.string()}),Mie=A.record(A.string(),A.unknown()),kT=A.string().regex(/^doc_[0-9A-Za-z]{22}$/),Iz=A.string().regex(/^proj_[0-9A-Za-z]{22}$/),JMt=["active","archived"],Cz=A.enum(JMt),eGe=A.object({id:A.string().min(1),display_name:A.string().min(1)}),tGe=A.object({id:Iz,name:A.string().min(1)}),Lie=A.object({id:kT,title:A.string().min(1),status:Cz,author:eGe,project:tGe.nullable(),created_at:A.string().datetime(),updated_at:A.string().datetime(),archived_at:A.string().datetime().nullable()}),ZMt=A.object({type:A.literal("list"),list_type:A.literal("doc"),objects:A.array(Lie)}),WMt=A.object({project_id:Iz.optional(),status:Cz.optional()}),XMt=A.object({title:A.string().trim().min(1).max(300).optional(),prosemirror_json:Mie.optional(),project_id:Iz.nullable().optional()}),e2t=A.object({id:kT,created_at:A.string().datetime()}),t2t=A.object({title:A.string().trim().min(1).max(300).optional(),prosemirror_json:Mie.optional(),project_id:Iz.nullable().optional(),status:Cz.optional()}).refine(e=>Object.keys(e).length>0,{message:"At least one field must be provided"}),n2t=A.object({id:kT,updated_at:A.string().datetime()}),r2t=A.object({id:kT,title:A.string().min(1),prosemirror_json:Mie,status:Cz,author:eGe,project:tGe.nullable(),created_at:A.string().datetime(),updated_at:A.string().datetime(),archived_at:A.string().datetime().nullable()}),nGe=KMt.router({listDocs:{method:"GET",path:"/docs",headers:A.object({authorization:A.string().min(1).optional()}),query:WMt,responses:{200:ZMt,401:Iu,403:Iu},summary:"List docs in the authenticated user\u2019s organization. Optional project_id filter scopes to a single project."},createDoc:{method:"POST",path:"/docs",headers:A.object({authorization:A.string().min(1).optional()}),body:XMt,responses:{201:e2t,401:Iu,403:Iu,404:Iu,422:Iu},summary:"Create a doc. If project_id is provided, the doc is scoped to that project; otherwise it lives at the workspace level."},getDoc:{method:"GET",path:"/docs/:docId",pathParams:A.object({docId:kT}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:r2t,401:Iu,403:Iu,404:Iu},summary:"Get a doc by id with its rich-text body and parent project (if any)"},updateDoc:{method:"PATCH",path:"/docs/:docId",pathParams:A.object({docId:kT}),headers:A.object({authorization:A.string().min(1).optional()}),body:t2t,responses:{200:n2t,401:Iu,403:Iu,404:Iu,422:Iu},summary:"Update a doc. If prosemirror_json changes, the server re-syncs lore.mention_references from mention nodes."},deleteDoc:{method:"DELETE",path:"/docs/:docId",pathParams:A.object({docId:kT}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{204:A.object({}),401:Iu,403:Iu,404:Iu},summary:"Hard-delete a doc and any mention references it owns"}})});var o2t,Mf,N3n,B3n,i2t,w3n,s2t,Ux,Rz=w(()=>{"use strict";m();pc();o2t=["person","foot_gun"],Mf=A.enum(o2t),N3n=A.enum(["authored","commented","edited","mentioned"]),B3n=A.enum(["observed_in","reaffirmed_in"]),i2t=["primary"],w3n=A.enum(i2t),s2t=["supports","supersedes"],Ux=A.enum(s2t)});var a2t,Uie=w(()=>{"use strict";m();pc();a2t=A.object({user_id:A.string().nullable()})});var u2t,Qie=w(()=>{"use strict";m();pc();u2t=A.object({typical_phrasings:A.array(A.string()).default([])})});var Fie=w(()=>{"use strict";m();Rz();Uie();Qie();Rz();Uie();Qie()});var c2t,Qi,ad,l2t,oGe,iGe,d2t,rGe,PT,p2t,f2t,m2t,A2t,g2t,sGe,Gie=w(()=>{"use strict";m();cA();pc();Fie();c2t=Tu(),Qi=A.object({message:A.string()}),ad=A.string().regex(/^ent_[0-9A-Za-z]{22}$/),l2t=["active","archived"],oGe=A.enum(l2t),iGe=A.object({id:ad,kind:Mf,slug:A.string(),name:A.string(),blurb:A.string().nullable(),status:oGe,lifecycle:A.string().nullable(),human_edited_at:A.string().datetime().nullable(),last_active_at:A.string().datetime(),created_at:A.string().datetime(),updated_at:A.string().datetime()}),d2t=A.object({thread_id:A.string(),thread_title:A.string(),role:A.string(),score:A.number().nullable(),added_at:A.string().datetime(),added_by:A.object({id:A.string(),display_name:A.string()})}),rGe=A.object({entity_id:ad,name:A.string(),slug:A.string(),kind:Mf,edge_kind:Ux}),PT=iGe.extend({payload:A.record(A.string(),A.unknown()),attachments:A.array(d2t),edges:A.object({outgoing:A.array(rGe),incoming:A.array(rGe)})}),p2t=A.object({type:A.literal("list"),list_type:A.literal("entities"),has_more:A.boolean(),objects:A.array(iGe)}),f2t=A.object({kind:Mf.optional().describe("Filter to a single entity kind"),status:oGe.optional().describe("Filter by entity status"),after:ad.optional().describe("Cursor: return entities after this id"),before:ad.optional().describe("Cursor: return entities before this id")}),m2t=A.object({name:A.string().min(1).optional().describe("New display name for the entity"),blurb:A.string().nullable().optional().describe("New blurb; null clears it"),payload:A.record(A.string(),A.unknown()).optional().describe("Replacement payload for the entity")}),A2t=A.object({thread_id:A.string().min(1).describe("Id of the thread to attach"),role:A.string().min(1).describe("Role of the thread relative to the entity"),score:A.number().min(0).max(1).nullable().optional().describe("Optional relevance score in [0, 1]")}),g2t=A.object({to_id:ad.describe("Id of the target entity for the edge"),kind:Ux.describe("Kind of edge to create")}),sGe=c2t.router({listEntities:{method:"GET",path:"/entities",headers:A.object({authorization:A.string().min(1).optional()}),query:f2t,responses:{200:p2t,401:Qi},summary:"List entities in the authenticated user\u2019s organization"},getEntity:{method:"GET",path:"/entities/:entityId",pathParams:A.object({entityId:ad.describe("Id of the entity to fetch")}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:PT,401:Qi,404:Qi},summary:"Get an entity with its payload, attachments, and edges"},patchEntity:{method:"PATCH",path:"/entities/:entityId",pathParams:A.object({entityId:ad.describe("Id of the entity to update")}),headers:A.object({authorization:A.string().min(1).optional()}),body:m2t,responses:{200:PT,401:Qi,403:Qi,404:Qi},summary:"Update an entity\u2019s name, blurb, or payload"},archiveEntity:{method:"POST",path:"/entities/:entityId/archive",pathParams:A.object({entityId:ad.describe("Id of the entity to archive")}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}),responses:{200:PT,401:Qi,403:Qi,404:Qi},summary:"Archive an entity"},attachEntityThread:{method:"POST",path:"/entities/:entityId/threads",pathParams:A.object({entityId:ad.describe("Id of the entity to attach a thread to")}),headers:A.object({authorization:A.string().min(1).optional()}),body:A2t,responses:{200:PT,401:Qi,403:Qi,404:Qi},summary:"Attach a thread to an entity"},detachEntityThread:{method:"DELETE",path:"/entities/:entityId/threads/:threadId",pathParams:A.object({entityId:ad.describe("Id of the entity to detach a thread from"),threadId:A.string().min(1).describe("Id of the thread to detach")}),headers:A.object({authorization:A.string().min(1).optional()}),query:A.object({role:A.string().min(1).describe("Role of the thread membership to remove")}),responses:{200:PT,401:Qi,403:Qi,404:Qi},summary:"Detach a thread from an entity"},addEntityEdge:{method:"POST",path:"/entities/:entityId/edges",pathParams:A.object({entityId:ad.describe("Id of the source entity for the edge")}),headers:A.object({authorization:A.string().min(1).optional()}),body:g2t,responses:{200:PT,401:Qi,403:Qi,404:Qi},summary:"Add an edge from this entity to another entity"},removeEntityEdge:{method:"DELETE",path:"/entities/:entityId/edges/:toId/:kind",pathParams:A.object({entityId:ad.describe("Id of the source entity for the edge"),toId:ad.describe("Id of the target entity for the edge"),kind:Ux.describe("Kind of edge to remove")}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:PT,401:Qi,403:Qi,404:Qi},summary:"Remove an edge from this entity to another entity"}})});var h2t,_2t,da,aGe,E2t,y2t,S2t,T2t,uGe,b2t,I2t,cGe,jie=w(()=>{"use strict";m();cA();pc();h2t=Tu(),_2t=A.object({type:A.literal("list"),list_type:A.literal("thread"),has_more:A.boolean(),objects:A.array(A.unknown())}),da=A.object({message:A.string()}),aGe=A.object({thread_id:A.string().min(1),is_favorited:A.boolean(),favorited_at:A.string().datetime().nullable()}),E2t=A.object({before:A.string().min(1).max(64).optional()}),y2t=A.object({id:A.string().min(1),display_name:A.string().min(1)}),S2t=A.object({block_id:A.string().min(1),thread_id:A.string().min(1),thread_title:A.string(),thread_visibility:A.enum(["private","workspace","public"]),author:y2t,preview:A.string(),prompted_at:A.string().datetime().nullable(),favorited_at:A.string().datetime()}),T2t=A.object({type:A.literal("list"),list_type:A.literal("favorite_prompt"),has_more:A.boolean(),objects:A.array(S2t)}),uGe=A.object({block_id:A.string().min(1),thread_id:A.string().min(1).nullable(),is_favorited:A.boolean(),favorited_at:A.string().datetime().nullable()}),b2t=A.object({before:A.string().min(1).max(64).optional()}),I2t=A.object({block_ids:A.array(A.string().min(1))}),cGe=h2t.router({addThreadFavorite:{method:"POST",path:"/threads/:id/favorite",pathParams:A.object({id:A.string().min(1).max(64)}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{201:aGe,401:da,403:da,404:da},summary:"Bookmark a thread for the authenticated user. Idempotent \u2014 re-favoriting returns the existing membership."},removeThreadFavorite:{method:"DELETE",path:"/threads/:id/favorite",pathParams:A.object({id:A.string().min(1).max(64)}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{200:aGe,401:da,403:da,404:da},summary:"Remove a thread bookmark for the authenticated user (no-op if absent)."},listFavoriteThreads:{method:"GET",path:"/favorites/threads",headers:A.object({authorization:A.string().min(1).optional()}),query:E2t,responses:{200:_2t,401:da,403:da},summary:"List threads the authenticated user has favorited, newest favorited first. Visibility filtering still applies \u2014 a thread the viewer can no longer see (e.g. visibility downgraded) is omitted from the list."},addPromptFavorite:{method:"POST",path:"/thread-blocks/:id/favorite",pathParams:A.object({id:A.string().min(1).max(64)}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{201:uGe,401:da,403:da,404:da,409:da},summary:'Bookmark a single user prompt (a thread_blocks row with type="user") for the authenticated user. Idempotent.'},removePromptFavorite:{method:"DELETE",path:"/thread-blocks/:id/favorite",pathParams:A.object({id:A.string().min(1).max(64)}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{200:uGe,401:da,404:da},summary:"Remove a prompt bookmark for the authenticated user (no-op if absent)."},listFavoritePrompts:{method:"GET",path:"/favorites/prompts",headers:A.object({authorization:A.string().min(1).optional()}),query:b2t,responses:{200:T2t,401:da},summary:"List the user's favorited prompts, newest first. Prompts whose parent thread the viewer can no longer see (visibility downgraded) are filtered out at read time."},listFavoritedBlockIdsInThread:{method:"GET",path:"/threads/:id/favorited-blocks",pathParams:A.object({id:A.string().min(1).max(64)}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:I2t,401:da,403:da,404:da},summary:"Returns the set of thread_block ids the authenticated viewer has favorited within a single thread, used to bootstrap per-prompt star state on the SessionView."}})});var C2t,xz,v2t,Dz,R2t,x2t,D2t,N2t,B2t,w2t,O2t,k2t,lGe,zie=w(()=>{"use strict";m();cA();pc();C2t=Tu(),xz=A.object({message:A.string()}),v2t=["thread","plan","doc","user"],Dz=A.enum(v2t),R2t=["doc","project"],x2t=A.enum(R2t),D2t=A.object({kind:Dz,id:A.string().min(1),title:A.string().min(1),href:A.string().min(1)}),N2t=A.object({type:A.literal("list"),list_type:A.literal("mention"),objects:A.array(D2t)}),B2t=A.object({q:A.string().trim().min(1).max(50),kinds:A.string().optional().transform(e=>{if(!e)return;let t=e.split(",").map(n=>n.trim()).filter(n=>n.length>0);return t.length>0?t:void 0}).pipe(A.array(Dz).optional())}),w2t=A.object({source_kind:x2t,source_id:A.string().min(1),source_title:A.string().min(1),source_href:A.string().min(1),target_kind:Dz,target_id:A.string().min(1),created_at:A.string().datetime()}),O2t=A.object({type:A.literal("list"),list_type:A.literal("backlink"),objects:A.array(w2t)}),k2t=A.object({target_kind:Dz,target_id:A.string().min(1).max(64)}),lGe=C2t.router({searchMentions:{method:"GET",path:"/mentions/search",headers:A.object({authorization:A.string().min(1).optional()}),query:B2t,responses:{200:N2t,401:xz,422:xz},summary:"Search threads, plans, files, and users by title/name for @-mention typeahead. Org-scoped, max 10 results across all kinds."},listBacklinks:{method:"GET",path:"/mentions/backlinks",headers:A.object({authorization:A.string().min(1).optional()}),query:k2t,responses:{200:O2t,401:xz,403:xz},summary:"List every doc/project body in the caller\u2019s organization that mentions the given target. Newest-first."}})});var P2t,Fi,Hie,mA,M2t,Nz,$ie,dGe,L2t,U2t,Q2t,F2t,G2t,j2t,z2t,H2t,$2t,q2t,V2t,Y2t,pGe,qie=w(()=>{"use strict";m();cA();pc();vz();P2t=Tu(),Fi=A.object({message:A.string()}),Hie=A.record(A.string(),A.unknown()),mA=A.string().regex(/^proj_[0-9A-Za-z]{22}$/),M2t=["active","archived"],Nz=A.enum(M2t),$ie=A.object({id:A.string().min(1),display_name:A.string().min(1)}),dGe=A.object({thread_id:A.string().min(1),title:A.string().min(1),added_at:A.string().datetime(),added_by:$ie}),L2t=A.object({id:mA,name:A.string().min(1),status:Nz,author:$ie,thread_count:A.number().int().nonnegative(),doc_count:A.number().int().nonnegative(),created_at:A.string().datetime(),updated_at:A.string().datetime(),archived_at:A.string().datetime().nullable()}),U2t=A.object({type:A.literal("list"),list_type:A.literal("project"),objects:A.array(L2t)}),Q2t=A.object({status:Nz.optional()}),F2t=A.object({name:A.string().trim().min(1).max(200),prosemirror_json:Hie.optional()}),G2t=A.object({id:mA,created_at:A.string().datetime()}),j2t=A.object({name:A.string().trim().min(1).max(200).optional(),prosemirror_json:Hie.optional()}).refine(e=>Object.keys(e).length>0,{message:"At least one field must be provided"}),z2t=A.object({id:mA,updated_at:A.string().datetime()}),H2t=A.object({archived:A.boolean()}),$2t=A.object({id:mA,status:Nz,archived_at:A.string().datetime().nullable()}),q2t=A.object({id:mA,name:A.string().min(1),prosemirror_json:Hie,status:Nz,author:$ie,created_at:A.string().datetime(),updated_at:A.string().datetime(),archived_at:A.string().datetime().nullable(),threads:A.array(dGe),docs:A.array(Lie)}),V2t=A.object({thread_id:A.string().min(1).max(64)}),Y2t=dGe,pGe=P2t.router({listProjects:{method:"GET",path:"/projects",headers:A.object({authorization:A.string().min(1).optional()}),query:Q2t,responses:{200:U2t,401:Fi},summary:"List projects in the authenticated user\u2019s organization"},createProject:{method:"POST",path:"/projects",headers:A.object({authorization:A.string().min(1).optional()}),body:F2t,responses:{201:G2t,401:Fi,422:Fi},summary:"Create a new project in the authenticated user\u2019s organization"},getProject:{method:"GET",path:"/projects/:projectId",pathParams:A.object({projectId:mA}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:q2t,401:Fi,403:Fi,404:Fi},summary:"Get a project with its attached threads and child docs. The project description is the canonical mention source for project-scoped @-mentions."},updateProject:{method:"PATCH",path:"/projects/:projectId",pathParams:A.object({projectId:mA}),headers:A.object({authorization:A.string().min(1).optional()}),body:j2t,responses:{200:z2t,401:Fi,403:Fi,404:Fi,422:Fi},summary:"Update a project\u2019s name or rich-text body. Body changes re-sync mention_references for source_kind=project."},archiveProject:{method:"POST",path:"/projects/:projectId/archive",pathParams:A.object({projectId:mA}),headers:A.object({authorization:A.string().min(1).optional()}),body:H2t,responses:{200:$2t,401:Fi,403:Fi,404:Fi},summary:"Archive (soft-delete) or unarchive a project"},addProjectThread:{method:"POST",path:"/projects/:projectId/threads",pathParams:A.object({projectId:mA}),headers:A.object({authorization:A.string().min(1).optional()}),body:V2t,responses:{201:Y2t,401:Fi,403:Fi,404:Fi,409:Fi,422:Fi},summary:"Pin an existing visible thread to this project. Idempotent \u2014 re-adding returns the existing membership."},removeProjectThread:{method:"DELETE",path:"/projects/:projectId/threads/:threadId",pathParams:A.object({projectId:mA,threadId:A.string().min(1).max(64)}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{204:A.object({}),401:Fi,403:Fi,404:Fi},summary:"Remove a thread membership from a project"}})});var K2t,$n,ol,mGe,J2t,Bz,wz,Z2t,W2t,X2t,fGe,eLt,tLt,AGe,nLt,rLt,oLt,iLt,sLt,aLt,uLt,cLt,lLt,dLt,pLt,fLt,mLt,ALt,gLt,hLt,_Lt,ELt,yLt,SLt,gGe,Vie=w(()=>{"use strict";m();cA();pc();K2t=Tu(),$n=A.object({message:A.string()}),ol=A.string().regex(/^reg_[0-9A-Za-z]{22}$/),mGe=A.string().min(1).max(64),J2t=["active","quiet","dormant","archived"],Bz=A.enum(J2t),wz=A.object({id:A.string().min(1),display_name:A.string().min(1),avatar_url:A.string().nullable().optional()}),Z2t=A.object({id:A.string().min(1),display_name:A.string().min(1),thread_count:A.number().int().positive()}),W2t=["asked","requested","decided","corrected","shared","requirement"],X2t=A.enum(W2t),fGe=A.object({id:A.string().min(1),kind:X2t,summary:A.string(),thread_id:A.string().min(1),thread_title:A.string(),created_at:A.string().datetime()}),eLt=A.object({decided_14d:A.number().int().nonnegative(),asked_14d:A.number().int().nonnegative()}),tLt=A.object({id:ol,name:A.string().min(1),overlap_score:A.number().min(0).max(1)}),AGe=A.object({thread_id:A.string().min(1),title:A.string().min(1),is_primary:A.boolean(),added_at:A.string().datetime(),added_by:wz}),nLt=A.object({id:ol,name:A.string().min(1),blurb:A.string().nullable(),status:Bz,thread_count:A.number().int().nonnegative(),contributor_count:A.number().int().nonnegative(),comment_count:A.number().int().nonnegative(),contributors_preview:A.array(wz).max(3),top_filepath:A.string().nullable(),last_active_at:A.string().datetime(),created_at:A.string().datetime(),updated_at:A.string().datetime(),archived_at:A.string().datetime().nullable()}),rLt=A.object({type:A.literal("list"),list_type:A.literal("region"),objects:A.array(nLt)}),oLt=A.object({status:Bz.optional()}),iLt=A.object({name:A.string().trim().min(1).max(200),blurb:A.string().trim().max(2e3).optional()}),sLt=A.object({id:ol,created_at:A.string().datetime()}),aLt=A.object({name:A.string().trim().min(1).max(200).optional(),blurb:A.string().trim().max(2e3).nullable().optional()}).refine(e=>Object.keys(e).length>0,{message:"At least one field must be provided"}),uLt=A.object({id:ol,updated_at:A.string().datetime()}),cLt=A.object({archived:A.boolean()}),lLt=A.object({id:ol,status:Bz,archived_at:A.string().datetime().nullable()}),dLt=A.object({id:ol,name:A.string().min(1),blurb:A.string().nullable(),status:Bz,created_by:wz,thread_count:A.number().int().nonnegative(),last_active_at:A.string().datetime(),created_at:A.string().datetime(),updated_at:A.string().datetime(),archived_at:A.string().datetime().nullable(),synthesized_status:A.string().nullable(),synthesized_status_at:A.string().datetime().nullable(),threads:A.array(AGe),contributors:A.array(Z2t),decisions:A.object({decided:A.array(fGe),open:A.array(fGe)}),velocity:eLt,cited_by_active_regions:A.array(tLt)}),pLt=A.object({id:ol,synthesized_status:A.string(),synthesized_status_at:A.string().datetime()}),fLt=A.object({regions_created:A.number().int().nonnegative(),llm_dispatched:A.boolean()}),mLt=A.object({promoted_to_active:A.number().int().nonnegative(),demoted_to_quiet:A.number().int().nonnegative(),demoted_to_dormant:A.number().int().nonnegative()}),ALt=A.object({thread_id:A.string().min(1),region_id:ol,region_name:A.string().min(1),score:A.number().min(0).max(1),signal:A.enum(["file","embedding","combined"])}),gLt=A.object({thread_ids:A.array(A.string().min(1)).min(1).max(50)}),hLt=A.object({type:A.literal("list"),list_type:A.literal("region_suggestion"),objects:A.array(ALt)}),_Lt=A.object({thread_id:A.string().min(1),title:A.string(),created_at:A.string().datetime(),author:wz,user_message_count:A.number().int().nonnegative(),comment_count:A.number().int().nonnegative()}),ELt=A.object({type:A.literal("list"),list_type:A.literal("unfiled_thread"),objects:A.array(_Lt)}),yLt=A.object({thread_id:mGe}),SLt=AGe,gGe=K2t.router({listRegions:{method:"GET",path:"/regions",headers:A.object({authorization:A.string().min(1).optional()}),query:oLt,responses:{200:rLt,401:$n,403:$n},summary:"List regions in the authenticated user\u2019s organization"},createRegion:{method:"POST",path:"/regions",headers:A.object({authorization:A.string().min(1).optional()}),body:iLt,responses:{201:sLt,401:$n,403:$n,409:$n,422:$n},summary:"Create a new region in the authenticated user\u2019s organization"},getRegion:{method:"GET",path:"/regions/:regionId",pathParams:A.object({regionId:ol}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:dLt,401:$n,403:$n,404:$n},summary:"Get a region with its attached threads and rolled-up contributors"},updateRegion:{method:"PATCH",path:"/regions/:regionId",pathParams:A.object({regionId:ol}),headers:A.object({authorization:A.string().min(1).optional()}),body:aLt,responses:{200:uLt,401:$n,403:$n,404:$n,409:$n,422:$n},summary:"Rename a region or update its blurb"},archiveRegion:{method:"POST",path:"/regions/:regionId/archive",pathParams:A.object({regionId:ol}),headers:A.object({authorization:A.string().min(1).optional()}),body:cLt,responses:{200:lLt,401:$n,403:$n,404:$n},summary:"Archive or unarchive a region"},addRegionThread:{method:"POST",path:"/regions/:regionId/threads",pathParams:A.object({regionId:ol}),headers:A.object({authorization:A.string().min(1).optional()}),body:yLt,responses:{201:SLt,401:$n,403:$n,404:$n,409:$n,422:$n},summary:"Attach an existing visible thread to this region. Primary if the thread has no other primary, otherwise secondary (up to 2). Idempotent."},suggestRegionsForThreads:{method:"POST",path:"/regions/suggest-for-threads",headers:A.object({authorization:A.string().min(1).optional()}),body:gLt,responses:{200:hLt,401:$n,403:$n,422:$n},summary:'Batch lookup: for each thread id, return the highest-scoring active region in the viewer\u2019s workspace (or omit when no region clears the threshold). Used by the per-thread inline "Add to <region>" suggestion chip.'},listUnfiledThreads:{method:"GET",path:"/regions/unfiled",headers:A.object({authorization:A.string().min(1).optional()}),query:A.object({days:A.coerce.number().int().positive().max(180).optional()}),responses:{200:ELt,401:$n,403:$n},summary:"List threads in the authenticated user\u2019s scope that are not yet attached to any region (default last 30 days)."},transitionRegionLifecycle:{method:"POST",path:"/regions/lifecycle/transition",headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{200:mLt,401:$n,403:$n},summary:"Sweep regions and demote/promote between active/quiet/dormant based on last_active_at. Idempotent \u2014 safe to run on a cron or on-demand."},refreshRegions:{method:"POST",path:"/regions/refresh",headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{200:fLt,401:$n,403:$n},summary:"Run the clustering pipeline against unfiled threads and create regions from the resulting clusters. Deterministic pass is synchronous; LLM pass is dispatched as an async Inngest event and lands more regions ~30s later."},synthesizeRegion:{method:"POST",path:"/regions/:regionId/synthesize",pathParams:A.object({regionId:ol}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{200:pLt,401:$n,403:$n,404:$n,409:$n,503:$n},summary:"Generate (or refresh) the region\u2019s synthesized status using recent decisions and threads. Persists to regions.synthesized_status."},removeRegionThread:{method:"DELETE",path:"/regions/:regionId/threads/:threadId",pathParams:A.object({regionId:ol,threadId:mGe}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{204:A.object({}),401:$n,403:$n,404:$n},summary:"Remove a thread membership from a region"}})});var TLt,hGe,bLt,ILt,CLt,vLt,RLt,_Ge,Yie=w(()=>{"use strict";m();cA();pc();TLt=Tu(),hGe=A.object({message:A.string()}),bLt=A.object({id:A.string().min(1),title:A.string(),href:A.string().min(1),author_display_name:A.string().nullable(),author_handle:A.string().nullable()}),ILt=A.object({name:A.string().min(1),usage_count:A.number().int().nonnegative(),href:A.string().min(1)}),CLt=A.object({id:A.string().min(1),display_name:A.string(),handle:A.string().nullable(),avatar_url:A.string().nullable(),href:A.string().min(1)}),vLt=A.object({type:A.literal("global_search"),threads:A.array(bLt),skills:A.array(ILt),people:A.array(CLt)}),RLt=A.object({q:A.string().trim().min(1).max(80)}),_Ge=TLt.router({globalSearch:{method:"GET",path:"/search",headers:A.object({authorization:A.string().min(1).optional()}),query:RLt,responses:{200:vLt,401:hGe,422:hGe},summary:"Global navbar search. Threads and people are searched globally (subject to thread visibility); skills are scoped to the viewer workspace. Max 5 results per kind."}})});var I6n,C6n,v6n,oi,xLt,DLt,NLt,BLt,Kie,R6n,EGe=w(()=>{"use strict";m();pc();Rz();Rk();I6n=A.enum(["thread","org","user","public"]),C6n=A.discriminatedUnion("kind",[A.object({kind:A.literal("thread"),id:A.string().min(1)}),A.object({kind:A.literal("org"),id:A.string().min(1)}),A.object({kind:A.literal("user"),id:A.string().min(1)}),A.object({kind:A.literal("public"),id:A.string().min(1)})]),v6n=A.enum(["thread.created","thread.completed","thread.block.appended","thread.comment.created","thread.comment.updated","thread.comment.deleted","thread.vote.cast","thread.vote.cleared","user.followed","user.joined","user.presence","entity.created","entity.updated","entity.archived","entity.thread_attached","entity.thread_detached","entity.linked","entity.superseded","skill.published","skill.version.accepted","skill.version.proposed","skill.version.rejected","skill.installation.deleted"]),oi=A.object({id:A.string().min(1),subjects:A.array(A.string().min(1)).min(1),actor_user_id:A.string().min(1).nullable(),created_at:A.string().datetime()}),xLt=A.object({thread_id:A.string().min(1),title:A.string(),author_id:A.string().min(1),created_at:A.string().datetime()}),DLt=A.enum(["user","assistant","tool","progress","system"]),NLt=A.enum(["claude_global","agents_global","claude_project","agents_project"]),BLt=A.enum(["private","workspace"]),Kie=A.object({skill_id:A.string().min(1),name:A.string().min(1),root_kind:NLt,version:A.number().int().positive(),content_hash:A.string().startsWith("md5:")}),R6n=A.discriminatedUnion("type",[oi.extend({type:A.literal("thread.created"),payload:xLt}),oi.extend({type:A.literal("thread.completed"),payload:A.object({thread_id:A.string().min(1),completed_at:A.string().datetime()})}),oi.extend({type:A.literal("thread.block.appended"),payload:A.object({thread_id:A.string().min(1),block_id:A.string().min(1),block_type:DLt,excerpt:A.string().nullable()})}),oi.extend({type:A.literal("thread.comment.created"),payload:A.object({comment:A.lazy(()=>AA)})}),oi.extend({type:A.literal("thread.comment.updated"),payload:A.object({comment:A.lazy(()=>AA)})}),oi.extend({type:A.literal("thread.comment.deleted"),payload:A.object({thread_id:A.string().min(1),comment_id:A.string().min(1)})}),oi.extend({type:A.literal("thread.vote.cast"),payload:A.object({thread_id:A.string().min(1),vote_count:A.number().int().nonnegative()})}),oi.extend({type:A.literal("thread.vote.cleared"),payload:A.object({thread_id:A.string().min(1),vote_count:A.number().int().nonnegative()})}),oi.extend({type:A.literal("user.followed"),payload:A.object({followee_id:A.string().min(1),followee_handle:A.string().nullable(),followee_display_name:A.string().nullable()})}),oi.extend({type:A.literal("user.joined"),payload:A.object({organization_id:A.string().min(1).nullable(),organization_name:A.string().nullable()})}),oi.extend({type:A.literal("user.presence"),payload:A.object({status:A.literal("online")})}),oi.extend({type:A.literal("entity.created"),payload:A.object({entity_id:A.string().min(1),kind:Mf,slug:A.string().min(1),name:A.string().min(1)})}),oi.extend({type:A.literal("entity.updated"),payload:A.object({entity_id:A.string().min(1),kind:Mf,changed_fields:A.array(A.string()).min(1),actor:A.enum(["agent","human"])})}),oi.extend({type:A.literal("entity.archived"),payload:A.object({entity_id:A.string().min(1),kind:Mf})}),oi.extend({type:A.literal("entity.thread_attached"),payload:A.object({entity_id:A.string().min(1),kind:Mf,thread_id:A.string().min(1),role:A.string().min(1),score:A.number().nullable()})}),oi.extend({type:A.literal("entity.thread_detached"),payload:A.object({entity_id:A.string().min(1),kind:Mf,thread_id:A.string().min(1),role:A.string().min(1)})}),oi.extend({type:A.literal("entity.linked"),payload:A.object({from_id:A.string().min(1),to_id:A.string().min(1),edge_kind:Ux})}),oi.extend({type:A.literal("entity.superseded"),payload:A.object({superseding_id:A.string().min(1),supersedes_id:A.string().min(1)})}),oi.extend({type:A.literal("skill.published"),payload:Kie.extend({visibility:BLt})}),oi.extend({type:A.literal("skill.version.accepted"),payload:Kie}),oi.extend({type:A.literal("skill.version.proposed"),payload:Kie.extend({owner_user_id:A.string().min(1),proposer_user_id:A.string().min(1)})}),oi.extend({type:A.literal("skill.version.rejected"),payload:A.object({skill_id:A.string().min(1),version:A.number().int().positive(),reviewer_user_id:A.string().min(1),proposer_user_id:A.string().min(1)})}),oi.extend({type:A.literal("skill.installation.deleted"),payload:A.object({skill_id:A.string().min(1),installation_id:A.string().min(1),user_id:A.string().min(1)})})])});var wLt,OLt,F6n,kLt,PLt,G6n,q,MLt,BGe,wGe,OGe,LLt,ULt,QLt,yGe,FLt,GLt,kGe,jLt,zLt,HLt,$Lt,qLt,VLt,YLt,KLt,PGe,JLt,ZLt,WLt,XLt,MGe,Lz,eUt,tUt,nUt,rUt,oUt,iUt,sUt,aUt,uUt,cUt,lUt,dUt,pUt,fUt,mUt,AUt,Wie,LGe,gUt,hUt,_Ut,EUt,UGe,yUt,SUt,TUt,bUt,IUt,CUt,Lf,vUt,RUt,xUt,DUt,NUt,Nk,t0,BUt,QGe,Xie,j6n,Oz,wUt,OUt,Uz,kUt,FGe,GGe,PUt,xk,ese,SGe,MUt,jGe,TGe,LUt,UUt,AA,QUt,FUt,GUt,jUt,zUt,HUt,z6n,$Ut,qUt,VUt,YUt,tse,zGe,KUt,JUt,ZUt,WUt,XUt,eQt,HGe,tQt,nQt,rQt,oQt,iQt,sQt,aQt,Jie,uQt,cQt,lQt,Dk,dQt,pQt,fQt,mQt,AQt,gQt,hQt,_Qt,EQt,yQt,SQt,TQt,bQt,IQt,bGe,CQt,vQt,RQt,xQt,DQt,NQt,BQt,wQt,OQt,kQt,PQt,Pz,MQt,LQt,UQt,QQt,FQt,IGe,GQt,jQt,CGe,zQt,vGe,HQt,$Qt,qQt,VQt,YQt,KQt,JQt,ZQt,WQt,XQt,$Ge,eFt,tFt,nFt,rFt,oFt,qGe,iFt,sFt,aFt,uFt,cFt,lFt,RGe,dFt,pFt,fFt,mFt,kz,AFt,gFt,hFt,_Ft,EFt,yFt,SFt,TFt,bFt,IFt,CFt,vFt,RFt,Qx,VGe,Zie,xFt,DFt,NFt,BFt,wFt,xGe,Mz,OFt,kFt,PFt,MFt,LFt,UFt,QFt,FFt,GFt,jFt,zFt,e0,DGe,HFt,$Ft,qFt,VFt,YFt,KFt,JFt,ZFt,WFt,XFt,e4t,t4t,n4t,r4t,o4t,i4t,s4t,a4t,u4t,c4t,l4t,NGe,d4t,YGe,p4t,f4t,m4t,A4t,g4t,Qz,Rk=w(()=>{"use strict";m();FQe();cA();pc();vz();Gie();jie();zie();qie();Vie();Yie();EGe();Fie();qie();Vie();Gie();vz();zie();jie();Yie();wLt=Tu(),OLt=["gmail.com","googlemail.com","hotmail.com","outlook.com","live.com","msn.com","yahoo.com","ymail.com","rocketmail.com","icloud.com","me.com","mac.com","aol.com","proton.me","protonmail.com","pm.me","tutanota.com","tuta.io","fastmail.com","hey.com","mail.com","gmx.com","gmx.net","zoho.com","zohomail.com","hushmail.com","lycos.com","inbox.com","yandex.com","yandex.ru","mail.ru","inbox.ru","bk.ru","list.ru","rambler.ru","qq.com","163.com","126.com","yeah.net","sina.com","naver.com","daum.net","hanmail.net","kakao.com","rediffmail.com","comcast.net","verizon.net","att.net","sbcglobal.net","bellsouth.net","earthlink.net","charter.net","cox.net","roadrunner.com","spectrum.net","btinternet.com","virginmedia.com","sky.com","orange.fr","wanadoo.fr","free.fr","laposte.net","web.de","t-online.de","gmx.de","libero.it","virgilio.it","alice.it","seznam.cz","centrum.cz","wp.pl","interia.pl","o2.pl","onet.pl"],F6n=new Set(OLt),kLt=A.object({id:A.string().uuid(),role:A.enum(["user","assistant"]),content:A.string().min(1),timestamp:A.string().datetime()}),PLt=A.object({id:A.string().uuid(),title:A.string().min(1),author:A.string().min(1),authorAvatar:A.string().min(1).max(4),model:A.string().min(1),turnCount:A.number().int().nonnegative(),createdAt:A.string().datetime(),preview:A.string()}),G6n=PLt.extend({messages:A.array(kLt)}),q=A.object({message:A.string()}),MLt=/^[a-zA-Z0-9_-]{2,32}$/,BGe=A.string().regex(MLt,"Handle must be 2\u201332 characters: letters, numbers, dashes, or underscores."),wGe=A.enum(["friend","events","twitter","linkedin","hacker_news","reddit","discord","youtube","google","ai_search","other"]),OGe=A.object({id:A.string(),first_name:A.string().min(1),last_name:A.string().min(1),display_name:A.string().min(1),handle:A.string().nullable(),bio:A.string().max(280).nullable(),avatar_url:A.string().nullable(),banner_url:A.string().nullable(),share_new_threads_to_workspace:A.boolean(),experimental_features_enabled:A.boolean(),onboarded_at:A.string().nullable(),attribution_source:wGe.nullable(),attribution_source_detail:A.string().nullable()}),LLt=A.object({email:A.string().nullable(),name:A.string().nullable(),handle:A.string().nullable(),created_at:A.string(),onboarded_at:A.string().nullable(),is_admin:A.boolean(),referred_by_user_id:A.string().nullable(),plan_tier:A.enum(["free","creator","team"]),organization_id:A.string().nullable(),signup_source:A.enum(["referral","organic"]),first_upload_at:A.string().nullable(),first_share_at:A.string().nullable(),first_cli_auth_at:A.string().nullable(),first_plugin_activated_at:A.string().nullable(),first_plugin_agent:A.string().nullable()}),ULt=A.object({group_key:A.string().min(1),properties:A.object({name:A.string(),plan_tier:A.enum(["free","creator","team"]),seat_count:A.number().int().nonnegative(),created_at:A.string(),email_domains:A.array(A.string()),default_thread_visibility:A.string(),member_count:A.number().int().nonnegative().nullable()})}),QLt=A.object({authProviderUserId:A.string().min(1).optional(),organizationId:A.string().min(1).optional(),org_name:A.string().min(1).optional(),organizations:A.array(A.object({id:A.string().min(1),name:A.string().min(1)})),emailAddress:A.string().email(),name:A.string().nullable(),user:OGe,is_admin:A.boolean(),is_new_signup:A.boolean(),posthog:A.object({user_properties:LLt,organization:ULt.nullable()})}),yGe=A.object({workos_client_id:A.string().min(1),workos_api_origin:A.string().url()}),FLt=A.object({share_new_threads_to_workspace:A.boolean().optional(),experimental_features_enabled:A.boolean().optional(),onboarded_at:A.union([A.literal("now"),A.null()]).optional(),attribution_source:wGe.nullable().optional(),attribution_source_detail:A.string().max(280).nullable().optional(),display_name:A.string().min(1).max(120).optional(),handle:BGe.optional(),bio:A.string().max(280).nullable().optional(),avatar_storage_url:A.string().min(1).nullable().optional(),banner_storage_url:A.string().min(1).nullable().optional()}).refine(e=>Object.keys(e).length>0,{message:"At least one field must be provided"}),GLt=A.object({id:A.string(),display_name:A.string(),handle:A.string().nullable(),avatar_url:A.string().nullable(),visible_thread_count:A.number().int().nonnegative(),last_active_at:A.string().datetime().nullable(),product_last_seen_at:A.string().datetime().nullable()}),kGe=A.object({id:A.string().min(1),display_name:A.string().min(1),handle:A.string().nullable(),bio:A.string().max(280).nullable(),avatar_url:A.string().nullable(),banner_url:A.string().nullable(),organization_name:A.string().min(1).nullable(),created_at:A.string().min(1),visible_thread_count:A.number().int().nonnegative(),follower_count:A.number().int().nonnegative(),following_count:A.number().int().nonnegative(),published_project_count:A.number().int().nonnegative(),is_following:A.boolean(),is_self:A.boolean()}),jLt=A.object({type:A.literal("list"),list_type:A.literal("organization_member"),objects:A.array(GLt)}),zLt=A.object({email_address:A.string().email()}),HLt=A.object({email_address:A.string().email(),invitation_id:A.string().min(1)}),$Lt=A.object({organization_id:A.string().min(1),organization_name:A.string().min(1),domain:A.string().min(1),created:A.boolean()}),qLt=A.object({location:A.string().trim().min(1),contact:A.string().trim().email()}),VLt=A.object({name:A.string().trim().min(1).max(100).describe("Sender's name"),email:A.string().trim().email().max(200).describe("Reply-to email"),message:A.string().trim().min(1).max(5e3).describe("Message body"),company:A.string().max(200).optional()}),YLt=A.object({ok:A.boolean()}),KLt=A.object({location:A.string().min(1),contact:A.string().email(),created_at:A.string().datetime()}),PGe=A.enum(["general","bug","feature_request","question"]),JLt=A.object({type:PGe,message:A.string().trim().min(1).max(5e3)}),ZLt=A.object({id:A.string().min(1),type:PGe,message:A.string().min(1),created_at:A.string().datetime()}),WLt=A.object({path_glob:A.string().min(1),name:A.string().min(1),description:A.string().min(1)}),XLt=A.object({repo_origin_path:A.string().min(1),building_blocks:A.array(WLt)}),MGe=A.string().regex(/^th_[0-9A-Za-z]{22}$/),Lz=A.string().regex(/^tb_[0-9A-Za-z]{22}$/),eUt=A.object({id:MGe,author:A.object({id:A.string().min(1),display_name:A.string().min(1)}),title:A.string().min(1),excerpt:A.string(),created_at:A.string().datetime(),repo_origin_path:A.string().min(1),latest_revision_id:Lz,revision_count:A.number().int().positive()}),tUt=A.object({id:A.string().min(1),display_name:A.string().min(1)}),nUt=A.object({id:A.string().min(1),author_id:A.string().min(1).nullable(),author:tUt.nullable(),created_at:A.string().datetime(),deleted_at:A.string().datetime().nullable(),content:A.string().min(1)}),rUt=A.object({id:A.string().min(1),thread_block_id:A.string().min(1),created_at:A.string().datetime(),resolved_at:A.string().datetime().nullable(),comments:A.array(nUt)}),oUt=A.object({thread_block_id:Lz,from_position:A.number().int().positive(),to_position:A.number().int().positive(),selected_text:A.string().min(1),content:A.string().trim().min(1)}),iUt=A.object({id:A.string().min(1)}),sUt=A.object({content:A.string().trim().min(1)}),aUt=A.object({id:A.string().min(1)}),uUt=A.object({content:A.string().trim().min(1)}),cUt=A.object({id:A.string().min(1)}),lUt=A.object({content:A.string().trim().min(1)}),dUt=A.object({id:A.string().min(1)}),pUt=A.object({resolved:A.boolean()}),fUt=A.object({id:A.string().min(1),resolved_at:A.string().datetime().nullable()}),mUt=A.object({resolved:A.boolean()}),AUt=A.object({id:A.string().min(1),resolved_at:A.string().datetime().nullable()}),Wie=A.record(A.string(),A.unknown()),LGe=A.object({id:Lz,body:A.string().nullable(),created_at:A.string().datetime(),prosemirror_json:Wie.nullable(),comment_threads:A.array(rUt)}),gUt=LGe.extend({body:A.string(),prosemirror_json:Wie}),hUt=A.object({id:MGe,created_at:A.string().datetime(),repo_origin_path:A.string().min(1),author:A.object({id:A.string().min(1),display_name:A.string().min(1)}),latest_revision_id:Lz,revision_count:A.number().int().positive(),revisions:A.array(LGe)}),_Ut=A.object({type:A.literal("list"),list_type:A.literal("plan"),has_more:A.boolean(),objects:A.array(eUt)}),EUt=A.object({before:A.string().min(1).optional(),after:A.string().min(1).optional(),author_id:A.string().min(1).optional(),repo_origin_path:A.string().min(1).optional()}),UGe=A.object({id:A.string().min(1),organization_id:A.string().min(1).nullable(),created_at:A.string().min(1),repo_origin_path:A.string().min(1),path_glob:A.string().min(1),name:A.string().min(1),description:A.string().min(1)}),yUt=A.array(UGe),SUt=A.object({type:A.literal("list"),list_type:A.literal("building_block"),has_more:A.boolean(),objects:A.array(UGe)}),TUt=A.object({repo_origin_path:A.string().min(1),before:A.string().min(1).optional(),after:A.string().min(1).optional()}),bUt=A.enum(["thread","building_block"]),IUt=A.object({repo_origin_path:A.string().min(1),sources:A.array(bUt).nonempty()}),CUt=A.object({type:A.literal("list"),list_type:A.literal("repository"),has_more:A.boolean(),objects:A.array(IUt)}),Lf=A.enum(["claudeCode","codex","amp","lore","cursor","cowork","unspecified"]),vUt=A.enum(["claudeCode","codex","amp","cursor","cowork","unspecified"]),RUt=A.object({uploads:A.array(A.string()),outputs:A.array(A.string())}),xUt=A.object({connected:A.boolean(),last_upload_at:A.string().nullable(),harnesses:A.array(Lf)}),DUt=["transcript","plan"],NUt=A.enum(DUt),Nk=A.enum(["private","workspace"]),t0=A.enum(["claude_global","agents_global","claude_project","agents_project"]),BUt=A.object({name:A.string().min(1),description:A.string().nullable(),root_kind:t0,file_path:A.string().min(1),also_seen_at:A.array(A.string().min(1))}),QGe=A.object({type:A.literal("local_skill_scanner_output"),skills:A.record(A.string(),A.array(BUt))}),Xie=A.enum(["accepted","proposed","rejected","superseded"]),j6n=A.enum(["capture","capture_update","owner_update","subscriber_update"]),Oz=A.object({md5:A.string().min(1).describe("Raw hex MD5 used to verify uploaded SKILL.md bytes"),name:A.string().min(1).describe("Skill directory/name, e.g. code-review"),filename:A.string().min(1).describe("Upload object filename, usually <name>/SKILL.md").optional(),description:A.string().nullable().describe("Optional skill description extracted from frontmatter").optional(),root_kind:t0.describe("Local root kind where this skill file came from"),base_version:A.number().int().positive().describe("Installed base version for local edits").optional()}),wUt=A.discriminatedUnion("sync_action",[Oz.extend({sync_action:A.literal("capture").describe("Capture a local skill without an existing server skill ID"),skill_id:A.never().optional()}),Oz.extend({sync_action:A.literal("owner_update").describe("Publish an accepted update to an owned skill"),skill_id:A.string().min(1).describe("Existing skill ID for owner updates")}),Oz.extend({sync_action:A.literal("capture_update").describe("Update an existing private captured skill"),skill_id:A.string().min(1).describe("Existing skill ID for private capture updates")}),Oz.extend({sync_action:A.literal("subscriber_update").describe("Propose an update to an installed workspace skill"),skill_id:A.string().min(1).describe("Existing skill ID for subscriber update proposals")})]),OUt=A.object({md5:A.string().min(1),harness:vUt,filename:A.string().min(1).optional(),repo_origin_path:A.string().min(1).optional(),harness_internal_id:A.string().min(1).optional(),file_type:NUt.optional(),artifact_metadata:RUt.optional()}).refine(e=>(e.filename?.trim().length??0)>0||(e.harness_internal_id?.trim().length??0)>0,{path:["harness_internal_id"],message:"filename or harness_internal_id is required"}),Uz=A.object({id:A.string().min(1),display_name:A.string().min(1),avatar_url:A.string().nullable()}),kUt=A.object({id:A.string().min(1),display_name:A.string().min(1)}),FGe=A.object({id:A.string().min(1),author_id:A.string().min(1).nullable(),author:kUt.nullable(),created_at:A.string().datetime(),deleted_at:A.string().datetime().nullable(),content:A.string().min(1)}),GGe=A.object({id:A.string().min(1),thread_block_id:A.string().min(1),created_at:A.string().datetime(),resolved_at:A.string().datetime().nullable()}),PUt=GGe.extend({comments:A.array(FGe)}),xk=A.object({id:A.string().min(1),type:A.string().min(1),index_in_thread:A.number().int().nonnegative(),isCritiqued:A.boolean(),comment_threads:A.array(PUt).optional()}).passthrough(),ese=A.object({type:A.literal("list"),list_type:A.literal("thread_block"),has_more:A.boolean(),objects:A.array(xk)}),SGe=xk.extend({type:A.literal("plan"),prosemirror_json:Wie,thread_file_id:A.string().min(1)}),MUt=A.union([A.literal(-1),A.literal(1)]),jGe=A.union([A.literal(-1),A.literal(0),A.literal(1)]),TGe=A.object({score:A.number().int(),up_count:A.number().int().nonnegative(),down_count:A.number().int().nonnegative(),viewer_vote:jGe}),LUt=A.object({value:MUt}),UUt=A.object({id:A.string().min(1),display_name:A.string().min(1),avatar_url:A.string().nullable()}),AA=A.object({id:A.string().min(1),thread_id:A.string().min(1),author_id:A.string().min(1).nullable(),author:UUt.nullable(),parent_comment_id:A.string().min(1).nullable(),content:A.string(),created_at:A.string().datetime(),updated_at:A.string().datetime(),deleted_at:A.string().datetime().nullable()}),QUt=A.object({type:A.literal("list"),list_type:A.literal("thread_comment"),objects:A.array(AA)}),FUt=A.object({content:A.string().trim().min(1).max(4e3),parent_comment_id:A.string().min(1).optional()}),GUt=AA,jUt=A.object({content:A.string().trim().min(1).max(4e3)}),zUt=AA,HUt=AA,z6n=A.discriminatedUnion("kind",[A.object({kind:A.literal("created"),thread_id:A.string().min(1),actor_user_id:A.string().min(1),version:A.number(),comment:AA}),A.object({kind:A.literal("updated"),thread_id:A.string().min(1),actor_user_id:A.string().min(1),version:A.number(),comment:AA}),A.object({kind:A.literal("deleted"),thread_id:A.string().min(1),actor_user_id:A.string().min(1),version:A.number(),comment:AA})]),$Ut=A.enum(["pending","generating","ready","failed"]),qUt=A.enum(["pending","generating","ready","failed"]),VUt=A.enum(["pending","placeholder","ai","user","command"]),YUt=A.enum(["pending","generating","ready","failed"]),tse=A.enum(["pending","generating","ready","failed","disabled"]),zGe=A.enum(["pending","generating","ready","failed"]),KUt=A.object({title:A.string().min(1),body:A.string().min(1),files:A.array(A.string()).optional()}),JUt=A.object({status:tse,url:A.string().nullable(),url_expires_at:A.string().nullable(),generated_at:A.string().nullable(),model:A.string().nullable()}),ZUt=A.object({status:zGe,steps:A.array(KUt),generated_at:A.string().nullable()}),WUt=A.object({cover:JUt,how_to:ZUt}),XUt=A.object({id:A.string().min(1),title:A.string().min(1),author:A.object({id:A.string().min(1),display_name:A.string(),handle:A.string().nullable(),avatar_url:A.string().nullable()}),cover:A.object({url:A.string(),url_expires_at:A.string()}),started_at:A.string(),cover_generated_at:A.string()}),eQt=A.object({type:A.literal("list"),list_type:A.literal("card_feed_item"),has_more:A.boolean(),objects:A.array(XUt)}),HGe=A.enum(["asked","requested","decided","corrected","shared","requirement"]),tQt=A.object({id:A.string().min(1),kind:HGe,summary:A.string().min(1),block_id:A.string().min(1)}),nQt=A.object({block_id:A.string().min(1),status:YUt,generated_at:A.string().nullable()}),rQt=A.object({type:A.literal("list"),list_type:A.literal("thread_decision"),objects:A.array(tQt),block_statuses:A.array(nQt)}),oQt=A.object({forker_intent:A.string().min(1).max(2e3).describe("What the forking user wants to do next with this session")}),iQt=A.object({source_thread_id:A.string().min(1),forker_intent:A.string(),source_distilled:A.string().min(1).describe("Intent-conditioned handoff summary of the source thread for a new agent")}),sQt=A.object({question:A.string().trim().min(1).max(2e3).describe("Question to answer from visible Lore thread decisions and titles")}),aQt=A.object({id:A.string().min(1),kind:HGe,summary:A.string().min(1),block_id:A.string().min(1)}),Jie=A.object({thread_id:A.string().min(1),title:A.string().min(1),summary:A.string().nullable(),started_at:A.string().datetime(),score:A.number(),matched_by:A.enum(["summary","decision"]),decisions:A.array(aQt)}),uQt=A.object({id:A.string().min(1),kind:A.enum(["agent","tool","retrieval","answer","sources"]),title:A.string().min(1),status:A.enum(["completed"]),summary:A.string().min(1),duration_ms:A.number().nonnegative().optional(),metadata:A.object({retrieved_decisions:A.number().int().nonnegative().optional(),returned_sources:A.number().int().nonnegative().optional(),cited_sources:A.number().int().nonnegative().optional(),matched_sources:A.array(Jie).optional(),searched_query:A.string().min(1).optional(),since:A.string().min(1).optional(),until:A.string().min(1).optional(),thread_id:A.string().min(1).optional(),thread_ids:A.array(A.string().min(1)).optional(),question:A.string().min(1).optional()}).optional()}),cQt=A.object({steps:A.array(uQt)}),lQt=A.object({answer:A.string(),sources:A.array(Jie),matched_sources:A.array(Jie).describe("Threads matched by the vector decision search before citation filtering"),searched_query:A.string().describe("String embedded for the vector decision search"),trace:cQt.optional()}),Dk=A.object({id:A.string().min(1),thread_file_id:A.string().min(1),organization_id:A.string().min(1).nullable(),deleted_at:A.string().datetime().nullable(),author:Uz,repo:A.string().min(1),title:A.string().min(1),started_at:A.string().min(1),last_activity_at:A.string().datetime().nullable(),blocks:ese,user_message_count:A.number().int().nonnegative(),files_touched:A.array(A.string()),skills_invoked:A.array(A.string()),slash_commands_invoked:A.array(A.string()),harness:Lf,transcript_parsing_state:A.enum(["pending","parsed","too_large_to_parse","failed"]),visibility:A.enum(["private","workspace","public"]),has_plan:A.boolean().optional(),summary:A.string().nullable(),summary_status:$Ut,summary_generated_at:A.string().nullable(),title_status:qUt,title_generated_at:A.string().nullable(),title_source:VUt,score:A.number().int(),up_count:A.number().int().nonnegative(),down_count:A.number().int().nonnegative(),viewer_vote:jGe,comment_count:A.number().int().nonnegative(),is_favorited:A.boolean(),card:WUt}),dQt=A.object({storage_url:A.string().min(1)}),pQt=A.object({storage_url:A.string().min(1)}),fQt=A.object({storage_url:A.string(),harness:Lf,thread:Dk.nullable()}),mQt=A.object({status:A.literal("complete"),thread_files:A.array(fQt),skill_files:A.array(A.object({storage_url:A.string(),skill:A.object({id:A.string(),name:A.string(),version:A.number().int().positive(),latest_version:A.number().int().positive(),visibility:Nk,root_kind:t0,version_status:Xie.optional(),content_hash:A.string()}).nullable()})).optional()}),AQt=A.object({id:A.string(),presigned_url:A.string().nullable(),presigned_url_expires_at:A.string().nullable(),storage_url:A.string(),harness:Lf,expected_md5:A.string(),error:A.string().nullable(),thread:Dk.nullable()}),gQt=A.object({id:A.string(),presigned_url:A.string().nullable(),presigned_url_expires_at:A.string().nullable(),storage_url:A.string(),expected_md5:A.string(),name:A.string(),error:A.string().nullable()}),hQt=A.object({id:A.string(),substrate:A.enum(["s3","filesystem"]),status:A.enum(["incomplete","locked_for_parsing","complete","error"]),thread_files:A.array(AQt),skill_files:A.array(gQt).optional()}),_Qt=A.object({query:A.string().min(1).describe("Natural-language description of the block or block range to highlight")}),EQt=A.object({thread_id:A.string(),url:A.string().url(),start_block_id:A.string().nullable(),end_block_id:A.string().nullable(),matched:A.boolean()}),yQt=A.object({}),SQt=A.object({thread_id:A.string().min(1)}),TQt=A.object({visibility:A.enum(["private","workspace","public"]).optional(),title:A.string().trim().min(1).max(200).optional()}).refine(e=>e.visibility!==void 0||e.title!==void 0,{message:"At least one of visibility or title must be provided"}),bQt=A.discriminatedUnion("visibility",[A.object({visibility:A.literal("private")}),A.object({visibility:A.literal("workspace")}),A.object({visibility:A.literal("public"),title:A.string().min(1),author_display_name:A.string().min(1),author_avatar_url:A.string().nullable(),first_user_message:A.string().nullable(),summary:A.string().nullable(),started_at:A.string().min(1),harness:Lf,cover_url:A.string().nullable()})]),IQt=A.object({id:A.string().min(1),author:Uz,repo:A.string().min(1),title:A.string().min(1),started_at:A.string().min(1),last_activity_at:A.string().datetime().nullable(),blocks:ese,user_message_count:A.number().int().nonnegative(),comment_count:A.number().int().nonnegative(),files_touched:A.array(A.string()),skills_invoked:A.array(A.string()),harness:Lf,visibility:A.enum(["private","workspace","public"]),has_plan:A.boolean().optional(),is_favorited:A.boolean()}),bGe=A.object({type:A.literal("list"),list_type:A.literal("thread"),has_more:A.boolean(),objects:A.array(IQt)}),CQt=A.enum(["recent","popular"]),vQt=A.enum(["everyone","following"]),RQt=Dk,xQt=A.object({type:A.literal("list"),list_type:A.literal("discover_thread"),has_more:A.boolean(),objects:A.array(RQt)}),DQt=A.object({before:A.string().min(1).optional(),after:A.string().min(1).optional(),sort:CQt.optional(),scope:vQt.optional(),harness:Lf.optional(),search:A.string().max(200).optional()}),NQt=A.object({thread_count:A.number().int().nonnegative(),author_count:A.number().int().nonnegative(),organization_count:A.number().int().nonnegative(),harness_breakdown:A.record(A.string(),A.number().int().nonnegative()).refine(e=>Object.keys(e).every(t=>Lf.safeParse(t).success),"Harness breakdown keys must be known harness values")}),BQt=A.object({id:A.string(),status:A.enum(["incomplete","locked_for_parsing","complete","error"]),created_at:A.string(),thread_count:A.number().int().nonnegative(),skill_count:A.number().int().nonnegative().default(0),thread_ids:A.array(A.string()).default([])}),wQt=A.object({type:A.literal("list"),list_type:A.literal("upload_session"),objects:A.array(BQt)}),OQt=A.object({before:A.string().min(1).optional(),after:A.string().min(1).optional()}),kQt=A.object({before:A.string().min(1).optional(),after:A.string().min(1).optional(),author_ids:A.string().min(1).optional(),created_at:A.string().min(1).optional(),filepath_prefixes:A.string().min(1).optional(),q:A.string().trim().min(1).max(200).optional()}),PQt=A.object({path:A.string().min(1),start_offset:A.number().int().nonnegative(),end_offset:A.number().int().positive()}),Pz=A.object({id:A.string(),display_name:A.string(),avatar_url:A.string().nullable()}),MQt=A.object({before:A.string().min(1).optional().describe("Skill ID cursor. Returns skills newer than this cursor in descending created_at order."),after:A.string().min(1).optional().describe("Skill ID cursor. Returns skills older than this cursor in descending created_at order.")}),LQt=A.object({id:A.string(),name:A.string(),description:A.string().nullable(),visibility:Nk,root_kind:t0,latest_version:A.number().int().nonnegative().nullable(),content_hash:A.string().nullable(),has_content:A.boolean(),owner:Pz.nullable(),usage_count:A.number().int().nonnegative(),author_count:A.number().int().nonnegative(),first_used_at:A.string().nullable(),last_used_at:A.string().nullable()}),UQt=A.object({type:A.literal("list"),list_type:A.literal("skill"),has_more:A.boolean(),objects:A.array(LQt)}),QQt=A.object({id:A.string(),title:A.string(),visibility:A.enum(["private","workspace","public"]),started_at:A.string(),author:Uz,skills_invoked:A.array(A.string())}),FQt=A.object({version:A.number().int().positive().describe("Version timestamp for this SKILL.md body"),content_hash:A.string().describe("Content-addressed skill body hash, prefixed by hash type"),status:Xie.describe("Review status for this skill version"),created_at:A.string().describe("ISO-8601 timestamp when this version was uploaded"),created_by:Pz.nullable().describe("User who uploaded/proposed this version, when known"),reviewed_at:A.string().nullable().describe("ISO-8601 timestamp when the owner reviewed this version"),reviewed_by:Pz.nullable().describe("Owner who approved or rejected this version"),rejection_reason:A.string().nullable().describe("Owner-provided rejection reason for rejected versions")}),IGe=A.object({id:A.string(),name:A.string(),description:A.string().nullable(),visibility:Nk,root_kind:t0,latest_version:A.number().int().nonnegative().nullable(),content_hash:A.string().nullable(),owner:Pz.nullable(),usage_count:A.number().int().nonnegative(),author_count:A.number().int().nonnegative(),first_used_at:A.string().nullable(),last_used_at:A.string().nullable(),versions:A.array(FQt),threads:A.array(QQt)}),GQt=A.object({id:A.string(),name:A.string(),visibility:Nk,root_kind:t0,latest_version:A.number().int().nonnegative(),content_hash:A.string()}),jQt=A.object({installation_id:A.string(),already_registered:A.boolean(),body_md_url:A.string(),skill:GQt}),CGe=A.object({id:A.string(),skill_id:A.string(),installed_version:A.number().int().nonnegative().nullable(),already_registered:A.boolean().optional()}),zQt=A.object({installed_version:A.number().int().nonnegative().describe("Accepted skill version that was successfully written locally")}),vGe=A.object({id:A.string(),name:A.string(),version:A.number().int().positive(),latest_version:A.number().int().positive(),visibility:Nk,root_kind:t0,version_status:Xie,content_hash:A.string()}),HQt=A.object({reason:A.string().optional().describe("Optional owner-provided reason for rejecting the proposed version")}),$Qt=A.object({id:A.string(),skill_id:A.string(),name:A.string(),description:A.string().nullable(),root_kind:t0,latest_version:A.number().int().nonnegative(),latest_content_hash:A.string(),installed_version:A.number().int().nonnegative().nullable()}),qQt=A.object({type:A.literal("list"),list_type:A.literal("skill_installation_sync"),has_more:A.boolean(),objects:A.array($Qt)}),VQt=A.object({path:A.string().min(1),text:A.string().max(64e3)}),YQt=A.enum(["text_edit","redact","delete_block"]),KQt=A.object({id:A.string(),thread_block_id:A.string(),editor:A.object({id:A.string(),display_name:A.string()}),kind:YQt,path:A.string().nullable(),previous_text:A.string().nullable(),new_text:A.string().nullable(),created_at:A.string()}),JQt=A.object({type:A.literal("list"),list_type:A.literal("thread_block_edit"),objects:A.array(KQt)}),ZQt=A.object({organization_count:A.number().int().nonnegative(),user_count:A.number().int().nonnegative(),thread_count:A.number().int().nonnegative(),thread_count_last_24h:A.number().int().nonnegative(),user_count_last_24h:A.number().int().nonnegative()}),WQt=A.object({id:A.string(),name:A.string(),email_domains:A.array(A.string()),member_count:A.number().int().nonnegative(),thread_count:A.number().int().nonnegative(),default_thread_visibility:A.enum(["private","workspace","public"]),created_at:A.string()}),XQt=A.object({type:A.literal("list"),list_type:A.literal("admin_organization"),objects:A.array(WQt)}),$Ge=A.object({id:A.string(),name:A.string()}),eFt=A.object({id:A.string(),display_name:A.string(),workos_id:A.string(),thread_count:A.number().int().nonnegative(),onboarded_at:A.string().nullable(),created_at:A.string(),organizations:A.array($Ge)}),tFt=A.object({q:A.string().trim().min(1).max(120).optional()}),nFt=A.object({follower_id:A.string().min(1),followee_id:A.string().min(1)}),rFt=A.object({follower_id:A.string().min(1),followee_id:A.string().min(1),is_following:A.literal(!0)}),oFt=A.object({type:A.literal("list"),list_type:A.literal("admin_user"),objects:A.array(eFt)}),qGe=A.object({id:A.string(),title:A.string(),started_at:A.string(),created_at:A.string(),deleted_at:A.string().nullable(),visibility:A.enum(["private","workspace","public"]),harness:Lf,harness_internal_id:A.string(),thread_file_id:A.string(),transcript_parsing_state:A.enum(["pending","parsed","too_large_to_parse","failed"]),author:Uz,organization:$Ge.nullable()}),iFt=A.object({id:A.string(),content_type:A.enum(["transcript","plan"]),harness:Lf,harness_internal_id:A.string(),expected_md5:A.string(),size_in_bytes:A.number().int().nonnegative().nullable(),created_at:A.string()}),sFt=A.object({thread:qGe,latest_transcript_file:iFt.nullable()}),aFt=A.object({type:A.literal("list"),list_type:A.literal("admin_thread"),has_more:A.boolean(),objects:A.array(qGe)}),uFt=A.object({before:A.string().min(1).optional(),after:A.string().min(1).optional()}),cFt=A.object({thread_id:A.string().min(1).optional().describe("Lore thread id, e.g. th_xxx."),thread_file_id:A.string().min(1).optional().describe("Thread file id, e.g. tf_xxx."),harness:Lf.optional().describe("Harness name, e.g. claudeCode."),harness_internal_id:A.string().min(1).optional().describe("Harness-native session id.")}),lFt=A.object({thread_id:A.string().min(1),thread_file_id:A.string().min(1),event_name:A.literal("lore/thread-files.parse.requested")}),RGe=A.object({token:A.string().min(1),thread_id:A.string().min(1)}),dFt=A.object({visitor:A.string().min(1).max(64).optional()}),pFt=A.object({user_id:A.string(),display_name:A.string(),shares_sent:A.number().int().nonnegative(),unique_viewers:A.number().int().nonnegative(),attributed_signups:A.number().int().nonnegative()}),fFt=A.object({window_days:A.number().int().positive(),shares_sent:A.number().int().nonnegative(),unique_viewers:A.number().int().nonnegative(),attributed_signups:A.number().int().nonnegative(),active_sharers:A.number().int().nonnegative(),k_factor:A.number().nullable(),shares_sent_sparkline:A.array(A.number().int().nonnegative()),top_sharers:A.array(pFt)}),mFt=A.object({windows:A.array(fFt)}),kz=A.object({period:A.string(),active:A.number().int().nonnegative()}),AFt=A.object({daily:A.array(kz),weekly:A.array(kz),monthly:A.array(kz),allTime:A.array(kz)}),gFt=A.object({quoted_text:A.string().min(1),comment:A.string().nullable(),type:A.enum(["comment","highlight:trapdoor"])}),hFt=GGe,_Ft=FGe.extend({comment_thread_id:A.string().min(1)}),EFt=A.object({markdown:A.string().min(1)}),yFt=A.object({storage_url:A.string().min(1),thread_file_id:A.string().min(1),parsed_plan_block:SGe,critiqued_plan_block:SGe,annotations:A.array(gFt),comment_threads:A.array(hFt),comments:A.array(_Ft)}),SFt=A.object({key:A.string().min(1),label:A.string().min(1),description:A.string().optional(),type:A.enum(["text","textarea","url","email"]),required:A.boolean(),defaultValue:A.string()}),TFt=A.object({id:A.string().min(1),name:A.string().min(1),description:A.string().min(1),deliveryTrigger:A.string().min(1),fields:A.array(SFt),availableFormats:A.array(A.enum(["html","text"]))}),bFt=A.object({templates:A.array(TFt)}),IFt=A.object({values:A.record(A.string(),A.string())}),CFt=A.object({subject:A.string().min(1),html:A.string().optional(),text:A.string().optional()}),vFt=A.object({to:A.string().email().describe("Recipient email address."),values:A.record(A.string(),A.string())}),RFt=A.object({id:A.string().min(1)}),Qx=A.enum(cee),VGe=A.object({workspace_scope:A.boolean(),review:A.boolean(),shared_thread_ttl_days:A.number().int().positive().nullable()}),Zie=A.object({subject_type:A.enum(["user","organization"]),subject_id:A.string().min(1),effective_plan:Qx,admin_override:Qx.nullable(),stripe_subscription_status:A.string().nullable(),cancel_at_period_end:A.boolean(),current_period_end:A.string().nullable(),seat_quantity:A.number().int().positive(),member_count:A.number().int().nonnegative().nullable(),features:VGe}),xFt=A.object({effective_plan:Qx,features:VGe,user:Zie,organization:Zie.nullable()}),DFt=A.object({plan:A.enum(["creator","team"]),seat_quantity:A.number().int().positive().optional()}),NFt=A.object({checkout_url:A.string().min(1)}),BFt=A.object({portal_url:A.string().min(1)}),wFt=A.object({seat_quantity:A.number().int().positive()}),xGe=A.object({plan:Qx.nullable()}),Mz=A.object({subject_type:A.enum(["user","organization"]),subject_id:A.string().min(1),label:A.string().min(1),effective_plan:Qx,admin_override:Qx.nullable(),stripe_subscription_status:A.string().nullable(),seat_quantity:A.number().int().positive()}),OFt=A.object({users:A.array(Mz),organizations:A.array(Mz)}),kFt=A.object({id:A.string().min(1),display_name:A.string().min(1),handle:A.string().nullable(),avatar_url:A.string().nullable()}),PFt=A.object({thread_id:A.string().min(1),title:A.string().min(1),author:kFt,last_active_at:A.string().datetime(),last_block_excerpt:A.string().nullable(),last_block_kind:A.string().min(1).nullable(),is_streaming:A.boolean()}),MFt=A.object({type:A.literal("list"),list_type:A.literal("live_thread"),objects:A.array(PFt)}),LFt=A.object({thread_id:A.string().min(1)}),UFt=A.object({thread_id:A.string().min(1),last_seen_at:A.string().datetime(),started_at:A.string().datetime()}),QFt=A.object({user_id:A.string().min(1),organization_id:A.string().min(1).nullable(),last_seen_at:A.string().datetime(),started_at:A.string().datetime()}),FFt=A.object({upload_completed:A.boolean().optional().describe("When true, also bump last_upload_at \u2014 the daemon completed an upload pass.")}),GFt=A.object({last_seen_at:A.string().datetime(),last_upload_at:A.string().datetime().nullable(),started_at:A.string().datetime()}),jFt=A.object({follower_id:A.string().min(1),followee_id:A.string().min(1),is_following:A.literal(!0),follower_count:A.number().int().nonnegative()}),zFt=A.object({follower_id:A.string().min(1),followee_id:A.string().min(1),is_following:A.literal(!1),follower_count:A.number().int().nonnegative()}),e0=A.object({id:A.string().min(1),display_name:A.string().min(1),handle:A.string().nullable(),avatar_url:A.string().nullable(),bio:A.string().max(280).nullable(),is_following:A.boolean(),is_self:A.boolean()}),DGe=A.object({type:A.literal("list"),list_type:A.literal("user_follow"),objects:A.array(e0)}),HFt=e0.extend({mutuals:A.array(e0),mutual_count:A.number().int().nonnegative()}),$Ft=A.object({type:A.literal("list"),list_type:A.literal("follow_suggestion"),objects:A.array(HFt)}),qFt=e0.extend({referred_at:A.string().min(1)}),VFt=A.object({type:A.literal("list"),list_type:A.literal("referral"),count:A.number().int().nonnegative(),recent:A.array(qFt)}),YFt=A.object({date:A.string().regex(/^\d{4}-\d{2}-\d{2}$/),referred:A.number().int().nonnegative(),total:A.number().int().nonnegative()}),KFt=A.object({inviter:e0,organization_name:A.string().nullable(),referred_count:A.number().int().positive(),latest_referred_at:A.string().min(1)}),JFt=A.object({inviter:e0,referee:e0,attributed_at:A.string().min(1)}),ZFt=A.object({total_referred_signups:A.number().int().nonnegative(),active_inviters:A.number().int().nonnegative(),referred_signups_last_30d:A.number().int().nonnegative(),total_signups_last_30d:A.number().int().nonnegative(),daily_counts:A.array(YFt),top_inviters:A.array(KFt),recent_attributions:A.array(JFt)}),WFt=A.object({source:A.string().min(1),signups:A.number().int().nonnegative()}),XFt=A.object({sources:A.array(WFt),total_with_source:A.number().int().nonnegative(),total_without_source:A.number().int().nonnegative()}),e4t=A.object({date:A.string().regex(/^\d{4}-\d{2}-\d{2}$/),count:A.number().int().nonnegative()}),t4t=A.object({window_start:A.string().datetime(),window_end:A.string().datetime(),total_contributions:A.number().int().nonnegative(),days_active:A.number().int().nonnegative(),daily_average:A.number().nonnegative(),current_streak_days:A.number().int().nonnegative(),days:A.array(e4t)}),n4t=A.object({type:A.literal("thread_created"),occurred_at:A.string().datetime(),id:A.string().min(1),thread:A.object({id:A.string().min(1),title:A.string(),visibility:A.enum(["private","workspace","public"])})}),r4t=A.object({type:A.literal("thread_updated"),occurred_at:A.string().datetime(),id:A.string().min(1),thread:A.object({id:A.string().min(1),title:A.string(),visibility:A.enum(["private","workspace","public"])})}),o4t=A.object({type:A.literal("comment_posted"),occurred_at:A.string().datetime(),id:A.string().min(1),comment_excerpt:A.string(),thread:A.object({id:A.string().min(1),title:A.string(),visibility:A.enum(["private","workspace","public"])})}),i4t=A.object({type:A.literal("project_published"),occurred_at:A.string().datetime(),id:A.string().min(1),project:A.object({id:A.string().min(1),name:A.string().min(1)})}),s4t=A.object({type:A.literal("user_followed"),occurred_at:A.string().datetime(),id:A.string().min(1),followee:e0}),a4t=A.discriminatedUnion("type",[n4t,r4t,o4t,i4t,s4t]),u4t=A.object({type:A.literal("list"),list_type:A.literal("user_activity"),objects:A.array(a4t)}),c4t=A.object({id:A.string().min(1),name:A.string().min(1),excerpt:A.string(),published_at:A.string().datetime(),updated_at:A.string().datetime()}),l4t=A.object({type:A.literal("list"),list_type:A.literal("profile_published_project"),objects:A.array(c4t)}),NGe=A.object({id:A.string().min(1),published_at:A.string().datetime().nullable()}),d4t=A.enum(["avatar","banner"]),YGe=A.enum(["image/png","image/jpeg","image/webp","image/gif"]),p4t=A.object({kind:d4t,content_type:YGe,base64_data:A.string().min(1)}),f4t=A.object({substrate:A.enum(["s3","filesystem"]),storage_url:A.string().min(1)}),m4t=A.object({content_type:YGe,base64_data:A.string().min(1)}),A4t=A.object({cover_status:tse,cover_url:A.string().min(1),cover_url_expires_at:A.string().min(1),cover_generated_at:A.string().min(1)}),g4t=kGe,Qz=wLt.router({health:{method:"GET",path:"/health",responses:{200:A.object({status:A.literal("ok")})},summary:"Health check"},getDeepHealth:{method:"GET",path:"/health/deep",responses:{200:A.object({status:A.enum(["ok","degraded"]),environment:A.string(),checks:A.object({database:A.object({ok:A.boolean(),latencyMs:A.number().int().nonnegative().optional(),error:A.string().optional()}),migrations:A.object({ok:A.boolean(),appliedCount:A.number().int().nonnegative(),pendingCount:A.number().int().nonnegative(),latestApplied:A.string().optional(),pending:A.array(A.string())}),storage:A.object({ok:A.boolean(),bucket:A.string().optional(),error:A.string().optional()})})}),503:A.object({status:A.literal("down"),environment:A.string(),error:A.string()})},summary:"Diagnostic health check covering database connectivity, migration drift, and storage reachability. Used by smoke tests and operators; NOT wired into Railway healthcheckPath."},whoAmI:{method:"GET",path:"/whoami",headers:A.object({authorization:A.string().min(1).optional(),"x-lore-referral-token":A.string().min(1).max(16).optional(),"x-lore-invited-by-user-id":A.string().min(1).max(40).optional(),"user-agent":A.string().min(1).max(1024).optional()}),responses:{200:QLt,401:q,500:q,502:q},summary:"Validate a WorkOS Bearer token and return member plus user fields"},getCliAuthConfig:{method:"GET",path:"/cli-auth/config",responses:{200:yGe,503:q},summary:"Return public WorkOS CLI Auth configuration for the Lore CLI"},getDesktopAuthConfig:{method:"GET",path:"/desktop-auth/config",responses:{200:yGe,503:q},summary:"Return public WorkOS configuration for the Lore desktop app (dedicated native client, separate from the web/CLI client)"},getCliStatus:{method:"GET",path:"/users/me/cli-status",headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:xUt,401:q},summary:"Return whether the viewer has connected the Lore CLI (i.e., uploaded any thread under a non-unspecified harness), plus the latest upload timestamp."},recordHeartbeat:{method:"POST",path:"/heartbeat",headers:A.object({authorization:A.string().min(1).optional()}),body:LFt,responses:{200:UFt,401:q,403:q,404:q,422:q},summary:"Record (or refresh) a presence heartbeat for the authenticated user against one of their own threads. Idempotent; the daemon should call this every ~30s while a session is open."},recordProductPresence:{method:"POST",path:"/users/me/presence",headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{200:QFt,401:q},summary:"Record (or refresh) an authenticated Lore web-app presence heartbeat for the current user. Browser clients call this while the product is open."},recordCliHeartbeat:{method:"POST",path:"/users/me/cli-heartbeat",headers:A.object({authorization:A.string().min(1).optional()}),body:FFt,responses:{200:GFt,401:q},summary:"Record a liveness heartbeat for the authenticated user's CLI watch daemon. Idempotent; the daemon calls this ~every 60s and on each completed upload (upload_completed:true). Daemon-internal \u2014 not a `lore` subcommand."},listLiveThreads:{method:"GET",path:"/threads/live",headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:MFt,401:q,403:q},summary:"List people with user-block activity in the last 10 minutes. Includes the viewer\u2019s workspace and followed authors, deduped per author, max 10."},listThreads:{method:"GET",path:"/threads",headers:A.object({authorization:A.string().min(1).optional()}),query:kQt,responses:{200:bGe,401:q},summary:"List threads visible to the authenticated user"},createThread:{method:"POST",path:"/threads",headers:A.object({authorization:A.string().min(1).optional()}),body:yQt,responses:{201:SQt,401:q},summary:"Create an empty Lore-native thread for the authenticated user"},getThread:{method:"GET",path:"/threads/:id",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:Dk,404:q},summary:"Load a visible thread by id"},getSimilarThreads:{method:"GET",path:"/threads/:id/similar",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:bGe,404:q,409:q},summary:"List the top 20 visible threads with the closest summary embedding"},resolveThreadShareHighlight:{method:"POST",path:"/threads/:id/share-highlight",pathParams:A.object({id:A.string().min(1).describe("Thread id to share")}),headers:A.object({authorization:A.string().min(1).optional()}),body:_Qt,responses:{200:EQt,401:q,404:q,409:q},summary:"Resolve a natural-language share highlight to a canonical /thread URL with block anchors"},askThreads:{method:"POST",path:"/threads/ask",headers:A.object({authorization:A.string().min(1).optional()}),body:sQt,responses:{200:lQt,401:q},summary:"Answer a question from the top 20 visible decision matches, grouped back into threads"},forkThread:{method:"POST",path:"/threads/:id/fork",pathParams:A.object({id:A.string().min(1).describe("Thread id or stable harness lookup id to fork")}),headers:A.object({authorization:A.string().min(1).optional()}),body:oQt,responses:{200:iQt,403:q,404:q},summary:"Generate a distilled source handoff for continuing a visible coding-assistant session"},listThreadBlocks:{method:"GET",path:"/threads/:id/blocks",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),query:OQt,responses:{200:ese,401:q},summary:"List blocks for a visible thread"},createThreadBlockCommentThread:{method:"POST",path:"/threads/:threadId/blocks/:blockId/comment-threads",pathParams:A.object({threadId:A.string().min(1),blockId:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:sUt,responses:{201:aUt,401:q,404:q},summary:"Create a new block-level comment thread on a visible thread block"},createThreadBlockComment:{method:"POST",path:"/threads/:threadId/blocks/:blockId/comment-threads/:commentThreadId/comments",pathParams:A.object({threadId:A.string().min(1),blockId:A.string().min(1),commentThreadId:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:lUt,responses:{201:dUt,401:q,404:q,409:q},summary:"Reply to a block-level comment thread on a visible thread block"},updateThreadBlockCommentThread:{method:"PATCH",path:"/threads/:threadId/blocks/:blockId/comment-threads/:commentThreadId",pathParams:A.object({threadId:A.string().min(1),blockId:A.string().min(1),commentThreadId:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:mUt,responses:{200:AUt,401:q,404:q},summary:"Resolve or reopen a block-level comment thread on a visible thread block"},listSkills:{method:"GET",path:"/skills",headers:A.object({authorization:A.string().min(1).optional()}),query:MQt,responses:{200:UQt,401:q},summary:"List visible workspace skills and the viewer's private captured skills"},getSkillDetail:{method:"GET",path:"/skills/:id",pathParams:A.object({id:A.string().min(1).describe("Stable skill ID, e.g. sk_...")}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:IGe,401:q,404:q},summary:"Get visible skill details by stable skill ID"},getSkillRaw:{method:"GET",path:"/skills/:id/raw",pathParams:A.object({id:A.string().min(1).describe("Stable skill ID, e.g. sk_...")}),query:A.object({version:A.coerce.number().int().positive().optional().describe("Version timestamp to download. Defaults to latest accepted version.")}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:A.string(),401:q,403:q,404:q},summary:"Raw SKILL.md body for a skill (download / install path)"},installSkill:{method:"POST",path:"/skills/:id/installations",pathParams:A.object({id:A.string().min(1).describe("Workspace skill ID to install")}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{200:jQt,401:q,403:q,404:q},summary:"Register the current user as an installer of a visible skill"},uninstallSkill:{method:"DELETE",path:"/skills/:id/installation",pathParams:A.object({id:A.string().min(1).describe("Workspace skill ID to uninstall")}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{200:CGe,401:q},summary:"Unregister the current user installation for a skill (idempotent)"},updateSkillInstallation:{method:"PATCH",path:"/skills/installations/:id",pathParams:A.object({id:A.string().min(1).describe("Stable skill installation ID, e.g. ski_...")}),headers:A.object({authorization:A.string().min(1).optional()}),body:zQt,responses:{200:CGe,401:q,404:q,422:q},summary:"Record the accepted skill version installed by the current user"},listSkillInstallationSync:{method:"GET",path:"/skills/installations/sync",headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:qQt,401:q},summary:"List installed skills with latest accepted version metadata"},publishSkill:{method:"POST",path:"/skills/:id/publish",pathParams:A.object({id:A.string().min(1).describe("Private captured skill ID to publish")}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{200:IGe,401:q,403:q,404:q},summary:"Promote a private captured skill to the caller workspace"},approveSkillVersion:{method:"POST",path:"/skills/:id/versions/:version/approve",pathParams:A.object({id:A.string().min(1).describe("Workspace skill ID"),version:A.coerce.number().int().positive().describe("Proposed version timestamp to approve")}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{200:vGe,400:q,401:q,403:q,404:q},summary:"Approve a proposed skill version and make it latest accepted"},rejectSkillVersion:{method:"POST",path:"/skills/:id/versions/:version/reject",pathParams:A.object({id:A.string().min(1).describe("Workspace skill ID"),version:A.coerce.number().int().positive().describe("Proposed version timestamp to reject")}),headers:A.object({authorization:A.string().min(1).optional()}),body:HQt.optional(),responses:{200:vGe,400:q,401:q,403:q,404:q},summary:"Reject a proposed skill version with an optional owner reason"},redactThreadBlock:{method:"POST",path:"/threads/:threadId/blocks/:blockId/redactions",pathParams:A.object({threadId:A.string().min(1),blockId:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:PQt,responses:{200:xk,401:q,403:q,404:q,422:q},summary:"Permanently redact a character range within a text field of a thread block (author only)"},updateThreadBlockText:{method:"PATCH",path:"/threads/:threadId/blocks/:blockId/text",pathParams:A.object({threadId:A.string().min(1),blockId:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:VQt,responses:{200:xk,401:q,403:q,404:q,422:q},summary:"Replace a single text leaf in a thread block with new content (author only)"},critiqueThreadBlock:{method:"POST",path:"/threads/:threadId/blocks/:blockId/critique",pathParams:A.object({threadId:A.string().min(1),blockId:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{200:xk,401:q,403:q,404:q,409:q,422:q},summary:"Critique a plan block once and persist its annotations as nested comment threads (author only)"},listThreadBlockEdits:{method:"GET",path:"/threads/:threadId/blocks/:blockId/edits",pathParams:A.object({threadId:A.string().min(1),blockId:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:JQt,401:q,404:q},summary:"List edits made to a thread block (visible to anyone who can see the thread)"},listThreadDecisions:{method:"GET",path:"/threads/:id/decisions",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:rQt,401:q,404:q},summary:"List AI-extracted user decisions for a thread, in chronological order"},updateThread:{method:"PATCH",path:"/threads/:id",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:TQt,responses:{200:Dk,401:q,403:q,404:q},summary:"Update thread visibility (author only)"},deleteThread:{method:"DELETE",path:"/threads/:id",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{204:A.null(),401:q,403:q,404:q},summary:"Soft-delete a thread (author only)"},generateThreadCard:{method:"POST",path:"/threads/:id/card/generate",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{200:A.object({cover_status:tse,how_to_status:zGe}),401:q,403:q,404:q,429:q.extend({retry_after_seconds:A.number().int().nonnegative()})},summary:"Enqueue cover image + how-to recipe generation for the thread. Author-only. Idempotent \u2014 recently-fired statuses are not double-enqueued. Rate-limited: at most one cover generation per minute per thread (cooldown begins when the previous cover finishes). Used to populate cards on legacy threads (created before Lore Cards) and to retry after a 'failed' status or opt back in from 'disabled'."},uploadThreadCover:{method:"POST",path:"/threads/:id/card/cover/upload",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:m4t,responses:{200:A4t,401:q,403:q,404:q,413:q,422:q},summary:"Upload a custom cover image for a thread. Author or Tanagram admin only. Bytes go to the same storage substrate the AI cover uses (S3 in prod, filesystem in dev), and the threads row is updated atomically with the new cover_storage_url, cover_status='ready', cover_generated_at=now, cover_model='user-uploaded' so subsequent re-rolls / how-to fan-outs treat the upload like any other ready cover."},castThreadVote:{method:"PUT",path:"/threads/:id/vote",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:LUt,responses:{200:TGe,401:q,403:q,404:q,422:q},summary:"Cast or change the caller's up/down vote on a public thread. Idempotent \u2014 re-casting the same value is a no-op."},clearThreadVote:{method:"DELETE",path:"/threads/:id/vote",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{200:TGe,401:q,404:q},summary:"Clear the caller's vote on a thread. No-op when the caller hasn't voted."},listThreadComments:{method:"GET",path:"/threads/:threadId/comments",pathParams:A.object({threadId:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:QUt,403:q,404:q},summary:"List all (live + soft-deleted as tombstones) comments on a public thread, flat with parent_comment_id pointers."},createThreadComment:{method:"POST",path:"/threads/:threadId/comments",pathParams:A.object({threadId:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:FUt,responses:{201:GUt,401:q,403:q,404:q,422:q},summary:"Post a top-level or reply comment on a public thread."},updateThreadComment:{method:"PATCH",path:"/threads/:threadId/comments/:commentId",pathParams:A.object({threadId:A.string().min(1),commentId:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:jUt,responses:{200:zUt,401:q,403:q,404:q,422:q},summary:"Edit your own thread comment (author only; rejects edits to soft-deleted rows)."},deleteThreadComment:{method:"DELETE",path:"/threads/:threadId/comments/:commentId",pathParams:A.object({threadId:A.string().min(1),commentId:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{200:HUt,401:q,403:q,404:q},summary:"Soft-delete your own thread comment (author only). Idempotent."},getThreadPreview:{method:"GET",path:"/threads/:id/preview",pathParams:A.object({id:A.string().min(1)}),responses:{200:bQt,404:q},summary:"Unauthenticated, visibility-redacted metadata for OG / social preview consumers"},getUser:{method:"GET",path:"/users/:id",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:kGe,404:q},summary:"Public profile for a user. Optional auth \u2014 unauthenticated viewers see only public thread metadata; signed-in viewers see counts scoped to the threads they'd normally be able to access."},updateCurrentUser:{method:"PATCH",path:"/users/me",headers:A.object({authorization:A.string().min(1).optional()}),body:FLt,responses:{200:OGe,401:q,409:q,422:q},summary:"Update the authenticated user profile"},getUserByHandle:{method:"GET",path:"/users/by-handle/:handle",pathParams:A.object({handle:BGe}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:g4t,404:q},summary:"Resolve a public profile by handle \u2014 same shape as GET /users/:id but keyed on the user's chosen handle."},listMyReferrals:{method:"GET",path:"/users/me/referrals",headers:A.object({authorization:A.string().min(1)}),responses:{200:VFt,401:q},summary:"Total count plus the most-recent referees the authenticated user has attributed via `/?invited_by=\u2026` invite links. Mirrors the inviter side of users.referred_by_user_id."},listUserActivity:{method:"GET",path:"/users/:id/activity",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),query:A.object({limit:A.coerce.number().int().positive().max(100).optional()}),responses:{200:u4t,404:q},summary:"Reverse-chronological activity feed for a user, scoped to what the viewer can see (same visibility rules as listThreads)."},getUserContributions:{method:"GET",path:"/users/:id/contributions",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:t4t,404:q},summary:"Daily contribution counts for the trailing 365 days \u2014 counts thread blocks the user authored on threads visible to the viewer."},listUserFollowers:{method:"GET",path:"/users/:id/followers",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:DGe,404:q},summary:"List the users following a given user."},listUserFollowing:{method:"GET",path:"/users/:id/following",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:DGe,404:q},summary:"List the users a given user is following."},listFollowSuggestions:{method:"GET",path:"/users/:id/follow-suggestions",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:$Ft,404:q},summary:"Mutual-follow suggestions for a viewer: walks the viewer's followees one hop further and ranks candidates by mutual count. Replaces a 1 \u2192 24 client-side fan-out across `/users/:seed/following`."},followUser:{method:"POST",path:"/users/:id/follow",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{200:jFt,401:q,404:q,409:q,422:q},summary:"Follow another user. Idempotent \u2014 repeating the call is a no-op."},unfollowUser:{method:"DELETE",path:"/users/:id/follow",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{200:zFt,401:q,404:q},summary:"Unfollow a user. Idempotent \u2014 repeating the call is a no-op."},listProfilePublishedProjects:{method:"GET",path:"/users/:id/projects",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:l4t,404:q},summary:"Projects the user has published to their public profile."},publishProject:{method:"POST",path:"/projects/:id/publish",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{200:NGe,401:q,403:q,404:q},summary:"Publish a project to the author's public profile. Stamps published_at with `now()`. Author-only."},unpublishProject:{method:"DELETE",path:"/projects/:id/publish",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{200:NGe,401:q,403:q,404:q},summary:"Remove a project from the author's public profile."},uploadProfileImage:{method:"POST",path:"/users/me/profile-image",headers:A.object({authorization:A.string().min(1).optional()}),body:p4t,responses:{200:f4t,401:q,413:q,422:q},summary:"Upload an avatar or banner image (base64-encoded JSON body). The API streams the bytes to its configured storage substrate using its own credentials and returns the canonical storage URL the client passes to PATCH /users/me."},listOrganizationMembers:{method:"GET",path:"/organization/members",headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:jLt,401:q},summary:"List members of the authenticated user\u2019s organization"},createOrganizationInvite:{method:"POST",path:"/organization/invites",headers:A.object({authorization:A.string().min(1).optional()}),body:zLt,responses:{201:HLt,401:q,403:q,409:q,422:q},summary:"Invite a teammate to the authenticated user\u2019s workspace via WorkOS AuthKit"},ensureWorkOSOrganization:{method:"POST",path:"/organization/workos/ensure",headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{200:$Lt,401:q,422:q,503:q},summary:"Create or reuse a WorkOS organization for the authenticated user\u2019s non-public email domain and add the user as a member."},listRepositories:{method:"GET",path:"/repositories",headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:CUt,401:q,403:q},summary:"List repositories known to the authenticated user\u2019s organization across threads and building blocks"},createBuildingBlockSnapshots:{method:"POST",path:"/building_blocks",headers:A.object({authorization:A.string().min(1).optional()}),body:XLt,responses:{201:yUt,401:q,403:q},summary:"Create building block snapshots for the authenticated user\u2019s organization"},getPlan:{method:"GET",path:"/plans/:id",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:hUt,401:q,403:q,404:q},summary:"Load a thread-backed plan container visible to the authenticated user, including all visible plan revisions in that thread (only the latest revision carries body + prosemirror_json; older revisions are metadata-only and load on demand via getPlanRevision)"},getPlanRevision:{method:"GET",path:"/plans/:id/revisions/:revisionId",pathParams:A.object({id:A.string().min(1),revisionId:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:gUt,401:q,403:q,404:q},summary:"Load a single revision body + prosemirror_json + comment threads for a thread-backed plan container. Used to fetch non-latest revisions on demand without paying for every revision when the plan is first opened"},createPlanCommentThread:{method:"POST",path:"/plans/:id/comment-threads",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:oUt,responses:{201:iUt,401:q,403:q,404:q,422:q},summary:"Create a new inline comment thread on a specific revision inside a thread-backed plan container"},createPlanComment:{method:"POST",path:"/plans/:id/comment-threads/:threadId/comments",pathParams:A.object({id:A.string().min(1),threadId:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:uUt,responses:{201:cUt,401:q,403:q,404:q,409:q},summary:"Reply to an inline comment thread on a thread-backed plan container"},updatePlanCommentThread:{method:"PATCH",path:"/plans/:id/comment-threads/:threadId",pathParams:A.object({id:A.string().min(1),threadId:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:pUt,responses:{200:fUt,401:q,403:q,404:q},summary:"Resolve or reopen an inline comment thread on a thread-backed plan container"},listPlans:{method:"GET",path:"/plans",headers:A.object({authorization:A.string().min(1).optional()}),query:EUt,responses:{200:_Ut,401:q,403:q},summary:"List thread-backed plan containers visible to the authenticated user in their organization, ordered by latest visible revision and optionally filtered by author or repository"},listBuildingBlockSnapshots:{method:"GET",path:"/building_blocks",headers:A.object({authorization:A.string().min(1).optional()}),query:TUt,responses:{200:SUt,401:q,403:q},summary:"List building block snapshots for the authenticated user\u2019s organization and repo origin path"},listUploadSessions:{method:"GET",path:"/upload_sessions",headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:wQt,401:q},summary:"List recent upload sessions for the authenticated user"},createUploadSession:{method:"POST",path:"/upload_sessions",headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({thread_files:A.array(OUt).optional(),skill_files:A.array(wUt).optional()}),responses:{201:hQt,400:q,401:q},summary:"Create an upload session with presigned URLs for file uploads"},completeUploadSession:{method:"POST",path:"/upload_sessions/:id/complete",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({thread_files:A.array(dQt).optional(),skill_files:A.array(pQt).optional()}),responses:{200:mQt,400:q,401:q,404:q,409:q,422:q},summary:"Complete an upload session after files have been uploaded to storage"},adminStats:{method:"GET",path:"/admin/stats",headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:ZQt,401:q,403:q},summary:"Cross-org operational counts. Tanagram admins only."},adminListOrganizations:{method:"GET",path:"/admin/organizations",headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:XQt,401:q,403:q},summary:"List every organization with member and thread counts. Tanagram admins only."},adminListUsers:{method:"GET",path:"/admin/users",query:tFt,headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:oFt,401:q,403:q},summary:"List every user with their org memberships and thread count. Tanagram admins only."},adminListThreads:{method:"GET",path:"/admin/threads",headers:A.object({authorization:A.string().min(1).optional()}),query:uFt,responses:{200:aFt,401:q,403:q},summary:"List live threads across every organization. Tanagram admins only."},adminLookupThread:{method:"GET",path:"/admin/threads/lookup",headers:A.object({authorization:A.string().min(1).optional()}),query:cFt,responses:{200:sFt,400:q,401:q,403:q,404:q},summary:"Look up a thread by thread id, thread file id, or harness session id. Tanagram admins only."},adminForceFollow:{method:"POST",path:"/admin/connections/follow",headers:A.object({authorization:A.string().min(1).optional()}),body:nFt,responses:{200:rFt,401:q,403:q,404:q,422:q},summary:"Force follower->followee edge. Admin-only and non-destructive."},adminHardDeleteThread:{method:"DELETE",path:"/admin/threads/:id",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{204:A.null(),401:q,403:q,404:q},summary:"Permanently remove a thread. Tanagram admins only."},adminReparseThreadFile:{method:"POST",path:"/admin/thread-files/:id/reparse",pathParams:A.object({id:A.string().min(1).describe("Thread file id, e.g. tf_xxx.")}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{200:lFt,401:q,403:q,404:q},summary:"Re-enqueue parsing for a thread file. Tanagram admins only."},listCardFeed:{method:"GET",path:"/cards/feed",query:A.object({limit:A.coerce.number().int().min(1).max(48).optional()}),responses:{200:eQt},summary:"Slim feed of public threads with a ready cover image, ordered by cover_generated_at descending. Powers the landing-page UGC card scroll. Returns presigned cover URLs inline so the grid renders without a follow-up round trip per card."},listDiscoverThreads:{method:"GET",path:"/discover/threads",headers:A.object({authorization:A.string().min(1).optional()}),query:DQt,responses:{200:xQt},summary:"Feed of public threads with sort, harness filter, search, and cursor pagination. Auth is optional and populates viewer_vote."},discoverStats:{method:"GET",path:"/discover/stats",responses:{200:NQt},summary:"Unauthenticated rollup of public-thread counts for the Discover header."},createWaitlistEntry:{method:"POST",path:"/waitlist_entries",body:qLt,responses:{201:KLt,409:q},summary:"Create an unauthenticated waitlist entry keyed by (location, contact)."},submitContactMessage:{method:"POST",path:"/contact",body:VLt,responses:{200:YLt,429:q,503:q},summary:"Submit a contact-form message from the marketing site; emails the Lore team."},createFeedback:{method:"POST",path:"/feedback",headers:A.object({authorization:A.string().min(1).optional()}),body:JLt,responses:{201:ZLt,401:q,422:q,429:q},summary:"Submit in-app feedback. Persists to lore.feedback_entries and best-effort posts to the #lore-feedback Slack channel. Rate-limited to 30 submissions/hour per user."},createShareToken:{method:"POST",path:"/threads/:id/share-token",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({}).optional(),responses:{201:RGe,401:q,403:q,404:q,409:q},summary:"Mint a short share-link token for a public thread. Author only. The token powers `/s/:token` short URLs and enables k-factor attribution."},resolveShareToken:{method:"GET",path:"/referrals/resolve/:token",pathParams:A.object({token:A.string().min(1).max(16)}),headers:A.object({authorization:A.string().min(1).optional()}),query:dFt,responses:{200:RGe,404:q},summary:"Resolve a share-link token to its thread and record the view. Works for signed-out viewers; if a bearer token is present we attribute the view to that Lore user for analytics."},adminGrowth:{method:"GET",path:"/admin/growth",headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:mFt,401:q,403:q},summary:"Share-link k-factor, funnel, sparkline, and top sharers by window. Tanagram admins only."},adminActiveUsers:{method:"GET",path:"/admin/active-users",headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:AFt,401:q,403:q},summary:"DAU/WAU/MAU/all-time active-user buckets \u2014 union of oauth token issuance and thread-event spine. Tanagram admins only."},adminReferrals:{method:"GET",path:"/admin/referrals",headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:ZFt,401:q,403:q},summary:"Cross-organization invite-link funnel: lifetime + 30-day counts, 60-day daily timeseries, top inviters, recent attributions. Tanagram admins only."},adminOnboardingSources:{method:"GET",path:"/admin/onboarding/sources",headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:XFt,401:q,403:q},summary:"Signed-up persons grouped by PostHog `initial_source` first-touch attribution. Powers bucket 1 of /admin's Onboarding flow tab; sourced via HogQL."},adminRunCritiquePlayground:{method:"POST",path:"/admin/critique-playground/run",headers:A.object({authorization:A.string().min(1).optional()}),body:EFt,responses:{200:yFt,401:q,403:q,409:q},summary:"Admin-only critique playground that saves markdown to a file:// plan artifact and returns parsed + critiqued plan blocks."},adminListEmailTemplates:{method:"GET",path:"/admin/email-templates",headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:bFt,401:q,403:q},summary:"List transactional email templates and their editable preview fields. Tanagram admins only."},adminPreviewEmailTemplate:{method:"POST",path:"/admin/email-templates/:id/preview",pathParams:A.object({id:A.string().min(1).describe("Email template id.")}),headers:A.object({authorization:A.string().min(1).optional()}),body:IFt,responses:{200:CFt,400:q,401:q,403:q,404:q},summary:"Render a transactional email template with supplied values. Tanagram admins only."},adminSendEmailTemplate:{method:"POST",path:"/admin/email-templates/:id/send",pathParams:A.object({id:A.string().min(1).describe("Email template id.")}),headers:A.object({authorization:A.string().min(1).optional()}),body:vFt,responses:{200:RFt,400:q,401:q,403:q,404:q,503:q},summary:"Send a transactional email template through Resend. Tanagram admins only."},getBillingState:{method:"GET",path:"/billing/state",headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:xFt,401:q},summary:"Resolve the caller's plan, features, seat count, and any admin override."},createBillingCheckout:{method:"POST",path:"/billing/checkout",headers:A.object({authorization:A.string().min(1).optional()}),body:DFt,responses:{200:NFt,400:q,401:q,403:q,503:q},summary:"Start a Stripe Checkout session for Creator ($29/mo) or Team ($19/seat/mo, min 2)."},createBillingPortal:{method:"POST",path:"/billing/portal",headers:A.object({authorization:A.string().min(1).optional()}),body:A.object({subject_type:A.enum(["user","organization"]).default("user")}).optional(),responses:{200:BFt,401:q,404:q,503:q},summary:"Open the Stripe customer portal so the subject can manage their subscription."},updateTeamSeats:{method:"PATCH",path:"/billing/team-seats",headers:A.object({authorization:A.string().min(1).optional()}),body:wFt,responses:{200:Zie,400:q,401:q,403:q,404:q,503:q},summary:"Adjust the caller-organization's Team seat quantity (admin of that org only)."},adminListBilling:{method:"GET",path:"/admin/billing",headers:A.object({authorization:A.string().min(1).optional()}),responses:{200:OFt,401:q,403:q},summary:"List every user and org with current plan + override for the admin panel."},adminSetUserPlanOverride:{method:"PUT",path:"/admin/billing/users/:id/override",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:xGe,responses:{200:Mz,401:q,403:q,404:q},summary:"Admin override for a user's plan tier. Null clears the override."},adminSetOrganizationPlanOverride:{method:"PUT",path:"/admin/billing/organizations/:id/override",pathParams:A.object({id:A.string().min(1)}),headers:A.object({authorization:A.string().min(1).optional()}),body:xGe,responses:{200:Mz,401:q,403:q,404:q},summary:"Admin override for an organization's plan tier. Null clears the override."},projects:pGe,regions:gGe,entities:sGe,docs:nGe,mentions:lGe,favorites:cGe,search:_Ge},{pathPrefix:"/api"})});import{AsyncLocalStorage as h4t}from"node:async_hooks";import ch from"node:fs/promises";import JGe from"node:path";function S4t(e){return JGe.join(e,"tokens-refresh.lock")}async function Bk(e,t,n={}){let r=KGe.getStore();if(r?.has(e))return t();let o=n.waitMs??_4t,i=n.staleMs??E4t,s=n.now??Date.now,u=n.sleep??(v=>new Promise(R=>setTimeout(R,v))),l=S4t(e),f=JGe.join(l,"owner"),h=`${process.pid}:${Date.now()}:${Math.random().toString(36).slice(2)}`,_=s(),y=!1;for(;!y;)try{await ch.mkdir(e,{recursive:!0,mode:448}),await ch.chmod(e,448).catch(()=>{}),await ch.mkdir(l,{mode:448});try{await ch.writeFile(f,h,{mode:384})}catch(v){throw await ch.rm(l,{recursive:!0,force:!0}),v}y=!0}catch(v){if(!T4t(v))throw v;if(await b4t(l,i,s)){await ch.rm(l,{recursive:!0,force:!0});continue}if(s()-_>=o)throw new Error(`Timed out waiting for OAuth token refresh lock at ${l}`);await u(Math.min(y4t,o))}let T=new Set(r??[]);T.add(e);try{return await KGe.run(T,t)}finally{await I4t(l,f,h)}}function ZGe(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="ENOENT"}function T4t(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="EEXIST"}async function b4t(e,t,n){try{let r=await ch.stat(e);return n()-r.mtimeMs>=t}catch(r){if(ZGe(r))return!1;throw r}}async function I4t(e,t,n){try{if(await ch.readFile(t,"utf8")!==n)return}catch(r){if(!ZGe(r))throw r}await ch.rm(e,{recursive:!0,force:!0})}var KGe,_4t,E4t,y4t,iGn,sGn,aGn,uGn,cGn,lGn,Fz,nse=w(()=>{"use strict";m();pc();KGe=new h4t,_4t=3e4,E4t=6e4,y4t=100,iGn=process.env.LORE_PLUGIN_AUTHKIT_CLIENT_ID?.trim()||process.env.PLUGIN_AUTHKIT_CLIENT_ID?.trim()||"client_01KRSDB9SR20N7MB0D9MPS05Q6",sGn=process.env.LORE_CLI_AUTHKIT_CLIENT_ID?.trim()||process.env.CLI_AUTHKIT_CLIENT_ID?.trim()||"client_01KV6K8BBANC2J3998K4DG9840",aGn=A.object({resource:A.string(),endpoints:A.object({audience:A.string(),deviceAuthorizationEndpoint:A.string(),tokenEndpoint:A.string(),authorizationEndpoint:A.string()}),fetchedAt:A.number(),prmEtag:A.string().optional()}),uGn=A.object({resource:A.string().min(1,"`resource` must be a non-empty string"),authorization_servers:A.array(A.string())}),cGn=A.object({issuer:A.string().min(1,"`issuer` must be a non-empty string"),token_endpoint:A.string().min(1,"`token_endpoint` must be a non-empty string"),authorization_endpoint:A.string().optional()}),lGn=A.object({access_token:A.string().min(1),refresh_token:A.string().min(1),expires_in:A.number().int().positive(),token_type:A.string().min(1),scope:A.string().optional()}),Fz=class extends Error{constructor(){super("OAuth refresh token is invalid or expired"),this.name="OAuthInvalidGrantError"}}});import hp from"node:fs";import C4t from"node:path";function rse(e){return C4t.join(e,"tokens.json")}function v4t(e){return`${e}.tmp.${process.pid}.${Date.now()}.${Math.random().toString(36).slice(2)}`}function eje(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="ENOENT"}function R4t(e,t){let n;try{n=JSON.parse(e)}catch(o){throw new Error(`tokens file at ${t} is not valid JSON: ${o.message}`)}if(typeof n=="object"&&n!==null&&"version"in n){let o=XGe.safeParse(n);if(!o.success)throw new Error(`tokens file at ${t} failed schema validation: ${o.error.message}`);return o.data}let r=Gz.safeParse(n);if(!r.success)throw new Error(`tokens file at ${t} failed schema validation: ${r.error.message}`);return N4t(r.data)}function x4t(e){let t=e.split(".");if(t.length<2||!t[1])return null;try{let n=JSON.parse(Buffer.from(t[1],"base64url").toString("utf8"));if(typeof n!="object"||n===null)return null;let r=n.iss;return typeof r=="string"&&r.length>0?r:null}catch{return null}}function D4t(e){let t=x4t(e.access_token);if(!t)return!1;let n;try{n=new URL(t).host.toLowerCase()}catch{return!1}return n!=="workos.com"&&!n.endsWith(".workos.com")}function N4t(e){let t={};return D4t(e)&&(t.plugin=e),{version:2,clients:t}}function B4t(e){return JSON.stringify(XGe.parse(e))}function ose(e){let t=rse(e),n;try{n=hp.readFileSync(t,"utf8")}catch(r){if(eje(r))return null;throw r}return R4t(n,t)}function tje(e,t){let n=rse(e);hp.mkdirSync(e,{recursive:!0,mode:448}),hp.chmodSync(e,448);let r=v4t(n),o=B4t(t),i;try{i=hp.openSync(r,"w",384),hp.writeSync(i,o),hp.fchmodSync(i,384),hp.fsyncSync(i),hp.closeSync(i),i=void 0,hp.renameSync(r,n)}catch(s){if(i!==void 0)try{hp.closeSync(i)}catch{}try{hp.unlinkSync(r)}catch{}throw s}}function ise(e,t){return ose(e)?.clients[t]??null}function w4t(e){try{return ose(e)??{version:2,clients:{}}}catch{return{version:2,clients:{}}}}function WGe(e){try{hp.rmSync(rse(e))}catch(t){if(!eje(t))throw t}}function nje(e,t,n){let r=w4t(e);r.clients[t]=Gz.parse(n),tje(e,r)}function sse(e,t){let n;try{n=ose(e)}catch{WGe(e);return}if(!(!n||!(t in n.clients))){if(delete n.clients[t],Object.keys(n.clients).length===0){WGe(e);return}tje(e,n)}}var Gz,XGe,ase=w(()=>{"use strict";m();pc();nse();Gz=A.object({access_token:A.string(),refresh_token:A.string(),expires_at:A.number().int(),scope:A.string().default("")}),XGe=A.object({version:A.literal(2),clients:A.record(A.string(),Gz).default({})})});import O4t from"node:fs";import oje from"node:os";import ije from"node:path";function k4t(e=oje.homedir()){return ije.join(e,"Library","Application Support","tanagram","lore","tokens.json")}function use(e){let t=e.split(".");if(t.length<2||!t[1])return null;let n;try{n=JSON.parse(Buffer.from(t[1],"base64url").toString("utf8"))}catch{return null}if(typeof n!="object"||n===null)return null;let r=n.exp;return typeof r=="number"?r*1e3:null}function rje(e){try{O4t.rmSync(e)}catch(t){if(!(typeof t=="object"&&t!==null&&"code"in t&&t.code==="ENOENT"))throw t}}function jz(e,t=oje.homedir()){for(let n of P4t)rje(ije.join(e,n));rje(k4t(t))}var P4t,sje=w(()=>{"use strict";m();ase();P4t=["token","refresh_token"]});var zz=w(()=>{"use strict";m();ase();sje();nse()});import{execFileSync as M4t}from"node:child_process";import{createHash as L4t}from"node:crypto";import wk from"node:os";import pa from"node:path";function Er(){if(to()==="dev"){let t=process.env.LORE_DEV_STATE_DIR?.trim();if(t)return pa.resolve(t.replace(/^~(?=$|\/)/,wk.homedir()));let n=U4t();if(n)return pa.join(wk.homedir(),`.lore-dev-${n}`)}let e=to()==="dev"?".lore-dev":".lore";return pa.join(wk.homedir(),e)}function U4t(){let e=aje(process.env.LORE_DEV_STACK_NAME??"");if(e)return e;let t=Q4t();return[aje(t.split(/[\\/]/).pop()||"lore"),F4t(t)].filter(Boolean).join("-").slice(0,63)}function Q4t(){try{return M4t("git",["rev-parse","--show-toplevel"],{encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim()}catch{return pa.resolve(process.cwd(),"../..")}}function F4t(e){return L4t("sha1").update(e).digest("hex").slice(0,8)}function aje(e){return e.toLowerCase().replace(/[^a-z0-9-]+/g,"-").replace(/^-+|-+$/g,"").slice(0,63)}function _p(){return pa.join(Er(),"cli.log.txt")}function cse(){return pa.join(Er(),"upload.log.txt")}function uje(){return pa.join(Er(),"upload-daemon.lock")}function lse(){return pa.join(Er(),"skill-sync.log.txt")}function dse(){return pa.join(Er(),"sync_state.json")}function MT(){return pa.join(Er(),"upload_filters.json")}function Hz(){return pa.join(Er(),"upload_dirs.json")}function Ok(){return pa.join(Er(),"status.json")}function Fx(){return pa.join(Er(),"quarantine")}function LT(){return pa.join(Er(),"install_source.json")}function UT(){return pa.join(Er(),"skill_sync_state.json")}function n0(){return pa.join(Er(),"bin","lore")}function r0(){let e=to();return e==="prod"?"ai.tanagram.lore":`ai.tanagram.lore.${e}`}function Gx(){return`${r0()}.skill-sync`}function jx(){return pa.join(wk.homedir(),"Library","LaunchAgents",`${r0()}.plist`)}function $z(){return pa.join(wk.homedir(),"Library","LaunchAgents",`${Gx()}.plist`)}var Mo=w(()=>{"use strict";m();sc()});import lje from"node:fs";function G4t(){let e=Er();cje!==e&&(lje.mkdirSync(e,{recursive:!0}),cje=e)}function j4t(e){let t=typeof e=="string"?e:JSON.stringify(e);return/[\s"=]/.test(t)?JSON.stringify(t):t}function z4t(e,t,n){let r=`${new Date().toISOString()} ${e} ${t}`;if(!n)return`${r}
105
105
  `;let o=Object.entries(n).map(([i,s])=>`${i}=${j4t(s)}`).join(" ");return o?`${r} ${o}
106
106
  `:`${r}
107
107
  `}function pse(e,t,n){try{let r=z4t(e,t,n);G4t(),lje.appendFileSync(_p(),r),to()==="dev"&&process.stderr.write(r)}catch{}H4t(e,t,n)}function H4t(e,t,n){try{Lw[e](t,$4t(n))}catch{}}function $4t(e){if(!e)return;let t={};for(let[n,r]of Object.entries(e))if(r!=null){if(typeof r=="string"||typeof r=="number"||typeof r=="boolean"){t[n]=r;continue}try{t[n]=JSON.stringify(r)}catch{t[n]=String(r)}}return t}var cje,$,Bn=w(()=>{"use strict";m();WR();sc();Mo();cje=null;$={info(e,t){pse("info",e,t)},warn(e,t){pse("warn",e,t)},error(e,t){pse("error",e,t)}}});import o0 from"node:fs";import qz from"node:path";function lh(){try{return ise(Er(),Vz)}catch(e){return $.warn("auth_load_tokens_failed",{stateDir:Er(),errorName:e instanceof Error?e.name:void 0,error:e instanceof Error?e.message:String(e)}),null}}function Yz(){try{return ise(Er(),q4t)}catch(e){return $.warn("auth_load_desktop_managed_tokens_failed",{stateDir:Er(),errorName:e instanceof Error?e.name:void 0,error:e instanceof Error?e.message:String(e)}),null}}function fse(){return qz.join(Er(),"analytics_distinct_id")}function dje(){let e;try{e=o0.readFileSync(fse(),"utf8")}catch(n){if(n&&typeof n=="object"&&"code"in n&&n.code==="ENOENT")return null;throw n}let t=e.trim();return t.length>0?t:null}function pje(e){let t=fse();o0.mkdirSync(qz.dirname(t),{recursive:!0,mode:448}),o0.writeFileSync(t,e,{mode:384})}function fje(){try{o0.rmSync(fse())}catch(e){if(e&&typeof e=="object"&&"code"in e&&e.code==="ENOENT")return;throw e}}function mse(){return qz.join(Er(),"analytics_person_properties.json")}function mje(){let e;try{e=o0.readFileSync(mse(),"utf8")}catch(t){if(t&&typeof t=="object"&&"code"in t&&t.code==="ENOENT")return null;throw t}try{let t=JSON.parse(e);return t&&typeof t=="object"?t:null}catch{return null}}function Aje(e){let t=mse();o0.mkdirSync(qz.dirname(t),{recursive:!0,mode:448}),o0.writeFileSync(t,JSON.stringify(e),{mode:384})}function gje(){try{o0.rmSync(mse())}catch(e){if(e&&typeof e=="object"&&"code"in e&&e.code==="ENOENT")return;throw e}}function Ase(){let e=process.env.LORE_CLI_ACCESS_TOKEN?.trim()??"";if(e&&!Hx(e,new Date,zx))return{token:e,source:"env"};let t=lh()?.access_token.trim()??"";return!t||Hx(t,new Date,zx)?{token:"",source:"none"}:{token:t,source:"file"}}function hje(){let e=Yz()?.access_token.trim()??"";return!e||Hx(e,new Date,zx)?{token:"",source:"none"}:{token:e,source:"file"}}function _je(){return lh()?.refresh_token.trim()??""}function Eje(){return!!lh()?.access_token}function gse(e){let t=Er();nje(t,Vz,e),jz(t)}function yje(e){gse(e)}function Sje(e){let t=lh();gse({access_token:e,refresh_token:t?.refresh_token??"",expires_at:use(e)??0,scope:t?.scope??""})}function Kz(e,t){let n=lh();gse({access_token:e,refresh_token:t,expires_at:use(e)??0,scope:n?.scope??""})}function dh(){$.warn("auth_delete_access_token",{stateDir:Er()}),sse(Er(),Vz),jz(Er())}function Tje(){sse(Er(),Vz),jz(Er())}function Y4t(e,t){return new URL(t,e).toString()}async function K4t(e){try{return await e.json()}catch{throw new Error(`WorkOS returned an invalid JSON response: HTTP ${e.status}`)}}function J4t(e){return[e.error_description,e.error].find(t=>typeof t=="string"&&t.length>0)??"Token refresh failed"}async function bje({clientId:e,refreshToken:t,workosApiOrigin:n,fetch:r=globalThis.fetch}){let o=await r(Y4t(n,"/user_management/authenticate"),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:V4t,refresh_token:t,client_id:e})}),i=await K4t(o);if(!o.ok){let s=i,u=J4t(s);throw s.error==="invalid_grant"?new kk(u):new Error(u)}return i}function Pk(e){let t=e.split(".");if(t.length<2)throw new Error("invalid JWT format");return JSON.parse(Buffer.from(t[1],"base64url").toString("utf8"))}function Hx(e,t,n=0){let r;try{r=Pk(e)}catch{return!1}return typeof r.exp!="number"?!1:t.getTime()+n>=r.exp*1e3}var Vz,q4t,zx,kk,V4t,i0=w(()=>{"use strict";m();zz();Bn();Mo();Vz="cli",q4t="desktop",zx=10*1e3;kk=class extends Error{constructor(t="Refresh token is invalid or expired"){super(t),this.name="RefreshTokenInvalidGrantError"}},V4t="refresh_token"});import{AsyncLocalStorage as Z4t}from"node:async_hooks";function Cje(e,t){return Ije.run(e,t)}function vje(){return Ije.getStore()}var Ije,hse=w(()=>{"use strict";m();Ije=new Z4t});function ln(e){return e instanceof Error?e.message:String(e)}function kr(e,t){return e!==null&&typeof e=="object"&&"code"in e&&e.code===t}function qx(){return to()==="dev"?"pnpm dev login":"lore login"}function W4t(e){return to()!=="dev"?e:e.replaceAll("'lore login'","'pnpm dev login'").replaceAll("`lore login`","`pnpm dev login`")}function ud(){throw new De("")}var De,$x,on=w(()=>{"use strict";m();sc();De=class extends Error{constructor(t){super(W4t(t)),this.name="CLIError"}};$x=class extends De{billingUrl;serverMessage;constructor(t){let n=t.serverMessage.trim(),r=n.replace(/\.+$/,""),o=r?`: ${r}`:"";super(`${t.action} blocked by your billing plan${o}. Manage or upgrade your plan: ${t.billingUrl}`),this.name="BillingBlockedError",this.billingUrl=t.billingUrl,this.serverMessage=n}}});import{setTimeout as X4t}from"node:timers/promises";async function Mk(e,t){let n=t.limit??e3t,r=t.baseMs??Rje,o=t.maxMs??xje,i=t.sleep??X4t,s=t.logEvent??"fetch_retry";for(let u=0;u<=n;u+=1){let l=u===n;try{return await e()}catch(f){if(!t.isRetryableError(f)||l)throw f;$.warn(s,{attempt:u+1,reason:t.describeRetryReason?.(f)??"retryable_error",...t.logFields})}await i(t3t(u,{baseMs:r,maxMs:o}))}throw new Error("fetchWithRetry: unreachable")}function t3t(e,{baseMs:t=Rje,maxMs:n=xje}={}){let r=Math.min(t*2**e,n),o=Math.floor(r/2);return o+Math.floor(Math.random()*o)}function Vx(e){return e instanceof TypeError?e.message==="fetch failed"||e.message==="terminated":!1}function Lk(e){return Dje(e,n3t)}function Uk(e){return Dje(e,r3t)}function Dje(e,t){if(!Vx(e))return!1;let n=e.cause;if(!(n instanceof Error))return!1;let r=n.code;return typeof r=="string"&&t.has(r)}function Qk(e){if(!Vx(e))return"unknown";let t=e.cause;if(!(t instanceof Error))return"unknown";let n=t.code;return typeof n=="string"?`${t.name}:${n}`:t.name}function Nje(e){let t=e instanceof Error?e.message:String(e),n=[],r=[],o=e instanceof Error?e.cause:void 0,i=0,s=5;for(;o&&i<s;){if(o instanceof Error){let u=o,l=u.code;l&&r.push(l),n.push(`${u.name}${l?`[${l}]`:""}: ${u.message}`),o=u.cause}else if(typeof o=="string"){n.push(o);break}else{n.push(String(o));break}i+=1}return{message:t,causeChain:n,codes:r}}var e3t,Rje,xje,n3t,r3t,Jz=w(()=>{"use strict";m();Bn();e3t=5,Rje=1e3,xje=16e3;n3t=new Set(["UND_ERR_CONNECT_TIMEOUT","ENOTFOUND","EAI_AGAIN","ECONNREFUSED"]),r3t=new Set(["ECONNRESET","ETIMEDOUT","EPIPE"])});import{execFileSync as wje}from"node:child_process";import{createHash as o3t}from"node:crypto";import{resolve as i3t}from"node:path";function a3t(e){if(process.env.LORE_DISABLE_PORTLESS_DISCOVERY!=="1"&&process.env.npm_lifecycle_event!=="test")try{return wje("portless",["get",e],{encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim().replace(/\/$/,"")}catch{return}}function Bje(e){return e.toLowerCase().replace(/[^a-z0-9-]+/g,"-").replace(/^-+|-+$/g,"").slice(0,63)}function u3t(){try{return wje("git",["rev-parse","--show-toplevel"],{encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim()}catch{return i3t(process.cwd(),"../..")}}function c3t(e){return o3t("sha1").update(e).digest("hex").slice(0,8)}function l3t(){let e=Bje(process.env.LORE_DEV_STACK_NAME??"");if(e)return e;let t=u3t();return[Bje(t.split(/[\\/]/).pop()||"lore"),c3t(t)].filter(Boolean).join("-").slice(0,63)}function d3t(){let e=l3t();return e?`api.${e}.lore`:"api.lore"}function p3t(e){let t=process.env.LORE_TARGET?.trim();return t&&s3t.has(t)?t:e}function cd(e=to(),t=process.env.LORE_API_ORIGIN){let n=t?.trim();if(n)return n.replace(/\/$/,"");let r=p3t(e);return r==="dev"?a3t(d3t())??Xz.dev:Xz[r]}function Cu(){let e=lh(),t=Yz(),n=e?.access_token.trim()??"",r=e?.refresh_token.trim()??"",o=t?.access_token.trim()??"";return{hasTokenRecord:!!e,hasAccessToken:!!n,accessTokenExpiredOrNearExpiry:n?Hx(n,new Date,zx):void 0,hasRefreshToken:!!r,externalTokenManager:Pje(),hasDesktopManagedTokenRecord:!!t,hasDesktopManagedAccessToken:!!o,desktopManagedAccessTokenExpiredOrNearExpiry:o?Hx(o,new Date,zx):void 0}}function Oje(e){let t=vje()??Hc();if(!t||t.spanContext().traceFlags!==1)return e;let n=eE({span:t,propagateTraceparent:!0});return!n["sentry-trace"]&&!n.baggage&&!n.traceparent?e:{...e,...!e["sentry-trace"]&&n["sentry-trace"]?{"sentry-trace":n["sentry-trace"]}:{},...!e.baggage&&n.baggage?{baggage:n.baggage}:{},...!e.traceparent&&n.traceparent?{traceparent:n.traceparent}:{}}}async function f3t(){let e=await kje(`${cd()}/api/cli-auth/config`);if(!e.ok)throw new Error(`CLI auth config failed: HTTP ${e.status}`);return await e.json()}async function m3t(){if(!lh()?.refresh_token.trim())return $.warn("auth_refresh_skipped_no_refresh_token",Cu()),"";Zz?$.info("auth_refresh_join_inflight",Cu()):($.info("auth_refresh_start",Cu()),Zz=Bk(Er(),async()=>{let t=Ase().token;if(t)return $.info("auth_refresh_reused_latest_token",Cu()),t;let n=lh();if(!n?.refresh_token.trim())return $.warn("auth_refresh_skipped_latest_no_refresh_token",Cu()),"";$.info("auth_refresh_cli_auth_config_start",{...Cu(),resource:cd()});let r=await f3t();$.info("auth_refresh_cli_auth_config_success",{...Cu(),tokenEndpoint:new URL("/user_management/authenticate",r.workos_api_origin).toString()});let o=await bje({clientId:r.workos_client_id,refreshToken:n.refresh_token,workosApiOrigin:r.workos_api_origin,fetch:kje});return Kz(o.access_token,o.refresh_token??n.refresh_token),$.info("auth_refresh_success",Cu()),o.access_token}).finally(()=>{Zz=void 0}));try{return await Zz}catch(t){return t instanceof Fz||t instanceof kk?($.warn("auth_refresh_invalid_grant_deleting_tokens",{...Cu(),error:ln(t)}),dh()):$.warn("auth_refresh_failed",{...Cu(),errorName:t instanceof Error?t.name:void 0,error:ln(t)}),""}}function Wz(e){try{let t=Pk(e);typeof t.sub=="string"&&jQ({id:t.sub,...typeof t.email=="string"?{email:t.email}:{}})}catch{}}function Pje(){let e=process.env.LORE_EXTERNAL_TOKEN_MANAGER;return typeof e=="string"&&A3t.has(e.trim().toLowerCase())}async function sn(){if(Pje()){let n=hje().token;if(n)return $.info("auth_get_access_token_valid_desktop_managed_token",Cu()),Wz(n),n;let r=Yz()?.access_token.trim()??"";return $.warn("auth_get_access_token_external_manager_raw_desktop_token",{...Cu(),returnedRawToken:!!r}),r&&Wz(r),r}let e=Ase().token;if(e)return $.info("auth_get_access_token_valid_file_token",Cu()),Wz(e),e;$.warn("auth_get_access_token_no_valid_file_token",Cu());let t=await m3t();return t?($.info("auth_get_access_token_refreshed_token",Cu()),Wz(t)):$.warn("auth_get_access_token_returning_empty",Cu()),t}function Gt(e={}){let t=e.token;return See(Qz,{baseUrl:cd(),baseHeaders:{"User-Agent":BQe(),...t?{authorization:`Bearer ${t}`}:{}},api:async n=>{let r=Oje(n.headers);if(t===void 0){let i=await sn();i&&!r.authorization&&(r={...r,authorization:`Bearer ${i}`})}let o=n.method.toUpperCase()==="GET";try{return await Mk(()=>yee({...n,headers:r}),{isRetryableError:o?i=>Lk(i)||Uk(i):Lk,describeRetryReason:i=>`network:${Qk(i)}`,logEvent:"api_request_retry",logFields:{method:n.method,path:n.path}})}catch(i){if(Vx(i)){let s=Nje(i);$.error("api_request_failed",{method:n.method,path:n.path,error:s.message,causeChain:s.causeChain.join(" \u2192 "),codes:s.codes.join(",")})}throw i}}})}var Xz,_jn,s3t,Zz,kje,A3t,Pr=w(()=>{"use strict";m();Rk();zz();cA();WR();i0();hse();sc();on();Jz();Bn();Mo();Xz={dev:"http://localhost:4000","dev-shared":"https://lore-api.dev.tanagram.ai",prod:"https://lore-api.tanagram.ai"},_jn={dev:`${Xz.dev}/mcp`,"dev-shared":`${Xz["dev-shared"]}/mcp`,prod:"https://mcp.lore.link/mcp"},s3t=new Set(["dev","dev-shared","prod"]);kje=(async(e,t)=>{let n=Oje(Object.fromEntries(new Headers(t?.headers).entries()));return fetch(e,{...t,headers:n})});A3t=new Set(["1","true","yes","on"])});function Gje(e){return typeof e!="string"?!1:C3t.has(e.trim().toLowerCase())}function vu(e={}){let t=e.stdout??process.stdout,n=e.stdin??process.stdin,r=e.env??process.env;return!((e.rawArgs??process.argv.slice(2)).includes(jje)||Gje(r.LORE_NO_TUI)||Gje(r.CI)||r.TERM==="dumb"||!t?.isTTY||!n?.isTTY)}function zje(e){return e.filter(t=>t!==jje)}var jje,C3t,s0=w(()=>{"use strict";m();jje="--no-tui",C3t=new Set(["1","true","yes","on"])});var eze=M(Sn=>{"use strict";m();var Cse=Symbol.for("react.transitional.element"),v3t=Symbol.for("react.portal"),R3t=Symbol.for("react.fragment"),x3t=Symbol.for("react.strict_mode"),D3t=Symbol.for("react.profiler"),N3t=Symbol.for("react.consumer"),B3t=Symbol.for("react.context"),w3t=Symbol.for("react.forward_ref"),O3t=Symbol.for("react.suspense"),k3t=Symbol.for("react.memo"),Yje=Symbol.for("react.lazy"),P3t=Symbol.for("react.activity"),Hje=Symbol.iterator;function M3t(e){return e===null||typeof e!="object"?null:(e=Hje&&e[Hje]||e["@@iterator"],typeof e=="function"?e:null)}var Kje={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Jje=Object.assign,Zje={};function Kx(e,t,n){this.props=e,this.context=t,this.refs=Zje,this.updater=n||Kje}Kx.prototype.isReactComponent={};Kx.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Kx.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Wje(){}Wje.prototype=Kx.prototype;function vse(e,t,n){this.props=e,this.context=t,this.refs=Zje,this.updater=n||Kje}var Rse=vse.prototype=new Wje;Rse.constructor=vse;Jje(Rse,Kx.prototype);Rse.isPureReactComponent=!0;var $je=Array.isArray;function Ise(){}var vo={H:null,A:null,T:null,S:null},Xje=Object.prototype.hasOwnProperty;function xse(e,t,n){var r=n.ref;return{$$typeof:Cse,type:e,key:t,ref:r!==void 0?r:null,props:n}}function L3t(e,t){return xse(e.type,t,e.props)}function Dse(e){return typeof e=="object"&&e!==null&&e.$$typeof===Cse}function U3t(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var qje=/\/+/g;function bse(e,t){return typeof e=="object"&&e!==null&&e.key!=null?U3t(""+e.key):t.toString(36)}function Q3t(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Ise,Ise):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Yx(e,t,n,r,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(i){case"bigint":case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Cse:case v3t:s=!0;break;case Yje:return s=e._init,Yx(s(e._payload),t,n,r,o)}}if(s)return o=o(e),s=r===""?"."+bse(e,0):r,$je(o)?(n="",s!=null&&(n=s.replace(qje,"$&/")+"/"),Yx(o,t,n,"",function(f){return f})):o!=null&&(Dse(o)&&(o=L3t(o,n+(o.key==null||e&&e.key===o.key?"":(""+o.key).replace(qje,"$&/")+"/")+s)),t.push(o)),1;s=0;var u=r===""?".":r+":";if($je(e))for(var l=0;l<e.length;l++)r=e[l],i=u+bse(r,l),s+=Yx(r,t,n,i,o);else if(l=M3t(e),typeof l=="function")for(e=l.call(e),l=0;!(r=e.next()).done;)r=r.value,i=u+bse(r,l++),s+=Yx(r,t,n,i,o);else if(i==="object"){if(typeof e.then=="function")return Yx(Q3t(e),t,n,r,o);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return s}function eH(e,t,n){if(e==null)return e;var r=[],o=0;return Yx(e,r,"","",function(i){return t.call(n,i,o++)}),r}function F3t(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Vje=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},G3t={map:eH,forEach:function(e,t,n){eH(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return eH(e,function(){t++}),t},toArray:function(e){return eH(e,function(t){return t})||[]},only:function(e){if(!Dse(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Sn.Activity=P3t;Sn.Children=G3t;Sn.Component=Kx;Sn.Fragment=R3t;Sn.Profiler=D3t;Sn.PureComponent=vse;Sn.StrictMode=x3t;Sn.Suspense=O3t;Sn.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=vo;Sn.__COMPILER_RUNTIME={__proto__:null,c:function(e){return vo.H.useMemoCache(e)}};Sn.cache=function(e){return function(){return e.apply(null,arguments)}};Sn.cacheSignal=function(){return null};Sn.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var r=Jje({},e.props),o=e.key;if(t!=null)for(i in t.key!==void 0&&(o=""+t.key),t)!Xje.call(t,i)||i==="key"||i==="__self"||i==="__source"||i==="ref"&&t.ref===void 0||(r[i]=t[i]);var i=arguments.length-2;if(i===1)r.children=n;else if(1<i){for(var s=Array(i),u=0;u<i;u++)s[u]=arguments[u+2];r.children=s}return xse(e.type,o,r)};Sn.createContext=function(e){return e={$$typeof:B3t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:N3t,_context:e},e};Sn.createElement=function(e,t,n){var r,o={},i=null;if(t!=null)for(r in t.key!==void 0&&(i=""+t.key),t)Xje.call(t,r)&&r!=="key"&&r!=="__self"&&r!=="__source"&&(o[r]=t[r]);var s=arguments.length-2;if(s===1)o.children=n;else if(1<s){for(var u=Array(s),l=0;l<s;l++)u[l]=arguments[l+2];o.children=u}if(e&&e.defaultProps)for(r in s=e.defaultProps,s)o[r]===void 0&&(o[r]=s[r]);return xse(e,i,o)};Sn.createRef=function(){return{current:null}};Sn.forwardRef=function(e){return{$$typeof:w3t,render:e}};Sn.isValidElement=Dse;Sn.lazy=function(e){return{$$typeof:Yje,_payload:{_status:-1,_result:e},_init:F3t}};Sn.memo=function(e,t){return{$$typeof:k3t,type:e,compare:t===void 0?null:t}};Sn.startTransition=function(e){var t=vo.T,n={};vo.T=n;try{var r=e(),o=vo.S;o!==null&&o(n,r),typeof r=="object"&&r!==null&&typeof r.then=="function"&&r.then(Ise,Vje)}catch(i){Vje(i)}finally{t!==null&&n.types!==null&&(t.types=n.types),vo.T=t}};Sn.unstable_useCacheRefresh=function(){return vo.H.useCacheRefresh()};Sn.use=function(e){return vo.H.use(e)};Sn.useActionState=function(e,t,n){return vo.H.useActionState(e,t,n)};Sn.useCallback=function(e,t){return vo.H.useCallback(e,t)};Sn.useContext=function(e){return vo.H.useContext(e)};Sn.useDebugValue=function(){};Sn.useDeferredValue=function(e,t){return vo.H.useDeferredValue(e,t)};Sn.useEffect=function(e,t){return vo.H.useEffect(e,t)};Sn.useEffectEvent=function(e){return vo.H.useEffectEvent(e)};Sn.useId=function(){return vo.H.useId()};Sn.useImperativeHandle=function(e,t,n){return vo.H.useImperativeHandle(e,t,n)};Sn.useInsertionEffect=function(e,t){return vo.H.useInsertionEffect(e,t)};Sn.useLayoutEffect=function(e,t){return vo.H.useLayoutEffect(e,t)};Sn.useMemo=function(e,t){return vo.H.useMemo(e,t)};Sn.useOptimistic=function(e,t){return vo.H.useOptimistic(e,t)};Sn.useReducer=function(e,t,n){return vo.H.useReducer(e,t,n)};Sn.useRef=function(e){return vo.H.useRef(e)};Sn.useState=function(e){return vo.H.useState(e)};Sn.useSyncExternalStore=function(e,t,n){return vo.H.useSyncExternalStore(e,t,n)};Sn.useTransition=function(){return vo.H.useTransition()};Sn.version="19.2.4"});var tze=M((mn,tH)=>{"use strict";m();process.env.NODE_ENV!=="production"&&(function(){function e(L,ne){Object.defineProperty(r.prototype,L,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",ne[0],ne[1])}})}function t(L){return L===null||typeof L!="object"?null:(L=Mn&&L[Mn]||L["@@iterator"],typeof L=="function"?L:null)}function n(L,ne){L=(L=L.constructor)&&(L.displayName||L.name)||"ReactClass";var ve=L+"."+ne;ft[ve]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",ne,L),ft[ve]=!0)}function r(L,ne,ve){this.props=L,this.context=ne,this.refs=Rt,this.updater=ve||tn}function o(){}function i(L,ne,ve){this.props=L,this.context=ne,this.refs=Rt,this.updater=ve||tn}function s(){}function u(L){return""+L}function l(L){try{u(L);var ne=!1}catch{ne=!0}if(ne){ne=console;var ve=ne.error,$e=typeof Symbol=="function"&&Symbol.toStringTag&&L[Symbol.toStringTag]||L.constructor.name||"Object";return ve.call(ne,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",$e),u(L)}}function f(L){if(L==null)return null;if(typeof L=="function")return L.$$typeof===ai?null:L.displayName||L.name||null;if(typeof L=="string")return L;switch(L){case Lt:return"Fragment";case be:return"Profiler";case Gr:return"StrictMode";case yr:return"Suspense";case Us:return"SuspenseList";case zt:return"Activity"}if(typeof L=="object")switch(typeof L.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),L.$$typeof){case ut:return"Portal";case en:return L.displayName||"Context";case mt:return(L._context.displayName||"Context")+".Consumer";case Tn:var ne=L.render;return L=L.displayName,L||(L=ne.displayName||ne.name||"",L=L!==""?"ForwardRef("+L+")":"ForwardRef"),L;case Vn:return ne=L.displayName||null,ne!==null?ne:f(L.type)||"Memo";case ar:ne=L._payload,L=L._init;try{return f(L(ne))}catch{}}return null}function h(L){if(L===Lt)return"<>";if(typeof L=="object"&&L!==null&&L.$$typeof===ar)return"<...>";try{var ne=f(L);return ne?"<"+ne+">":"<...>"}catch{return"<...>"}}function _(){var L=vt.A;return L===null?null:L.getOwner()}function y(){return Error("react-stack-top-frame")}function T(L){if($i.call(L,"key")){var ne=Object.getOwnPropertyDescriptor(L,"key").get;if(ne&&ne.isReactWarning)return!1}return L.key!==void 0}function v(L,ne){function ve(){xo||(xo=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",ne))}ve.isReactWarning=!0,Object.defineProperty(L,"key",{get:ve,configurable:!0})}function R(){var L=f(this.type);return Nu[L]||(Nu[L]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),L=this.props.ref,L!==void 0?L:null}function x(L,ne,ve,$e,et,Ht){var xt=ve.ref;return L={$$typeof:ot,type:L,key:ne,props:ve,_owner:$e},(xt!==void 0?xt:null)!==null?Object.defineProperty(L,"ref",{enumerable:!1,get:R}):Object.defineProperty(L,"ref",{enumerable:!1,value:null}),L._store={},Object.defineProperty(L._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(L,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(L,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:et}),Object.defineProperty(L,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Ht}),Object.freeze&&(Object.freeze(L.props),Object.freeze(L)),L}function O(L,ne){return ne=x(L.type,ne,L.props,L._owner,L._debugStack,L._debugTask),L._store&&(ne._store.validated=L._store.validated),ne}function P(L){j(L)?L._store&&(L._store.validated=1):typeof L=="object"&&L!==null&&L.$$typeof===ar&&(L._payload.status==="fulfilled"?j(L._payload.value)&&L._payload.value._store&&(L._payload.value._store.validated=1):L._store&&(L._store.validated=1))}function j(L){return typeof L=="object"&&L!==null&&L.$$typeof===ot}function G(L){var ne={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(ve){return ne[ve]})}function H(L,ne){return typeof L=="object"&&L!==null&&L.key!=null?(l(L.key),G(""+L.key)):ne.toString(36)}function V(L){switch(L.status){case"fulfilled":return L.value;case"rejected":throw L.reason;default:switch(typeof L.status=="string"?L.then(s,s):(L.status="pending",L.then(function(ne){L.status==="pending"&&(L.status="fulfilled",L.value=ne)},function(ne){L.status==="pending"&&(L.status="rejected",L.reason=ne)})),L.status){case"fulfilled":return L.value;case"rejected":throw L.reason}}throw L}function ae(L,ne,ve,$e,et){var Ht=typeof L;(Ht==="undefined"||Ht==="boolean")&&(L=null);var xt=!1;if(L===null)xt=!0;else switch(Ht){case"bigint":case"string":case"number":xt=!0;break;case"object":switch(L.$$typeof){case ot:case ut:xt=!0;break;case ar:return xt=L._init,ae(xt(L._payload),ne,ve,$e,et)}}if(xt){xt=L,et=et(xt);var Fn=$e===""?"."+H(xt,0):$e;return oo(et)?(ve="",Fn!=null&&(ve=Fn.replace(Ad,"$&/")+"/"),ae(et,ne,ve,"",function(ui){return ui})):et!=null&&(j(et)&&(et.key!=null&&(xt&&xt.key===et.key||l(et.key)),ve=O(et,ve+(et.key==null||xt&&xt.key===et.key?"":(""+et.key).replace(Ad,"$&/")+"/")+Fn),$e!==""&&xt!=null&&j(xt)&&xt.key==null&&xt._store&&!xt._store.validated&&(ve._store.validated=2),et=ve),ne.push(et)),1}if(xt=0,Fn=$e===""?".":$e+":",oo(L))for(var pn=0;pn<L.length;pn++)$e=L[pn],Ht=Fn+H($e,pn),xt+=ae($e,ne,ve,Ht,et);else if(pn=t(L),typeof pn=="function")for(pn===L.entries&&(Bu||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Bu=!0),L=pn.call(L),pn=0;!($e=L.next()).done;)$e=$e.value,Ht=Fn+H($e,pn++),xt+=ae($e,ne,ve,Ht,et);else if(Ht==="object"){if(typeof L.then=="function")return ae(V(L),ne,ve,$e,et);throw ne=String(L),Error("Objects are not valid as a React child (found: "+(ne==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":ne)+"). If you meant to render a collection of children, use an array instead.")}return xt}function re(L,ne,ve){if(L==null)return L;var $e=[],et=0;return ae(L,$e,"","",function(Ht){return ne.call(ve,Ht,et++)}),$e}function _e(L){if(L._status===-1){var ne=L._ioInfo;ne!=null&&(ne.start=ne.end=performance.now()),ne=L._result;var ve=ne();if(ve.then(function(et){if(L._status===0||L._status===-1){L._status=1,L._result=et;var Ht=L._ioInfo;Ht!=null&&(Ht.end=performance.now()),ve.status===void 0&&(ve.status="fulfilled",ve.value=et)}},function(et){if(L._status===0||L._status===-1){L._status=2,L._result=et;var Ht=L._ioInfo;Ht!=null&&(Ht.end=performance.now()),ve.status===void 0&&(ve.status="rejected",ve.reason=et)}}),ne=L._ioInfo,ne!=null){ne.value=ve;var $e=ve.displayName;typeof $e=="string"&&(ne.name=$e)}L._status===-1&&(L._status=0,L._result=ve)}if(L._status===1)return ne=L._result,ne===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
@@ -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(k0(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(ZZe(n.key)&&!k0(n.sep,"newline")){let s=o1(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(k0(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{let s=o1(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]}):k0(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&&!k0(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||k0(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=E9(r),i=o1(o);JZe(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=E9(t),r=o1(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=E9(t),r=o1(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())}}};WZe.Parser=kpe});var rWe=M(CM=>{"use strict";m();var XZe=Spe(),vZt=gM(),IM=EM(),RZt=Ede(),xZt=gr(),DZt=Ope(),eWe=Ppe();function tWe(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new DZt.LineCounter||null,prettyErrors:t}}function NZt(e,t={}){let{lineCounter:n,prettyErrors:r}=tWe(t),o=new eWe.Parser(n?.addNewLine),i=new XZe.Composer(t),s=Array.from(i.compose(o.parse(e)));if(r&&n)for(let u of s)u.errors.forEach(IM.prettifyError(e,n)),u.warnings.forEach(IM.prettifyError(e,n));return s.length>0?s:Object.assign([],{empty:!0},i.streamInfo())}function nWe(e,t={}){let{lineCounter:n,prettyErrors:r}=tWe(t),o=new eWe.Parser(n?.addNewLine),i=new XZe.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 IM.YAMLParseError(u.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(s.errors.forEach(IM.prettifyError(e,n)),s.warnings.forEach(IM.prettifyError(e,n))),s}function BZt(e,t,n){let r;typeof t=="function"?r=t:n===void 0&&t&&typeof t=="object"&&(n=t);let o=nWe(e,n);if(!o)return null;if(o.warnings.forEach(i=>RZt.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 wZt(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 xZt.isDocument(e)&&!r?e.toString(n):new vZt.Document(e,r,n).toString(n)}CM.parse=BZt;CM.parseAllDocuments=NZt;CM.parseDocument=nWe;CM.stringify=wZt});var iWe=M(Mr=>{"use strict";m();var OZt=Spe(),kZt=gM(),PZt=tpe(),Mpe=EM(),MZt=XP(),P0=gr(),LZt=N0(),UZt=ps(),QZt=w0(),FZt=O0(),GZt=h9(),jZt=Bpe(),zZt=Ope(),HZt=Ppe(),y9=rWe(),oWe=KP();Mr.Composer=OZt.Composer;Mr.Document=kZt.Document;Mr.Schema=PZt.Schema;Mr.YAMLError=Mpe.YAMLError;Mr.YAMLParseError=Mpe.YAMLParseError;Mr.YAMLWarning=Mpe.YAMLWarning;Mr.Alias=MZt.Alias;Mr.isAlias=P0.isAlias;Mr.isCollection=P0.isCollection;Mr.isDocument=P0.isDocument;Mr.isMap=P0.isMap;Mr.isNode=P0.isNode;Mr.isPair=P0.isPair;Mr.isScalar=P0.isScalar;Mr.isSeq=P0.isSeq;Mr.Pair=LZt.Pair;Mr.Scalar=UZt.Scalar;Mr.YAMLMap=QZt.YAMLMap;Mr.YAMLSeq=FZt.YAMLSeq;Mr.CST=GZt;Mr.Lexer=jZt.Lexer;Mr.LineCounter=zZt.LineCounter;Mr.Parser=HZt.Parser;Mr.parse=y9.parse;Mr.parseAllDocuments=y9.parseAllDocuments;Mr.parseDocument=y9.parseDocument;Mr.stringify=y9.stringify;Mr.visit=oWe.visit;Mr.visitAsync=oWe.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]="4881d5a8-cbd9-41da-8213-e57d7090c263",e._sentryDebugIdIdentifier="sentry-dbid-4881d5a8-cbd9-41da-8213-e57d7090c263")}catch{}})();m();m();m();function aAe(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 uAe=aAe();uAe.ok||(process.stderr.write(`lore: ${uAe.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=E9(t),r=o1(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=E9(t),r=o1(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())}}};WZe.Parser=kpe});var rWe=M(CM=>{"use strict";m();var XZe=Spe(),vZt=gM(),IM=EM(),RZt=Ede(),xZt=gr(),DZt=Ope(),eWe=Ppe();function tWe(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new DZt.LineCounter||null,prettyErrors:t}}function NZt(e,t={}){let{lineCounter:n,prettyErrors:r}=tWe(t),o=new eWe.Parser(n?.addNewLine),i=new XZe.Composer(t),s=Array.from(i.compose(o.parse(e)));if(r&&n)for(let u of s)u.errors.forEach(IM.prettifyError(e,n)),u.warnings.forEach(IM.prettifyError(e,n));return s.length>0?s:Object.assign([],{empty:!0},i.streamInfo())}function nWe(e,t={}){let{lineCounter:n,prettyErrors:r}=tWe(t),o=new eWe.Parser(n?.addNewLine),i=new XZe.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 IM.YAMLParseError(u.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(s.errors.forEach(IM.prettifyError(e,n)),s.warnings.forEach(IM.prettifyError(e,n))),s}function BZt(e,t,n){let r;typeof t=="function"?r=t:n===void 0&&t&&typeof t=="object"&&(n=t);let o=nWe(e,n);if(!o)return null;if(o.warnings.forEach(i=>RZt.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 wZt(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 xZt.isDocument(e)&&!r?e.toString(n):new vZt.Document(e,r,n).toString(n)}CM.parse=BZt;CM.parseAllDocuments=NZt;CM.parseDocument=nWe;CM.stringify=wZt});var iWe=M(Mr=>{"use strict";m();var OZt=Spe(),kZt=gM(),PZt=tpe(),Mpe=EM(),MZt=XP(),P0=gr(),LZt=N0(),UZt=ps(),QZt=w0(),FZt=O0(),GZt=h9(),jZt=Bpe(),zZt=Ope(),HZt=Ppe(),y9=rWe(),oWe=KP();Mr.Composer=OZt.Composer;Mr.Document=kZt.Document;Mr.Schema=PZt.Schema;Mr.YAMLError=Mpe.YAMLError;Mr.YAMLParseError=Mpe.YAMLParseError;Mr.YAMLWarning=Mpe.YAMLWarning;Mr.Alias=MZt.Alias;Mr.isAlias=P0.isAlias;Mr.isCollection=P0.isCollection;Mr.isDocument=P0.isDocument;Mr.isMap=P0.isMap;Mr.isNode=P0.isNode;Mr.isPair=P0.isPair;Mr.isScalar=P0.isScalar;Mr.isSeq=P0.isSeq;Mr.Pair=LZt.Pair;Mr.Scalar=UZt.Scalar;Mr.YAMLMap=QZt.YAMLMap;Mr.YAMLSeq=FZt.YAMLSeq;Mr.CST=GZt;Mr.Lexer=jZt.Lexer;Mr.LineCounter=zZt.LineCounter;Mr.Parser=HZt.Parser;Mr.parse=y9.parse;Mr.parseAllDocuments=y9.parseAllDocuments;Mr.parseDocument=y9.parseDocument;Mr.stringify=y9.stringify;Mr.visit=oWe.visit;Mr.visitAsync=oWe.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]="143159fd-51d0-4fa6-adc3-5b2a99c24a99",e._sentryDebugIdIdentifier="sentry-dbid-143159fd-51d0-4fa6-adc3-5b2a99c24a99")}catch{}})();m();m();m();function aAe(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 uAe=aAe();uAe.ok||(process.stderr.write(`lore: ${uAe.message}.
666
666
  Upgrade Node (e.g. \`nvm install 20\`) and re-run.
667
667
  `),process.exit(1));m();WR();sc();function Nwt(){let e=process.env.SENTRY_SPOTLIGHT?.trim();return!e||e==="0"||e==="false"?!1:e==="1"||e==="true"?!0:e}var Bwt=Nwt();oee({dsn:"https://583674b382128b1b30b9fa1f0581daab@o4509017064472576.ingest.us.sentry.io/4511344717529088",environment:to(),release:_u(),sendDefaultPii:!0,enableLogs:!0,spotlight:Bwt,tracesSampleRate:1});GQ("service_name","lore-cli");WR();uee();import{realpathSync as Snn}from"node:fs";import{fileURLToPath as Tnn,pathToFileURL as utt}from"node:url";m();m();Rk();Pr();on();Bn();m();function Fk(e){let t=e;return t._def??t.def??{}}function g3t(e){let t=Fk(e);return typeof t.typeName=="string"?t.typeName:typeof t.type=="string"?t.type:void 0}function il(e,t,n){let r=g3t(e);return r===t||r===n}function Mje(e){let t=Fk(e);if(t.element)return t.element;if(typeof t.type=="object"&&t.type!==null)return t.type}function h3t(e){let t=e.options;if(Array.isArray(t))return[...t];let n=Fk(e);return Array.isArray(n.values)?[...n.values]:n.entries&&typeof n.entries=="object"?Object.values(n.entries):[]}function _se(e){if(!e||!il(e,"ZodObject","object"))return;let t=e.shape;if(typeof t=="function")return t();if(t&&typeof t=="object")return t;let n=Fk(e).shape;if(typeof n=="function")return n();if(n&&typeof n=="object")return n}function Lje(e){let t=e,n=!1,r,o=e.description;for(;;){o=t.description??o;let i=Fk(t);if(il(t,"ZodOptional","optional"))n=!0,t=i.innerType;else if(il(t,"ZodNullable","nullable"))n=!0,t=i.innerType;else if(il(t,"ZodDefault","default"))r=typeof i.defaultValue=="function"?i.defaultValue():i.defaultValue,t=i.innerType;else if(il(t,"ZodEffects","effects"))t=i.schema;else if(il(t,"ZodPipeline","pipe"))t=i.in;else break}return{inner:t,optional:n,defaultValue:r,description:o}}function _3t(e,t={}){let{inner:n,optional:r,defaultValue:o,description:i}=Lje(e),s=!1,u=n;il(u,"ZodArray","array")&&(s=!0,u=Mje(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}:il(u,"ZodEnum","enum")?{arg:{type:"enum",description:i,options:h3t(u),required:l,...o!==void 0?{default:String(o)}:{}},optional:r,isArray:s}:il(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 Ese(e,t={}){let n={},r={};for(let[o,i]of Object.entries(e)){let{arg:s,isArray:u}=_3t(i,t);n[o]=s,r[o]={isArray:u,leafKind:E3t(i)}}return{args:n,fields:r}}function yse(e,t={}){let n=_se(e);return n?Ese(n,t):{args:{},fields:{}}}function E3t(e){let{inner:t}=Lje(e),n=t;return il(n,"ZodArray","array")&&(n=Mje(n)??n),il(n,"ZodNumber","number")?"number":il(n,"ZodBoolean","boolean")?"boolean":il(n,"ZodEnum","enum")?"enum":il(n,"ZodString","string")?"string":"other"}function y3t(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 S3t(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 Sse(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 T3t(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 b3t(e,t){let n=t.path.map(o=>String(o)).join(".");return` ${n?`${e}.${n}`:e}: ${t.message}`}function Tse(e,t,n){if(!e)return[];let r=t??{},o=e.safeParse(r);return o.success?[]:(o.error.issues??[]).map(s=>b3t(n,s))}function I3t(e,t,n){return e.resource==="threads"&&t==="id"?T3t(n):n}function Uje(e){let t=y3t(Qz,e.path),n=_se(t.pathParams),r=e.positional??(n?Object.keys(n):[]),o=new Set(r),i=Ese(n?Object.fromEntries(r.map(h=>[h,n[h]])):{},{positional:!0}),s=yse(t.query),u=t.method==="GET"||t.method==="DELETE"?{args:{},fields:{}}:yse(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},f=e.description??t.summary??`${t.method} ${t.path}`;return{meta:{name:e.op,description:f},args:l,async run({args:h,data:_}){$.info("command_start",{command:`${e.resource} ${e.op}`,route:e.path.join(".")});let y=_;if(!await(y?.getAccessToken??sn)())throw new De("not logged in \u2014 run 'lore login' first");let v={};for(let ae of r){let re=h[ae],_e=Sse(re,i.fields[ae])??re;v[ae]=I3t(e,ae,_e)}let R={};for(let[ae,re]of Object.entries(s.fields)){let _e=Sse(h[ae],re);_e!==void 0&&(R[ae]=_e)}let x={};for(let[ae,re]of Object.entries(u.fields)){let _e=Sse(h[ae],re);_e!==void 0&&(x[ae]=_e)}let O=[...Tse(t.pathParams,v,"path"),...Tse(t.query,R,"query"),...t.method==="GET"||t.method==="DELETE"?[]:Tse(t.body,x,"body")];if(O.length>0)throw new De(`Invalid request for \`lore ${e.resource} ${e.op}\`:
668
668
  ${O.join(`
@@ -692,7 +692,7 @@ The held transcript is never uploaded, and secret values are never shown.`)}},vW
692
692
  `))}return t.join(`
693
693
 
694
694
  `)}var MXe={meta:{name:"list",description:"List skills available in your workspace."},async run({data:e}){let t=e;if(!await(t?.getAccessToken??sn)())throw new De("not logged in \u2014 run 'lore login' first");let o=await(t?.client??Gt()).listSkills({});if(o.status!==200){let i=o.body?.message??`listSkills returned ${o.status}`;throw new De(i)}console.log($Xt(o.body.objects))}};m();Pr();on();var LXe={meta:{name:"proposals",description:"List proposed versions awaiting owner review for a skill."},args:{id:{type:"positional",required:!0,description:"Workspace skill ID, e.g. sk_01j..."}},async run({args:e}){if(!await sn())throw new De("skill proposals require login \u2014 run 'lore login' first");await qXt(Gt(),e.id)}};async function qXt(e,t){let n=await e.getSkillDetail({params:{id:t}});if(n.status!==200){let o=n.body?.message??`getSkillDetail returned ${n.status}`;throw new De(o)}let r=n.body.versions.filter(o=>o.status==="proposed");if(r.length===0){console.log(`no proposed versions for ${t}`);return}for(let o of r){let i=o.created_by?`${o.created_by.display_name} (${o.created_by.id})`:"unknown";console.log(`${n.body.id} /${n.body.name} version=${o.version} proposer=${i} created_at=${o.created_at}`)}}m();import{readFile as UXe}from"node:fs/promises";Pr();on();Bn();var QXe={meta:{name:"publish",description:"Publish a local or captured skill to your workspace, or upload local edits for an already-published skill."},args:{target:{type:"positional",required:!0,description:"Local skill name/path, private captured sk_* ID, or workspace published sk_* ID"}},async run({args:e}){if(!await sn())throw new De("not logged in \u2014 run 'lore login' first");let t=typeof e.target=="string"?e.target.trim():"";if(!t)throw new De("pass a skill name, path, or sk_* ID to publish");let n=await VXt(Gt(),t);ten(n)}};async function VXt(e,t){let n=t.trim();if(!n)throw new De("pass a skill name, path, or sk_* ID to publish");let r=n.startsWith("sk_")?"skill_id":"local_name_or_path";$.info("skill_publish_started",{target_kind:r,target:n});try{if(n.startsWith("sk_"))return await FXe(e,n);let o=await pWe(n)??await fWe(n);if(!o)throw new De(`no SKILL.md found for ${n}`);return await YXt(e,o)}catch(o){throw $.warn("skill_publish_failed",{target_kind:r,target:n,phase:"publish",error:ln(o)}),o}}async function YXt(e,t){let n=Vf(t.bodyMd),r=await NWe(t);$.info("skill_publish_local_resolved",{name:t.name,file_path:t.filePath,root_kind:t.rootKind,captured_skill_id:r,captured_skill_id_present:!!r});let o=r;if(!o||await KXt(o)!==n){let s=await s1(e,{...t,...o?{skillId:o}:{}},{syncAction:"capture"});o=s.skill_id,$.info("skill_publish_capture_uploaded",{name:t.name,file_path:t.filePath,skill_id:s.skill_id,version:s.version,root_kind:s.root_kind})}let i=await FXe(e,o);return i.kind!=="conflict"&&i.kind!=="remote_newer"&&await a1(t,{skillId:o,version:i.version}),i}async function KXt(e){return(await $a()).captured[e]?.lastPushedHash??null}async function FXe(e,t){let n=await e.getSkillDetail({params:{id:t}});if(n.status===200&&n.body.visibility==="workspace")return ZXt(e,t,n.body);let r=await e.publishSkill({params:{id:t},body:{}});if(r.status!==200)throw een("publish skill",r.status,r.body);return await JXt(t,r.body.latest_version??0),$.info("skill_publish_promoted",{skill_id:r.body.id,version:r.body.latest_version??0,name:r.body.name}),{kind:"promoted",skillId:r.body.id,version:r.body.latest_version??0}}async function JXt(e,t){let r=(await $a()).captured[e];if(!r)return;let o;try{o=await UXe(r.filePath,"utf8")}catch(i){$.warn("skill_publish_record_local_failed",{skill_id:e,file_path:r.filePath,error:ln(i)});return}await a1({name:r.name,bodyMd:o,filePath:r.filePath,rootKind:r.rootKind},{skillId:e,version:t})}async function ZXt(e,t,n){let r=await $a(),o=r.installed[t]??null,i=r.captured[t]??null,s=r.published[t]??null,u=o?.installPath??i?.filePath,l=o?.rootKind??i?.rootKind??n.root_kind,f=o?.name??i?.name??n.name;if(!u)throw new De(`no managed local SKILL.md found for ${t}; install or capture it first`);let h=await UXe(u,"utf8"),_=Vf(h),y=n.latest_version??0,T=n.content_hash??"",v=WXt(o,s,i);if(_===T)return $.info("skill_publish_noop",{skill_id:t,version:y,reason:"local_matches_remote"}),{kind:"unchanged",skillId:t,version:y};if(v.version>0&&y>v.version)return _===v.hash?($.info("skill_publish_noop",{skill_id:t,version:y,reason:"remote_newer_local_unchanged",local_version:v.version}),{kind:"remote_newer",skillId:t,localVersion:v.version,remoteVersion:y}):(o&&await cl({...o,lastSyncStatus:"conflict"}),$.warn("skill_publish_conflict",{skill_id:t,local_version:v.version,remote_version:y,name:f,file_path:u}),{kind:"conflict",skillId:t,localVersion:v.version,remoteVersion:y});if(_===v.hash)return $.info("skill_publish_noop",{skill_id:t,version:y,reason:"local_matches_base"}),{kind:"unchanged",skillId:t,version:y};let R=await XXt(e),x=n.owner?.id&&n.owner.id===R?"owner_update":"subscriber_update",O=await s1(e,{skillId:t,name:f,description:null,bodyMd:h,filePath:u,rootKind:l},{syncAction:x,...v.version>0?{baseVersion:v.version}:{}});return o&&await cl({...o,...O.version_status==="accepted"?{baseVersion:O.version,baseContentHash:O.content_hash,lastSyncStatus:"current"}:{lastSyncStatus:"proposed"},lastInstalledVersion:O.version,lastInstalledHash:O.content_hash}),await a1({name:f,bodyMd:h,filePath:u,rootKind:l},{skillId:O.skill_id,version:O.version}),$.info("skill_publish_update_uploaded",{skill_id:O.skill_id,name:f,file_path:u,sync_action:x,version:O.version,version_status:O.version_status}),{kind:"uploaded",skillId:O.skill_id,version:O.version,versionStatus:O.version_status==="proposed"?"proposed":"accepted"}}function WXt(e,t,n){return e?{hash:e.baseContentHash,version:e.baseVersion}:t?{hash:t.lastPublishedHash,version:t.lastPublishedVersion}:n?{hash:n.lastPushedHash,version:n.lastPushedVersion}:{hash:"",version:0}}async function XXt(e){let t=await e.whoAmI({headers:{}});return t.status!==200?null:t.body.user.id}function een(e,t,n){let r=n?.message??`${e} returned ${t}`;return new De(r)}function ten(e){switch(e.kind){case"promoted":console.log(`published ${e.skillId} (v${e.version})`);break;case"uploaded":console.log(`${e.versionStatus} ${e.skillId} (v${e.version})`);break;case"unchanged":console.log(`already up to date ${e.skillId} (v${e.version})`);break;case"remote_newer":console.log(`remote newer ${e.skillId}: local base is v${e.localVersion}, remote is v${e.remoteVersion}; run lore skills sync`);break;case"conflict":console.log(`conflict ${e.skillId}: remote advanced from v${e.localVersion} to v${e.remoteVersion}; run lore skills sync`);break}}m();Pr();on();var GXe={meta:{name:"reject",description:"Reject a proposed skill version without changing the latest accepted version."},args:{id:{type:"positional",required:!0,description:"Workspace skill ID, e.g. sk_01j..."},version:{type:"string",required:!0,description:"Proposed version timestamp to reject"},reason:{type:"string",required:!1,description:"Optional rejection reason shown with the reviewed version"}},async run({args:e}){if(!await sn())throw new De("skill rejection requires login \u2014 run 'lore login' first");await nen(Gt(),{id:e.id,version:e.version,reason:e.reason})}};async function nen(e,t){let n=Number(t.version);if(!Number.isInteger(n)||n<=0)throw new De("--version must be a positive integer timestamp");let r=t.reason?.trim(),o=await e.rejectSkillVersion({params:{id:t.id,version:n},body:r?{reason:r}:{}});if(o.status!==200){let i=o.body?.message??`rejectSkillVersion returned ${o.status}`;throw new De(i)}console.log(`rejected /${o.body.name} v${o.body.version} (${o.body.id})`)}m();Rk();import ren from"node:os";import qa from"node:path";var jXe={meta:{name:"scan",description:"List local skills found by Lore's scanner."},async run(){await cen()}};function oen(e){let t=qa.resolve(e),n=qa.resolve(ren.homedir()),r=qa.relative(n,t);return r===""?"~":!r.startsWith("..")&&!qa.isAbsolute(r)?qa.join("~",r):t}function ien(e){return oen(qa.dirname(qa.dirname(e)))}function sen(e){return qa.basename(qa.dirname(e))}function aen(e,t){let n=qa.resolve(e);for(let r of t){let o=qa.resolve(r),i=qa.relative(o,n);if(i!==""&&!i.startsWith("..")&&!qa.isAbsolute(i))return o}return null}function uen(e,t,n){return e==="claude_project"?t.map(r=>qa.join(T9(r),n)):e==="agents_project"?t.map(r=>qa.join(b9(r),n)):[]}async function cen(){let e=await BWe(),t=e.map(u=>u.root),n=new Map(e.map(u=>[qa.resolve(u.root),u])),r=await Upe({projectCwds:t,includeCwdProject:!1}),o={},i=new Set;for(let u of r){let l=qa.resolve(u.filePath);if(i.has(l))continue;i.add(l);let f=ien(u.filePath),h=aen(u.filePath,t),_=h?n.get(h)?.alsoSeenAt??[]:[];o[f]??=[],o[f].push({name:u.name,description:u.description,root_kind:u.rootKind,file_path:u.filePath,also_seen_at:uen(u.rootKind,_,sen(u.filePath))})}let s=QGe.parse({type:"local_skill_scanner_output",skills:o});console.log(JSON.stringify(s,null,2))}m();Pr();on();var zXe={meta:{name:"status",description:"Show local Lore-managed skill sync state."},async run(){if(!await sn())throw new De("skill status requires login \u2014 run 'lore login' first");await len()}};async function len(){let e=await $a(),t=[];for(let n of Object.values(e.installed).sort((r,o)=>r.skillId.localeCompare(o.skillId)))t.push(["installed",n.skillId,`/${n.name}`,`status=${n.lastSyncStatus}`,`base=${n.baseVersion}`,`installed=${n.lastInstalledVersion}`,`root=${n.rootKind}`,`path=${n.installPath}`].join(" "));for(let n of Object.values(e.captured).sort((r,o)=>r.skillId.localeCompare(o.skillId))){let r=e.published[n.skillId];t.push(["captured",n.skillId,`/${n.name}`,`status=${r?"published":"private"}`,`version=${n.lastPushedVersion}`,`root=${n.rootKind}`,`path=${n.filePath}`].join(" "))}for(let[n,r]of Object.entries(e.published).sort(([o],[i])=>o.localeCompare(i)))e.captured[n]||t.push(["published",n,`version=${r.lastPublishedVersion}`,`hash=${r.lastPublishedHash}`].join(" "));if(t.length===0){console.log("no local skills tracked by Lore");return}console.log(t.join(`
695
- `))}m();Pr();on();var HXe={meta:{name:"sync",description:"Sync installed Lore-managed skills to their latest accepted versions."},async run(){if(!await sn())throw new De("workspace skill sync requires login \u2014 run 'lore login' first");let e=await rfe(Gt());console.log(`skill sync complete: ${e.installedUpdated} updated, ${e.localEditsUploaded} local edit${e.localEditsUploaded===1?"":"s"} uploaded, ${e.conflicts} conflict${e.conflicts===1?"":"s"}`)}};m();import $Xe from"node:fs/promises";import den from"node:path";Pr();on();var qXe={meta:{name:"uninstall",description:"Remove a Lore-managed skill by stable skill ID."},args:{target:{type:"positional",required:!0,description:"Workspace skill ID"}},async run({args:e}){let t=typeof e.target=="string"?e.target.trim():"";if(!t)throw new De("uninstall needs a skill ID \u2014 e.g. `lore skills uninstall sk_01j...`");if(!await sn())throw new De("workspace skill uninstalls require login \u2014 run 'lore login' first");let n=Gt();await pen(n,t)}};async function pen(e,t){let n=await i1(t);n&&(await $Xe.rm(n.installPath,{force:!0}),await $Xe.rmdir(den.dirname(n.installPath)).catch(()=>{}));let r=await e.uninstallSkill({params:{id:t},body:{}});if(r.status!==200){let o=r.body?.message??`uninstallSkill returned ${r.status}`;throw new De(o)}if(await bWe(t),n){console.log(`uninstalled /${n.name} (${t}) from ${n.installPath}`);return}console.log(`uninstalled ${t}`)}var VXe={meta:{name:"skills",description:"Publish, install, and list skills shared via Lore."},subCommands:{publish:QXe,install:PXe,uninstall:qXe,sync:HXe,daemon:F9,approve:OXe,reject:GXe,proposals:LXe,status:zXe,list:MXe,scan:jXe}};s0();m();await Ao();var Y9=ue(dn(),1);sc();await pb();m();await Ao();var $9=ue(dn(),1);await xA();m();await Ao();var c1=ue(dn(),1);ks();var md=ue(jt(),1);function l1({items:e,onSelect:t,initialIndex:n=0,disabled:r=!1,hint:o,labelWidth:i=20}){let[s,u]=(0,c1.useState)(YXe(e,n)),l=(0,c1.useRef)(s);return(0,c1.useEffect)(()=>{let f=YXe(e,n);l.current=f,u(f)},[e,n]),xu((f,h)=>{if(e.length!==0){if(h.upArrow||f==="k"){let _=fen(e,l.current);l.current=_,u(_);return}if(h.downArrow||f==="j"){let _=KXe(e,l.current);l.current=_,u(_);return}if(h.return||f===" "){let _=e[l.current];_&&!_.disabled&&t(_)}}},{isActive:!r}),e.length===0?(0,md.jsx)(he,{color:Re.muted,children:"no actions available"}):(0,md.jsxs)(Ee,{flexDirection:"column",children:[e.map((f,h)=>{let _=h===s,y=f.disabled?Re.muted:_?Re.primary:Re.highlight;return(0,md.jsxs)(Ee,{children:[(0,md.jsx)(Ee,{width:2,flexShrink:0,children:(0,md.jsx)(he,{color:_?Re.primary:Re.muted,children:_?"\u203A":" "})}),(0,md.jsx)(Ee,{width:i,flexShrink:0,children:(0,md.jsx)(he,{color:y,bold:_&&!f.disabled,children:f.label})}),f.description?(0,md.jsx)(Ee,{flexGrow:1,flexShrink:1,children:(0,md.jsx)(he,{color:Re.muted,children:f.description})}):null]},f.id)}),o?(0,md.jsx)(Ee,{marginTop:1,children:(0,md.jsx)(he,{color:Re.muted,children:o})}):null]})}function YXe(e,t){if(e.length===0)return 0;let n=Math.max(0,Math.min(t,e.length-1));return e[n]?.disabled?KXe(e,n-1):n}function KXe(e,t){if(e.length===0)return 0;for(let n=1;n<=e.length;n++){let r=(t+n)%e.length;if(!e[r]?.disabled)return r}return t}function fen(e,t){if(e.length===0)return 0;for(let n=1;n<=e.length;n++){let r=(t-n+e.length)%e.length;if(!e[r]?.disabled)return r}return t}await DA();await Ab();await gb();ks();m();Pr();Ga();LD();HD();async function G9(e){if(!await(e.hasAccessToken??(async()=>!!await sn()))())return{state:"logged_out"};let n=e.client??Gt();try{let r=await n.whoAmI({headers:{}});return r.status!==200?{state:"error",message:JXe(r.body,`whoAmI returned ${r.status}`)}:{state:"ready",userId:r.body.user.id,email:r.body.emailAddress,displayName:r.body.user.display_name,organizations:r.body.organizations,activeOrganizationId:r.body.organizationId,activeOrganizationName:r.body.org_name}}catch(r){return{state:"error",message:r instanceof Error?r.message:String(r)}}}async function j9(e){let t=e.platform??process.platform;if(t!=="darwin")return{state:"unsupported",platform:t};let n=e.getDaemonStatus??u$;try{return{state:"ready",report:await n()}}catch(r){return{state:"error",message:r instanceof Error?r.message:String(r)}}}async function z9(e){if(!await(e.hasAccessToken??(async()=>!!await sn()))())return{state:"logged_out"};let n=e.client??Gt();try{let r=await n.listSkills({});if(r.status!==200)return{state:"error",message:JXe(r.body,`listSkills returned ${r.status}`)};let o=r.body.objects.length,i=r.body.objects.filter(s=>s.visibility==="workspace").length;return{state:"ready",count:o,published:i}}catch(r){return{state:"error",message:r instanceof Error?r.message:String(r)}}}async function H9(){try{await Ih();let e=await Ho();return men(e)}catch(e){return{state:"error",message:e instanceof Error?e.message:String(e)}}}function men(e){return{state:"ready",cwd:e.include.cwd,repo:e.include.repo}}function JXe(e,t){if(e&&typeof e=="object"&&"message"in e){let n=e.message;if(typeof n=="string"&&n.length>0)return n}return t}var wt=ue(jt(),1);function U0({cliVersion:e,initialData:t,deps:n={},onSelect:r}){let{exit:o}=ws(),[i,s]=(0,$9.useState)(t??{identity:{state:"loading"},daemon:{state:"loading"},skills:{state:"loading"},uploadDirs:{state:"loading"}});(0,$9.useEffect)(()=>{if(t)return;let l=!1;return(async()=>{let[f,h,_,y]=await Promise.all([G9(n),j9(n),z9(n),H9()]);l||s({identity:f,daemon:h,skills:_,uploadDirs:y})})(),()=>{l=!0}},[]),xu((l,f)=>{(l==="q"||f.ctrl&&l==="c"||f.escape)&&(r("quit"),o())});let u=yen(i);return(0,wt.jsxs)(Ee,{flexDirection:"column",paddingY:1,paddingX:1,children:[(0,wt.jsx)(Ps,{title:"lore",subtitle:gen(i.identity),right:`v${e}`}),(0,wt.jsxs)(Ee,{flexDirection:"row",gap:2,children:[(0,wt.jsx)(Ee,{flexDirection:"column",width:"50%",children:(0,wt.jsx)(Qn,{title:"Daemon",children:(0,wt.jsx)(hen,{daemon:i.daemon})})}),(0,wt.jsx)(Ee,{flexDirection:"column",width:"50%",children:(0,wt.jsx)(Qn,{title:"Workspace",children:(0,wt.jsx)(_en,{identity:i.identity,skills:i.skills})})})]}),(0,wt.jsx)(Ee,{marginTop:1,children:(0,wt.jsx)(Qn,{title:"Upload filters",subtitle:i.uploadDirs.state==="ready"?`${i.uploadDirs.cwd.length+i.uploadDirs.repo.length} configured`:void 0,children:(0,wt.jsx)(Aen,{uploadDirs:i.uploadDirs})})}),(0,wt.jsx)(Ee,{marginTop:1,children:(0,wt.jsx)(Qn,{title:"Quick actions",subtitle:"\u2191/\u2193 or j/k \xB7 Enter to choose \xB7 q to quit",children:(0,wt.jsx)(l1,{items:u,onSelect:l=>{r(l.id),o()}})})})]})}function Aen({uploadDirs:e}){return e.state==="loading"?(0,wt.jsx)(za,{label:"reading ~/.lore/upload_filters.json\u2026"}):e.state==="error"?(0,wt.jsxs)(Ee,{flexDirection:"column",children:[(0,wt.jsx)(an,{label:"Status",value:"error",kind:"error"}),(0,wt.jsx)(he,{color:Re.danger,children:e.message})]}):e.cwd.length===0&&e.repo.length===0?(0,wt.jsxs)(Ee,{flexDirection:"column",children:[(0,wt.jsx)(an,{label:"Status",value:"none configured \u2014 the daemon won't auto-upload anything",kind:"warning"}),(0,wt.jsx)(Ee,{marginTop:1,children:(0,wt.jsxs)(he,{color:Re.muted,children:["Run ",(0,wt.jsx)(he,{bold:!0,children:"lore configure"})," to pick directories interactively."]})})]}):(0,wt.jsxs)(Ee,{flexDirection:"column",children:[e.cwd.map(t=>(0,wt.jsx)(an,{label:"cwd",value:t,kind:"success",labelWidth:16},`cwd:${t}`)),e.repo.map(t=>(0,wt.jsx)(an,{label:"repo",value:t,kind:"success",labelWidth:16},`repo:${t}`))]})}function gen(e){switch(e.state){case"ready":{let t=e.activeOrganizationName??"";return t?`${e.email} \xB7 ${t}`:e.email}case"logged_out":return"not signed in";case"loading":return"loading\u2026";case"error":return"identity error"}}function hen({daemon:e}){if(e.state==="loading")return(0,wt.jsx)(za,{label:"reading launchd state\u2026"});if(e.state==="unsupported")return(0,wt.jsxs)(Ee,{flexDirection:"column",children:[(0,wt.jsx)(he,{color:Re.muted,children:"Background uploads are macOS-only today."}),(0,wt.jsxs)(he,{color:Re.muted,children:["Detected platform: ",e.platform]})]});if(e.state==="error")return(0,wt.jsxs)(Ee,{flexDirection:"column",children:[(0,wt.jsx)(an,{label:"Status",value:"error",kind:"error"}),(0,wt.jsx)(he,{color:Re.danger,children:e.message})]});let t=e.report,n=t.healthy?"success":t.enabled?"warning":"idle";return(0,wt.jsxs)(Ee,{flexDirection:"column",children:[(0,wt.jsx)(an,{label:"Status",value:t.health,kind:n}),(0,wt.jsx)(an,{label:"Enabled",value:t.enabled?"yes":"no",kind:t.enabled?"success":"idle"}),(0,wt.jsx)(an,{label:"Running",value:t.running?"yes":"no",kind:t.running?"success":"idle"}),(0,wt.jsx)(an,{label:"Heartbeat",value:ZXe(t.status?.last_heartbeat_at),kind:t.heartbeat_fresh?"success":"idle"}),(0,wt.jsx)(an,{label:"Last upload",value:ZXe(t.status?.last_success_at)}),t.status?.last_error?(0,wt.jsx)(an,{label:"Last error",value:t.status.last_error,kind:"error"}):null]})}function _en({identity:e,skills:t}){return e.state==="loading"?(0,wt.jsx)(za,{label:"loading your account\u2026"}):e.state==="logged_out"?(0,wt.jsxs)(Ee,{flexDirection:"column",children:[(0,wt.jsx)(an,{label:"Status",value:"signed out",kind:"warning"}),(0,wt.jsx)(he,{color:Re.muted,children:"Choose \u201CSign in\u201D below to authorise this CLI."})]}):e.state==="error"?(0,wt.jsxs)(Ee,{flexDirection:"column",children:[(0,wt.jsx)(an,{label:"Status",value:"error",kind:"error"}),(0,wt.jsx)(he,{color:Re.danger,children:e.message})]}):(0,wt.jsxs)(Ee,{flexDirection:"column",children:[(0,wt.jsx)(an,{label:"User",value:e.email,kind:"success"}),(0,wt.jsx)(an,{label:"Display name",value:e.displayName}),(0,wt.jsx)(an,{label:"Workspace",value:e.activeOrganizationName??"\u2014",kind:e.activeOrganizationName?"info":"idle"}),(0,wt.jsx)(an,{label:"Other workspaces",value:Math.max(0,e.organizations.length-1)}),(0,wt.jsx)(an,{label:"Skills",value:Een(t)})]})}function Een(e){return e.state==="loading"?"loading\u2026":e.state==="logged_out"?"\u2014":e.state==="error"?`error (${e.message})`:`${e.count} installed \xB7 ${e.published} published`}function yen(e){let t=e.identity.state==="ready",n=e.daemon.state==="ready"&&e.daemon.report.enabled,r=e.daemon.state!=="unsupported",o=[];return t&&(o.push({id:"share-codex",label:"Share Codex",description:"lore share-codex --session-file <path>"}),o.push({id:"share-cowork",label:"Share Cowork",description:"lore share-cowork"}),o.push({id:"export",label:"Export Claude",description:"lore export"})),r&&(n?(o.push({id:"status",label:"Daemon status",description:"lore status"}),o.push({id:"restart",label:"Restart daemon",description:"lore restart"}),o.push({id:"disable",label:"Disable daemon",description:"lore disable"})):o.push({id:"enable",label:"Enable daemon",description:"lore enable"})),t?(o.push({id:"configure",label:"Configure uploads",description:"lore configure"}),o.push({id:"listen-list",label:"Manage upload dirs",description:"lore listen list"}),o.push({id:"skills-list",label:"Skills",description:"lore skills list"}),o.push({id:"workspaces-list",label:"Workspaces",description:"lore workspaces list"}),o.push({id:"logout",label:"Sign out",description:"lore logout"})):o.push({id:"login",label:"Sign in",description:"lore login"}),o.push({id:"quit",label:"Quit",description:"exit the dashboard"}),o}function ZXe(e){if(!e)return"never";let t=Date.parse(e);if(Number.isNaN(t))return e;let n=Math.max(0,Math.floor((Date.now()-t)/1e3));return n<60?`${n}s ago`:n<3600?`${Math.floor(n/60)}m ago`:n<86400?`${Math.floor(n/3600)}h ago`:`${Math.floor(n/86400)}d ago`}m();await Ao();await xA();await DA();ks();var si=ue(jt(),1),Sen=[{id:"login",label:"Sign in with WorkOS",description:"opens your browser for a device-code flow"},{id:"quit",label:"Quit",description:"exit without signing in"}];function q9({cliVersion:e,onSelect:t}){let{exit:n}=ws();return xu((r,o)=>{(r==="q"||o.ctrl&&r==="c"||o.escape)&&(t("quit"),n())}),(0,si.jsxs)(Ee,{flexDirection:"column",paddingX:1,paddingY:1,children:[(0,si.jsx)(Ps,{title:"lore",subtitle:"welcome",right:`v${e}`}),(0,si.jsx)(Qn,{title:"What is Lore?",children:(0,si.jsxs)(Ee,{flexDirection:"column",children:[(0,si.jsx)(he,{children:"Lore captures your Claude Code, Codex, and Cowork sessions and shares them with your team \u2014 searchable, discussable, and remixable."}),(0,si.jsxs)(Ee,{marginTop:1,flexDirection:"column",children:[(0,si.jsx)(he,{color:Re.muted,children:"You'll get:"}),(0,si.jsxs)(he,{children:[(0,si.jsx)(he,{color:Re.success,children:" \u2713"})," Background auto-upload of every Claude Code session"]}),(0,si.jsxs)(he,{children:[(0,si.jsx)(he,{color:Re.success,children:" \u2713"})," One-command share for Codex rollouts and Cowork sessions"]}),(0,si.jsxs)(he,{children:[(0,si.jsx)(he,{color:Re.success,children:" \u2713"})," Skill publishing and discovery across your workspace"]}),(0,si.jsxs)(he,{children:[(0,si.jsx)(he,{color:Re.success,children:" \u2713"})," Thread search, dashboards, and discussion"]})]})]})}),(0,si.jsx)(Ee,{marginTop:1,children:(0,si.jsx)(Qn,{title:"Sign in to continue",subtitle:"\u2191/\u2193 or j/k \xB7 Enter to choose \xB7 q to quit",children:(0,si.jsx)(l1,{items:Sen,onSelect:r=>{t(r.id),n()}})})}),(0,si.jsx)(Ee,{marginTop:1,children:(0,si.jsxs)(he,{color:Re.muted,children:["New to Lore? Run ",(0,si.jsx)(he,{bold:!0,children:"lore --help"})," any time for the command reference."]})})]})}var V9=ue(jt(),1),Ten={login:["login"],logout:["logout"],enable:["enable"],disable:["disable"],status:["status"],restart:["restart"],"share-codex":["share-codex"],"share-cowork":["share-cowork"],export:["export"],"workspaces-list":["workspaces","list"],"skills-list":["skills","list"],"listen-list":["listen","list"],configure:["configure"],quit:[]};function ben({cliVersion:e,deps:t,onSelect:n}){let[r,o]=(0,Y9.useState)(void 0),{exit:i}=ws();return(0,Y9.useEffect)(()=>{let s=!1;return(async()=>{let[u,l,f,h]=await Promise.all([G9(t),j9(t),z9(t),H9()]);s||o({identity:u,daemon:l,skills:f,uploadDirs:h})})(),()=>{s=!0}},[]),r?r.identity.state==="logged_out"?(0,V9.jsx)(q9,{cliVersion:e,onSelect:s=>{n(s),i()}}):(0,V9.jsx)(U0,{cliVersion:e,initialData:r,onSelect:n}):null}async function WXe(){let e="quit";return await sl((0,V9.jsx)(ben,{cliVersion:_u(),deps:{},onSelect:n=>{e=n}})).waitUntilExit(),{action:e,rawArgs:Ten[e]}}m();await pb();m();await Ao();var FM=ue(dn(),1);await xA();await DA();ks();m();await Ao();await Mle();await xA();await mb();await DA();await Qle();m();await Ao();ks();var d1=ue(jt(),1),Ien="\u2588",Cen="\u2591";function XXe({value:e,width:t=24,label:n,color:r=Re.success}){let o=Number.isFinite(e)?Math.max(0,Math.min(1,e)):0,i=Math.round(o*t),s=Math.max(0,t-i);return(0,d1.jsxs)(Ee,{children:[(0,d1.jsx)(he,{color:r,children:Ien.repeat(i)}),(0,d1.jsx)(he,{color:Re.muted,children:Cen.repeat(s)}),n?(0,d1.jsxs)(he,{color:Re.muted,children:[" ",n]}):null]})}await Ab();await gb();await Lle();await $le();await Yle();m();await Ao();await xA();await mb();await DA();await Ab();ks();var go=ue(jt(),1),tet=[{key:"resolving_session",label:"Resolving session"},{key:"uploading",label:"Uploading transcript"},{key:"parsing",label:"Parsing on server"},{key:"updating_visibility",label:"Updating visibility"},{key:"resolving_highlight",label:"Resolving highlight"}];function PM(){return{steps:tet.map(({key:e,label:t})=>({key:e,label:t,status:"pending"}))}}function K9(e,t){return t.kind==="completed"?{...e,result:{url:t.url,reused:t.reused,visibility:t.visibility,clipboardCopied:t.clipboardCopied,sessionId:t.sessionId}}:t.kind==="error"?{...e,errorMessage:t.message,steps:e.steps.map(n=>n.status==="active"?{...n,status:"pending"}:n)}:t.step==="done"||t.step==="errored"?{...e,steps:e.steps.map(n=>({...n,status:n.status==="active"?"done":n.status}))}:{...e,steps:e.steps.map(n=>n.key===t.step?{...n,status:"active",label:t.label?`${eet(n.key)} (${t.label})`:eet(n.key)}:n.status==="active"?{...n,status:"done"}:n)}}function eet(e){return tet.find(t=>t.key===e)?.label??e}function Nh({title:e,subtitle:t,state:n}){return(0,go.jsxs)(Ee,{flexDirection:"column",paddingX:1,paddingY:1,children:[(0,go.jsx)(Ps,{title:e,subtitle:t}),(0,go.jsx)(Qn,{title:"Pipeline",children:(0,go.jsx)(Ee,{flexDirection:"column",children:n.steps.map(r=>(0,go.jsx)(ven,{step:r},r.key))})}),n.result?(0,go.jsx)(Ee,{marginTop:1,flexDirection:"column",children:(0,go.jsx)(Ms,{kind:"success",title:n.result.reused?"Already on Lore":"Shared",children:(0,go.jsxs)(Ee,{flexDirection:"column",children:[(0,go.jsx)(he,{children:n.result.url}),(0,go.jsx)(Ee,{marginTop:1,children:(0,go.jsxs)(he,{color:Re.muted,children:[n.result.clipboardCopied?"Copied to clipboard. ":"",n.result.visibility?`Visibility: ${n.result.visibility}.`:""]})})]})})}):null,n.errorMessage?(0,go.jsx)(Ee,{marginTop:1,children:(0,go.jsx)(Ms,{kind:"error",title:"Failed",children:(0,go.jsx)(he,{children:n.errorMessage})})}):null]})}function ven({step:e}){return e.status==="active"?(0,go.jsxs)(Ee,{children:[(0,go.jsx)(za,{}),(0,go.jsx)(he,{children:" "}),(0,go.jsx)(he,{color:Re.primary,children:e.label})]}):e.status==="done"?(0,go.jsxs)(Ee,{children:[(0,go.jsx)(he,{color:Re.success,children:"\u2713 "}),(0,go.jsx)(he,{color:Re.muted,children:e.label})]}):(0,go.jsxs)(Ee,{children:[(0,go.jsx)(he,{color:Re.muted,children:"\u25CB "}),(0,go.jsx)(he,{color:Re.muted,children:e.label})]})}ks();m();var MM=Date.parse("2026-05-16T12:00:00.000Z");function LM(e){return new Date(MM-e*6e4).toISOString()}var Yf={plist:"/Users/alex/Library/LaunchAgents/ai.tanagram.lore.plist",binary:"/Users/alex/.lore/bin/lore-background",logFile:"/Users/alex/.lore/log.txt",status:"/Users/alex/.lore/status.json",installSource:"/opt/homebrew/bin/lore"},net=[{id:"tanagram/lore",label:"tanagram/lore",kind:"repo",sessionCount:18,lastUsedAtMs:MM-7*6e4},{id:"acme/customer-demo",label:"acme/customer-demo",kind:"repo",sessionCount:6,lastUsedAtMs:MM-42*6e4},{id:"acme/integration",label:"acme/integration",kind:"repo",sessionCount:3,lastUsedAtMs:MM-180*6e4},{id:"__custom_repo_path__:/Users/alex/notes",label:"/Users/alex/notes",kind:"dir",sessionCount:1,lastUsedAtMs:MM-1560*6e4}],Ren=["/Users/alex/code/tanagram-lore","/Users/alex/work/acme-integration"],p1={label:"ai.tanagram.lore",enabled:!0,loaded:!0,running:!0,healthy:!0,health:"running",heartbeat_fresh:!0,plist_path:Yf.plist,binary_path:Yf.binary,status_path:Yf.status,install_source_path:Yf.installSource,status:{version:"0.1.0",pid:4242,state:"idle",auth:"logged_in",started_at:LM(60),last_heartbeat_at:LM(1),last_success_at:LM(5),last_completed_at:LM(5),last_thread_ids:["thr_01hx_story"]}},ret={...p1,running:!1,healthy:!1,health:"stale heartbeat",heartbeat_fresh:!1,status:{...p1.status,state:"error",last_heartbeat_at:LM(17),last_error:"upload failed: HTTP 503 from /api/upload-session"}},xen={...p1,enabled:!1,loaded:!1,running:!1,healthy:!1,health:"disabled",heartbeat_fresh:!1,status:void 0},Den={state:"ready",userId:"user_alex",email:"alex@tanagram.ai",displayName:"Alex Rivera",organizations:[{id:"org_tanagram",name:"Tanagram"},{id:"org_acme",name:"Acme"}],activeOrganizationId:"org_tanagram",activeOrganizationName:"Tanagram"},UM={identity:Den,daemon:{state:"ready",report:p1},skills:{state:"ready",count:9,published:4},uploadDirs:{state:"ready",cwd:Ren,repo:[]}},oet={...UM,uploadDirs:{state:"ready",cwd:[],repo:[]}},iet={...UM,daemon:{state:"error",message:"launchctl print failed: service not found"}},set={...UM,daemon:{state:"unsupported",platform:"linux"}},aet={identity:{state:"logged_out"},daemon:{state:"ready",report:xen},skills:{state:"logged_out"},uploadDirs:{state:"ready",cwd:[],repo:[]}},uet=["/Users/alex/code/tanagram-lore","/Users/alex/code/customer-demo","/Users/alex/code/internal-tools"];var yt=ue(jt(),1),ro=()=>{};function Q0(...e){return e.reduce(S$,VP())}function QM(...e){return e.reduce(K9,PM())}var LA=[{id:"onboarding/welcome/default",title:"Welcome",path:["TUI","Screens","Onboarding","Welcome"],description:"First-run value prop and sign-in CTA.",render:()=>(0,yt.jsx)(q9,{cliVersion:"0.1.0",onSelect:ro})},{id:"onboarding/login/initialising",title:"Login / initialising",path:["TUI","Screens","Onboarding","Login"],description:"Device-code request is in flight.",render:()=>(0,yt.jsx)(Dp,{state:VP()})},{id:"onboarding/login/device-code",title:"Login / device code",path:["TUI","Screens","Onboarding","Login"],description:"User has a WorkOS code and browser URL.",render:()=>(0,yt.jsx)(Dp,{state:Q0({kind:"device_authorized",userCode:"ABCD-EFGH",verificationUri:"https://login.example.com/device",verificationUriComplete:"https://login.example.com/device?user_code=ABCD-EFGH"},{kind:"browser_opened"})})},{id:"onboarding/login/awaiting-authorization",title:"Login / awaiting authorization",path:["TUI","Screens","Onboarding","Login"],description:"Browser is open and polling is active.",render:()=>(0,yt.jsx)(Dp,{state:Q0({kind:"device_authorized",userCode:"ABCD-EFGH",verificationUri:"https://login.example.com/device",verificationUriComplete:"https://login.example.com/device?user_code=ABCD-EFGH"},{kind:"browser_opened"},{kind:"waiting_for_authorization"})})},{id:"onboarding/login/auto-enable",title:"Login / auto-enable in progress",path:["TUI","Screens","Onboarding","Login"],description:"Login succeeded and launchd install is running.",render:()=>(0,yt.jsx)(Dp,{state:Q0({kind:"device_authorized",userCode:"ABCD-EFGH",verificationUri:"https://login.example.com/device",verificationUriComplete:"https://login.example.com/device?user_code=ABCD-EFGH"},{kind:"browser_opened"},{kind:"logged_in"},{kind:"auto_enable_started"})})},{id:"onboarding/login/success",title:"Login / success",path:["TUI","Screens","Onboarding","Login"],description:"Signed in and background uploads enabled.",render:()=>(0,yt.jsx)(Dp,{state:Q0({kind:"device_authorized",userCode:"ABCD-EFGH",verificationUri:"https://login.example.com/device",verificationUriComplete:"https://login.example.com/device?user_code=ABCD-EFGH"},{kind:"browser_opened"},{kind:"logged_in"},{kind:"auto_enable_started"},{kind:"auto_enable_succeeded",plistPath:Yf.plist,binaryPath:Yf.binary,logFile:Yf.logFile})})},{id:"onboarding/login/auto-enable-failed",title:"Login / auto-enable failed",path:["TUI","Screens","Onboarding","Login"],description:"Login succeeded but the daemon install needs a retry.",render:()=>(0,yt.jsx)(Dp,{state:Q0({kind:"device_authorized",userCode:"ABCD-EFGH",verificationUri:"https://login.example.com/device",verificationUriComplete:"https://login.example.com/device?user_code=ABCD-EFGH"},{kind:"logged_in"},{kind:"auto_enable_started"},{kind:"auto_enable_failed"})})},{id:"onboarding/login/denied",title:"Login / denied",path:["TUI","Screens","Onboarding","Login"],description:"Terminal authorization failure state.",render:()=>(0,yt.jsx)(Dp,{state:Q0({kind:"device_authorized",userCode:"ABCD-EFGH",verificationUri:"https://login.example.com/device",verificationUriComplete:"https://login.example.com/device?user_code=ABCD-EFGH"},{kind:"authorization_denied"})})},{id:"onboarding/login/api-unreachable",title:"Login / API unreachable",path:["TUI","Screens","Onboarding","Login"],description:"Early failure before WorkOS device-code negotiation.",render:()=>(0,yt.jsx)(Dp,{state:Q0({kind:"login_failed",message:"Could not reach the Lore API at http://localhost:4000. If you're running pnpm dev, start the local API server or set LORE_TARGET=dev-shared."})})},{id:"onboarding/login/already-signed-in",title:"Login / already signed in",path:["TUI","Screens","Onboarding","Login"],description:"Short-circuit copy for authenticated callers.",render:()=>(0,yt.jsx)(Dp,{state:Q0({kind:"already_logged_in"})})},{id:"onboarding/configure-upload-repos/loading",title:"Configure upload repos / loading",path:["TUI","Screens","Onboarding","Configure upload repos"],description:"Recent Claude Code cwd discovery is in flight.",render:()=>(0,yt.jsx)(wA,{state:{phase:"loading",suggestions:[],organizationName:"Tanagram"},onSubmit:ro,onSkip:ro})},{id:"onboarding/configure-upload-repos/choose",title:"Configure upload repos / choose",path:["TUI","Screens","Onboarding","Configure upload repos"],description:"Suggested git remotes with defaults checked.",render:()=>(0,yt.jsx)(wA,{state:{phase:"choose",suggestions:net,now:Date.parse("2026-05-16T12:00:00.000Z"),organizationName:"Tanagram"},onSubmit:ro,onSkip:ro})},{id:"onboarding/configure-upload-repos/empty",title:"Configure upload repos / empty",path:["TUI","Screens","Onboarding","Configure upload repos"],description:"No recent sessions, with add-custom affordance.",render:()=>(0,yt.jsx)(wA,{state:{phase:"choose",suggestions:[],organizationName:"Tanagram"},onSubmit:ro,onSkip:ro})},{id:"onboarding/configure-upload-repos/saving",title:"Configure upload repos / saving",path:["TUI","Screens","Onboarding","Configure upload repos"],description:"Persisting selected repos.",render:()=>(0,yt.jsx)(wA,{state:{phase:"saving",suggestions:[],organizationName:"Tanagram"},onSubmit:ro,onSkip:ro})},{id:"onboarding/configure-upload-repos/saved",title:"Configure upload repos / saved",path:["TUI","Screens","Onboarding","Configure upload repos"],description:"Successful save for multiple repos.",render:()=>(0,yt.jsx)(wA,{state:{phase:"saved",suggestions:[],savedCount:3},onSubmit:ro,onSkip:ro})},{id:"onboarding/configure-upload-repos/skipped",title:"Configure upload repos / skipped",path:["TUI","Screens","Onboarding","Configure upload repos"],description:"Successful save with zero selected repos.",render:()=>(0,yt.jsx)(wA,{state:{phase:"saved",suggestions:[],savedCount:0},onSubmit:ro,onSkip:ro})},{id:"onboarding/configure-upload-repos/error",title:"Configure upload repos / error",path:["TUI","Screens","Onboarding","Configure upload repos"],description:"Failed persistence state.",render:()=>(0,yt.jsx)(wA,{state:{phase:"errored",suggestions:[],errorMessage:"EACCES: permission denied, open ~/.lore/upload_filters.json"},onSubmit:ro,onSkip:ro})},{id:"dashboard/healthy",title:"Dashboard / healthy",path:["TUI","Screens","Dashboard"],description:"Signed in, daemon healthy, upload repos configured.",render:()=>(0,yt.jsx)(U0,{cliVersion:"0.1.0",initialData:UM,onSelect:ro})},{id:"dashboard/empty-upload-dirs",title:"Dashboard / empty upload repos",path:["TUI","Screens","Dashboard"],description:"Consent-first empty state for background uploads.",render:()=>(0,yt.jsx)(U0,{cliVersion:"0.1.0",initialData:oet,onSelect:ro})},{id:"dashboard/daemon-error",title:"Dashboard / daemon error",path:["TUI","Screens","Dashboard"],description:"Daemon panel surfaces a launchctl failure.",render:()=>(0,yt.jsx)(U0,{cliVersion:"0.1.0",initialData:iet,onSelect:ro})},{id:"dashboard/unsupported-platform",title:"Dashboard / unsupported platform",path:["TUI","Screens","Dashboard"],description:"Linux/Windows copy for macOS-only daemon features.",render:()=>(0,yt.jsx)(U0,{cliVersion:"0.1.0",initialData:set,onSelect:ro})},{id:"dashboard/signed-out",title:"Dashboard / signed out",path:["TUI","Screens","Dashboard"],description:"Signed-out dashboard snapshot.",render:()=>(0,yt.jsx)(U0,{cliVersion:"0.1.0",initialData:aet,onSelect:ro})},{id:"sharing/initial",title:"Share flow / initial",path:["TUI","Screens","Sharing"],description:"All pipeline steps pending.",render:()=>(0,yt.jsx)(Nh,{title:"lore share-codex",subtitle:"sharing this Codex session",state:PM()})},{id:"sharing/uploading",title:"Share flow / uploading",path:["TUI","Screens","Sharing"],description:"Upload step active with a progress label.",render:()=>(0,yt.jsx)(Nh,{title:"lore share-codex",subtitle:"sharing this Codex session",state:QM({kind:"step",step:"resolving_session"},{kind:"step",step:"uploading",label:"42%"})})},{id:"sharing/parsing",title:"Share flow / parsing",path:["TUI","Screens","Sharing"],description:"Server-side parsing is active.",render:()=>(0,yt.jsx)(Nh,{title:"lore export",subtitle:"sharing your latest Claude Code session",state:QM({kind:"step",step:"resolving_session"},{kind:"step",step:"uploading"},{kind:"step",step:"parsing",label:"queued"})})},{id:"sharing/shared",title:"Share flow / shared",path:["TUI","Screens","Sharing"],description:"New share completed and copied to clipboard.",render:()=>(0,yt.jsx)(Nh,{title:"lore share-codex",state:QM({kind:"step",step:"resolving_session"},{kind:"step",step:"uploading"},{kind:"step",step:"parsing"},{kind:"step",step:"updating_visibility"},{kind:"step",step:"done"},{kind:"completed",url:"https://lore.link/thread/thr_01hx_story",reused:!1,visibility:"workspace",clipboardCopied:!0,sessionId:"thr_01hx_story"})})},{id:"sharing/already-shared",title:"Share flow / already shared",path:["TUI","Screens","Sharing"],description:"Deduped upload converges to an existing Lore thread.",render:()=>(0,yt.jsx)(Nh,{title:"lore share-cowork",state:QM({kind:"completed",url:"https://lore.link/thread/thr_01hx_story",reused:!0,visibility:"private",clipboardCopied:!1})})},{id:"sharing/error",title:"Share flow / error",path:["TUI","Screens","Sharing"],description:"Pipeline error callout.",render:()=>(0,yt.jsx)(Nh,{title:"lore export",state:QM({kind:"step",step:"resolving_session"},{kind:"step",step:"uploading"},{kind:"error",message:"presigned upload failed: HTTP 403"})})},{id:"daemon/run/enable-progress",title:"Daemon run / enable progress",path:["TUI","Screens","Daemon","Run"],description:"Enable command while launchd work is active.",render:()=>(0,yt.jsx)(L0,{mode:"enable",state:{phase:"in_progress"}})},{id:"daemon/run/enable-success",title:"Daemon run / enable success",path:["TUI","Screens","Daemon","Run"],description:"Enable success includes resolved paths.",render:()=>(0,yt.jsx)(L0,{mode:"enable",state:{phase:"finished",result:{plistPath:Yf.plist,binaryPath:Yf.binary,logFile:Yf.logFile}}})},{id:"daemon/run/disable-success",title:"Daemon run / disable success",path:["TUI","Screens","Daemon","Run"],description:"Disable success copy.",render:()=>(0,yt.jsx)(L0,{mode:"disable",state:{phase:"finished"}})},{id:"daemon/run/restart-success",title:"Daemon run / restart success",path:["TUI","Screens","Daemon","Run"],description:"Restart success copy.",render:()=>(0,yt.jsx)(L0,{mode:"restart",state:{phase:"finished"}})},{id:"daemon/run/error",title:"Daemon run / error",path:["TUI","Screens","Daemon","Run"],description:"Mode-independent daemon command error.",render:()=>(0,yt.jsx)(L0,{mode:"restart",state:{phase:"errored",errorMessage:"launchctl bootstrap failed"}})},{id:"daemon/status/healthy",title:"Daemon status / healthy",path:["TUI","Screens","Daemon","Status"],description:"Healthy daemon report.",render:()=>(0,yt.jsx)(NM,{report:p1})},{id:"daemon/status/unhealthy",title:"Daemon status / unhealthy",path:["TUI","Screens","Daemon","Status"],description:"Unhealthy report with warning and last error.",render:()=>(0,yt.jsx)(NM,{report:ret})},{id:"components/primitives/header",title:"Components / header",path:["TUI","Components","Primitives"],description:"Top-level title row with optional subtitle and right cell.",render:()=>(0,yt.jsx)(Ps,{title:"lore",subtitle:"component primitive",right:"v0.1.0"})},{id:"components/primitives/panel",title:"Components / panel",path:["TUI","Components","Primitives"],description:"Bordered container with title, subtitle, and focus styling.",render:()=>(0,yt.jsx)(Qn,{title:"Panel",subtitle:"focused",focused:!0,children:(0,yt.jsx)(he,{color:Re.muted,children:"Panels compose screen sections and callouts."})})},{id:"components/primitives/status-line",title:"Components / status line",path:["TUI","Components","Primitives"],description:"Key/value rows with severity dots.",render:()=>(0,yt.jsxs)(Qn,{title:"StatusLine",children:[(0,yt.jsx)(an,{label:"Healthy",value:"yes",kind:"success"}),(0,yt.jsx)(an,{label:"Warning",value:"needs attention",kind:"warning"}),(0,yt.jsx)(an,{label:"Error",value:"launchctl failed",kind:"error"})]})},{id:"components/primitives/progress-bar",title:"Components / progress bar",path:["TUI","Components","Primitives"],description:"Plain unicode progress bar for deterministic terminal rendering.",render:()=>(0,yt.jsx)(Qn,{title:"ProgressBar",children:(0,yt.jsx)(XXe,{value:.62,label:"62%"})})},{id:"components/primitives/message-box",title:"Components / message box",path:["TUI","Components","Primitives"],description:"Severity callout for success, info, warning, and error copy.",render:()=>(0,yt.jsxs)(Ee,{flexDirection:"column",children:[(0,yt.jsx)(Ms,{kind:"success",title:"Shared",children:(0,yt.jsx)(he,{children:"Copied the Lore URL to your clipboard."})}),(0,yt.jsx)(Ee,{marginTop:1,children:(0,yt.jsx)(Ms,{kind:"error",title:"Failed",children:(0,yt.jsx)(he,{color:Re.muted,children:"presigned upload failed: HTTP 403"})})})]})},{id:"components/primitives/spinner",title:"Components / spinner",path:["TUI","Components","Primitives"],description:"Unrefed animated spinner primitive.",render:()=>(0,yt.jsx)(Qn,{title:"Spinner",children:(0,yt.jsx)(za,{label:"working on a terminal-friendly task\u2026"})})},{id:"components/inputs/menu",title:"Components / menu",path:["TUI","Components","Inputs"],description:"Keyboard menu with enabled and disabled items.",render:()=>(0,yt.jsx)(Qn,{title:"Menu",subtitle:"\u2191/\u2193 or j/k \xB7 Enter to choose",children:(0,yt.jsx)(l1,{items:[{id:"share",label:"Share",description:"upload a session"},{id:"status",label:"Status",description:"inspect daemon"},{id:"disabled",label:"Disabled",description:"not available in this state",disabled:!0}],onSelect:ro})})},{id:"components/inputs/checkbox-list",title:"Components / checkbox list",path:["TUI","Components","Inputs"],description:"Multi-select list with an action row.",render:()=>(0,yt.jsx)(Qn,{title:"CheckboxList",subtitle:"space to toggle \xB7 enter to save",children:(0,yt.jsx)($P,{items:[{id:"repo",label:"/Users/alex/code/tanagram-lore",initialChecked:!0},{id:"demo",label:"/Users/alex/code/customer-demo"},{id:"add",label:"+ Add a custom path\u2026",action:!0}],onSubmit:ro,onAction:ro})})},{id:"components/inputs/text-input",title:"Components / text input",path:["TUI","Components","Inputs"],description:"Single-line input with cursor rendering.",render:()=>(0,yt.jsx)(Qn,{title:"TextInput",children:(0,yt.jsx)(g$,{initialValue:"~/code",onSubmit:ro,onCancel:ro})})},{id:"components/inputs/path-picker",title:"Components / path picker",path:["TUI","Components","Inputs"],description:"Directory picker with deterministic story suggestions.",render:()=>(0,yt.jsx)(Qn,{title:"PathPicker",subtitle:"suggestions are fixture-backed",children:(0,yt.jsx)(h$,{initialValue:"/Users/alex/code",loadSuggestions:async()=>uet,onSubmit:ro,onCancel:ro})})}];function cet(e){return LA.find(t=>t.id===e)}function f1(e){return e.path.slice(1).join(" / ")}var Fr=ue(jt(),1);function pet({initialStoryId:e}){let t=Math.max(0,LA.findIndex(f=>f.id===e)),[n,r]=(0,FM.useState)(t),[o,i]=(0,FM.useState)("sidebar"),s=(0,FM.useRef)(o);s.current=o;let{exit:u}=ws();xu((f,h)=>{if(h.ctrl&&f==="c"){u();return}if(s.current==="sidebar"&&f==="q"){u();return}if(h.escape){if(s.current==="preview"){s.current="sidebar",i("sidebar");return}u();return}if(s.current==="preview"&&h.tab&&h.shift){s.current="sidebar",i("sidebar");return}if(s.current==="sidebar"&&h.tab&&!h.shift){s.current="preview",i("preview");return}if(s.current==="sidebar"){if(h.upArrow||f==="k"){r(_=>det(_-1));return}(h.downArrow||f==="j")&&r(_=>det(_+1))}});let l=LA[n]??LA[0];return(0,Fr.jsxs)(Ee,{flexDirection:"column",paddingX:1,paddingY:1,children:[(0,Fr.jsx)(Ps,{title:"lore TUI stories",subtitle:"terminal story runner",right:`${n+1}/${LA.length}`}),(0,Fr.jsx)(Ee,{marginBottom:1,children:(0,Fr.jsx)(he,{color:Re.muted,children:"\u2191/\u2193 or j/k select stories \xB7 Tab focuses preview \xB7 Shift+Tab/Esc returns \xB7 q exits from sidebar"})}),(0,Fr.jsxs)(Ee,{flexDirection:"row",gap:2,children:[(0,Fr.jsx)(Ee,{width:36,flexShrink:0,children:(0,Fr.jsx)(Qn,{title:"Stories",subtitle:o==="sidebar"?"focused":void 0,focused:o==="sidebar",children:(0,Fr.jsx)(Nen,{stories:LA,selectedIndex:n,focused:o==="sidebar"})})}),(0,Fr.jsx)(Ee,{flexDirection:"column",flexGrow:1,flexShrink:1,children:(0,Fr.jsx)(Qn,{title:l.title,focused:o==="preview",subtitle:o==="preview"?`${f1(l)} \xB7 focused`:f1(l),children:(0,Fr.jsxs)(Ee,{flexDirection:"column",children:[(0,Fr.jsx)(he,{color:Re.muted,children:l.description}),o==="sidebar"?(0,Fr.jsxs)(he,{color:Re.muted,children:["Press ",(0,Fr.jsx)(he,{bold:!0,children:"Tab"})," to interact with this preview."]}):null,(0,Fr.jsx)(Ee,{marginTop:1,children:l.render()})]})})})]})]})}function Nen({stories:e,selectedIndex:t,focused:n}){let r=[],o=[];return e.forEach((i,s)=>{let u=i.path.slice(1),l=Pen(o,u);for(let f=l;f<u.length;f++)r.push((0,Fr.jsx)(Ben,{label:u[f]??"",level:f,marginTop:ken(u[f]??"",f,l),focused:n},`group:${u.slice(0,f+1).join("/")}`));r.push((0,Fr.jsx)(wen,{story:i,selected:s===t,focused:n},i.id)),o=u}),(0,Fr.jsx)(Ee,{flexDirection:"column",children:r})}function Ben({label:e,level:t,marginTop:n,focused:r}){return(0,Fr.jsx)(Ee,{marginLeft:fet(t),marginTop:n,children:(0,Fr.jsx)(he,{color:r?Re.primary:Re.muted,bold:r,wrap:"truncate-end",children:e})})}function wen({story:e,selected:t,focused:n}){let r=n?t?Re.accent:Re.highlight:Re.muted;return(0,Fr.jsxs)(Ee,{marginLeft:fet(e.path.slice(1).length),children:[(0,Fr.jsx)(he,{color:n&&t?Re.accent:Re.muted,children:t?"\u203A ":" "}),(0,Fr.jsx)(he,{color:r,bold:n&&t,wrap:"truncate-end",children:Oen(e)})]})}function Oen(e){let t=e.title.split(" / ");return t.length>1?t.slice(1).join(" / "):e.path.at(-1)===e.title?"Default":e.title}function fet(e){return Math.min(e,4)}function ken(e,t,n){return t===0?e==="Components"?1:0:t===1&&t===n?1:0}function Pen(e,t){let n=Math.min(e.length,t.length);for(let r=0;r<n;r++)if(e[r]!==t[r])return r;return n}function det(e){let t=LA.length;return(e%t+t)%t}function met({story:e}){let{exit:t}=ws();return xu((n,r)=>{(r.ctrl&&n==="c"||r.escape)&&t()}),(0,Fr.jsxs)(Ee,{flexDirection:"column",paddingX:1,paddingY:1,children:[(0,Fr.jsx)(Ps,{title:e.title,subtitle:f1(e),right:"Esc to exit"}),(0,Fr.jsx)(Ee,{marginBottom:1,children:(0,Fr.jsx)(he,{color:Re.muted,children:e.description})}),e.render()]})}var ofe=ue(jt(),1),Aet={meta:{name:"tui:stories",description:"Open the terminal story runner for Ink TUI screens.",hidden:!0,skipAutoupdate:!0},args:{story:{type:"string",description:"Open a specific story id."},list:{type:"boolean",description:"Print story ids instead of opening the runner."}},async run({args:e}){if(e.list||!process.stdin.isTTY||!process.stdout.isTTY){Men();return}if(typeof e.story=="string"&&e.story.trim().length>0){let n=cet(e.story.trim());if(!n){console.error(`Unknown TUI story: ${e.story}`),console.error("Run `lore tui:stories --list` to see available ids."),process.exitCode=1;return}await sl((0,ofe.jsx)(met,{story:n})).waitUntilExit();return}await sl((0,ofe.jsx)(pet,{})).waitUntilExit()}};function Men(){for(let e of LA)console.log(`${e.id} ${f1(e)} ${e.title}`)}m();Bn();s0();m();await Ao();var J9=ue(dn(),1);await pb();var ife=ue(jt(),1);function Len({title:e,subtitle:t,perform:n,onResolve:r,onReject:o}){let[i,s]=(0,J9.useState)(PM),{exit:u}=ws();return(0,J9.useEffect)(()=>{let l=!1,f=h=>{l||s(_=>K9(_,h))};return(async()=>{try{let h=await n(f);if(l)return;r(h),setTimeout(()=>u(),100)}catch(h){if(f({kind:"error",message:h instanceof Error?h.message:String(h)}),l)return;o(h),setTimeout(()=>u(h instanceof Error?h:new Error(String(h))),100)}})(),()=>{l=!0}},[]),(0,ife.jsx)(Nh,{title:e,subtitle:t,state:i})}async function m1(e){let t,n,r=!1;if(await sl((0,ife.jsx)(Len,{title:e.title,subtitle:e.subtitle,perform:e.perform,onResolve:i=>{t=i,r=!0},onReject:i=>{n=i}})).waitUntilExit(),!r)throw n instanceof Error?n:new Error(String(n??"share flow failed"));return t}m();WR();Pr();import stn from"node:os";import ket from"node:path";m();import{spawn as Uen}from"node:child_process";import Qen from"node:os";async function get(e,t={}){let n=t.timeoutMs??2e3,r=Fen();for(let o of r)if(await Gen(o,e,n))return!0;return!1}function Fen(){switch(Qen.platform()){case"darwin":return[{name:"pbcopy",args:[]}];case"linux":return[{name:"wl-copy",args:[]},{name:"xclip",args:["-selection","clipboard"]},{name:"xsel",args:["--clipboard","--input"]}];case"win32":return[{name:"clip.exe",args:[]}];default:return[]}}async function Gen(e,t,n){return new Promise(r=>{let o;try{o=Uen(e.name,e.args,{stdio:["pipe","ignore","ignore"]})}catch{r(!1);return}let i=!1,s=l=>{i||(i=!0,r(l))},u=setTimeout(()=>{o.kill("SIGKILL"),s(!1)},n);o.on("error",()=>{clearTimeout(u),s(!1)}),o.on("close",l=>{clearTimeout(u),s(l===0)}),o.stdin?.on("error",()=>{}),o.stdin?.end(t)})}on();Bn();FP();m();import dl from"node:fs/promises";import vet from"node:os";import fs from"node:path";m();m();import jen from"node:os";import het from"node:path";function _et(e){return e.replace(/[^A-Za-z0-9_-]/g,"-")}function Eet(e=jen.homedir(),t=process.env.CLAUDE_CONFIG_DIR){let n=t?.trim();return n?het.join(n,"projects"):het.join(e,".claude","projects")}m();import ll from"node:fs";import zen from"node:os";import vb from"node:path";var sfe="local-agent-mode-sessions",afe=["audit.jsonl","transcript.jsonl"];function yet(e=zen.homedir()){return vb.join(e,"Library","Application Support","Claude",sfe)}function Tet(e){if(!ll.existsSync(e))return[];let t=[];for(let n of ll.readdirSync(e,{withFileTypes:!0})){if(!n.isDirectory())continue;let r=vb.join(e,n.name);for(let o of ll.readdirSync(r,{withFileTypes:!0})){if(!o.isDirectory())continue;let i=vb.join(r,o.name);for(let s of ll.readdirSync(i,{withFileTypes:!0})){if(!s.isDirectory()||!s.name.startsWith("local_"))continue;let u=s.name.replace(/^local_/,"");if(!u)continue;let l=vb.join(i,s.name),f=W9(l),h=f?ll.statSync(f):ll.statSync(l);t.push({accountId:n.name,orgId:o.name,sessionId:u,sessionDir:i,localDir:l,mtimeMs:h.mtimeMs})}}}return t.sort((n,r)=>r.mtimeMs-n.mtimeMs),t}function Z9(e){if(!ll.existsSync(e))return null;let t=null;for(let n of ll.readdirSync(e,{withFileTypes:!0})){if(!n.isDirectory()||!n.name.startsWith("local_"))continue;let r=vb.join(e,n.name),o=W9(r),i=o!==null,s=o?ll.statSync(o).mtimeMs:ll.statSync(r).mtimeMs;(t===null||i&&!t.hasTranscript||i===t.hasTranscript&&s>t.mtimeMs)&&(t={dir:r,mtimeMs:s,hasTranscript:i})}return t?.dir??null}function W9(e){for(let t of afe){let n=vb.join(e,t);if(ll.existsSync(n)&&ll.statSync(n).isFile())return n}return null}function ufe(e,t){let n=vb.join(e,t);return ll.existsSync(n)?ll.readdirSync(n,{withFileTypes:!0}).filter(r=>r.isFile()&&!r.name.startsWith(".")).map(r=>r.name).sort((r,o)=>r.localeCompare(o)):[]}on();l$();Bn();Ga();Th();m();on();import{createReadStream as Hen}from"node:fs";import $en from"node:fs/promises";import{createInterface as qen}from"node:readline";var Ven=50;async function bet(e,t={}){let n=t.maxLines??Ven;try{await $en.stat(e)}catch(o){if(kr(o,"ENOENT"))return null;throw o}let r=Hen(e,{encoding:"utf8"});return await new Promise((o,i)=>{let s=!1,u=0,l=_=>{s||(s=!0,f.close(),r.destroy(),o(_))},f=qen({input:r,crlfDelay:Number.POSITIVE_INFINITY});f.on("line",_=>{if(s)return;let y=_.trim();if(y){u+=1;try{let T=JSON.parse(y);if(typeof T=="object"&&T!==null&&"cwd"in T&&typeof T.cwd=="string"){let v=T.cwd.trim();if(v){l(v);return}}}catch{}u>=n&&l(null)}}),f.on("close",()=>l(null));let h=_=>{if(!s){if(s=!0,kr(_,"ENOENT")){o(null);return}i(_)}};f.on("error",h),r.on("error",h)})}var Yen=3600*1e3,Ken=336*60*60*1e3,X9=Symbol("missingSessionID"),Ret={name:"claudeCode",historyFilePath:eq,readUnuploadedEntries:xet,collectLocalFiles:Wen,buildPendingTranscriptWatches:Xen};async function xet(e){let t=eq(),n=Date.now()-Ken,r;try{r=await dl.readdir(t,{withFileTypes:!0})}catch(i){if(kr(i,"ENOENT"))return[];throw new Error(`readdir ${t}: ${String(i)}`)}let o=[];for(let i of r){if(!i.isDirectory())continue;let s=fs.join(t,i.name),u;try{u=await dl.readdir(s,{withFileTypes:!0})}catch{continue}for(let l of u){if(!l.isFile()||!l.name.endsWith(".jsonl"))continue;let f=fs.join(s,l.name),h;try{h=await dl.stat(f)}catch{continue}!h.isFile()||h.mtimeMs<n||o.push({sessionId:l.name.slice(0,-6),project:"",timestamp:h.mtimeMs,resolvedTranscriptPath:f})}}return o.sort((i,s)=>i.timestamp-s.timestamp)}async function Det(){let e=new Map,t;try{t=await dl.readFile(S0(),"utf8")}catch{return e}for(let n of HP(t)){let r=n.sessionId?.trim(),o=n.project?.trim();r&&o&&!e.has(r)&&e.set(r,o)}return e}async function Net(e,t,n){let r=await bet(e);return r||((await n()).get(t)??null)}async function Jen(){let e=S0(),t;try{t=await dl.readFile(e,"utf8")}catch(n){if(kr(n,"ENOENT"))return[];throw n}return HP(t,e)}async function Bet(e){let t=await Jen(),n=e.sessionId.trim();if(n){for(let u=t.length-1;u>=0;u-=1){let l=t[u];if(l?.sessionId?.trim()===n)return l}let s=await Zen(n);if(s){let u=e.project.trim()||process.cwd();return{sessionId:n,project:u,timestamp:s.mtimeMs,resolvedTranscriptPath:s.fullPath}}throw new De(`no history entry or transcript file found for session-id "${n}" \u2014 check ~/.claude/history.jsonl and ~/.claude/projects/`)}let r=fs.normalize(e.project.trim());if(!r)throw new De("export requires either --session-id or a project path");let o=await PD(r),i=[...t].sort((s,u)=>u.timestamp-s.timestamp);for(let s of i){if(!s.sessionId?.trim())continue;let u=fs.normalize(s.project.trim());if(!u||u===".")continue;if(u===r)return s;if(!o)continue;let l=await PD(u);if(l&&l===o)return s}throw new De(`no history entry found for project "${r}" \u2014 pass --session-id to pick a specific session, or cd into the repo where the Claude Code session ran`)}async function Zen(e){let t=e.trim();if(!t)return null;let n=eq(),r;try{r=await dl.readdir(n,{withFileTypes:!0})}catch(o){if(kr(o,"ENOENT"))return null;throw new Error(`readdir ${n}: ${String(o)}`)}for(let o of r){if(!o.isDirectory())continue;let i=fs.join(n,o.name,`${t}.jsonl`);try{let s=await dl.stat(i);if(s.isFile())return{fullPath:i,mtimeMs:s.mtimeMs}}catch(s){if(!kr(s,"ENOENT")&&!kr(s,"ENOTDIR"))throw new Error(`stat ${i}: ${String(s)}`)}}return null}async function wet(e){let t=await cfe(e);if(t===X9)throw new Error("history entry is missing sessionId");return t}async function Wen(e,t={}){let n=[],r=new Array(e.length),o=new Set,i=new Set,s=new Set,u=[],l=null,f=async()=>(l??=await Det(),l);try{for(let h=0;h<e.length;h+=1){let _=e[h],y=await cfe(_);if(y===X9){let V=`__missing_session__:${_.project}:${_.timestamp}:${h}`;r[h]=V,o.add(V),s.add(V);continue}if(r[h]=y.key,s.has(y.key))continue;let T=await Hi(y.fullPath);if(!T.exists){o.add(y.key),s.add(y.key);continue}if(t.isUnchanged?.(y.key,T)){o.add(y.key),s.add(y.key);continue}if(t.isThrottled?.(y.key)){i.add(y.key),s.add(y.key);continue}let v=_.project.trim()||await Net(y.fullPath,_.sessionId??"",f);if(!v){$.info("upload_filter_session_excluded",{filename:y.relativeFilename,transcript_path:y.fullPath,cwd:"<unresolved>",reason:"no_resolvable_cwd"}),o.add(y.key),s.add(y.key);continue}let R=await vp(v),x=null,O=async()=>(x!==null||(x=await dl.readFile(y.fullPath,"utf8")),x),P=await bh(t.uploadFilterConfig??vA(),{cwd:v,repoOriginPath:R,transcriptPath:y.fullPath,readTranscript:O});if(!P.shouldUpload){$.info("upload_filter_session_excluded",{filename:y.relativeFilename,transcript_path:y.fullPath,cwd:v,repo_origin_path:R||"<none>",reason:P.reason}),o.add(y.key),s.add(y.key);continue}$.info("upload_filter_session_included",{filename:y.relativeFilename,transcript_path:y.fullPath,cwd:v,repo_origin_path:R||"<none>",reason:"matched"});let j;try{j=await fd(y.fullPath)}catch(V){if(kr(V,"ENOENT")){o.add(y.key),s.add(y.key);continue}throw new Error(`read session transcript ${y.fullPath}: ${String(V)}`)}u.push(j.tempPath),n.push({key:y.key,filename:y.relativeFilename,sourcePath:y.fullPath,repoOriginPath:R,tempPath:j.tempPath,md5:j.md5,fileType:"transcript",harness:"claudeCode",harnessInternalId:_.sessionId?.trim()??"",watchedState:T}),s.add(y.key);let G=await dl.readFile(j.tempPath,"utf8"),H=rtn(G);for(let V of H){let ae;try{ae=await otn(V)}catch{continue}let re=`${y.key}::plan:${ae}`;if(s.has(re))continue;let _e=await Hi(ae),Qe;try{Qe=await fd(ae)}catch(pt){if(kr(pt,"ENOENT"))continue;throw new Error(`read plan file ${ae}: ${String(pt)}`)}u.push(Qe.tempPath),n.push({key:re,filename:ae,sourcePath:ae,repoOriginPath:R,tempPath:Qe.tempPath,md5:Qe.md5,fileType:"plan",harness:"claudeCode",harnessInternalId:ae,watchedState:_e}),s.add(re)}}}catch(h){throw await Promise.all(u.map(_=>dl.rm(fs.dirname(_),{recursive:!0,force:!0}))),h}return{entries:e,localFiles:n,entryFileKeys:r,skippedFileKeys:o,deferredFileKeys:i}}async function Xen(e,t,n={}){let r=await xet(e),o=Date.now(),i=[],s=new Set,u=null,l=async()=>(u??=await Det(),u);for(let f of r){let h=await cfe(f);if(h===X9||s.has(h.fullPath))continue;s.add(h.fullPath);let _=await Hi(h.fullPath);if(!_.exists)continue;let y=f.project.trim()||await Net(h.fullPath,f.sessionId??"",l);if(!y)continue;let T=await vp(y),v=await bh(n.uploadFilterConfig??vA(),{cwd:y,repoOriginPath:T,transcriptPath:h.fullPath,readTranscript:()=>dl.readFile(h.fullPath,"utf8")},{ignoreSkillRules:!0});if(!v.shouldUpload){$.info("upload_filter_watch_excluded",{filename:h.relativeFilename,transcript_path:h.fullPath,cwd:y,repo_origin_path:T||"<none>",reason:v.reason});continue}i.push({sessionId:f.sessionId?.trim()??"",project:y,transcriptPath:h.fullPath,expiresAt:new Date(o+Yen),baseline:t.get(h.fullPath)??_})}return i.sort((f,h)=>f.transcriptPath.localeCompare(h.transcriptPath))}async function cfe(e){let t=e.sessionId?.trim();if(!t)return X9;let n=eq(),r=e.resolvedTranscriptPath?.trim();if(r){let s=fs.relative(n,r).split(fs.sep).join("/");return{fullPath:r,relativeFilename:s,key:s}}let o=await etn(e.project),i=null;for(let s of o){let u=ttn(s),l=fs.posix.join(u,`${t}.jsonl`),f=fs.join(n,...l.split("/")),h={fullPath:f,relativeFilename:l,key:l};i??=h;try{return await dl.stat(f),h}catch(_){if(!kr(_,"ENOENT"))throw new Error(`stat session transcript ${f}: ${String(_)}`)}}if(!i)throw new Error("history entry is missing project path");return i}async function etn(e){let t=fs.normalize(e.trim());if(!t||t===".")throw new Error("history entry is missing project path");let n=[t],r=await PD(t);if(!r||r===t)return n;for(let o=fs.dirname(t);o!==t&&(n.push(o),o!==r);)t=o,o=fs.dirname(o);return n}function ttn(e){let t=fs.normalize(e.trim());if(!t||t===".")throw new Error("history entry is missing project path");return _et(t)}function eq(){return Eet()}function ntn(){return fs.join(vet.homedir(),".claude","plans")}function rtn(e){let t=[],n=new Set;for(let r of e.split(`
695
+ `))}m();Pr();on();var HXe={meta:{name:"sync",description:"Sync installed Lore-managed skills to their latest accepted versions."},async run(){if(!await sn())throw new De("workspace skill sync requires login \u2014 run 'lore login' first");let e=await rfe(Gt());console.log(`skill sync complete: ${e.installedUpdated} updated, ${e.localEditsUploaded} local edit${e.localEditsUploaded===1?"":"s"} uploaded, ${e.conflicts} conflict${e.conflicts===1?"":"s"}`)}};m();import $Xe from"node:fs/promises";import den from"node:path";Pr();on();var qXe={meta:{name:"uninstall",description:"Remove a Lore-managed skill by stable skill ID."},args:{target:{type:"positional",required:!0,description:"Workspace skill ID"}},async run({args:e}){let t=typeof e.target=="string"?e.target.trim():"";if(!t)throw new De("uninstall needs a skill ID \u2014 e.g. `lore skills uninstall sk_01j...`");if(!await sn())throw new De("workspace skill uninstalls require login \u2014 run 'lore login' first");let n=Gt();await pen(n,t)}};async function pen(e,t){let n=await i1(t);n&&(await $Xe.rm(n.installPath,{force:!0}),await $Xe.rmdir(den.dirname(n.installPath)).catch(()=>{}));let r=await e.uninstallSkill({params:{id:t},body:{}});if(r.status!==200){let o=r.body?.message??`uninstallSkill returned ${r.status}`;throw new De(o)}if(await bWe(t),n){console.log(`uninstalled /${n.name} (${t}) from ${n.installPath}`);return}console.log(`uninstalled ${t}`)}var VXe={meta:{name:"skills",description:"Publish, install, and list skills shared via Lore."},subCommands:{publish:QXe,install:PXe,uninstall:qXe,sync:HXe,daemon:F9,approve:OXe,reject:GXe,proposals:LXe,status:zXe,list:MXe,scan:jXe}};s0();m();await Ao();var Y9=ue(dn(),1);sc();await pb();m();await Ao();var $9=ue(dn(),1);await xA();m();await Ao();var c1=ue(dn(),1);ks();var md=ue(jt(),1);function l1({items:e,onSelect:t,initialIndex:n=0,disabled:r=!1,hint:o,labelWidth:i=20}){let[s,u]=(0,c1.useState)(YXe(e,n)),l=(0,c1.useRef)(s);return(0,c1.useEffect)(()=>{let f=YXe(e,n);l.current=f,u(f)},[e,n]),xu((f,h)=>{if(e.length!==0){if(h.upArrow||f==="k"){let _=fen(e,l.current);l.current=_,u(_);return}if(h.downArrow||f==="j"){let _=KXe(e,l.current);l.current=_,u(_);return}if(h.return||f===" "){let _=e[l.current];_&&!_.disabled&&t(_)}}},{isActive:!r}),e.length===0?(0,md.jsx)(he,{color:Re.muted,children:"no actions available"}):(0,md.jsxs)(Ee,{flexDirection:"column",children:[e.map((f,h)=>{let _=h===s,y=f.disabled?Re.muted:_?Re.primary:Re.highlight;return(0,md.jsxs)(Ee,{children:[(0,md.jsx)(Ee,{width:2,flexShrink:0,children:(0,md.jsx)(he,{color:_?Re.primary:Re.muted,children:_?"\u203A":" "})}),(0,md.jsx)(Ee,{width:i,flexShrink:0,children:(0,md.jsx)(he,{color:y,bold:_&&!f.disabled,children:f.label})}),f.description?(0,md.jsx)(Ee,{flexGrow:1,flexShrink:1,children:(0,md.jsx)(he,{color:Re.muted,children:f.description})}):null]},f.id)}),o?(0,md.jsx)(Ee,{marginTop:1,children:(0,md.jsx)(he,{color:Re.muted,children:o})}):null]})}function YXe(e,t){if(e.length===0)return 0;let n=Math.max(0,Math.min(t,e.length-1));return e[n]?.disabled?KXe(e,n-1):n}function KXe(e,t){if(e.length===0)return 0;for(let n=1;n<=e.length;n++){let r=(t+n)%e.length;if(!e[r]?.disabled)return r}return t}function fen(e,t){if(e.length===0)return 0;for(let n=1;n<=e.length;n++){let r=(t-n+e.length)%e.length;if(!e[r]?.disabled)return r}return t}await DA();await Ab();await gb();ks();m();Pr();Ga();LD();HD();async function G9(e){if(!await(e.hasAccessToken??(async()=>!!await sn()))())return{state:"logged_out"};let n=e.client??Gt();try{let r=await n.whoAmI({headers:{}});return r.status!==200?{state:"error",message:JXe(r.body,`whoAmI returned ${r.status}`)}:{state:"ready",userId:r.body.user.id,email:r.body.emailAddress,displayName:r.body.user.display_name,organizations:r.body.organizations,activeOrganizationId:r.body.organizationId,activeOrganizationName:r.body.org_name}}catch(r){return{state:"error",message:r instanceof Error?r.message:String(r)}}}async function j9(e){let t=e.platform??process.platform;if(t!=="darwin")return{state:"unsupported",platform:t};let n=e.getDaemonStatus??u$;try{return{state:"ready",report:await n()}}catch(r){return{state:"error",message:r instanceof Error?r.message:String(r)}}}async function z9(e){if(!await(e.hasAccessToken??(async()=>!!await sn()))())return{state:"logged_out"};let n=e.client??Gt();try{let r=await n.listSkills({});if(r.status!==200)return{state:"error",message:JXe(r.body,`listSkills returned ${r.status}`)};let o=r.body.objects.length,i=r.body.objects.filter(s=>s.visibility==="workspace").length;return{state:"ready",count:o,published:i}}catch(r){return{state:"error",message:r instanceof Error?r.message:String(r)}}}async function H9(){try{await Ih();let e=await Ho();return men(e)}catch(e){return{state:"error",message:e instanceof Error?e.message:String(e)}}}function men(e){return{state:"ready",cwd:e.include.cwd,repo:e.include.repo}}function JXe(e,t){if(e&&typeof e=="object"&&"message"in e){let n=e.message;if(typeof n=="string"&&n.length>0)return n}return t}var wt=ue(jt(),1);function U0({cliVersion:e,initialData:t,deps:n={},onSelect:r}){let{exit:o}=ws(),[i,s]=(0,$9.useState)(t??{identity:{state:"loading"},daemon:{state:"loading"},skills:{state:"loading"},uploadDirs:{state:"loading"}});(0,$9.useEffect)(()=>{if(t)return;let l=!1;return(async()=>{let[f,h,_,y]=await Promise.all([G9(n),j9(n),z9(n),H9()]);l||s({identity:f,daemon:h,skills:_,uploadDirs:y})})(),()=>{l=!0}},[]),xu((l,f)=>{(l==="q"||f.ctrl&&l==="c"||f.escape)&&(r("quit"),o())});let u=yen(i);return(0,wt.jsxs)(Ee,{flexDirection:"column",paddingY:1,paddingX:1,children:[(0,wt.jsx)(Ps,{title:"lore",subtitle:gen(i.identity),right:`v${e}`}),(0,wt.jsxs)(Ee,{flexDirection:"row",gap:2,children:[(0,wt.jsx)(Ee,{flexDirection:"column",width:"50%",children:(0,wt.jsx)(Qn,{title:"Daemon",children:(0,wt.jsx)(hen,{daemon:i.daemon})})}),(0,wt.jsx)(Ee,{flexDirection:"column",width:"50%",children:(0,wt.jsx)(Qn,{title:"Workspace",children:(0,wt.jsx)(_en,{identity:i.identity,skills:i.skills})})})]}),(0,wt.jsx)(Ee,{marginTop:1,children:(0,wt.jsx)(Qn,{title:"Upload filters",subtitle:i.uploadDirs.state==="ready"?`${i.uploadDirs.cwd.length+i.uploadDirs.repo.length} configured`:void 0,children:(0,wt.jsx)(Aen,{uploadDirs:i.uploadDirs})})}),(0,wt.jsx)(Ee,{marginTop:1,children:(0,wt.jsx)(Qn,{title:"Quick actions",subtitle:"\u2191/\u2193 or j/k \xB7 Enter to choose \xB7 q to quit",children:(0,wt.jsx)(l1,{items:u,onSelect:l=>{r(l.id),o()}})})})]})}function Aen({uploadDirs:e}){return e.state==="loading"?(0,wt.jsx)(za,{label:"reading ~/.lore/upload_filters.json\u2026"}):e.state==="error"?(0,wt.jsxs)(Ee,{flexDirection:"column",children:[(0,wt.jsx)(an,{label:"Status",value:"error",kind:"error"}),(0,wt.jsx)(he,{color:Re.danger,children:e.message})]}):e.cwd.length===0&&e.repo.length===0?(0,wt.jsxs)(Ee,{flexDirection:"column",children:[(0,wt.jsx)(an,{label:"Status",value:"none configured \u2014 the daemon won't auto-upload anything",kind:"warning"}),(0,wt.jsx)(Ee,{marginTop:1,children:(0,wt.jsxs)(he,{color:Re.muted,children:["Run ",(0,wt.jsx)(he,{bold:!0,children:"lore configure"})," to pick directories interactively."]})})]}):(0,wt.jsxs)(Ee,{flexDirection:"column",children:[e.cwd.map(t=>(0,wt.jsx)(an,{label:"cwd",value:t,kind:"success",labelWidth:16},`cwd:${t}`)),e.repo.map(t=>(0,wt.jsx)(an,{label:"repo",value:t,kind:"success",labelWidth:16},`repo:${t}`))]})}function gen(e){switch(e.state){case"ready":{let t=e.activeOrganizationName??"";return t?`${e.email} \xB7 ${t}`:e.email}case"logged_out":return"not signed in";case"loading":return"loading\u2026";case"error":return"identity error"}}function hen({daemon:e}){if(e.state==="loading")return(0,wt.jsx)(za,{label:"reading launchd state\u2026"});if(e.state==="unsupported")return(0,wt.jsxs)(Ee,{flexDirection:"column",children:[(0,wt.jsx)(he,{color:Re.muted,children:"Background uploads are macOS-only today."}),(0,wt.jsxs)(he,{color:Re.muted,children:["Detected platform: ",e.platform]})]});if(e.state==="error")return(0,wt.jsxs)(Ee,{flexDirection:"column",children:[(0,wt.jsx)(an,{label:"Status",value:"error",kind:"error"}),(0,wt.jsx)(he,{color:Re.danger,children:e.message})]});let t=e.report,n=t.healthy?"success":t.enabled?"warning":"idle";return(0,wt.jsxs)(Ee,{flexDirection:"column",children:[(0,wt.jsx)(an,{label:"Status",value:t.health,kind:n}),(0,wt.jsx)(an,{label:"Enabled",value:t.enabled?"yes":"no",kind:t.enabled?"success":"idle"}),(0,wt.jsx)(an,{label:"Running",value:t.running?"yes":"no",kind:t.running?"success":"idle"}),(0,wt.jsx)(an,{label:"Heartbeat",value:ZXe(t.status?.last_heartbeat_at),kind:t.heartbeat_fresh?"success":"idle"}),(0,wt.jsx)(an,{label:"Last upload",value:ZXe(t.status?.last_success_at)}),t.status?.last_error?(0,wt.jsx)(an,{label:"Last error",value:t.status.last_error,kind:"error"}):null]})}function _en({identity:e,skills:t}){return e.state==="loading"?(0,wt.jsx)(za,{label:"loading your account\u2026"}):e.state==="logged_out"?(0,wt.jsxs)(Ee,{flexDirection:"column",children:[(0,wt.jsx)(an,{label:"Status",value:"signed out",kind:"warning"}),(0,wt.jsx)(he,{color:Re.muted,children:"Choose \u201CSign in\u201D below to authorise this CLI."})]}):e.state==="error"?(0,wt.jsxs)(Ee,{flexDirection:"column",children:[(0,wt.jsx)(an,{label:"Status",value:"error",kind:"error"}),(0,wt.jsx)(he,{color:Re.danger,children:e.message})]}):(0,wt.jsxs)(Ee,{flexDirection:"column",children:[(0,wt.jsx)(an,{label:"User",value:e.email,kind:"success"}),(0,wt.jsx)(an,{label:"Display name",value:e.displayName}),(0,wt.jsx)(an,{label:"Workspace",value:e.activeOrganizationName??"\u2014",kind:e.activeOrganizationName?"info":"idle"}),(0,wt.jsx)(an,{label:"Other workspaces",value:Math.max(0,e.organizations.length-1)}),(0,wt.jsx)(an,{label:"Skills",value:Een(t)})]})}function Een(e){return e.state==="loading"?"loading\u2026":e.state==="logged_out"?"\u2014":e.state==="error"?`error (${e.message})`:`${e.count} installed \xB7 ${e.published} published`}function yen(e){let t=e.identity.state==="ready",n=e.daemon.state==="ready"&&e.daemon.report.enabled,r=e.daemon.state!=="unsupported",o=[];return t&&(o.push({id:"share-codex",label:"Share Codex",description:"lore share-codex --session-file <path>"}),o.push({id:"share-cowork",label:"Share Cowork",description:"lore share-cowork"}),o.push({id:"export",label:"Export Claude",description:"lore export"})),r&&(n?(o.push({id:"status",label:"Daemon status",description:"lore status"}),o.push({id:"restart",label:"Restart daemon",description:"lore restart"}),o.push({id:"disable",label:"Disable daemon",description:"lore disable"})):o.push({id:"enable",label:"Enable daemon",description:"lore enable"})),t?(o.push({id:"configure",label:"Configure uploads",description:"lore configure"}),o.push({id:"listen-list",label:"Manage upload dirs",description:"lore listen list"}),o.push({id:"skills-list",label:"Skills",description:"lore skills list"}),o.push({id:"workspaces-list",label:"Workspaces",description:"lore workspaces list"}),o.push({id:"logout",label:"Sign out",description:"lore logout"})):o.push({id:"login",label:"Sign in",description:"lore login"}),o.push({id:"quit",label:"Quit",description:"exit the dashboard"}),o}function ZXe(e){if(!e)return"never";let t=Date.parse(e);if(Number.isNaN(t))return e;let n=Math.max(0,Math.floor((Date.now()-t)/1e3));return n<60?`${n}s ago`:n<3600?`${Math.floor(n/60)}m ago`:n<86400?`${Math.floor(n/3600)}h ago`:`${Math.floor(n/86400)}d ago`}m();await Ao();await xA();await DA();ks();var si=ue(jt(),1),Sen=[{id:"login",label:"Sign in with WorkOS",description:"opens your browser for a device-code flow"},{id:"quit",label:"Quit",description:"exit without signing in"}];function q9({cliVersion:e,onSelect:t}){let{exit:n}=ws();return xu((r,o)=>{(r==="q"||o.ctrl&&r==="c"||o.escape)&&(t("quit"),n())}),(0,si.jsxs)(Ee,{flexDirection:"column",paddingX:1,paddingY:1,children:[(0,si.jsx)(Ps,{title:"lore",subtitle:"welcome",right:`v${e}`}),(0,si.jsx)(Qn,{title:"What is Lore?",children:(0,si.jsxs)(Ee,{flexDirection:"column",children:[(0,si.jsx)(he,{children:"Lore captures your Claude Code, Codex, and Cowork sessions and shares them with your team \u2014 searchable, discussable, and remixable."}),(0,si.jsxs)(Ee,{marginTop:1,flexDirection:"column",children:[(0,si.jsx)(he,{color:Re.muted,children:"You'll get:"}),(0,si.jsxs)(he,{children:[(0,si.jsx)(he,{color:Re.success,children:" \u2713"})," Background auto-upload of every Claude Code session"]}),(0,si.jsxs)(he,{children:[(0,si.jsx)(he,{color:Re.success,children:" \u2713"})," One-command share for Codex rollouts and Cowork sessions"]}),(0,si.jsxs)(he,{children:[(0,si.jsx)(he,{color:Re.success,children:" \u2713"})," Skill publishing and discovery across your workspace"]}),(0,si.jsxs)(he,{children:[(0,si.jsx)(he,{color:Re.success,children:" \u2713"})," Thread search, dashboards, and discussion"]})]})]})}),(0,si.jsx)(Ee,{marginTop:1,children:(0,si.jsx)(Qn,{title:"Sign in to continue",subtitle:"\u2191/\u2193 or j/k \xB7 Enter to choose \xB7 q to quit",children:(0,si.jsx)(l1,{items:Sen,onSelect:r=>{t(r.id),n()}})})}),(0,si.jsx)(Ee,{marginTop:1,children:(0,si.jsxs)(he,{color:Re.muted,children:["New to Lore? Run ",(0,si.jsx)(he,{bold:!0,children:"lore --help"})," any time for the command reference."]})})]})}var V9=ue(jt(),1),Ten={login:["login"],logout:["logout"],enable:["enable"],disable:["disable"],status:["status"],restart:["restart"],"share-codex":["share-codex"],"share-cowork":["share-cowork"],export:["export"],"workspaces-list":["workspaces","list"],"skills-list":["skills","list"],"listen-list":["listen","list"],configure:["configure"],quit:[]};function ben({cliVersion:e,deps:t,onSelect:n}){let[r,o]=(0,Y9.useState)(void 0),{exit:i}=ws();return(0,Y9.useEffect)(()=>{let s=!1;return(async()=>{let[u,l,f,h]=await Promise.all([G9(t),j9(t),z9(t),H9()]);s||o({identity:u,daemon:l,skills:f,uploadDirs:h})})(),()=>{s=!0}},[]),r?r.identity.state==="logged_out"?(0,V9.jsx)(q9,{cliVersion:e,onSelect:s=>{n(s),i()}}):(0,V9.jsx)(U0,{cliVersion:e,initialData:r,onSelect:n}):null}async function WXe(){let e="quit";return await sl((0,V9.jsx)(ben,{cliVersion:_u(),deps:{},onSelect:n=>{e=n}})).waitUntilExit(),{action:e,rawArgs:Ten[e]}}m();await pb();m();await Ao();var FM=ue(dn(),1);await xA();await DA();ks();m();await Ao();await Mle();await xA();await mb();await DA();await Qle();m();await Ao();ks();var d1=ue(jt(),1),Ien="\u2588",Cen="\u2591";function XXe({value:e,width:t=24,label:n,color:r=Re.success}){let o=Number.isFinite(e)?Math.max(0,Math.min(1,e)):0,i=Math.round(o*t),s=Math.max(0,t-i);return(0,d1.jsxs)(Ee,{children:[(0,d1.jsx)(he,{color:r,children:Ien.repeat(i)}),(0,d1.jsx)(he,{color:Re.muted,children:Cen.repeat(s)}),n?(0,d1.jsxs)(he,{color:Re.muted,children:[" ",n]}):null]})}await Ab();await gb();await Lle();await $le();await Yle();m();await Ao();await xA();await mb();await DA();await Ab();ks();var go=ue(jt(),1),tet=[{key:"resolving_session",label:"Resolving session"},{key:"uploading",label:"Uploading transcript"},{key:"parsing",label:"Parsing on server"},{key:"updating_visibility",label:"Updating visibility"},{key:"resolving_highlight",label:"Resolving highlight"}];function PM(){return{steps:tet.map(({key:e,label:t})=>({key:e,label:t,status:"pending"}))}}function K9(e,t){return t.kind==="completed"?{...e,result:{url:t.url,reused:t.reused,visibility:t.visibility,clipboardCopied:t.clipboardCopied,sessionId:t.sessionId}}:t.kind==="error"?{...e,errorMessage:t.message,steps:e.steps.map(n=>n.status==="active"?{...n,status:"pending"}:n)}:t.step==="done"||t.step==="errored"?{...e,steps:e.steps.map(n=>({...n,status:n.status==="active"?"done":n.status}))}:{...e,steps:e.steps.map(n=>n.key===t.step?{...n,status:"active",label:t.label?`${eet(n.key)} (${t.label})`:eet(n.key)}:n.status==="active"?{...n,status:"done"}:n)}}function eet(e){return tet.find(t=>t.key===e)?.label??e}function Nh({title:e,subtitle:t,state:n}){return(0,go.jsxs)(Ee,{flexDirection:"column",paddingX:1,paddingY:1,children:[(0,go.jsx)(Ps,{title:e,subtitle:t}),(0,go.jsx)(Qn,{title:"Pipeline",children:(0,go.jsx)(Ee,{flexDirection:"column",children:n.steps.map(r=>(0,go.jsx)(ven,{step:r},r.key))})}),n.result?(0,go.jsx)(Ee,{marginTop:1,flexDirection:"column",children:(0,go.jsx)(Ms,{kind:"success",title:n.result.reused?"Already on Lore":"Shared",children:(0,go.jsxs)(Ee,{flexDirection:"column",children:[(0,go.jsx)(he,{children:n.result.url}),(0,go.jsx)(Ee,{marginTop:1,children:(0,go.jsxs)(he,{color:Re.muted,children:[n.result.clipboardCopied?"Copied to clipboard. ":"",n.result.visibility?`Visibility: ${n.result.visibility}.`:""]})})]})})}):null,n.errorMessage?(0,go.jsx)(Ee,{marginTop:1,children:(0,go.jsx)(Ms,{kind:"error",title:"Failed",children:(0,go.jsx)(he,{children:n.errorMessage})})}):null]})}function ven({step:e}){return e.status==="active"?(0,go.jsxs)(Ee,{children:[(0,go.jsx)(za,{}),(0,go.jsx)(he,{children:" "}),(0,go.jsx)(he,{color:Re.primary,children:e.label})]}):e.status==="done"?(0,go.jsxs)(Ee,{children:[(0,go.jsx)(he,{color:Re.success,children:"\u2713 "}),(0,go.jsx)(he,{color:Re.muted,children:e.label})]}):(0,go.jsxs)(Ee,{children:[(0,go.jsx)(he,{color:Re.muted,children:"\u25CB "}),(0,go.jsx)(he,{color:Re.muted,children:e.label})]})}ks();m();var MM=Date.parse("2026-05-16T12:00:00.000Z");function LM(e){return new Date(MM-e*6e4).toISOString()}var Yf={plist:"/Users/alex/Library/LaunchAgents/ai.tanagram.lore.plist",binary:"/Users/alex/.lore/bin/lore-background",logFile:"/Users/alex/.lore/cli.log.txt",status:"/Users/alex/.lore/status.json",installSource:"/opt/homebrew/bin/lore"},net=[{id:"tanagram/lore",label:"tanagram/lore",kind:"repo",sessionCount:18,lastUsedAtMs:MM-7*6e4},{id:"acme/customer-demo",label:"acme/customer-demo",kind:"repo",sessionCount:6,lastUsedAtMs:MM-42*6e4},{id:"acme/integration",label:"acme/integration",kind:"repo",sessionCount:3,lastUsedAtMs:MM-180*6e4},{id:"__custom_repo_path__:/Users/alex/notes",label:"/Users/alex/notes",kind:"dir",sessionCount:1,lastUsedAtMs:MM-1560*6e4}],Ren=["/Users/alex/code/tanagram-lore","/Users/alex/work/acme-integration"],p1={label:"ai.tanagram.lore",enabled:!0,loaded:!0,running:!0,healthy:!0,health:"running",heartbeat_fresh:!0,plist_path:Yf.plist,binary_path:Yf.binary,status_path:Yf.status,install_source_path:Yf.installSource,status:{version:"0.1.0",pid:4242,state:"idle",auth:"logged_in",started_at:LM(60),last_heartbeat_at:LM(1),last_success_at:LM(5),last_completed_at:LM(5),last_thread_ids:["thr_01hx_story"]}},ret={...p1,running:!1,healthy:!1,health:"stale heartbeat",heartbeat_fresh:!1,status:{...p1.status,state:"error",last_heartbeat_at:LM(17),last_error:"upload failed: HTTP 503 from /api/upload-session"}},xen={...p1,enabled:!1,loaded:!1,running:!1,healthy:!1,health:"disabled",heartbeat_fresh:!1,status:void 0},Den={state:"ready",userId:"user_alex",email:"alex@tanagram.ai",displayName:"Alex Rivera",organizations:[{id:"org_tanagram",name:"Tanagram"},{id:"org_acme",name:"Acme"}],activeOrganizationId:"org_tanagram",activeOrganizationName:"Tanagram"},UM={identity:Den,daemon:{state:"ready",report:p1},skills:{state:"ready",count:9,published:4},uploadDirs:{state:"ready",cwd:Ren,repo:[]}},oet={...UM,uploadDirs:{state:"ready",cwd:[],repo:[]}},iet={...UM,daemon:{state:"error",message:"launchctl print failed: service not found"}},set={...UM,daemon:{state:"unsupported",platform:"linux"}},aet={identity:{state:"logged_out"},daemon:{state:"ready",report:xen},skills:{state:"logged_out"},uploadDirs:{state:"ready",cwd:[],repo:[]}},uet=["/Users/alex/code/tanagram-lore","/Users/alex/code/customer-demo","/Users/alex/code/internal-tools"];var yt=ue(jt(),1),ro=()=>{};function Q0(...e){return e.reduce(S$,VP())}function QM(...e){return e.reduce(K9,PM())}var LA=[{id:"onboarding/welcome/default",title:"Welcome",path:["TUI","Screens","Onboarding","Welcome"],description:"First-run value prop and sign-in CTA.",render:()=>(0,yt.jsx)(q9,{cliVersion:"0.1.0",onSelect:ro})},{id:"onboarding/login/initialising",title:"Login / initialising",path:["TUI","Screens","Onboarding","Login"],description:"Device-code request is in flight.",render:()=>(0,yt.jsx)(Dp,{state:VP()})},{id:"onboarding/login/device-code",title:"Login / device code",path:["TUI","Screens","Onboarding","Login"],description:"User has a WorkOS code and browser URL.",render:()=>(0,yt.jsx)(Dp,{state:Q0({kind:"device_authorized",userCode:"ABCD-EFGH",verificationUri:"https://login.example.com/device",verificationUriComplete:"https://login.example.com/device?user_code=ABCD-EFGH"},{kind:"browser_opened"})})},{id:"onboarding/login/awaiting-authorization",title:"Login / awaiting authorization",path:["TUI","Screens","Onboarding","Login"],description:"Browser is open and polling is active.",render:()=>(0,yt.jsx)(Dp,{state:Q0({kind:"device_authorized",userCode:"ABCD-EFGH",verificationUri:"https://login.example.com/device",verificationUriComplete:"https://login.example.com/device?user_code=ABCD-EFGH"},{kind:"browser_opened"},{kind:"waiting_for_authorization"})})},{id:"onboarding/login/auto-enable",title:"Login / auto-enable in progress",path:["TUI","Screens","Onboarding","Login"],description:"Login succeeded and launchd install is running.",render:()=>(0,yt.jsx)(Dp,{state:Q0({kind:"device_authorized",userCode:"ABCD-EFGH",verificationUri:"https://login.example.com/device",verificationUriComplete:"https://login.example.com/device?user_code=ABCD-EFGH"},{kind:"browser_opened"},{kind:"logged_in"},{kind:"auto_enable_started"})})},{id:"onboarding/login/success",title:"Login / success",path:["TUI","Screens","Onboarding","Login"],description:"Signed in and background uploads enabled.",render:()=>(0,yt.jsx)(Dp,{state:Q0({kind:"device_authorized",userCode:"ABCD-EFGH",verificationUri:"https://login.example.com/device",verificationUriComplete:"https://login.example.com/device?user_code=ABCD-EFGH"},{kind:"browser_opened"},{kind:"logged_in"},{kind:"auto_enable_started"},{kind:"auto_enable_succeeded",plistPath:Yf.plist,binaryPath:Yf.binary,logFile:Yf.logFile})})},{id:"onboarding/login/auto-enable-failed",title:"Login / auto-enable failed",path:["TUI","Screens","Onboarding","Login"],description:"Login succeeded but the daemon install needs a retry.",render:()=>(0,yt.jsx)(Dp,{state:Q0({kind:"device_authorized",userCode:"ABCD-EFGH",verificationUri:"https://login.example.com/device",verificationUriComplete:"https://login.example.com/device?user_code=ABCD-EFGH"},{kind:"logged_in"},{kind:"auto_enable_started"},{kind:"auto_enable_failed"})})},{id:"onboarding/login/denied",title:"Login / denied",path:["TUI","Screens","Onboarding","Login"],description:"Terminal authorization failure state.",render:()=>(0,yt.jsx)(Dp,{state:Q0({kind:"device_authorized",userCode:"ABCD-EFGH",verificationUri:"https://login.example.com/device",verificationUriComplete:"https://login.example.com/device?user_code=ABCD-EFGH"},{kind:"authorization_denied"})})},{id:"onboarding/login/api-unreachable",title:"Login / API unreachable",path:["TUI","Screens","Onboarding","Login"],description:"Early failure before WorkOS device-code negotiation.",render:()=>(0,yt.jsx)(Dp,{state:Q0({kind:"login_failed",message:"Could not reach the Lore API at http://localhost:4000. If you're running pnpm dev, start the local API server or set LORE_TARGET=dev-shared."})})},{id:"onboarding/login/already-signed-in",title:"Login / already signed in",path:["TUI","Screens","Onboarding","Login"],description:"Short-circuit copy for authenticated callers.",render:()=>(0,yt.jsx)(Dp,{state:Q0({kind:"already_logged_in"})})},{id:"onboarding/configure-upload-repos/loading",title:"Configure upload repos / loading",path:["TUI","Screens","Onboarding","Configure upload repos"],description:"Recent Claude Code cwd discovery is in flight.",render:()=>(0,yt.jsx)(wA,{state:{phase:"loading",suggestions:[],organizationName:"Tanagram"},onSubmit:ro,onSkip:ro})},{id:"onboarding/configure-upload-repos/choose",title:"Configure upload repos / choose",path:["TUI","Screens","Onboarding","Configure upload repos"],description:"Suggested git remotes with defaults checked.",render:()=>(0,yt.jsx)(wA,{state:{phase:"choose",suggestions:net,now:Date.parse("2026-05-16T12:00:00.000Z"),organizationName:"Tanagram"},onSubmit:ro,onSkip:ro})},{id:"onboarding/configure-upload-repos/empty",title:"Configure upload repos / empty",path:["TUI","Screens","Onboarding","Configure upload repos"],description:"No recent sessions, with add-custom affordance.",render:()=>(0,yt.jsx)(wA,{state:{phase:"choose",suggestions:[],organizationName:"Tanagram"},onSubmit:ro,onSkip:ro})},{id:"onboarding/configure-upload-repos/saving",title:"Configure upload repos / saving",path:["TUI","Screens","Onboarding","Configure upload repos"],description:"Persisting selected repos.",render:()=>(0,yt.jsx)(wA,{state:{phase:"saving",suggestions:[],organizationName:"Tanagram"},onSubmit:ro,onSkip:ro})},{id:"onboarding/configure-upload-repos/saved",title:"Configure upload repos / saved",path:["TUI","Screens","Onboarding","Configure upload repos"],description:"Successful save for multiple repos.",render:()=>(0,yt.jsx)(wA,{state:{phase:"saved",suggestions:[],savedCount:3},onSubmit:ro,onSkip:ro})},{id:"onboarding/configure-upload-repos/skipped",title:"Configure upload repos / skipped",path:["TUI","Screens","Onboarding","Configure upload repos"],description:"Successful save with zero selected repos.",render:()=>(0,yt.jsx)(wA,{state:{phase:"saved",suggestions:[],savedCount:0},onSubmit:ro,onSkip:ro})},{id:"onboarding/configure-upload-repos/error",title:"Configure upload repos / error",path:["TUI","Screens","Onboarding","Configure upload repos"],description:"Failed persistence state.",render:()=>(0,yt.jsx)(wA,{state:{phase:"errored",suggestions:[],errorMessage:"EACCES: permission denied, open ~/.lore/upload_filters.json"},onSubmit:ro,onSkip:ro})},{id:"dashboard/healthy",title:"Dashboard / healthy",path:["TUI","Screens","Dashboard"],description:"Signed in, daemon healthy, upload repos configured.",render:()=>(0,yt.jsx)(U0,{cliVersion:"0.1.0",initialData:UM,onSelect:ro})},{id:"dashboard/empty-upload-dirs",title:"Dashboard / empty upload repos",path:["TUI","Screens","Dashboard"],description:"Consent-first empty state for background uploads.",render:()=>(0,yt.jsx)(U0,{cliVersion:"0.1.0",initialData:oet,onSelect:ro})},{id:"dashboard/daemon-error",title:"Dashboard / daemon error",path:["TUI","Screens","Dashboard"],description:"Daemon panel surfaces a launchctl failure.",render:()=>(0,yt.jsx)(U0,{cliVersion:"0.1.0",initialData:iet,onSelect:ro})},{id:"dashboard/unsupported-platform",title:"Dashboard / unsupported platform",path:["TUI","Screens","Dashboard"],description:"Linux/Windows copy for macOS-only daemon features.",render:()=>(0,yt.jsx)(U0,{cliVersion:"0.1.0",initialData:set,onSelect:ro})},{id:"dashboard/signed-out",title:"Dashboard / signed out",path:["TUI","Screens","Dashboard"],description:"Signed-out dashboard snapshot.",render:()=>(0,yt.jsx)(U0,{cliVersion:"0.1.0",initialData:aet,onSelect:ro})},{id:"sharing/initial",title:"Share flow / initial",path:["TUI","Screens","Sharing"],description:"All pipeline steps pending.",render:()=>(0,yt.jsx)(Nh,{title:"lore share-codex",subtitle:"sharing this Codex session",state:PM()})},{id:"sharing/uploading",title:"Share flow / uploading",path:["TUI","Screens","Sharing"],description:"Upload step active with a progress label.",render:()=>(0,yt.jsx)(Nh,{title:"lore share-codex",subtitle:"sharing this Codex session",state:QM({kind:"step",step:"resolving_session"},{kind:"step",step:"uploading",label:"42%"})})},{id:"sharing/parsing",title:"Share flow / parsing",path:["TUI","Screens","Sharing"],description:"Server-side parsing is active.",render:()=>(0,yt.jsx)(Nh,{title:"lore export",subtitle:"sharing your latest Claude Code session",state:QM({kind:"step",step:"resolving_session"},{kind:"step",step:"uploading"},{kind:"step",step:"parsing",label:"queued"})})},{id:"sharing/shared",title:"Share flow / shared",path:["TUI","Screens","Sharing"],description:"New share completed and copied to clipboard.",render:()=>(0,yt.jsx)(Nh,{title:"lore share-codex",state:QM({kind:"step",step:"resolving_session"},{kind:"step",step:"uploading"},{kind:"step",step:"parsing"},{kind:"step",step:"updating_visibility"},{kind:"step",step:"done"},{kind:"completed",url:"https://lore.link/thread/thr_01hx_story",reused:!1,visibility:"workspace",clipboardCopied:!0,sessionId:"thr_01hx_story"})})},{id:"sharing/already-shared",title:"Share flow / already shared",path:["TUI","Screens","Sharing"],description:"Deduped upload converges to an existing Lore thread.",render:()=>(0,yt.jsx)(Nh,{title:"lore share-cowork",state:QM({kind:"completed",url:"https://lore.link/thread/thr_01hx_story",reused:!0,visibility:"private",clipboardCopied:!1})})},{id:"sharing/error",title:"Share flow / error",path:["TUI","Screens","Sharing"],description:"Pipeline error callout.",render:()=>(0,yt.jsx)(Nh,{title:"lore export",state:QM({kind:"step",step:"resolving_session"},{kind:"step",step:"uploading"},{kind:"error",message:"presigned upload failed: HTTP 403"})})},{id:"daemon/run/enable-progress",title:"Daemon run / enable progress",path:["TUI","Screens","Daemon","Run"],description:"Enable command while launchd work is active.",render:()=>(0,yt.jsx)(L0,{mode:"enable",state:{phase:"in_progress"}})},{id:"daemon/run/enable-success",title:"Daemon run / enable success",path:["TUI","Screens","Daemon","Run"],description:"Enable success includes resolved paths.",render:()=>(0,yt.jsx)(L0,{mode:"enable",state:{phase:"finished",result:{plistPath:Yf.plist,binaryPath:Yf.binary,logFile:Yf.logFile}}})},{id:"daemon/run/disable-success",title:"Daemon run / disable success",path:["TUI","Screens","Daemon","Run"],description:"Disable success copy.",render:()=>(0,yt.jsx)(L0,{mode:"disable",state:{phase:"finished"}})},{id:"daemon/run/restart-success",title:"Daemon run / restart success",path:["TUI","Screens","Daemon","Run"],description:"Restart success copy.",render:()=>(0,yt.jsx)(L0,{mode:"restart",state:{phase:"finished"}})},{id:"daemon/run/error",title:"Daemon run / error",path:["TUI","Screens","Daemon","Run"],description:"Mode-independent daemon command error.",render:()=>(0,yt.jsx)(L0,{mode:"restart",state:{phase:"errored",errorMessage:"launchctl bootstrap failed"}})},{id:"daemon/status/healthy",title:"Daemon status / healthy",path:["TUI","Screens","Daemon","Status"],description:"Healthy daemon report.",render:()=>(0,yt.jsx)(NM,{report:p1})},{id:"daemon/status/unhealthy",title:"Daemon status / unhealthy",path:["TUI","Screens","Daemon","Status"],description:"Unhealthy report with warning and last error.",render:()=>(0,yt.jsx)(NM,{report:ret})},{id:"components/primitives/header",title:"Components / header",path:["TUI","Components","Primitives"],description:"Top-level title row with optional subtitle and right cell.",render:()=>(0,yt.jsx)(Ps,{title:"lore",subtitle:"component primitive",right:"v0.1.0"})},{id:"components/primitives/panel",title:"Components / panel",path:["TUI","Components","Primitives"],description:"Bordered container with title, subtitle, and focus styling.",render:()=>(0,yt.jsx)(Qn,{title:"Panel",subtitle:"focused",focused:!0,children:(0,yt.jsx)(he,{color:Re.muted,children:"Panels compose screen sections and callouts."})})},{id:"components/primitives/status-line",title:"Components / status line",path:["TUI","Components","Primitives"],description:"Key/value rows with severity dots.",render:()=>(0,yt.jsxs)(Qn,{title:"StatusLine",children:[(0,yt.jsx)(an,{label:"Healthy",value:"yes",kind:"success"}),(0,yt.jsx)(an,{label:"Warning",value:"needs attention",kind:"warning"}),(0,yt.jsx)(an,{label:"Error",value:"launchctl failed",kind:"error"})]})},{id:"components/primitives/progress-bar",title:"Components / progress bar",path:["TUI","Components","Primitives"],description:"Plain unicode progress bar for deterministic terminal rendering.",render:()=>(0,yt.jsx)(Qn,{title:"ProgressBar",children:(0,yt.jsx)(XXe,{value:.62,label:"62%"})})},{id:"components/primitives/message-box",title:"Components / message box",path:["TUI","Components","Primitives"],description:"Severity callout for success, info, warning, and error copy.",render:()=>(0,yt.jsxs)(Ee,{flexDirection:"column",children:[(0,yt.jsx)(Ms,{kind:"success",title:"Shared",children:(0,yt.jsx)(he,{children:"Copied the Lore URL to your clipboard."})}),(0,yt.jsx)(Ee,{marginTop:1,children:(0,yt.jsx)(Ms,{kind:"error",title:"Failed",children:(0,yt.jsx)(he,{color:Re.muted,children:"presigned upload failed: HTTP 403"})})})]})},{id:"components/primitives/spinner",title:"Components / spinner",path:["TUI","Components","Primitives"],description:"Unrefed animated spinner primitive.",render:()=>(0,yt.jsx)(Qn,{title:"Spinner",children:(0,yt.jsx)(za,{label:"working on a terminal-friendly task\u2026"})})},{id:"components/inputs/menu",title:"Components / menu",path:["TUI","Components","Inputs"],description:"Keyboard menu with enabled and disabled items.",render:()=>(0,yt.jsx)(Qn,{title:"Menu",subtitle:"\u2191/\u2193 or j/k \xB7 Enter to choose",children:(0,yt.jsx)(l1,{items:[{id:"share",label:"Share",description:"upload a session"},{id:"status",label:"Status",description:"inspect daemon"},{id:"disabled",label:"Disabled",description:"not available in this state",disabled:!0}],onSelect:ro})})},{id:"components/inputs/checkbox-list",title:"Components / checkbox list",path:["TUI","Components","Inputs"],description:"Multi-select list with an action row.",render:()=>(0,yt.jsx)(Qn,{title:"CheckboxList",subtitle:"space to toggle \xB7 enter to save",children:(0,yt.jsx)($P,{items:[{id:"repo",label:"/Users/alex/code/tanagram-lore",initialChecked:!0},{id:"demo",label:"/Users/alex/code/customer-demo"},{id:"add",label:"+ Add a custom path\u2026",action:!0}],onSubmit:ro,onAction:ro})})},{id:"components/inputs/text-input",title:"Components / text input",path:["TUI","Components","Inputs"],description:"Single-line input with cursor rendering.",render:()=>(0,yt.jsx)(Qn,{title:"TextInput",children:(0,yt.jsx)(g$,{initialValue:"~/code",onSubmit:ro,onCancel:ro})})},{id:"components/inputs/path-picker",title:"Components / path picker",path:["TUI","Components","Inputs"],description:"Directory picker with deterministic story suggestions.",render:()=>(0,yt.jsx)(Qn,{title:"PathPicker",subtitle:"suggestions are fixture-backed",children:(0,yt.jsx)(h$,{initialValue:"/Users/alex/code",loadSuggestions:async()=>uet,onSubmit:ro,onCancel:ro})})}];function cet(e){return LA.find(t=>t.id===e)}function f1(e){return e.path.slice(1).join(" / ")}var Fr=ue(jt(),1);function pet({initialStoryId:e}){let t=Math.max(0,LA.findIndex(f=>f.id===e)),[n,r]=(0,FM.useState)(t),[o,i]=(0,FM.useState)("sidebar"),s=(0,FM.useRef)(o);s.current=o;let{exit:u}=ws();xu((f,h)=>{if(h.ctrl&&f==="c"){u();return}if(s.current==="sidebar"&&f==="q"){u();return}if(h.escape){if(s.current==="preview"){s.current="sidebar",i("sidebar");return}u();return}if(s.current==="preview"&&h.tab&&h.shift){s.current="sidebar",i("sidebar");return}if(s.current==="sidebar"&&h.tab&&!h.shift){s.current="preview",i("preview");return}if(s.current==="sidebar"){if(h.upArrow||f==="k"){r(_=>det(_-1));return}(h.downArrow||f==="j")&&r(_=>det(_+1))}});let l=LA[n]??LA[0];return(0,Fr.jsxs)(Ee,{flexDirection:"column",paddingX:1,paddingY:1,children:[(0,Fr.jsx)(Ps,{title:"lore TUI stories",subtitle:"terminal story runner",right:`${n+1}/${LA.length}`}),(0,Fr.jsx)(Ee,{marginBottom:1,children:(0,Fr.jsx)(he,{color:Re.muted,children:"\u2191/\u2193 or j/k select stories \xB7 Tab focuses preview \xB7 Shift+Tab/Esc returns \xB7 q exits from sidebar"})}),(0,Fr.jsxs)(Ee,{flexDirection:"row",gap:2,children:[(0,Fr.jsx)(Ee,{width:36,flexShrink:0,children:(0,Fr.jsx)(Qn,{title:"Stories",subtitle:o==="sidebar"?"focused":void 0,focused:o==="sidebar",children:(0,Fr.jsx)(Nen,{stories:LA,selectedIndex:n,focused:o==="sidebar"})})}),(0,Fr.jsx)(Ee,{flexDirection:"column",flexGrow:1,flexShrink:1,children:(0,Fr.jsx)(Qn,{title:l.title,focused:o==="preview",subtitle:o==="preview"?`${f1(l)} \xB7 focused`:f1(l),children:(0,Fr.jsxs)(Ee,{flexDirection:"column",children:[(0,Fr.jsx)(he,{color:Re.muted,children:l.description}),o==="sidebar"?(0,Fr.jsxs)(he,{color:Re.muted,children:["Press ",(0,Fr.jsx)(he,{bold:!0,children:"Tab"})," to interact with this preview."]}):null,(0,Fr.jsx)(Ee,{marginTop:1,children:l.render()})]})})})]})]})}function Nen({stories:e,selectedIndex:t,focused:n}){let r=[],o=[];return e.forEach((i,s)=>{let u=i.path.slice(1),l=Pen(o,u);for(let f=l;f<u.length;f++)r.push((0,Fr.jsx)(Ben,{label:u[f]??"",level:f,marginTop:ken(u[f]??"",f,l),focused:n},`group:${u.slice(0,f+1).join("/")}`));r.push((0,Fr.jsx)(wen,{story:i,selected:s===t,focused:n},i.id)),o=u}),(0,Fr.jsx)(Ee,{flexDirection:"column",children:r})}function Ben({label:e,level:t,marginTop:n,focused:r}){return(0,Fr.jsx)(Ee,{marginLeft:fet(t),marginTop:n,children:(0,Fr.jsx)(he,{color:r?Re.primary:Re.muted,bold:r,wrap:"truncate-end",children:e})})}function wen({story:e,selected:t,focused:n}){let r=n?t?Re.accent:Re.highlight:Re.muted;return(0,Fr.jsxs)(Ee,{marginLeft:fet(e.path.slice(1).length),children:[(0,Fr.jsx)(he,{color:n&&t?Re.accent:Re.muted,children:t?"\u203A ":" "}),(0,Fr.jsx)(he,{color:r,bold:n&&t,wrap:"truncate-end",children:Oen(e)})]})}function Oen(e){let t=e.title.split(" / ");return t.length>1?t.slice(1).join(" / "):e.path.at(-1)===e.title?"Default":e.title}function fet(e){return Math.min(e,4)}function ken(e,t,n){return t===0?e==="Components"?1:0:t===1&&t===n?1:0}function Pen(e,t){let n=Math.min(e.length,t.length);for(let r=0;r<n;r++)if(e[r]!==t[r])return r;return n}function det(e){let t=LA.length;return(e%t+t)%t}function met({story:e}){let{exit:t}=ws();return xu((n,r)=>{(r.ctrl&&n==="c"||r.escape)&&t()}),(0,Fr.jsxs)(Ee,{flexDirection:"column",paddingX:1,paddingY:1,children:[(0,Fr.jsx)(Ps,{title:e.title,subtitle:f1(e),right:"Esc to exit"}),(0,Fr.jsx)(Ee,{marginBottom:1,children:(0,Fr.jsx)(he,{color:Re.muted,children:e.description})}),e.render()]})}var ofe=ue(jt(),1),Aet={meta:{name:"tui:stories",description:"Open the terminal story runner for Ink TUI screens.",hidden:!0,skipAutoupdate:!0},args:{story:{type:"string",description:"Open a specific story id."},list:{type:"boolean",description:"Print story ids instead of opening the runner."}},async run({args:e}){if(e.list||!process.stdin.isTTY||!process.stdout.isTTY){Men();return}if(typeof e.story=="string"&&e.story.trim().length>0){let n=cet(e.story.trim());if(!n){console.error(`Unknown TUI story: ${e.story}`),console.error("Run `lore tui:stories --list` to see available ids."),process.exitCode=1;return}await sl((0,ofe.jsx)(met,{story:n})).waitUntilExit();return}await sl((0,ofe.jsx)(pet,{})).waitUntilExit()}};function Men(){for(let e of LA)console.log(`${e.id} ${f1(e)} ${e.title}`)}m();Bn();s0();m();await Ao();var J9=ue(dn(),1);await pb();var ife=ue(jt(),1);function Len({title:e,subtitle:t,perform:n,onResolve:r,onReject:o}){let[i,s]=(0,J9.useState)(PM),{exit:u}=ws();return(0,J9.useEffect)(()=>{let l=!1,f=h=>{l||s(_=>K9(_,h))};return(async()=>{try{let h=await n(f);if(l)return;r(h),setTimeout(()=>u(),100)}catch(h){if(f({kind:"error",message:h instanceof Error?h.message:String(h)}),l)return;o(h),setTimeout(()=>u(h instanceof Error?h:new Error(String(h))),100)}})(),()=>{l=!0}},[]),(0,ife.jsx)(Nh,{title:e,subtitle:t,state:i})}async function m1(e){let t,n,r=!1;if(await sl((0,ife.jsx)(Len,{title:e.title,subtitle:e.subtitle,perform:e.perform,onResolve:i=>{t=i,r=!0},onReject:i=>{n=i}})).waitUntilExit(),!r)throw n instanceof Error?n:new Error(String(n??"share flow failed"));return t}m();WR();Pr();import stn from"node:os";import ket from"node:path";m();import{spawn as Uen}from"node:child_process";import Qen from"node:os";async function get(e,t={}){let n=t.timeoutMs??2e3,r=Fen();for(let o of r)if(await Gen(o,e,n))return!0;return!1}function Fen(){switch(Qen.platform()){case"darwin":return[{name:"pbcopy",args:[]}];case"linux":return[{name:"wl-copy",args:[]},{name:"xclip",args:["-selection","clipboard"]},{name:"xsel",args:["--clipboard","--input"]}];case"win32":return[{name:"clip.exe",args:[]}];default:return[]}}async function Gen(e,t,n){return new Promise(r=>{let o;try{o=Uen(e.name,e.args,{stdio:["pipe","ignore","ignore"]})}catch{r(!1);return}let i=!1,s=l=>{i||(i=!0,r(l))},u=setTimeout(()=>{o.kill("SIGKILL"),s(!1)},n);o.on("error",()=>{clearTimeout(u),s(!1)}),o.on("close",l=>{clearTimeout(u),s(l===0)}),o.stdin?.on("error",()=>{}),o.stdin?.end(t)})}on();Bn();FP();m();import dl from"node:fs/promises";import vet from"node:os";import fs from"node:path";m();m();import jen from"node:os";import het from"node:path";function _et(e){return e.replace(/[^A-Za-z0-9_-]/g,"-")}function Eet(e=jen.homedir(),t=process.env.CLAUDE_CONFIG_DIR){let n=t?.trim();return n?het.join(n,"projects"):het.join(e,".claude","projects")}m();import ll from"node:fs";import zen from"node:os";import vb from"node:path";var sfe="local-agent-mode-sessions",afe=["audit.jsonl","transcript.jsonl"];function yet(e=zen.homedir()){return vb.join(e,"Library","Application Support","Claude",sfe)}function Tet(e){if(!ll.existsSync(e))return[];let t=[];for(let n of ll.readdirSync(e,{withFileTypes:!0})){if(!n.isDirectory())continue;let r=vb.join(e,n.name);for(let o of ll.readdirSync(r,{withFileTypes:!0})){if(!o.isDirectory())continue;let i=vb.join(r,o.name);for(let s of ll.readdirSync(i,{withFileTypes:!0})){if(!s.isDirectory()||!s.name.startsWith("local_"))continue;let u=s.name.replace(/^local_/,"");if(!u)continue;let l=vb.join(i,s.name),f=W9(l),h=f?ll.statSync(f):ll.statSync(l);t.push({accountId:n.name,orgId:o.name,sessionId:u,sessionDir:i,localDir:l,mtimeMs:h.mtimeMs})}}}return t.sort((n,r)=>r.mtimeMs-n.mtimeMs),t}function Z9(e){if(!ll.existsSync(e))return null;let t=null;for(let n of ll.readdirSync(e,{withFileTypes:!0})){if(!n.isDirectory()||!n.name.startsWith("local_"))continue;let r=vb.join(e,n.name),o=W9(r),i=o!==null,s=o?ll.statSync(o).mtimeMs:ll.statSync(r).mtimeMs;(t===null||i&&!t.hasTranscript||i===t.hasTranscript&&s>t.mtimeMs)&&(t={dir:r,mtimeMs:s,hasTranscript:i})}return t?.dir??null}function W9(e){for(let t of afe){let n=vb.join(e,t);if(ll.existsSync(n)&&ll.statSync(n).isFile())return n}return null}function ufe(e,t){let n=vb.join(e,t);return ll.existsSync(n)?ll.readdirSync(n,{withFileTypes:!0}).filter(r=>r.isFile()&&!r.name.startsWith(".")).map(r=>r.name).sort((r,o)=>r.localeCompare(o)):[]}on();l$();Bn();Ga();Th();m();on();import{createReadStream as Hen}from"node:fs";import $en from"node:fs/promises";import{createInterface as qen}from"node:readline";var Ven=50;async function bet(e,t={}){let n=t.maxLines??Ven;try{await $en.stat(e)}catch(o){if(kr(o,"ENOENT"))return null;throw o}let r=Hen(e,{encoding:"utf8"});return await new Promise((o,i)=>{let s=!1,u=0,l=_=>{s||(s=!0,f.close(),r.destroy(),o(_))},f=qen({input:r,crlfDelay:Number.POSITIVE_INFINITY});f.on("line",_=>{if(s)return;let y=_.trim();if(y){u+=1;try{let T=JSON.parse(y);if(typeof T=="object"&&T!==null&&"cwd"in T&&typeof T.cwd=="string"){let v=T.cwd.trim();if(v){l(v);return}}}catch{}u>=n&&l(null)}}),f.on("close",()=>l(null));let h=_=>{if(!s){if(s=!0,kr(_,"ENOENT")){o(null);return}i(_)}};f.on("error",h),r.on("error",h)})}var Yen=3600*1e3,Ken=336*60*60*1e3,X9=Symbol("missingSessionID"),Ret={name:"claudeCode",historyFilePath:eq,readUnuploadedEntries:xet,collectLocalFiles:Wen,buildPendingTranscriptWatches:Xen};async function xet(e){let t=eq(),n=Date.now()-Ken,r;try{r=await dl.readdir(t,{withFileTypes:!0})}catch(i){if(kr(i,"ENOENT"))return[];throw new Error(`readdir ${t}: ${String(i)}`)}let o=[];for(let i of r){if(!i.isDirectory())continue;let s=fs.join(t,i.name),u;try{u=await dl.readdir(s,{withFileTypes:!0})}catch{continue}for(let l of u){if(!l.isFile()||!l.name.endsWith(".jsonl"))continue;let f=fs.join(s,l.name),h;try{h=await dl.stat(f)}catch{continue}!h.isFile()||h.mtimeMs<n||o.push({sessionId:l.name.slice(0,-6),project:"",timestamp:h.mtimeMs,resolvedTranscriptPath:f})}}return o.sort((i,s)=>i.timestamp-s.timestamp)}async function Det(){let e=new Map,t;try{t=await dl.readFile(S0(),"utf8")}catch{return e}for(let n of HP(t)){let r=n.sessionId?.trim(),o=n.project?.trim();r&&o&&!e.has(r)&&e.set(r,o)}return e}async function Net(e,t,n){let r=await bet(e);return r||((await n()).get(t)??null)}async function Jen(){let e=S0(),t;try{t=await dl.readFile(e,"utf8")}catch(n){if(kr(n,"ENOENT"))return[];throw n}return HP(t,e)}async function Bet(e){let t=await Jen(),n=e.sessionId.trim();if(n){for(let u=t.length-1;u>=0;u-=1){let l=t[u];if(l?.sessionId?.trim()===n)return l}let s=await Zen(n);if(s){let u=e.project.trim()||process.cwd();return{sessionId:n,project:u,timestamp:s.mtimeMs,resolvedTranscriptPath:s.fullPath}}throw new De(`no history entry or transcript file found for session-id "${n}" \u2014 check ~/.claude/history.jsonl and ~/.claude/projects/`)}let r=fs.normalize(e.project.trim());if(!r)throw new De("export requires either --session-id or a project path");let o=await PD(r),i=[...t].sort((s,u)=>u.timestamp-s.timestamp);for(let s of i){if(!s.sessionId?.trim())continue;let u=fs.normalize(s.project.trim());if(!u||u===".")continue;if(u===r)return s;if(!o)continue;let l=await PD(u);if(l&&l===o)return s}throw new De(`no history entry found for project "${r}" \u2014 pass --session-id to pick a specific session, or cd into the repo where the Claude Code session ran`)}async function Zen(e){let t=e.trim();if(!t)return null;let n=eq(),r;try{r=await dl.readdir(n,{withFileTypes:!0})}catch(o){if(kr(o,"ENOENT"))return null;throw new Error(`readdir ${n}: ${String(o)}`)}for(let o of r){if(!o.isDirectory())continue;let i=fs.join(n,o.name,`${t}.jsonl`);try{let s=await dl.stat(i);if(s.isFile())return{fullPath:i,mtimeMs:s.mtimeMs}}catch(s){if(!kr(s,"ENOENT")&&!kr(s,"ENOTDIR"))throw new Error(`stat ${i}: ${String(s)}`)}}return null}async function wet(e){let t=await cfe(e);if(t===X9)throw new Error("history entry is missing sessionId");return t}async function Wen(e,t={}){let n=[],r=new Array(e.length),o=new Set,i=new Set,s=new Set,u=[],l=null,f=async()=>(l??=await Det(),l);try{for(let h=0;h<e.length;h+=1){let _=e[h],y=await cfe(_);if(y===X9){let V=`__missing_session__:${_.project}:${_.timestamp}:${h}`;r[h]=V,o.add(V),s.add(V);continue}if(r[h]=y.key,s.has(y.key))continue;let T=await Hi(y.fullPath);if(!T.exists){o.add(y.key),s.add(y.key);continue}if(t.isUnchanged?.(y.key,T)){o.add(y.key),s.add(y.key);continue}if(t.isThrottled?.(y.key)){i.add(y.key),s.add(y.key);continue}let v=_.project.trim()||await Net(y.fullPath,_.sessionId??"",f);if(!v){$.info("upload_filter_session_excluded",{filename:y.relativeFilename,transcript_path:y.fullPath,cwd:"<unresolved>",reason:"no_resolvable_cwd"}),o.add(y.key),s.add(y.key);continue}let R=await vp(v),x=null,O=async()=>(x!==null||(x=await dl.readFile(y.fullPath,"utf8")),x),P=await bh(t.uploadFilterConfig??vA(),{cwd:v,repoOriginPath:R,transcriptPath:y.fullPath,readTranscript:O});if(!P.shouldUpload){$.info("upload_filter_session_excluded",{filename:y.relativeFilename,transcript_path:y.fullPath,cwd:v,repo_origin_path:R||"<none>",reason:P.reason}),o.add(y.key),s.add(y.key);continue}$.info("upload_filter_session_included",{filename:y.relativeFilename,transcript_path:y.fullPath,cwd:v,repo_origin_path:R||"<none>",reason:"matched"});let j;try{j=await fd(y.fullPath)}catch(V){if(kr(V,"ENOENT")){o.add(y.key),s.add(y.key);continue}throw new Error(`read session transcript ${y.fullPath}: ${String(V)}`)}u.push(j.tempPath),n.push({key:y.key,filename:y.relativeFilename,sourcePath:y.fullPath,repoOriginPath:R,tempPath:j.tempPath,md5:j.md5,fileType:"transcript",harness:"claudeCode",harnessInternalId:_.sessionId?.trim()??"",watchedState:T}),s.add(y.key);let G=await dl.readFile(j.tempPath,"utf8"),H=rtn(G);for(let V of H){let ae;try{ae=await otn(V)}catch{continue}let re=`${y.key}::plan:${ae}`;if(s.has(re))continue;let _e=await Hi(ae),Qe;try{Qe=await fd(ae)}catch(pt){if(kr(pt,"ENOENT"))continue;throw new Error(`read plan file ${ae}: ${String(pt)}`)}u.push(Qe.tempPath),n.push({key:re,filename:ae,sourcePath:ae,repoOriginPath:R,tempPath:Qe.tempPath,md5:Qe.md5,fileType:"plan",harness:"claudeCode",harnessInternalId:ae,watchedState:_e}),s.add(re)}}}catch(h){throw await Promise.all(u.map(_=>dl.rm(fs.dirname(_),{recursive:!0,force:!0}))),h}return{entries:e,localFiles:n,entryFileKeys:r,skippedFileKeys:o,deferredFileKeys:i}}async function Xen(e,t,n={}){let r=await xet(e),o=Date.now(),i=[],s=new Set,u=null,l=async()=>(u??=await Det(),u);for(let f of r){let h=await cfe(f);if(h===X9||s.has(h.fullPath))continue;s.add(h.fullPath);let _=await Hi(h.fullPath);if(!_.exists)continue;let y=f.project.trim()||await Net(h.fullPath,f.sessionId??"",l);if(!y)continue;let T=await vp(y),v=await bh(n.uploadFilterConfig??vA(),{cwd:y,repoOriginPath:T,transcriptPath:h.fullPath,readTranscript:()=>dl.readFile(h.fullPath,"utf8")},{ignoreSkillRules:!0});if(!v.shouldUpload){$.info("upload_filter_watch_excluded",{filename:h.relativeFilename,transcript_path:h.fullPath,cwd:y,repo_origin_path:T||"<none>",reason:v.reason});continue}i.push({sessionId:f.sessionId?.trim()??"",project:y,transcriptPath:h.fullPath,expiresAt:new Date(o+Yen),baseline:t.get(h.fullPath)??_})}return i.sort((f,h)=>f.transcriptPath.localeCompare(h.transcriptPath))}async function cfe(e){let t=e.sessionId?.trim();if(!t)return X9;let n=eq(),r=e.resolvedTranscriptPath?.trim();if(r){let s=fs.relative(n,r).split(fs.sep).join("/");return{fullPath:r,relativeFilename:s,key:s}}let o=await etn(e.project),i=null;for(let s of o){let u=ttn(s),l=fs.posix.join(u,`${t}.jsonl`),f=fs.join(n,...l.split("/")),h={fullPath:f,relativeFilename:l,key:l};i??=h;try{return await dl.stat(f),h}catch(_){if(!kr(_,"ENOENT"))throw new Error(`stat session transcript ${f}: ${String(_)}`)}}if(!i)throw new Error("history entry is missing project path");return i}async function etn(e){let t=fs.normalize(e.trim());if(!t||t===".")throw new Error("history entry is missing project path");let n=[t],r=await PD(t);if(!r||r===t)return n;for(let o=fs.dirname(t);o!==t&&(n.push(o),o!==r);)t=o,o=fs.dirname(o);return n}function ttn(e){let t=fs.normalize(e.trim());if(!t||t===".")throw new Error("history entry is missing project path");return _et(t)}function eq(){return Eet()}function ntn(){return fs.join(vet.homedir(),".claude","plans")}function rtn(e){let t=[],n=new Set;for(let r of e.split(`
696
696
  `)){let o=r.trim();if(!o)continue;let i;try{i=JSON.parse(o)}catch{break}if(i.type!=="assistant")continue;let s=i.message?.content;if(Array.isArray(s))for(let u of s){if(!Cet(u)||u.type!=="tool_use"||u.name!=="ExitPlanMode"||!Cet(u.input))continue;let l=u.input.planFilePath;if(typeof l!="string")continue;let f=l.trim();!f||n.has(f)||(t.push(f),n.add(f))}}return t}async function otn(e){let t=e.trim();if(!t)throw new Error("plan file path is empty");let n=ntn(),r=n;try{r=await dl.realpath(n)}catch{}if(t.startsWith("~/")&&(t=fs.join(vet.homedir(),t.slice(2))),!fs.isAbsolute(t))throw new Error(`plan file path must stay under ${n}`);if(t=fs.normalize(t),!Iet(t,n))throw new Error(`plan file path must stay under ${n}`);try{let o=await dl.realpath(t);if(!Iet(o,r))throw new Error(`plan file path must resolve under ${n}`)}catch(o){if(!kr(o,"ENOENT"))throw o}return t}function Iet(e,t){let n=fs.relative(t,e);return n===""||n!==".."&&!n.startsWith(`..${fs.sep}`)}function Cet(e){return e!==null&&typeof e=="object"}Th();m();var A1=()=>{};m();Bn();async function itn(e,t,n){let r=await e.resolveThreadShareHighlight({params:{id:t},body:{query:n}});if(r.status!==200)throw Np(`resolve share highlight for thread ${t}`,r.status,r.body);return{url:r.body.url,matched:r.body.matched,start_block_id:r.body.start_block_id,end_block_id:r.body.end_block_id}}async function tq(e,t,n){try{return await itn(e,t,n)}catch(r){return $.warn("share_highlight_resolution_failed",{thread_id:t,error:r instanceof Error?r.message:String(r)}),null}}m();on();function Oet(e){if(e instanceof $x)return"billing_required";if(e instanceof YP)return e.status>=500&&e.status<600?"server_5xx":e.status>=400&&e.status<500?"server_4xx":"s3_error";if(e instanceof De)return"validation_failed";if(e instanceof Error){let t=e.message.toLowerCase();if(t.includes("not logged in")||t.includes("unauthorized")||t.includes("unauthenticated")||t.includes("authentication failed")||t.includes("authentication required")||t.includes("auth required")||t.includes("bearer token"))return"auth_failed";if(t.includes("timed out waiting for thread")&&t.includes("parsing")||t.includes("parse timeout"))return"parsing_timeout";if(t.includes("parsing failed permanently"))return"parsing_failed";if(t.includes("econnrefused")||t.includes("econnreset")||t.includes("etimedout")||t.includes("enotfound")||t.includes("network"))return"network_failed"}return"unknown"}var atn=new Set(["private","workspace","public"]);function utn(e){let t=(e??"").trim();if(!t)return"";if(!atn.has(t))throw new De(`invalid --visibility "${e}": use one of private, workspace, public`);return t}async function lfe(e={}){let t=e.progress??A1,n=utn(e.visibility),r=(e.project??process.cwd()).trim()||process.cwd(),o=(e.sessionId??"").trim(),i="resolving_session",s=null;try{t({kind:"step",step:"resolving_session"});let u=await Bet({sessionId:o,project:r});i="auth",await ftn();let l=e.client??Gt();i="collecting_local_file",s=await ctn(u),t({kind:"step",step:"uploading",label:s.filename}),i="uploading";let f=await ltn(l,s);if(f.quarantined)return t({kind:"step",step:"done"}),{quarantined:!0,reason:f.reason,finding_count:f.findingCount,session_id:u.sessionId?.trim()??""};let{reused:h,thread:_}=f;$.info("export_upload_single_file_result",{filename:s.filename,reused:h,response:JSON.stringify(_)});let y=_?.id?.trim();if(!y)throw Wn().setContext("upload_single_file_response",{filename:s.filename,reused:h,response:_}),new Error(`upload session response missing thread id for ${s.filename}`);i="parsing",t({kind:"step",step:"parsing"}),await VD(l,y);let T=_?.visibility?.trim()??"",v=T;n&&n!==T&&(i="updating_visibility",t({kind:"step",step:"updating_visibility"}),v=await dtn(l,y,n));let R=ptn(y),x,O=e.highlight?.trim();if(O){i="resolving_highlight",t({kind:"step",step:"resolving_highlight"});let j=await tq(l,y,O);j&&(R=j.url,x={query:O,matched:j.matched,start_block_id:j.start_block_id,end_block_id:j.end_block_id})}let P=await get(R);return t({kind:"completed",url:R,reused:h,visibility:v,clipboardCopied:P,sessionId:u.sessionId?.trim()??""}),t({kind:"step",step:"done"}),Ch("lore.cli.thread_exported",{thread_id:y,harness:s.harness,visibility:v,reused:h}),{thread_id:y,url:R,session_id:u.sessionId?.trim()??"",project:u.project,reused:h,visibility:v,clipboard_copied:P,...x?{highlight:x}:{}}}catch(u){throw Ch("lore.cli.upload_failed",{error_category:Oet(u),error_message:ln(u),step:i}),u}finally{s&&await wp(s.tempPath)}}async function ctn(e){let t=await wet(e),n=await Hi(t.fullPath);if(!n.exists)throw new De(`session transcript not found at ${mtn(t.fullPath)} \u2014 the file may have been rotated or pruned`);let r=await vp(e.project),o=await fd(t.fullPath);return{key:t.key,filename:t.relativeFilename,sourcePath:t.fullPath,repoOriginPath:r,tempPath:o.tempPath,md5:o.md5,fileType:"transcript",harness:"claudeCode",harnessInternalId:e.sessionId?.trim()??"",watchedState:n}}async function ltn(e,t){let[n]=await MA(e,[t]);if(!n)throw new Error("upload session response missing thread file");if(n.status==="quarantined")return{quarantined:!0,reason:n.reason,findingCount:n.findingCount};if(n.status==="no_upload"){let r=n.error?.trim()?`: ${n.error.trim()}`:"";throw new De(`upload session for ${t.filename} returned no upload URL and no reusable thread${r}`)}return{quarantined:!1,reused:n.status==="deduped",thread:n.thread}}async function dtn(e,t,n){let r=await e.updateThread({params:{id:t},body:{visibility:n}});if(r.status!==200)throw Np(`set thread ${t} visibility`,r.status,r.body);return r.body.visibility}function ptn(e){return`${C0().replace(/\/+$/,"")}/thread/${e}`}async function ftn(){let e=await sn();if(!e)throw new De("not logged in \u2014 run 'lore login' first");return e}function mtn(e){let t=stn.homedir();if(!t)return e;let n=ket.relative(t,e);return!n||n.startsWith("..")?e:ket.join("~",n)}var Pet={meta:{name:"export",description:"Upload a single Claude Code session to Lore and print its URL"},args:{"session-id":{type:"string",description:"Claude Code session ID to export. Defaults to the most recent session for $PWD."},project:{type:"string",description:"Project path used to resolve a session when --session-id is not provided. Defaults to the current working directory."},visibility:{type:"string",description:"Set thread visibility: private, workspace, or public. Defaults to leaving the existing visibility untouched."},highlight:{type:"string",description:"Natural-language description of the block or block range to highlight in the returned /thread URL."}},async run({args:e,data:t}){$.info("command_start",{command:"export"});let n={sessionId:typeof e["session-id"]=="string"?e["session-id"]:void 0,project:typeof e.project=="string"?e.project:void 0,visibility:typeof e.visibility=="string"?e.visibility:void 0,highlight:typeof e.highlight=="string"?e.highlight:void 0,client:t?.client};if(vu()&&!t?.progress){let o=await m1({title:"lore export",subtitle:"uploading the most recent Claude Code session",perform:i=>lfe({...n,progress:i})});"quarantined"in o&&o.quarantined&&console.log(`
697
697
  Held locally \u2014 not uploaded. ${o.finding_count} finding(s); reason: ${o.reason}. See \`lore quarantine\`.`);return}let r=await lfe({...n,progress:t?.progress});console.log(JSON.stringify(r,null,2))}};m();m();i0();Pr();sc();on();Bn();Ga();LD();var Atn=5,gtn=1e3;async function Let(e={}){(e.environment??to())!=="dev"||!await htn({fetchFn:e.fetchFn})||await _tn({client:e.client})}async function htn(e={}){let t=process.env.LORE_DEV_CLI_USER_EMAIL?.trim();if(!t)return $.warn("dev_preflight_no_email",{hint:"set LORE_DEV_CLI_USER_EMAIL in .env.local (run `pnpm bootstrap`) to auto-authenticate the dev uploader"}),!1;let n=e.fetchFn??globalThis.fetch,r=e.attempts??Atn,o=e.retryDelayMs??gtn,i=`${cd()}/api/cli-auth/dev-token`;for(let s=1;s<=r;s+=1)try{let u=await n(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:t})});if(u.status===404){let f=await Met(u);return dh(),$.warn("dev_preflight_token_rejected",{status:u.status,email:t,detail:f,url:i}),!1}if(!u.ok){let f=await Met(u);return dh(),$.warn("dev_preflight_token_rejected",{status:u.status,email:t,detail:f}),!1}let l=await u.json();return l.access_token?(Sje(l.access_token),$.info("dev_preflight_token_minted",{email:t,expiresIn:l.expires_in}),!0):(dh(),$.warn("dev_preflight_token_malformed",{url:i}),!1)}catch(u){if(s===r)return dh(),$.warn("dev_preflight_token_unreachable",{url:i,error:ln(u)}),!1;await Etn(o)}return!1}async function _tn(e={}){await Ih();let t=await Ho();if(t.include.cwd.length>0||t.include.repo.length>0)return;let n=ji(process.env.LORE_DEV_UPLOAD_DIR?.trim()||process.cwd()),r=e.client??Gt();try{let o=await r.whoAmI({headers:{}});if(o.status!==200){$.warn("dev_preflight_whoami_failed",{status:o.status});return}}catch(o){$.warn("dev_preflight_whoami_error",{error:ln(o)});return}await pd({...t,include:{...t.include,cwd:Array.from(new Set([...t.include.cwd,n])).sort()}}),$.info("dev_preflight_upload_dir_seeded",{path:n})}async function Met(e){try{let t=await e.json(),n=t.message??t.error;return typeof n=="string"?n:`HTTP ${e.status}`}catch{return`HTTP ${e.status}`}}function Etn(e){return new Promise(t=>{setTimeout(t,e)})}m();t$();Pr();Bn();Ga();import{setTimeout as Yet}from"node:timers/promises";m();on();Bn();Ga();import{createReadStream as ytn}from"node:fs";import F0 from"node:fs/promises";import Stn from"node:os";import Kf from"node:path";import{createInterface as Ttn}from"node:readline";Th();var btn=3600*1e3,Qet={name:"codex",historyFilePath:dfe,readUnuploadedEntries:Fet,collectLocalFiles:Ctn,buildPendingTranscriptWatches:vtn};function dfe(){return process.env.LORE_CODEX_SESSIONS_DIR??Kf.join(Stn.homedir(),".codex","sessions")}async function Fet(e){let t=dfe(),n;try{n=await F0.readdir(t,{withFileTypes:!0})}catch(o){if(kr(o,"ENOENT"))return[];throw o}let r=[];for(let o of n){if(!o.isDirectory())continue;let i=Kf.join(t,o.name),s;try{s=await F0.readdir(i,{withFileTypes:!0})}catch{continue}for(let u of s){if(!u.isDirectory())continue;let l=Kf.join(i,u.name),f;try{f=await F0.readdir(l,{withFileTypes:!0})}catch{continue}for(let h of f){if(!h.isDirectory())continue;let _=Kf.join(l,h.name),y;try{y=await F0.readdir(_,{withFileTypes:!0})}catch{continue}for(let T of y){if(!T.isFile()||!T.name.startsWith("rollout-")||!T.name.endsWith(".jsonl"))continue;let v=Kf.join(_,T.name),R;try{R=await F0.stat(v)}catch{continue}if(R.mtimeMs<=e)continue;let x=await Itn(v);x!==null&&r.push({timestamp:R.mtimeMs,sessionId:x.id,project:x.cwd,transcriptPath:v})}}}}return r.sort((o,i)=>o.timestamp-i.timestamp)}async function Itn(e){let t,n=ytn(e,{encoding:"utf8"});try{t=await new Promise((u,l)=>{let f=Ttn({input:n,crlfDelay:Number.POSITIVE_INFINITY}),h=!1;f.on("line",_=>{if(h)return;let y=_.trim();y&&(h=!0,f.close(),n.destroy(),u(y))}),f.on("close",()=>{h||u("")}),f.on("error",l),n.on("error",l)})}finally{n.destroy()}if(!t)return $.warn("codex_rollout_skipped",{transcript_path:e,reason:"empty_first_line"}),null;let r;try{r=JSON.parse(t)}catch{return $.warn("codex_rollout_skipped",{transcript_path:e,reason:"unparseable_json"}),null}if(!Uet(r))return $.warn("codex_rollout_skipped",{transcript_path:e,reason:"not_session_meta"}),null;if(r.type!=="session_meta")return $.warn("codex_rollout_skipped",{transcript_path:e,reason:"not_session_meta"}),null;let o=r.payload;if(!Uet(o))return $.warn("codex_rollout_skipped",{transcript_path:e,reason:"missing_payload"}),null;let i=typeof o.id=="string"?o.id.trim():"",s=typeof o.cwd=="string"?o.cwd.trim():"";return!i||!s?($.warn("codex_rollout_skipped",{transcript_path:e,reason:"missing_id_or_cwd"}),null):{id:i,cwd:s}}async function Ctn(e,t={}){let n=dfe(),r=[],o=new Array(e.length),i=new Set,s=new Set,u=new Set,l=[];try{for(let f=0;f<e.length;f+=1){let h=e[f];if(!h)continue;let _=Kf.relative(n,h.transcriptPath).split(Kf.sep).join("/");if(o[f]=_,u.has(_))continue;let y=await Hi(h.transcriptPath);if(!y.exists){i.add(_),u.add(_);continue}if(t.isUnchanged?.(_,y)){i.add(_),u.add(_);continue}if(t.isThrottled?.(_)){s.add(_),u.add(_);continue}let T=await vp(h.project),v=()=>F0.readFile(h.transcriptPath,"utf8"),R=await bh(t.uploadFilterConfig??vA(),{cwd:h.project,repoOriginPath:T,transcriptPath:h.transcriptPath,readTranscript:v});if(!R.shouldUpload){$.info("upload_filter_session_excluded",{filename:Kf.basename(h.transcriptPath),transcript_path:h.transcriptPath,cwd:h.project,repo_origin_path:T||"<none>",reason:R.reason}),i.add(_),u.add(_);continue}$.info("upload_filter_session_included",{filename:Kf.basename(h.transcriptPath),transcript_path:h.transcriptPath,cwd:h.project,repo_origin_path:T||"<none>",reason:"matched"});let x;try{x=await fd(h.transcriptPath)}catch(O){if(kr(O,"ENOENT")){i.add(_),u.add(_);continue}throw new Error(`read codex rollout ${h.transcriptPath}: ${String(O)}`)}l.push(x.tempPath),r.push({key:_,filename:_,sourcePath:h.transcriptPath,repoOriginPath:T,tempPath:x.tempPath,md5:x.md5,fileType:"transcript",harness:"codex",harnessInternalId:h.sessionId,watchedState:y}),u.add(_)}}catch(f){throw await Promise.all(l.map(h=>F0.rm(Kf.dirname(h),{recursive:!0,force:!0}))),f}return{entries:e,localFiles:r,entryFileKeys:o,skippedFileKeys:i,deferredFileKeys:s}}async function vtn(e,t,n={}){let r=await Fet(e),o=Date.now(),i=[],s=new Set;for(let u of r){if(s.has(u.transcriptPath))continue;s.add(u.transcriptPath);let l=await Hi(u.transcriptPath);if(!l.exists)continue;let f=await vp(u.project),h=await bh(n.uploadFilterConfig??vA(),{cwd:u.project,repoOriginPath:f,transcriptPath:u.transcriptPath,readTranscript:()=>F0.readFile(u.transcriptPath,"utf8")},{ignoreSkillRules:!0});if(!h.shouldUpload){$.info("upload_filter_watch_excluded",{filename:Kf.basename(u.transcriptPath),transcript_path:u.transcriptPath,cwd:u.project,repo_origin_path:f||"<none>",reason:h.reason});continue}i.push({sessionId:u.sessionId,project:u.project,transcriptPath:u.transcriptPath,expiresAt:new Date(o+btn),baseline:t.get(u.transcriptPath)??l})}return i}function Uet(e){return e!==null&&typeof e=="object"}m();on();Bn();Ga();import ffe from"node:fs";import mfe from"node:fs/promises";import jM from"node:path";m();import Rtn from"node:fs";var xtn=Z9,pfe=W9;function Get(e){let t=xtn(e);if(!t)throw new Error(`Session ${e} has no local_* subdirectory \u2014 is this a Cowork session?`);let n=pfe(t);if(!n)throw new Error(`Session ${e} has no transcript file under ${t} (looked for ${afe.join(", ")})`);let r=Rtn.readFileSync(n,"utf8"),o=ufe(t,"uploads"),i=ufe(t,"outputs");return{transcriptPath:n,transcript:r,uploads:o,outputs:i}}m();import GM from"node:path";var nq=yet;function jet(e){let t=GM.resolve(e).split(GM.sep),n=t.lastIndexOf(sfe);if(n<0)return null;let r=t[n+1],o=t[n+2];if(!r||!o)return null;let i=t.slice(0,n+1).join(GM.sep),s=GM.join(i,r,o),l=t.slice(n+3).find(h=>h.startsWith("local_"))??GM.basename(Z9(s)??""),f=l.startsWith("local_")?l.replace(/^local_/,""):"";return{accountId:r,orgId:o,sessionId:f,sessionDir:s,sessionsRoot:i}}function g1(e){return Tet(e)}function zet(e){return g1(e)[0]??null}Th();var Dtn=3600*1e3,$et={name:"cowork",historyFilePath:qet,readUnuploadedEntries:Ntn,collectLocalFiles:Otn,buildPendingTranscriptWatches:ktn};function qet(){return process.env.LORE_COWORK_SESSIONS_DIR??nq()}async function Ntn(e){return Vet(e,{includeWatermark:!1})}async function Vet(e,t){let n=qet(),r=g1(n),o=[];for(let i of r){let s=i.localDir,u=pfe(s);if(!u)continue;let l=jM.basename(s),f=jM.join(i.sessionDir,`${l}.json`),h=Btn(f,i.sessionDir);if(h!==null){if(t.includeWatermark){if(h.lastActivityAt<e)continue}else if(h.lastActivityAt<=e)continue;o.push({timestamp:h.lastActivityAt,sessionId:h.sessionId,accountId:i.accountId,orgId:i.orgId,project:"",userSelectedFolders:h.userSelectedFolders,transcriptPath:u})}}return o.sort((i,s)=>i.timestamp-s.timestamp)}function Btn(e,t){let n;try{n=ffe.readFileSync(e,"utf8")}catch{return $.warn("cowork_manifest_missing",{session_dir:t,manifest_path:e}),null}let r;try{r=JSON.parse(n)}catch{return $.warn("cowork_manifest_unparseable",{session_dir:t,manifest_path:e}),null}if(!Ptn(r))return $.warn("cowork_manifest_not_object",{session_dir:t,manifest_path:e}),null;let o=typeof r.sessionId=="string"?r.sessionId.trim():"";if(!o)return $.warn("cowork_manifest_missing_session_id",{session_dir:t,manifest_path:e}),null;let i=typeof r.lastActivityAt=="number"?r.lastActivityAt:0,s=typeof r.cwd=="string"?r.cwd.trim():"",u=Array.isArray(r.userSelectedFolders)?r.userSelectedFolders.filter(l=>typeof l=="string"&&l.trim().length>0):[];return u.length===0&&$.info("cowork_no_user_folders",{session_dir:t,manifest_path:e,cwd:s||"<none>"}),{sessionId:o,cwd:s,userSelectedFolders:u,lastActivityAt:i}}function wtn(e){return{uploads:Het(e,"uploads"),outputs:Het(e,"outputs")}}function Het(e,t){let n=jM.join(e,t);return ffe.existsSync(n)?ffe.readdirSync(n,{withFileTypes:!0}).filter(r=>r.isFile()&&!r.name.startsWith(".")).map(r=>r.name).sort((r,o)=>r.localeCompare(o)):[]}async function Otn(e,t={}){let n=[],r=new Array(e.length),o=new Set,i=new Set,s=new Set,u=[],l=[...e];try{for(let f=0;f<e.length;f+=1){let h=e[f];if(!h)continue;let _=`${h.accountId}/${h.orgId}/${h.sessionId}/audit.jsonl`;if(r[f]=_,s.has(_))continue;let y=await Hi(h.transcriptPath);if(!y.exists){o.add(_),s.add(_);continue}if(t.isUnchanged?.(_,y)){o.add(_),s.add(_);continue}if(t.isThrottled?.(_)){i.add(_),s.add(_);continue}let T=()=>mfe.readFile(h.transcriptPath,"utf8"),v=null,R=null;for(let[j,G]of h.userSelectedFolders.entries()){let H=await vp(G),V=await bh(t.uploadFilterConfig??vA(),{cwd:G,repoOriginPath:H,transcriptPath:h.transcriptPath,readTranscript:T});if($.info("cowork_upload_filter_folder_evaluated",{session_id:h.sessionId,account_id:h.accountId,org_id:h.orgId,transcript_path:h.transcriptPath,folder_index:j,folder:G,repo_origin_path:H||"<none>",should_upload:V.shouldUpload,reason:V.shouldUpload?"matched":V.reason}),V.shouldUpload){v=G,R=H;break}}if(v===null){$.info("upload_filter_session_excluded",{filename:"audit.jsonl",transcript_path:h.transcriptPath,user_selected_folders:h.userSelectedFolders,reason:h.userSelectedFolders.length===0?"no_user_selected_folders":"no_matching_folder"}),o.add(_),s.add(_);continue}l[f]={...h,project:v},$.info("cowork_upload_filter_session_accepted",{session_id:h.sessionId,account_id:h.accountId,org_id:h.orgId,transcript_path:h.transcriptPath,matched_project:v,repo_origin_path:R||"<none>",user_selected_folders:h.userSelectedFolders}),$.info("upload_filter_session_included",{filename:"audit.jsonl",transcript_path:h.transcriptPath,session_id:h.sessionId,account_id:h.accountId,org_id:h.orgId,cwd:v,repo_origin_path:R||"<none>",reason:"matched"});let x;try{x=await fd(h.transcriptPath)}catch(j){if(kr(j,"ENOENT")){o.add(_),s.add(_);continue}throw new Error(`read cowork audit ${h.transcriptPath}: ${String(j)}`)}u.push(x.tempPath);let O=jM.dirname(h.transcriptPath),P=wtn(O);n.push({key:_,filename:_,sourcePath:h.transcriptPath,repoOriginPath:R??"",tempPath:x.tempPath,md5:x.md5,fileType:"transcript",harness:"cowork",harnessInternalId:h.sessionId,watchedState:y,artifactMetadata:P}),s.add(_)}}catch(f){throw await Promise.all(u.map(h=>mfe.rm(jM.dirname(h),{recursive:!0,force:!0}))),f}return{entries:l,localFiles:n,entryFileKeys:r,skippedFileKeys:o,deferredFileKeys:i}}async function ktn(e,t,n={}){let r=await Vet(e,{includeWatermark:!0}),o=Date.now(),i=[],s=new Set;for(let u of r){if(s.has(u.transcriptPath))continue;s.add(u.transcriptPath);let l=await Hi(u.transcriptPath);if(!l.exists)continue;let f=()=>mfe.readFile(u.transcriptPath,"utf8"),h=null,_=null;for(let[y,T]of u.userSelectedFolders.entries()){let v=await vp(T),R=await bh(n.uploadFilterConfig??vA(),{cwd:T,repoOriginPath:v,transcriptPath:u.transcriptPath,readTranscript:f},{ignoreSkillRules:!0});if($.info("cowork_upload_filter_watch_folder_evaluated",{session_id:u.sessionId,account_id:u.accountId,org_id:u.orgId,transcript_path:u.transcriptPath,folder_index:y,folder:T,repo_origin_path:v||"<none>",should_upload:R.shouldUpload,reason:R.shouldUpload?"matched":R.reason}),R.shouldUpload){h=T,_=v;break}}if(h===null){$.info("upload_filter_watch_excluded",{filename:"audit.jsonl",transcript_path:u.transcriptPath,user_selected_folders:u.userSelectedFolders,reason:u.userSelectedFolders.length===0?"no_user_selected_folders":"no_matching_folder"});continue}i.push({sessionId:u.sessionId,project:h,transcriptPath:u.transcriptPath,expiresAt:new Date(o+Dtn),baseline:t.get(u.transcriptPath)??l}),$.info("cowork_upload_filter_watch_accepted",{session_id:u.sessionId,account_id:u.accountId,org_id:u.orgId,transcript_path:u.transcriptPath,matched_project:h,repo_origin_path:_||"<none>",user_selected_folders:u.userSelectedFolders})}return i}function Ptn(e){return e!==null&&typeof e=="object"}kle();var Mtn=1e3,Ltn=250,Utn=2,Qtn=5e3,gfe=[Ret,Qet,$et],h1=class extends Error{constructor(){super("lore is logged out")}};function Ftn(e){return e.adapters!==void 0?e.adapters:e.adapter!==void 0?[e.adapter]:gfe}async function Jet(e={}){return(await hfe(e)).threadIDs}async function hfe(e={}){G0(e.signal);let t=await d$(),n=e.recorder??new UD,r=Ftn(e),o=e.client??Gt();$.info("run_upload_start",{adapters:r.map(h=>h.name),hasInjectedClient:!!e.client,hasInjectedRecorder:!!e.recorder}),await n.markRunning();let i=[],s=0,u=t,l=new Map,f=!1;try{let h=e.uploadFilterConfig??await Ho(),_=await Zet({syncState:t,adapters:r,client:o,recorder:n,uploadFilterConfig:h,parseTimeoutMs:e.parseTimeoutMs,uploadNetworkTimeoutMs:e.uploadNetworkTimeoutMs,adapterConcurrency:e.adapterConcurrency,minReuploadIntervalMs:e.minReuploadIntervalMs,now:e.now,signal:e.signal});i=_.threadIDs,s=_.deferredCount,u=_.syncState,l=_.watchBaselineOverrides,f=_.loggedOut,G0(e.signal),f||(await n.markSyncSuccess(i),i.length>0&&e.onUploadCompleted?.());let y=e.tailActiveSessions!==!1;if(!f&&y&&i.length>0){let T=await Gtn({syncState:u,baselineOverrides:l,adapters:r,client:o,recorder:n,uploadFilterConfig:h,parseTimeoutMs:e.parseTimeoutMs,uploadNetworkTimeoutMs:e.uploadNetworkTimeoutMs,adapterConcurrency:e.adapterConcurrency,signal:e.signal});i=[...i,...T.threadIDs],u=T.syncState,f=T.loggedOut,G0(e.signal)}return f?($.warn("run_upload_marking_logged_out",{threadIDs:i.length,adapters:r.map(T=>T.name)}),await n.markLoggedOut()):await n.markSuccess(i),{threadIDs:i,deferredCount:s}}catch(h){throw Wet(h)||await n.markError(h),h}}function Afe(e){if(e==="claudeCode"||e==="codex"||e==="cowork")return e;throw new Error(`runUpload: adapter.name "${e}" is not a known HarnessKey. Expected one of: claudeCode, codex, cowork. Custom adapters must use one of these names or the per-harness watermark cannot be persisted.`)}async function Zet(e){let t=[],n=0,r=e.syncState,o=new Map,i=await $tn(e.adapters,Htn(e.adapterConcurrency,e.adapters.length),async h=>{G0(e.signal);let _=Afe(h.name),y=f$(e.syncState,_),T=e.syncState.harnesses[_]?.cursors??{};try{let v=await jtn({...e,adapter:h,harnessKey:_,floor:y,cursors:T});return{adapter:h,harnessKey:_,uploadResult:v}}catch(v){return{adapter:h,harnessKey:_,error:v}}}),s=[],u=0,l,f;for(let h of i)if(G0(e.signal),!!h){if("error"in h){if(h.error instanceof h1){l=h.adapter.name;continue}if(Wet(h.error)){f??=h.error;continue}s.push(h.error),$.error("run_upload_adapter_failed",{adapter:h.adapter.name,error:h.error instanceof Error?h.error.message:String(h.error)});continue}u+=1,t=[...t,...h.uploadResult.threadIDs],n+=h.uploadResult.deferredCount;for(let[_,y]of h.uploadResult.cursorUpdates)r=PYe(r,h.harnessKey,_,y);r=MYe(r,h.harnessKey,Qtn),r=kYe(r,h.harnessKey,h.uploadResult.newFloor);for(let[_,y]of h.uploadResult.watchBaselineOverrides)o.set(_,y);await p$(r)}if(f)throw f;if(u===0&&s.length>0)throw s.length===1?s[0]:new AggregateError(s,"all upload adapters failed");return l?($.warn("run_upload_logged_out_short_circuit",{adapter:l,threadIDs:t.length}),{threadIDs:t,deferredCount:n,syncState:r,watchBaselineOverrides:o,loggedOut:!0}):{threadIDs:t,deferredCount:n,syncState:r,watchBaselineOverrides:o,loggedOut:!1}}async function Gtn(e){let t=new Map;for(let i of e.adapters){let s=i.historyFilePath();t.set(s,await Hi(s))}let n=[];for(let i of e.adapters){let s=Afe(i.name),u=await i.buildPendingTranscriptWatches(f$(e.syncState,s),e.baselineOverrides,{uploadFilterConfig:e.uploadFilterConfig});n=[...n,...u]}if(await e.recorder.setPendingWatchers(n),n.length===0)return await e.recorder.setPendingWatchers([]),{threadIDs:[],syncState:e.syncState,loggedOut:!1};let r=[],o=e.syncState;try{for(;;){await Yet(Mtn,void 0,{signal:e.signal}),G0(e.signal),await e.recorder.heartbeat();let i=new Date,s=!1;for(let l of e.adapters){let f=l.historyFilePath(),h=t.get(f),_=await Hi(f);h!==void 0&&D9(h,_)&&(s=!0),t.set(f,_)}if(s||(s=await qtn(n)),!s){let l=Vtn(n,i);if(n=l.watchers,l.changed&&await e.recorder.setPendingWatchers(n),n.length===0)return{threadIDs:r,syncState:o,loggedOut:!1};continue}await Yet(Ltn,void 0,{signal:e.signal});let u=await Zet({syncState:o,adapters:e.adapters,client:e.client,recorder:e.recorder,uploadFilterConfig:e.uploadFilterConfig,parseTimeoutMs:e.parseTimeoutMs,uploadNetworkTimeoutMs:e.uploadNetworkTimeoutMs,adapterConcurrency:e.adapterConcurrency,signal:e.signal});if(o=u.syncState,u.loggedOut)return{threadIDs:r,syncState:o,loggedOut:!0};if(r.push(...u.threadIDs),await e.recorder.markSyncSuccess(u.threadIDs),u.threadIDs.length===0)return{threadIDs:r,syncState:o,loggedOut:!1};for(let l of e.adapters){let f=l.historyFilePath();t.set(f,await Hi(f))}n=[];for(let l of e.adapters){let f=Afe(l.name),h=await l.buildPendingTranscriptWatches(f$(o,f),u.watchBaselineOverrides,{uploadFilterConfig:e.uploadFilterConfig});n=[...n,...h]}if(await e.recorder.setPendingWatchers(n),n.length===0)return{threadIDs:r,syncState:o,loggedOut:!1}}}finally{await e.recorder.setPendingWatchers([])}}async function jtn(e){let t=new Map,n=(_,y)=>{let T=e.cursors[_];return T===void 0?!1:!D9({exists:!0,size:T.sizeBytes,modTimeUnixMs:T.modTimeUnixMs},y)},r=e.minReuploadIntervalMs??0,o=e.now??Date.now,i=o(),s=_=>{if(r<=0)return!1;let y=e.cursors[_];return y===void 0?!1:i-y.lastUploadedAtMs<r};G0(e.signal);let u=await e.adapter.readUnuploadedEntries(e.floor);if($.info("run_upload_adapter_entries_read",{adapter:e.adapter.name,entryCount:u.length,floor:e.floor}),u.length===0)return{threadIDs:[],cursorUpdates:t,newFloor:e.floor,watchBaselineOverrides:new Map,deferredCount:0};if(!await sn())throw $.warn("run_upload_no_access_token_for_entries",{adapter:e.adapter.name,entryCount:u.length,floor:e.floor}),new h1;$.info("run_upload_access_token_available",{adapter:e.adapter.name,entryCount:u.length}),await e.recorder.markAuthenticated();let f=await e.adapter.collectLocalFiles(u,{uploadFilterConfig:e.uploadFilterConfig,isUnchanged:n,isThrottled:s}),h=f.deferredFileKeys?.size??0;try{if(f.localFiles.length===0){let O=Ket(e.floor,f.entries,f.entryFileKeys,f.skippedFileKeys);return{threadIDs:[],cursorUpdates:t,newFloor:O,watchBaselineOverrides:new Map,deferredCount:h}}let _=await MA(e.client,f.localFiles,{networkTimeoutMs:e.uploadNetworkTimeoutMs}),y=[],T=new Map,v=new Set(f.skippedFileKeys),R=O=>{t.set(O.key,{sizeBytes:O.watchedState.size,modTimeUnixMs:O.watchedState.modTimeUnixMs,md5:O.md5,lastUploadedAtMs:o()})};for(let O of _){let{localFile:P}=O;if(O.status==="quarantined"){$.info("run_upload_quarantine",{filename:P.filename,reason:O.reason,findings:O.findingCount}),v.add(P.key);continue}if(O.status!=="uploaded"){let G=(O.status==="no_upload"?O.error?.trim():"")||`upload session response missing presigned_url for ${P.filename}`;$.info("run_upload_skip",{filename:P.filename,reason:G}),v.add(P.key),R(P);continue}await e.recorder.heartbeat(),G0(e.signal);let j=O.thread?.id?.trim()??"";if(!j){if(P.fileType==="plan"){v.add(P.key),R(P);continue}throw new Error(`complete upload session response missing thread for ${P.filename}`)}y.push(j);try{await ztn(e.client,j,e.recorder,{timeoutMs:e.parseTimeoutMs,signal:e.signal})}catch(G){if(G instanceof Error&&(G.message.includes("timed out waiting for thread")||G.message.includes("parsing failed permanently")||G.message.includes("unexpected transcript parsing state")))$.warn("parse_wait_soft_failure",{threadID:j,filename:P.filename,message:G.message});else throw G}v.add(P.key),R(P),P.sourcePath&&T.set(P.sourcePath,P.watchedState)}let x=Ket(e.floor,f.entries,f.entryFileKeys,v);return{threadIDs:y,cursorUpdates:t,newFloor:x,watchBaselineOverrides:T,deferredCount:h}}finally{await Promise.all(f.localFiles.map(_=>wp(_.tempPath)))}}async function ztn(e,t,n,r={}){let o={...r,onPoll:()=>n.heartbeat()};await VD(e,t,o)}function G0(e){if(e?.aborted)throw new DOMException("The operation was aborted","AbortError")}function Wet(e){return e instanceof Error&&e.name==="AbortError"}function Htn(e,t){return t<=0?1:e===void 0?Math.min(Utn,t):!Number.isFinite(e)||e<1?1:Math.min(Math.floor(e),t)}async function $tn(e,t,n){let r=new Array(e.length),o=0,i=Math.min(t,e.length),s=Array.from({length:i},async()=>{for(;;){let u=o;if(o+=1,u>=e.length)return;let l=e[u];if(l===void 0)return;r[u]=await n(l)}});return await Promise.all(s),r}function Ket(e,t,n,r){let o=Number.POSITIVE_INFINITY;for(let s=0;s<t.length;s+=1){let u=n[s];u&&r.has(u)||(o=Math.min(o,t[s]?.timestamp??o))}let i=e;for(let s=0;s<t.length;s+=1){let u=n[s];if(!u||!r.has(u))continue;let l=t[s]?.timestamp??i;l<o&&(i=Math.max(i,l))}return i}async function qtn(e){for(let t of e){let n=await Hi(t.transcriptPath);if(D9(t.baseline,n))return!0}return!1}function Vtn(e,t){let n=e.filter(r=>t<r.expiresAt);return{watchers:n,changed:n.length!==e.length}}m();t$();on();Bn();Mo();import Rb from"node:fs";import{watch as Ktn}from"node:fs/promises";import _fe from"node:path";import{setTimeout as oq}from"node:timers/promises";m();Pr();Bn();var Ytn=6e4,rq=class{client;now;minIntervalMs;lastBeatAt=Number.NEGATIVE_INFINITY;constructor(t={}){this.client=t.client??Gt(),this.now=t.now??Date.now,this.minIntervalMs=t.minIntervalMs??Ytn}async beat(){let t=this.now();t-this.lastBeatAt<this.minIntervalMs||(this.lastBeatAt=t,await this.post({}))}async uploadCompleted(){this.lastBeatAt=this.now(),await this.post({upload_completed:!0})}async post(t){try{await this.client.recordCliHeartbeat({body:t})}catch(n){$.warn("cli_heartbeat_failed",{error:n instanceof Error?n.message:String(n)})}}};var Jtn=2e3,Ztn=6e4,Wtn=5e3,Xtn=Xle*3,enn=5e3,tnn=5*6e4,nnn=.2,rnn=15e3;function onn(e){return Array.isArray(e)?{threadIDs:e,deferredCount:0}:e}var iq=class extends Error{constructor(t){super(t),this.name="SyncPassDeadlineError"}};function inn(e){return e.historyFilePath!==void 0?[e.historyFilePath]:e.watchPaths!==void 0?e.watchPaths:(e.uploadOptions?.adapters??gfe).map(n=>n.historyFilePath())}async function ett(e={}){let t=e.debounceMs??Jtn,n=e.pollIntervalMs,r=n??e.idlePollIntervalMs??Ztn,o=n??e.activePollIntervalMs??Wtn,i=e.syncDeadlineMs??Xtn,s=e.failureBackoffBaseMs??enn,u=e.failureBackoffMaxMs??tnn,l=e.failureBackoffJitterRatio??nnn,f=e.random??Math.random,h=inn(e),_=e.runUploadFn??hfe,y=e.uploadOptions?.minReuploadIntervalMs??e.minReuploadIntervalMs??rnn,T=e.uploadOptions?.recorder??new UD,v=e.heartbeatReporter??new rq,R={...e.uploadOptions,recorder:T,tailActiveSessions:!1,onUploadCompleted:()=>{v.uploadCompleted()},minReuploadIntervalMs:y},x=e.signal?void 0:new AbortController,O=e.signal??x.signal,P=()=>x?.abort();x&&(process.once("SIGINT",P),process.once("SIGTERM",P));let j=await ann(e.lockFilePath??uje());if(!j.acquired){x&&(process.removeListener("SIGINT",P),process.removeListener("SIGTERM",P)),$.info("watch_skip_already_running",{pid:j.pid});return}let G=j.release,H=!1,V=!1,ae=0,re=r,_e=async Tt=>{if(H){V=!0;return}H=!0;try{do{if(V=!1,O.aborted)break;if(ae>0){let ye=snn({consecutiveFailures:ae,baseMs:s,maxMs:u,jitterRatio:l,random:f});if($.warn("watch_sync_backoff",{reason:Tt,consecutiveFailures:ae,backoffMs:ye}),await oq(ye,void 0,{signal:O}).catch(()=>{}),O.aborted)break}try{let ye=new AbortController,Je=()=>ye.abort();O.addEventListener("abort",Je,{once:!0});let ot=`sync pass exceeded ${i}ms deadline`,ut,Lt=new Promise((be,mt)=>{ut=setTimeout(()=>{$.error("watch_sync_stuck",{reason:Tt,syncDeadlineMs:i}),T.markStuck(ot).catch(en=>$.warn("watch_mark_stuck_failed",{error:ln(en)})),ye.abort(),mt(new iq(ot))},i),ut.unref?.()}),Gr=_({...R,signal:ye.signal});try{let{threadIDs:be,deferredCount:mt}=onn(await Promise.race([Gr,Lt]));ae=0,re=be.length>0||mt>0?o:r,$.info("watch_sync_complete",{reason:Tt,uploaded:be.length,deferred:mt,nextPollIntervalMs:re})}finally{ut&&clearTimeout(ut),O.removeEventListener("abort",Je),await Gr.catch(()=>{})}}catch(ye){if(O.aborted&&ye?.name==="AbortError")break;ae+=1,!(ye instanceof iq)&&ye?.name!=="AbortError"&&await T.markDegraded(ye).catch(Je=>$.warn("watch_mark_degraded_failed",{error:ln(Je)})),$.error("watch_sync_failed",{reason:Tt,consecutiveFailures:ae,error:ln(ye)})}}while(V&&!O.aborted)}finally{H=!1}},Qe,pt=Tt=>{Qe&&clearTimeout(Qe),Qe=setTimeout(()=>{Qe=void 0,_e(Tt)},t),Qe.unref?.()};$.info("watch_start",{watchPaths:h,debounceMs:t,idlePollIntervalMs:r,activePollIntervalMs:o,syncDeadlineMs:i}),v.beat(),_e("startup");let Ge=async Tt=>{for(;!O.aborted;)try{let ye=Rb.existsSync(Tt)&&Rb.statSync(Tt).isDirectory(),Je=ye?Tt:_fe.dirname(Tt),ot=ye?void 0:_fe.basename(Tt),ut=e.watchEventSource?.({watchDir:Je,watchPath:Tt,recursive:ye,signal:O})??Ktn(Je,{signal:O,recursive:ye});for await(let Lt of ut){if(O.aborted)break;(ot===void 0||!Lt.filename||Lt.filename===ot)&&pt("fs-event")}}catch(ye){if(O.aborted||ye?.name==="AbortError")break;$.warn("watch_fs_retry",{path:Tt,error:ln(ye)}),await oq(r,void 0,{signal:O}).catch(()=>{})}},Pt=async()=>{for(;!O.aborted;){try{await oq(re,void 0,{signal:O})}catch{break}if(O.aborted)break;v.beat(),_e("poll")}};try{await Promise.all([...h.map(Ge),Pt()])}finally{for(Qe&&clearTimeout(Qe),x&&(process.removeListener("SIGINT",P),process.removeListener("SIGTERM",P));H;)await oq(50).catch(()=>{});await G(),$.info("watch_stop",{})}}function snn(e){let t=e.baseMs*2**Math.max(0,e.consecutiveFailures-1),n=Math.min(e.maxMs,t),r=n*e.jitterRatio,o=r===0?0:(e.random()*2-1)*r;return Math.max(0,Math.round(n+o))}async function ann(e){if($.info("upload_daemon_lock_check",{lockFilePath:e}),e===!1)return{acquired:!0,release:async()=>{}};for(await Rb.promises.mkdir(_fe.dirname(e),{recursive:!0,mode:448});;)try{let t=await Rb.promises.open(e,"wx",384);return await t.writeFile(JSON.stringify({pid:process.pid,started_at:new Date().toISOString()})),await t.close(),{acquired:!0,release:async()=>{(await Xet(e))?.pid===process.pid&&await Rb.promises.rm(e,{force:!0})}}}catch(t){if(!cnn(t))throw t;let n=await Xet(e);if(n?.pid&&unn(n.pid))return{acquired:!1,pid:n.pid};await Rb.promises.rm(e,{force:!0})}}async function Xet(e){try{let t=JSON.parse(await Rb.promises.readFile(e,"utf8"));return typeof t.pid=="number"?{pid:t.pid}:{}}catch{return}}function unn(e){try{return process.kill(e,0),!0}catch(t){return typeof t=="object"&&t!==null&&"code"in t&&t.code==="EPERM"}}function cnn(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="EEXIST"}var ttt={meta:{name:"_run_upload",hidden:!0,skipAutoupdate:!0},args:{watch:{type:"boolean",description:"Run continuously: watch the Claude history file and re-sync on every change. This is the launchd-free daemon `pnpm dev` runs locally.",default:!1}},async run({args:e,data:t}){let n={client:t?.client,...t?.adapters!==void 0?{adapters:t.adapters}:t?.adapter!==void 0?{adapter:t.adapter}:{},recorder:t?.recorder};if(e.watch){await Let(),await ett({uploadOptions:n});return}let r=await Jet(n);console.log(JSON.stringify(r))}};m();s0();m();Pr();import{spawn as lnn}from"node:child_process";import ntt from"node:path";async function Efe(e){let t=e.progress??A1;if(!await sn())throw new h1;t({kind:"step",step:"resolving_session"});let r=ntt.resolve(e.sessionFile),o=ntt.basename(r),i=e.harnessInternalId?.trim()||mnn(o)||o,s=await Hi(r);if(!s.exists)throw new Error(`session file does not exist: ${r}`);let u=await fd(r),l={key:o,filename:o,sourcePath:r,repoOriginPath:"",tempPath:u.tempPath,md5:u.md5,fileType:"transcript",harness:e.harness,harnessInternalId:i,watchedState:s},f=e.client??Gt();try{t({kind:"step",step:"uploading",label:o});let[h]=await MA(f,[l]);if(!h)throw new Error("create upload session returned no thread files");if(h.status==="quarantined")return t({kind:"step",step:"done"}),{quarantined:!0,reason:h.reason,finding_count:h.findingCount,session_id:i};if(h.status==="no_upload"){let V=h.error?.trim()??"upload session response missing presigned_url";throw new Error(`upload ${o} skipped: ${V}`)}let _=h.status==="deduped",y=h.thread,T=y?.id?.trim();if(!T)throw new Error("upload session did not return a thread id");t({kind:"step",step:"parsing"}),await VD(f,T);let v=y?.visibility?.trim()??"",R=v,x=e.visibility;x&&x!==v&&(t({kind:"step",step:"updating_visibility"}),R=await dnn(f,T,x));let O=`${C0().replace(/\/+$/,"")}/thread/${T}`,P,j=e.highlight?.trim();if(j){t({kind:"step",step:"resolving_highlight"});let V=await tq(f,T,j);V&&(O=V.url,P={query:j,matched:V.matched,start_block_id:V.start_block_id,end_block_id:V.end_block_id})}let G=await Ann(O),H=fnn(R)?R:"private";return t({kind:"completed",url:O,reused:_,visibility:H,clipboardCopied:G,sessionId:i}),t({kind:"step",step:"done"}),{thread_id:T,url:O,session_id:i,project:"",reused:_,visibility:H,clipboard_copied:G,...P?{highlight:P}:{}}}finally{await wp(u.tempPath)}}async function dnn(e,t,n){let r=await e.updateThread({params:{id:t},body:{visibility:n}});if(r.status!==200)throw Np(`update thread ${t} visibility`,r.status,r.body);return r.body.visibility}var pnn=new Set(["private","workspace","public"]);function fnn(e){return pnn.has(e)}function mnn(e){let n=e.replace(/\.jsonl$/i,"").split("-").filter(o=>o.length>0);if(n.length===0)return"";let r=n.slice(-5);return r.length===5&&r.every(o=>/^[0-9a-fA-F]+$/.test(o))?r.join("-"):n[n.length-1]??""}async function Ann(e){let t=process.platform==="darwin"?[{command:"pbcopy",args:[]}]:process.platform==="win32"?[{command:"clip.exe",args:[]}]:[{command:"wl-copy",args:[]},{command:"xclip",args:["-selection","clipboard"]},{command:"xsel",args:["--clipboard","--input"]}];for(let{command:n,args:r}of t)if(await gnn(n,r,e))return!0;return!1}function gnn(e,t,n){return new Promise(r=>{let o;try{o=lnn(e,t,{stdio:["pipe","ignore","ignore"]})}catch{r(!1);return}o.on("error",()=>r(!1)),o.on("exit",i=>r(i===0)),o.stdin?.on("error",()=>r(!1)),o.stdin?.end(n)})}var rtt=["private","workspace","public"],ott={meta:{name:"share-codex",description:"Upload a Codex session rollout (.jsonl) to Lore and print a shareable URL."},args:{"session-file":{type:"string",required:!0,description:"Absolute path to a Codex rollout file (e.g. ~/.codex/sessions/YYYY/MM/DD/rollout-...jsonl)"},visibility:{type:"string",required:!1,description:"After upload, set thread visibility to one of: private, workspace, public"},highlight:{type:"string",required:!1,description:"Natural-language description of the block or block range to highlight in the returned /thread URL."}},async run({args:e}){let t=e["session-file"];if(typeof t!="string"||t.trim()==="")throw new Error("--session-file is required");let n=hnn(e.visibility);if(vu()){let r=await m1({title:"lore share-codex",subtitle:"sharing this Codex session",perform:o=>Efe({sessionFile:t,harness:"codex",visibility:n,highlight:typeof e.highlight=="string"?e.highlight:void 0,progress:o})});"quarantined"in r&&r.quarantined&&console.log(`
698
698
  Held locally \u2014 not uploaded. ${r.finding_count} finding(s); reason: ${r.reason}. See \`lore quarantine\`.`)}else{let r=await Efe({sessionFile:t,harness:"codex",visibility:n,highlight:typeof e.highlight=="string"?e.highlight:void 0});console.log(JSON.stringify(r))}}};function hnn(e){if(!(e==null||e==="")){if(typeof e!="string")throw new Error("--visibility must be a string");if(!rtt.includes(e))throw new Error(`--visibility must be one of: ${rtt.join(", ")}`);return e}}m();Pr();Bn();s0();m();async function yfe(e,t,n={}){let r=n.progress??A1,{contents:o,accountId:i,orgId:s,sessionId:u}=t;r({kind:"step",step:"resolving_session",label:u});let l=await N9("audit.jsonl",o.transcript),f={key:u,filename:"audit.jsonl",sourcePath:o.transcriptPath,repoOriginPath:"",tempPath:l.tempPath,md5:l.md5,fileType:"transcript",harness:"cowork",harnessInternalId:u,watchedState:{exists:!0,size:0,modTimeUnixMs:0},artifactMetadata:{uploads:o.uploads,outputs:o.outputs}};try{r({kind:"step",step:"uploading"});let[h]=await MA(e,[f]);if(!h)throw new Error("createUploadSession returned no thread files");if(h.status==="quarantined")return{quarantined:!0,reason:h.reason,findingCount:h.findingCount};if(h.status==="no_upload")throw new Error(`createUploadSession returned no presigned_url and no existing thread: ${JSON.stringify(h)}`);let _=h.thread?.id;if(!_)throw new Error(`upload session did not return a thread id: ${JSON.stringify(h)}`);return{threadId:_,duplicate:h.status==="deduped"}}finally{await wp(l.tempPath)}}var itt={meta:{name:"share-cowork",description:"Share a Claude Cowork local-agent-mode session to Lore. Defaults to the current session when run from inside one (e.g. by the Cowork agent itself); otherwise shares the most recent local session."},args:{session:{type:"string",description:"Share a specific session by session-id (the bottom-level uuid)"},list:{type:"boolean",description:"List local Cowork sessions (newest first) and exit without sharing"}},async run({args:e,data:t}){$.info("command_start",{command:"share-cowork",list:!!e.list,session:e.session??null});let n=nq();if(e.list){let f=g1(n);if(f.length===0){console.error(`No Cowork sessions found under ${n}`);return}for(let h of f)console.log(Enn(h));return}let r=_nn(n,typeof e.session=="string"?e.session:void 0);if(!r)throw console.error(`No Cowork session found. Tried CWD walk-up and the most recent under